Merge remote-tracking branch 'origin/develop_master' into develop_master
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.controller;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--企业标准关联国内外标准信息")
|
||||
@RequestMapping("/${restPath}/lawss/SarBussStandAttrInfo")
|
||||
public class SarBussStandAttrInfoController extends BaseController<SarBussStandAttrInfo> {
|
||||
|
||||
@Autowired
|
||||
private ISarBussStandAttrInfoService sarBussStandAttrInfoEOService;
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:page")
|
||||
public ResponseMessage<PageInfo<SarBussStandAttrInfo>> page(SarBussStandAttrInfoEOPage page) throws Exception {
|
||||
List<SarBussStandAttrInfo> rows = sarBussStandAttrInfoEOService.queryByPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|查询")
|
||||
@GetMapping("")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:list")
|
||||
public ResponseMessage<List<SarBussStandAttrInfo>> list(SarBussStandAttrInfoEOPage page) throws Exception {
|
||||
return Result.success(sarBussStandAttrInfoEOService.queryByList(page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|新增")
|
||||
@PostMapping(consumes = "application/json;charset=UTF-8")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:save")
|
||||
public ResponseMessage<SarBussStandAttrInfo> create(@RequestBody SarBussStandAttrInfo sarBussStandAttrInfoEO) throws Exception {
|
||||
sarBussStandAttrInfoEOService.insertSelective(sarBussStandAttrInfoEO);
|
||||
return Result.success(sarBussStandAttrInfoEO);
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@Repository
|
||||
public interface SarBussStandAttrInfoDao extends BaseMapper<SarBussStandAttrInfo> {
|
||||
|
||||
List<SarBussStandAttrInfo> queryByList(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
List<SarBussStandAttrInfo> queryByPage(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
int insertSelective(SarBussStandAttrInfo sarBussStandAttrInfo);
|
||||
|
||||
Map<String, Object> selectStandFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
|
||||
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarBussStandAttrInfo对象", description="")
|
||||
public class SarBussStandAttrInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableField("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准基础表主键")
|
||||
@TableField("STAND_ID")
|
||||
private String standId;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
//
|
||||
// @TableField("SVPPS")
|
||||
// private String svpps;
|
||||
//
|
||||
// @TableField("GFXYYWJ")
|
||||
// private String gfxyywj;
|
||||
//
|
||||
// @TableField("ZRBM")
|
||||
// private String zrbm;
|
||||
//
|
||||
// @TableField("FZRQ")
|
||||
// private Date fzrq;
|
||||
//
|
||||
// @TableField("FSRQ")
|
||||
// private Date fsrq;
|
||||
//
|
||||
// @TableField("QBMJ")
|
||||
// private String qbmj;
|
||||
//
|
||||
// @TableField("QBSQ")
|
||||
// private String qbsq;
|
||||
//
|
||||
// @TableField("QBWB")
|
||||
// private String qbwb;
|
||||
//
|
||||
// @TableField("GCWB")
|
||||
// private String gcwb;
|
||||
//
|
||||
// @TableField("ZYQCR")
|
||||
// private String zyqcr;
|
||||
//
|
||||
// @TableField("QCFBW")
|
||||
// private String qcfbw;
|
||||
//
|
||||
// @TableField("XGLC")
|
||||
// private String xglc;
|
||||
//
|
||||
// @TableField("XGBM")
|
||||
// private String xgbm;
|
||||
//
|
||||
// @TableField("XHQBM")
|
||||
// private String xhqbm;
|
||||
//
|
||||
// @TableField("ZQCBM")
|
||||
// private String zqcbm;
|
||||
//
|
||||
// @TableField("QTQCR")
|
||||
// private String qtqcr;
|
||||
//
|
||||
// @TableField("WFSPJS")
|
||||
// private String wfspjs;
|
||||
//
|
||||
// @TableField("XGJH")
|
||||
// private String xgjh;
|
||||
|
||||
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_BUSS_STAND_ATTR_INFO SarBussStandAttrInfoEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-10-27 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class SarBussStandAttrInfoEOPage extends BasePage {
|
||||
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String standId;
|
||||
private String standIdOperator = "=";
|
||||
private String creationUser;
|
||||
private String creationUserOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
public String getStandId() {
|
||||
return this.standId;
|
||||
}
|
||||
|
||||
public void setStandId(String standId) {
|
||||
this.standId = standId;
|
||||
}
|
||||
|
||||
public String getStandIdOperator() {
|
||||
return this.standIdOperator;
|
||||
}
|
||||
|
||||
public void setStandIdOperator(String standIdOperator) {
|
||||
this.standIdOperator = standIdOperator;
|
||||
}
|
||||
|
||||
public String getCreationUser() {
|
||||
return this.creationUser;
|
||||
}
|
||||
|
||||
public void setCreationUser(String creationUser) {
|
||||
this.creationUser = creationUser;
|
||||
}
|
||||
|
||||
public String getCreationUserOperator() {
|
||||
return this.creationUserOperator;
|
||||
}
|
||||
|
||||
public void setCreationUserOperator(String creationUserOperator) {
|
||||
this.creationUserOperator = creationUserOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(String creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getCreationTime1() {
|
||||
return this.creationTime1;
|
||||
}
|
||||
|
||||
public void setCreationTime1(String creationTime1) {
|
||||
this.creationTime1 = creationTime1;
|
||||
}
|
||||
|
||||
public String getCreationTime2() {
|
||||
return this.creationTime2;
|
||||
}
|
||||
|
||||
public void setCreationTime2(String creationTime2) {
|
||||
this.creationTime2 = creationTime2;
|
||||
}
|
||||
|
||||
public String getCreationTimeOperator() {
|
||||
return this.creationTimeOperator;
|
||||
}
|
||||
|
||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
||||
this.creationTimeOperator = creationTimeOperator;
|
||||
}
|
||||
|
||||
public String getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(String modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getModifyTime1() {
|
||||
return this.modifyTime1;
|
||||
}
|
||||
|
||||
public void setModifyTime1(String modifyTime1) {
|
||||
this.modifyTime1 = modifyTime1;
|
||||
}
|
||||
|
||||
public String getModifyTime2() {
|
||||
return this.modifyTime2;
|
||||
}
|
||||
|
||||
public void setModifyTime2(String modifyTime2) {
|
||||
this.modifyTime2 = modifyTime2;
|
||||
}
|
||||
|
||||
public String getModifyTimeOperator() {
|
||||
return this.modifyTimeOperator;
|
||||
}
|
||||
|
||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
||||
this.modifyTimeOperator = modifyTimeOperator;
|
||||
}
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
public interface ISarBussStandAttrInfoService extends IService<SarBussStandAttrInfo> {
|
||||
|
||||
List<SarBussStandAttrInfo> queryByList(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
List<SarBussStandAttrInfo> queryByPage(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
int insertSelective(SarBussStandAttrInfo sarBussStandAttrInfo);
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@Service
|
||||
public class SarBussStandAttrInfoServiceImpl extends ServiceImpl<SarBussStandAttrInfoDao, SarBussStandAttrInfo> implements ISarBussStandAttrInfoService {
|
||||
|
||||
@Override
|
||||
public List<SarBussStandAttrInfo> queryByList(SarBussStandAttrInfoEOPage page){
|
||||
return this.baseMapper.queryByList(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarBussStandAttrInfo> queryByPage(SarBussStandAttrInfoEOPage page){
|
||||
return this.baseMapper.queryByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(SarBussStandAttrInfo sarBussStandAttrInfo){
|
||||
return this.baseMapper.insertSelective(sarBussStandAttrInfo);
|
||||
}
|
||||
}
|
||||
+60
@@ -1,12 +1,28 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.controller;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表 前端控制器
|
||||
@@ -20,4 +36,48 @@ import com.adc.da.base.web.BaseController;
|
||||
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
||||
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
||||
|
||||
@Autowired
|
||||
private ISarBussionessStandService sarBussionessStandEOService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
/**
|
||||
* 自定义分页查询列表
|
||||
* @param page 标准信息
|
||||
* @return
|
||||
* @author gaoyan
|
||||
* date 2018-09-04
|
||||
*/
|
||||
@ApiOperation(value = "|SarBussionessStandEO|自定义分页查询列表")
|
||||
@GetMapping("/getSarBussionStandPage")
|
||||
//@RequiresPermissions("lawss:sarBussionessStand:getSarBussionStandPage")
|
||||
public ResponseMessage<PageInfo<SarBussionessStand>> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception {
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
String advanceStr = SarAdvanceSearchUtil.createSql(searchList);
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
if(StringUtils.isNotBlank(page.getPaixu())){
|
||||
String sql = page.getPaixu()+" "+page.getShunxu();
|
||||
page.setSql(sql);
|
||||
}else{
|
||||
page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
|
||||
}
|
||||
List<String> getMenuIdList = iTsResourceService.queryRoleMenuIdList("BUSINESS_STAND",page.getMenuId());
|
||||
if(getMenuIdList != null && !getMenuIdList.isEmpty()){
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
List<SarBussionessStand> rows = sarBussionessStandEOService.getSarBussionStandPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
} else {
|
||||
return Result.success(getPageInfo(page.getPager(), null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarBussionessStand.dao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +15,13 @@ import java.util.List;
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Repository
|
||||
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage);
|
||||
|
||||
int getBussionessStandInfoCount(SarBussionessStandEOPage page);
|
||||
|
||||
List<SarBussionessStand> getBussionessStandInfoPage(SarBussionessStandEOPage page);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -17,4 +17,6 @@ import java.util.List;
|
||||
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage);
|
||||
|
||||
List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception;
|
||||
}
|
||||
|
||||
+119
@@ -1,13 +1,28 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.service.impl;
|
||||
|
||||
import com.adc.da.common.SelectionTypeEnum;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -20,6 +35,110 @@ import java.util.List;
|
||||
@Service
|
||||
public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStandDao, SarBussionessStand> implements ISarBussionessStandService {
|
||||
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception {
|
||||
if (StringUtils.isNotBlank(page.getMenuId())) {
|
||||
List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
|
||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getBussionessStandInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarBussionessStand> sarlist = this.baseMapper.getBussionessStandInfoPage(page);
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 处理属性表数据
|
||||
* @Param: [sarlist]
|
||||
* @Return: void
|
||||
*/
|
||||
public void attrInfo (List<SarBussionessStand> sarlist) throws Exception {
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetails (SarBussionessStand row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object value = entry.getValue();
|
||||
if (value != null && StringUtils.isNotBlank(value.toString())) {
|
||||
value = sysInfoEOService.getSvppsNamesByIds(value.toString());
|
||||
}
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage){
|
||||
return this.baseMapper.queryByList(sarBussionessStandEOPage);
|
||||
|
||||
+10
-1
@@ -31,10 +31,19 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
@Autowired
|
||||
private ISarModelTreeService iSarModelTreeService;
|
||||
|
||||
@ApiOperation("查询所有资源")
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarModelTree>> getAll(SarModelTree sarVppsTree){
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("根据父ID查询子所有资源")
|
||||
@GetMapping("/childByList")
|
||||
public ResponseMessage<List<SarModelTree>> childByList(String ids){
|
||||
SarModelTree tree = new SarModelTree();
|
||||
tree.setId(ids);
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(tree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarModelTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import com.adc.da.slrs.sarVppsTree.entity.SarVppsTree;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,4 +18,5 @@ public interface ISarModelTreeService extends IService<SarModelTree> {
|
||||
|
||||
List<SarModelTree> getAll(SarModelTree sarModelTree);
|
||||
|
||||
List<SarModelTree> recursionGetChildren(SarModelTree parent);
|
||||
}
|
||||
|
||||
+6
-5
@@ -29,9 +29,9 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
QueryWrapper<SarModelTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
List<SarModelTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
for(SarModelTree tree:list){
|
||||
tree.setChildren(recursionGetChildren((tree)));
|
||||
}
|
||||
// for(SarModelTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
// }
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -40,10 +40,11 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
* @param parent:父节点
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
private List<SarModelTree> recursionGetChildren(SarModelTree parent){
|
||||
@Override
|
||||
public List<SarModelTree> recursionGetChildren(SarModelTree parent){
|
||||
QueryWrapper<SarModelTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
List<SarModelTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarModelTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
|
||||
+12
-1
@@ -31,11 +31,22 @@ public class SarVppsTreeController extends BaseController<SarVppsTree> {
|
||||
@Autowired
|
||||
private ISarVppsTreeService iSarVppsTreeService;
|
||||
|
||||
@ApiOperation("查询所有资源")
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarVppsTree>> getAll(SarVppsTree sarVppsTree){
|
||||
List<SarVppsTree> tsResources = iSarVppsTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("根据父ID查询子所有资源")
|
||||
@GetMapping("/childByList")
|
||||
public ResponseMessage<List<SarVppsTree>> childByList(String ids){
|
||||
SarVppsTree tree = new SarVppsTree();
|
||||
tree.setId(ids);
|
||||
List<SarVppsTree> tsResources = iSarVppsTreeService.recursionGetChildren(tree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,6 @@ import java.util.List;
|
||||
public interface ISarVppsTreeService extends IService<SarVppsTree> {
|
||||
|
||||
List<SarVppsTree> getAll(SarVppsTree sarVppsTree);
|
||||
|
||||
List<SarVppsTree> recursionGetChildren(SarVppsTree parent);
|
||||
}
|
||||
|
||||
+6
-5
@@ -29,9 +29,9 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
||||
QueryWrapper<SarVppsTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
List<SarVppsTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
for(SarVppsTree tree:list){
|
||||
tree.setChildren(recursionGetChildren((tree)));
|
||||
}
|
||||
// for(SarVppsTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
// }
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -40,10 +40,11 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
||||
* @param parent:父节点
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
private List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
|
||||
@Override
|
||||
public List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
|
||||
QueryWrapper<SarVppsTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarVppsTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao">
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo" >
|
||||
<result column="id" property="id" />
|
||||
<result column="stand_id" property="standId" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_BUSS_STAND_ATTR_INFO table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, stand_id, creation_user, valid_flag, creation_time, modify_time
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="standId != null" >
|
||||
and stand_id ${standIdOperator} #{standId}
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
and creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo" >
|
||||
insert into SAR_BUSS_STAND_ATTR_INFO(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{creationUser, jdbcType=VARCHAR}, #{validFlag, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo" >
|
||||
insert into SAR_BUSS_STAND_ATTR_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="standId != null" >stand_id,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=VARCHAR},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- SAR_BUSS_STAND_ATTR_INFO 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_BUSS_STAND_ATTR_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_BUSS_STAND_ATTR_INFO列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_BUSS_STAND_ATTR_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_BUSS_STAND_ATTR_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.productNameLike != null and pager.productNameLike != ''">
|
||||
and PRODUCT_NAME like concat(concat('%',#{pager.productNameLike}),'%')
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 新增字段-->
|
||||
<insert id="alterStandAttr" parameterType="java.lang.String" >
|
||||
alter table SAR_BUSS_STAND_ATTR_INFO
|
||||
add ${fieldInfo}
|
||||
</insert>
|
||||
|
||||
<!-- 删除字段-->
|
||||
<insert id="deleteStandAttr" parameterType="java.lang.String" >
|
||||
alter table SAR_BUSS_STAND_ATTR_INFO
|
||||
drop COLUMN ${fieldInfo}
|
||||
</insert>
|
||||
|
||||
<!-- 查询表中已存在字段-->
|
||||
<select id="selectStandAttrColumn" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.columns
|
||||
WHERE TABLE_NAME = 'SAR_BUSS_STAND_ATTR_INFO' AND COLUMN_NAME = #{columnName}
|
||||
</select>
|
||||
|
||||
<!-- 修改字段长度-->
|
||||
<update id="updateAttrLen" parameterType="java.lang.String" >
|
||||
ALTER table SAR_BUSS_STAND_ATTR_INFO
|
||||
MODIFY ${fieldInfo}
|
||||
</update>
|
||||
|
||||
<!-- 查询字段及对应数据-->
|
||||
<select id="selectStandFieldAndData" resultType="Map">
|
||||
SELECT ${fieldInfo}
|
||||
FROM SAR_BUSS_STAND_ATTR_INFO
|
||||
WHERE valid_flag=0 and stand_id = #{standId}
|
||||
</select>
|
||||
|
||||
<insert id="insertStandAttr" parameterType="java.lang.String" >
|
||||
insert into SAR_BUSS_STAND_ATTR_INFO(${fieldInfo})
|
||||
values (${fieldValue})
|
||||
</insert>
|
||||
|
||||
<update id="deleteStandAttrByStandId" parameterType="java.lang.String" >
|
||||
delete from SAR_BUSS_STAND_ATTR_INFO
|
||||
where stand_id = #{standId}
|
||||
</update>
|
||||
|
||||
<update id="updateStandInfo" parameterType="java.lang.String" >
|
||||
update SAR_BUSS_STAND_ATTR_INFO set ${field}=#{value}
|
||||
where stand_id = #{standId}
|
||||
</update>
|
||||
|
||||
<select id="selectFieldValByStandId" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
SELECT ${field}
|
||||
FROM SAR_BUSS_STAND_ATTR_INFO
|
||||
WHERE stand_id = #{standId} and valid_flag=0
|
||||
</select>
|
||||
</mapper>
|
||||
+8
-2
@@ -77,11 +77,10 @@ public class PersonCollectEOController extends BaseController<TsPersonCollect> {
|
||||
@ApiOperation(value = "|PersonCollectEO|新增")
|
||||
@PostMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
||||
// @RequiresPermissions("person:personCollect:create")
|
||||
public ResponseMessage<TsPersonCollect> create(@RequestBody TsPersonCollect tsPersonCollect,String userId) throws Exception {
|
||||
public ResponseMessage<TsPersonCollect> create(@RequestBody TsPersonCollect tsPersonCollect) throws Exception {
|
||||
// String userId = LoginUserUtil.getUserId();
|
||||
|
||||
tsPersonCollect.setId(UUIDUtils.randomUUID20());
|
||||
tsPersonCollect.setUserId(userId);
|
||||
tsPersonCollect.setValidFlag(0);
|
||||
tsPersonCollect.setCreationTime(new Date());
|
||||
tsPersonCollect.setModifyTime(new Date());
|
||||
@@ -123,6 +122,13 @@ public class PersonCollectEOController extends BaseController<TsPersonCollect> {
|
||||
* @Param [personCollectEO]
|
||||
* @return com.adc.da.util.http.ResponseMessage<java.lang.Integer>
|
||||
**/
|
||||
|
||||
/**
|
||||
* 通过收藏的id和userId确定修改的数据
|
||||
* @param tsPersonCollect
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "取消收藏")
|
||||
@PutMapping("/updateByUserId")
|
||||
// @RequiresPermissions("person:personCollect:updateByUserId") PersonCollectEO
|
||||
|
||||
Reference in New Issue
Block a user