Merge remote-tracking branch 'origin/develop_master' into develop_master
# Conflicts: # adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandardComplianceAssessResult/controller/SarStandardComplianceAssessResultController.java
This commit is contained in:
+1
@@ -57,6 +57,7 @@ public class WorkGroupController extends BaseController<WorkGroup> {
|
||||
|
||||
|
||||
|
||||
@CrossOrigin
|
||||
@ApiModelProperty("批量删除工作组")
|
||||
@DeleteMapping
|
||||
public ResponseMessage deleteWorkGroup(String id){
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.adc.da.slrs.sarBussStandData.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarBussStandData.service.ISarBussStandDataService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarBussStandData.entity.SarBussStandData;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarBussStandData|")
|
||||
@RequestMapping("/${restPath}/sarBussStandData/sar-buss-stand-data")
|
||||
public class SarBussStandDataController extends BaseController<SarBussStandData> {
|
||||
|
||||
@Autowired
|
||||
ISarBussStandDataService iSarBussStandDataService;
|
||||
|
||||
@ApiOperation("角色与菜单关联控制右侧数据列表")
|
||||
@PostMapping("/saveBatch")
|
||||
public ResponseMessage<Object> disable(SarBussStandData sarBussStandData){
|
||||
//上来就给他 清了 能满足清空 修改 新增
|
||||
if (StringUtils.isNotBlank(sarBussStandData.getBussStandId())){
|
||||
List<String> menus=new ArrayList<>();
|
||||
if (sarBussStandData.getBussStandId().contains(",")){
|
||||
menus.addAll(new ArrayList<>(Arrays.asList(sarBussStandData.getBussStandId().split(","))));
|
||||
}else {
|
||||
menus.add(sarBussStandData.getBussStandId());
|
||||
}
|
||||
List<SarBussStandData> res=new ArrayList<>();
|
||||
menus.forEach(s -> {
|
||||
SarBussStandData sarBussStandData1=new SarBussStandData();
|
||||
sarBussStandData1.setId(String.valueOf(UUID.randomUUID()));
|
||||
sarBussStandData1.setValidFlag("0");
|
||||
sarBussStandData1.setBussStandId(s);
|
||||
sarBussStandData1.setMenuId(sarBussStandData.getMenuId());
|
||||
res.add(sarBussStandData1);
|
||||
});
|
||||
iSarBussStandDataService.saveBatch(res);
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error("请选择菜单");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("角色与菜单关联控制右侧数据列表")
|
||||
@PostMapping("/removeBatch")
|
||||
public ResponseMessage<Object> removeBatch(String ids){
|
||||
List<String> removeIds=new ArrayList<>();
|
||||
if (ids.contains(",")){
|
||||
removeIds.addAll(new ArrayList<>(Arrays.asList(ids.split(","))));
|
||||
}else {
|
||||
removeIds.add(ids);
|
||||
}
|
||||
QueryWrapper<SarBussStandData> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("ID",ids);
|
||||
return Result.success(iSarBussStandDataService.remove(wrapper));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询与角色绑定的菜单--支持多个角色查询")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<Object> list(String menuIds){
|
||||
//判断disableFlag是否填入正确
|
||||
List<String> list=new ArrayList<>();
|
||||
if (menuIds.contains(",")){
|
||||
list.addAll(new ArrayList<>(Arrays.asList(menuIds.split(","))));
|
||||
}else {
|
||||
list.add(menuIds);
|
||||
}
|
||||
QueryWrapper<SarBussStandData> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("MENU_ID",list);
|
||||
return Result.success(iSarBussStandDataService.list(wrapper));
|
||||
}
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarBussStandData.dao;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandData.entity.SarBussStandData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
public interface SarBussStandDataDao extends BaseMapper<SarBussStandData> {
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.adc.da.slrs.sarBussStandData.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarBussStandData对象", description="")
|
||||
public class SarBussStandData extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准id")
|
||||
@TableField("BUSS_STAND_ID")
|
||||
private String bussStandId;
|
||||
|
||||
@ApiModelProperty(value = "菜单id")
|
||||
@TableField("MENU_ID")
|
||||
private String menuId;
|
||||
|
||||
@ApiModelProperty(value = "删除标志")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "菜单id")
|
||||
@TableField(exist = false)
|
||||
private String menuIds;
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarBussStandData.service;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandData.entity.SarBussStandData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
public interface ISarBussStandDataService extends IService<SarBussStandData> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarBussStandData.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandData.entity.SarBussStandData;
|
||||
import com.adc.da.slrs.sarBussStandData.dao.SarBussStandDataDao;
|
||||
import com.adc.da.slrs.sarBussStandData.service.ISarBussStandDataService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
@Service
|
||||
public class SarBussStandDataServiceImpl extends ServiceImpl<SarBussStandDataDao, SarBussStandData> implements ISarBussStandDataService {
|
||||
|
||||
}
|
||||
+15
@@ -267,6 +267,21 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义分页查询列表---判断是否会进入详情页面
|
||||
* @param page 标准信息
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "|SarBussionessStandEO|自定义分页查询列表")
|
||||
@GetMapping("/checkIsShow")
|
||||
//@RequiresPermissions("lawss:sarBussionessStand:getSarBussionStandPage")
|
||||
public boolean checkIsShow(SarBussionessStandEOPage page) throws Exception {
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
return sarBussionessStandEOService.checkIsShow(page);
|
||||
}
|
||||
|
||||
private void nowOrderFunc(SarBussionessStandEOPage page) {
|
||||
switch (page.getNowOrderBy()) {
|
||||
case 1:
|
||||
|
||||
+2
@@ -42,6 +42,8 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
||||
|
||||
List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception;
|
||||
|
||||
boolean checkIsShow(SarBussionessStandEOPage page) throws Exception;
|
||||
|
||||
List<SarBussionessStand> getSarBussionStandPageQd(SarBussionessStandEOPage page) throws Exception;
|
||||
}
|
||||
|
||||
|
||||
+96
-5
@@ -1027,12 +1027,103 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
}
|
||||
}
|
||||
//配置列表显示的数据权限
|
||||
if ("1".equals(page.getIsKU())) {
|
||||
List<SarBussionessStand> sarlist = new ArrayList<>();
|
||||
List<String> access = tsUserService.getResourceDataUserId(page.getUserId());
|
||||
if (null == page.getMenuId() && null == page.getMenuAllChildrenIdList()) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
page.setMenuId("");
|
||||
} else if (page.getMenuId().equals("3")) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
}
|
||||
List<String> finalData = page.getMenuAllChildrenIdList().stream().filter(s -> access.contains(s)).collect(Collectors.toList());
|
||||
if (finalData.size() > 0) {
|
||||
page.setMenuAllChildrenIdList(finalData);
|
||||
if (null == page.getMenuId() && null == page.getMenuAllChildrenIdList()) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getBussionessStandInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
sarlist = this.baseMapper.getBussionessStandInfoPage(page);
|
||||
attrInfoCollect(sarlist);
|
||||
return sarlist;
|
||||
} else {
|
||||
page.getPager().setRowCount(0);
|
||||
return sarlist;
|
||||
}
|
||||
}else {
|
||||
Integer rowCount = this.baseMapper.getBussionessStandInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarBussionessStand> sarlist = this.baseMapper.getBussionessStandInfoPage(page);
|
||||
attrInfoCollect(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
}
|
||||
|
||||
Integer rowCount = this.baseMapper.getBussionessStandInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarBussionessStand> sarlist = this.baseMapper.getBussionessStandInfoPage(page);
|
||||
attrInfoCollect(sarlist);
|
||||
return sarlist;
|
||||
|
||||
@Override
|
||||
public boolean checkIsShow(SarBussionessStandEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
String treeType = page.getTreeType();
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "tsr".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
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);
|
||||
}
|
||||
}else if(!page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}else if(page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(page.getSarMsType()) && "filterSarMsMenu".equals(page.getSarMsType())){
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuTopId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
//配置列表显示的数据权限
|
||||
List<SarBussionessStand> sarlist = new ArrayList<>();
|
||||
List<String> access = tsUserService.getResourceDataUserId(page.getUserId());
|
||||
if (null == page.getMenuId() && null == page.getMenuAllChildrenIdList()) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
page.setMenuId("");
|
||||
} else if (page.getMenuId().equals("3")) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
}
|
||||
List<String> finalData = page.getMenuAllChildrenIdList().stream().filter(s -> access.contains(s)).collect(Collectors.toList());
|
||||
if (finalData.size() > 0) {
|
||||
page.setMenuAllChildrenIdList(finalData);
|
||||
if (null == page.getMenuId() && null == page.getMenuAllChildrenIdList()) {
|
||||
page.setMenuAllChildrenIdList(access);
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getBussionessStandInfoCount(page);
|
||||
if (rowCount>0) {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+27
-6
@@ -254,7 +254,8 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
Map<String, Object> getAttrMap = new TreeMap<>();
|
||||
getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListLaws != null && !InitStandAttrUtil.clobFieldListLaws.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListLaws) {
|
||||
@@ -285,16 +286,36 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && !InitStandAttrUtil.fileFieldListLaws.isEmpty() && InitStandAttrUtil.fileFieldListLaws.contains(entry.getKey())) {
|
||||
String value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
if(!fileObj.isEmpty()){
|
||||
String oldFileName = fileObj.stream().map(AttFileEO::getOldFileName).collect(Collectors.joining(","));
|
||||
newMap.put(name + "Name", oldFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
|
||||
if (!getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}else{
|
||||
List<String> list= Arrays.stream(fieldInfo.split(",")).map(String::trim).collect(Collectors.toList());
|
||||
list.forEach(s -> {
|
||||
newMap.put(s,"");
|
||||
});
|
||||
if (!newMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(newMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(newMap);
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.controller;
|
||||
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandardNew;
|
||||
import com.adc.da.slrs.sarMenuStandard.service.ISarMenuStandardNewService;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-07
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--标准法规库-菜单标准体系")
|
||||
@RequestMapping("/${restPath}/lawss/sarMenuStandardLimit")
|
||||
public class SarMenuStandardNewController extends BaseController<SarMenuStandardNew> {
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardNewService iSarMenuStandardNewService;
|
||||
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@ApiOperation("查询有权限资源")
|
||||
@GetMapping("/getListStandLimit")
|
||||
public ResponseMessage<List<SarMenuStandard>> getListStandLimit(SarMenuStandardNew sarMenuStandardNew){
|
||||
List<String> access = tsUserService.getResourceUserId(LoginUserUtil.getUserId());
|
||||
List<SarMenuStandard> tsResources= iSarMenuStandardNewService.getListStandLimit(sarMenuStandardNew,access);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.dao;
|
||||
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandardNew;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-07
|
||||
*/
|
||||
public interface SarMenuStandardNewDao extends BaseMapper<SarMenuStandardNew> {
|
||||
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.sys.utils.treetool.annotation.TreeNodeId;
|
||||
import com.adc.da.sys.utils.treetool.annotation.TreeNodeName;
|
||||
import com.adc.da.sys.utils.treetool.annotation.TreeNodeParentId;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarMenuStandard对象", description="")
|
||||
public class SarMenuStandardNew extends BaseEntity {
|
||||
public interface update{
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TreeNodeId
|
||||
@NotNull(message = "id不能为空",groups = {update.class})
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "ID",type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准法规划分")
|
||||
@TableField("SOR_DIVIDE")
|
||||
private String sorDivide;
|
||||
|
||||
@TreeNodeName
|
||||
@ApiModelProperty(value = "目录名称")
|
||||
@TableField("MENU_NAME")
|
||||
private String menuName;
|
||||
|
||||
@TreeNodeParentId
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@TableField("PARENT_ID")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty(value = "父级ID集合")
|
||||
@TableField("PARENT_IDS")
|
||||
private String parentIds;
|
||||
|
||||
@ApiModelProperty(value = "排序序号")
|
||||
@TableField("DISPLAY_SEQ")
|
||||
private Integer displaySeq;
|
||||
|
||||
@ApiModelProperty(value = "路径")
|
||||
@TableField("HREF")
|
||||
private String href;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer 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;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@TableField("REMARKS")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "数据字典ID")
|
||||
@TableField("DIC_ID")
|
||||
private String dicId;
|
||||
|
||||
@ApiModelProperty(value = "子菜单")
|
||||
@TableField(exist = false)
|
||||
private List<SarMenuStandardNew> children;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> roleIds;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> childMenuIds;
|
||||
|
||||
@TableField(exist=false)
|
||||
private String parentIdsName;
|
||||
|
||||
@TableField(exist=false)
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "树结构数据 区分 类型: 标准数据 tsr 技术系列 sarMs")
|
||||
@TableField(exist = false)
|
||||
private String treeType;
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.service;
|
||||
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandardNew;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-07
|
||||
*/
|
||||
public interface ISarMenuStandardNewService extends IService<SarMenuStandardNew> {
|
||||
|
||||
|
||||
List<SarMenuStandard> getListStandLimit(SarMenuStandardNew sarMenuStandardNew, List<String> access);
|
||||
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarMenuStandard.dao.SarMenuStandardNewDao;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandardNew;
|
||||
import com.adc.da.slrs.sarMenuStandard.service.ISarMenuStandardNewService;
|
||||
import com.adc.da.sys.sarMenuStandard.dao.SarMenuStandardDao;
|
||||
import com.adc.da.sys.sarMenuStandard.entity.SarMenuStandard;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-07
|
||||
*/
|
||||
@Service
|
||||
public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandardNewDao, SarMenuStandardNew> implements ISarMenuStandardNewService {
|
||||
|
||||
@Autowired
|
||||
private SarMenuStandardDao dao;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询有权限菜单
|
||||
* @param sarMenuStandardNew
|
||||
*/
|
||||
@Override
|
||||
public List<SarMenuStandard> getListStandLimit(SarMenuStandardNew sarMenuStandardNew, List<String> access) {
|
||||
List<SarMenuStandard> TsResources = new ArrayList<>();
|
||||
|
||||
QueryWrapper<SarMenuStandard> queryWrapper =new QueryWrapper<>();
|
||||
if(sarMenuStandardNew.getSorDivide()!=null){
|
||||
queryWrapper.eq("sor_divide", sarMenuStandardNew.getSorDivide());
|
||||
}
|
||||
|
||||
if(sarMenuStandardNew.getDicId()!=null){
|
||||
queryWrapper.eq("DIC_ID", sarMenuStandardNew.getDicId());
|
||||
}
|
||||
queryWrapper.in(null!=access,"ID",access);
|
||||
queryWrapper.isNull("PARENT_ID");
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
for(SarMenuStandard resource:TsResources){
|
||||
resource.setTreeType("sarMs");
|
||||
QueryWrapper<SarMenuStandard> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
TsResourceQueryWrapper.in(null!=access,"ID",access);
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<SarMenuStandard> children=dao.selectList(TsResourceQueryWrapper);
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
|
||||
return TsResources;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用获取子节点
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<SarMenuStandard> recursionGetListChildrenStand(SarMenuStandard resource, List<SarMenuStandard> children){
|
||||
List<SarMenuStandard> tsResources = children.stream()
|
||||
.filter(resource1 -> resource1.getParentId().equals(resource.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(!tsResources.isEmpty()){
|
||||
tsResources = tsResources.stream().sorted(Comparator.comparing(resource1 -> resource1.getDisplaySeq())).collect(Collectors.toList());
|
||||
tsResources.forEach(resource1 -> {
|
||||
resource1.setTreeType("sarMs");
|
||||
resource1.setChildren(recursionGetListChildrenStand((resource1),(children)));
|
||||
});
|
||||
}
|
||||
return tsResources;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+18
@@ -6,6 +6,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -32,6 +33,8 @@ import java.util.stream.Collectors;
|
||||
public class TsResourceController extends BaseController<TsResource> {
|
||||
@Autowired
|
||||
private ITsResourceService tsResourceService;
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@ApiOperation("根据ID查询菜单")
|
||||
@GetMapping("/getMenuById")
|
||||
@@ -68,6 +71,21 @@ public class TsResourceController extends BaseController<TsResource> {
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("查询有权限资源")
|
||||
@GetMapping("/getListStandLimitData")
|
||||
public ResponseMessage<List<TsResource>> getListStandLimit(TsResource tsResource){
|
||||
List<String> access = tsUserService.getResourceUserId(tsResource.getUserId());
|
||||
List<TsResource> tsResources=tsResourceService.getListStandLimit(tsResource,access);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("查询有权限资源")
|
||||
@GetMapping("/dealWithData")
|
||||
public ResponseMessage<Object> dealWithData(TsResource tsResource){
|
||||
tsResourceService.dealWithData();
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
// @ApiOperation("查询所有资源")
|
||||
// @GetMapping("/getDefault")
|
||||
// public ResponseMessage<List<TsResource>> getDefault(){
|
||||
|
||||
@@ -58,6 +58,10 @@ public class TsResource extends BaseEntity {
|
||||
@TableField("PARENT_ID")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty(value = "父级ID")
|
||||
@TableField(exist = false)
|
||||
private String middleParentId;
|
||||
|
||||
@ApiModelProperty(value = "父级ID集合")
|
||||
@TableField("PARENT_IDS")
|
||||
private String parentIds;
|
||||
|
||||
@@ -38,6 +38,8 @@ public interface ITsResourceService extends IService<TsResource> {
|
||||
|
||||
List<TsResource> getListStand(TsResource tsResource);
|
||||
|
||||
List<TsResource> getListStandLimit(TsResource tsResource,List<String> access);
|
||||
|
||||
List<String> getDefaultByName();
|
||||
|
||||
ResponseMessage<Object> addResource(TsResource tsResource);
|
||||
@@ -55,4 +57,6 @@ public interface ITsResourceService extends IService<TsResource> {
|
||||
List<TsResource> getResourceByIds(List<String> resourceIds, String sorDivide);
|
||||
|
||||
List<String> getChildMenuList(String menuId);
|
||||
|
||||
boolean dealWithData();
|
||||
}
|
||||
|
||||
+99
-2
@@ -36,6 +36,9 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
public List<TsResource> selectMenuByRole(TsResource sarMenu) {
|
||||
List<TsResource> list = dao.selectMenuByRole(sarMenu);
|
||||
if (list == null) {
|
||||
@@ -216,13 +219,65 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
queryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
||||
}
|
||||
queryWrapper.isNull("PARENT_ID");
|
||||
queryWrapper.eq("VALID_FLAG","0");
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
for(TsResource resource:TsResources){
|
||||
/**
|
||||
* TODO 此处代码有坑,当前查询子节点的时候,只查询子节点ID包含的情况,
|
||||
* 实际查询的时候 parentIds字段根本就没有记录当前节点下所有子节点的数据
|
||||
* 所以导致查询的时候查询的不对、
|
||||
* 修改逻辑如下:
|
||||
* 1、将下方代码注释掉,通过递归查询每一级的数据然后组装
|
||||
* 2、将数据库中的parentIds字段数据重做,然后查询的时候like 匹配 分割符+ID或
|
||||
* ID+分割符的方式将当前节点下的所有子节点全部查询出来,然后通过流式计算对数据进行重新组装
|
||||
*/
|
||||
resource.setTreeType("tsr");
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.eq("VALID_FLAG","0");
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",","+resource.getId()+",");
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
|
||||
/**
|
||||
* 入库流程去除我的收藏 flow
|
||||
*/
|
||||
if ( tsResource.getIsFlow()!=null && "flow".equals(tsResource.getIsFlow())){
|
||||
children=children.stream()
|
||||
.filter(item->!"我的收藏".equals(item.getMenuName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
|
||||
}
|
||||
|
||||
return TsResources;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询有权限菜单
|
||||
* @param tsResource
|
||||
*/
|
||||
@Override
|
||||
public List<TsResource> getListStandLimit(TsResource tsResource,List<String> access) {
|
||||
List<TsResource> TsResources = new ArrayList<>();
|
||||
|
||||
QueryWrapper<TsResource> queryWrapper =new QueryWrapper<>();
|
||||
if(tsResource.getSorDivide()!=null){
|
||||
queryWrapper.eq("sor_divide",tsResource.getSorDivide());
|
||||
}
|
||||
queryWrapper.isNull("PARENT_ID");
|
||||
queryWrapper.eq("VALID_FLAG","0");
|
||||
queryWrapper.in(null!=access,"ID",access);
|
||||
queryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
TsResources=dao.selectList(queryWrapper);
|
||||
|
||||
for(TsResource resource:TsResources){
|
||||
resource.setTreeType("tsr");
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
|
||||
TsResourceQueryWrapper.like("PARENT_IDS",","+resource.getId()+",");
|
||||
TsResourceQueryWrapper.in(null!=access,"ID",access);
|
||||
TsResourceQueryWrapper.eq("VALID_FLAG","0");
|
||||
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
|
||||
@@ -339,7 +394,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
*/
|
||||
private List<TsResource> recursionGetListChildrenStand(TsResource resource,List<TsResource> children){
|
||||
List<TsResource> tsResources = children.stream()
|
||||
.filter(resource1 -> resource1.getParentId().equals(resource.getId()))
|
||||
.filter(resource1 -> !children.isEmpty() && StringUtils.isNotBlank(resource1.getParentId()) && resource1.getParentId().equals(resource.getId()))
|
||||
.collect(Collectors.toList());
|
||||
if(!tsResources.isEmpty()){
|
||||
tsResources = tsResources.stream().sorted(Comparator.comparing(resource1 -> resource1.getDisplaySeq())).collect(Collectors.toList());
|
||||
@@ -357,6 +412,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
* @return List<TsResource>
|
||||
*/
|
||||
private List<TsResource> recursionGetChildren(TsResource parent){
|
||||
|
||||
QueryWrapper<TsResource> TsResourceQueryWrapper=new QueryWrapper<>();
|
||||
TsResourceQueryWrapper.eq("PARENT_ID",parent.getId());
|
||||
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
|
||||
@@ -381,4 +437,45 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
|
||||
}
|
||||
return menuIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dealWithData() {
|
||||
QueryWrapper<TsResource> wrapper=new QueryWrapper<>();
|
||||
wrapper.eq("VALID_FLAG","0");
|
||||
List<TsResource> list=iTsResourceService.list(wrapper);
|
||||
Map<String,TsResource> map=new HashMap<>();
|
||||
list.forEach(tsResource ->{
|
||||
if (null!=tsResource.getParentId()) {
|
||||
tsResource.setParentIds(",");
|
||||
}
|
||||
tsResource.setMiddleParentId(tsResource.getParentId());
|
||||
map.put(tsResource.getId(),tsResource);
|
||||
});
|
||||
list.forEach(tsResource -> dealData(tsResource,map));
|
||||
iTsResourceService.updateBatchById(list);
|
||||
QueryWrapper<TsResource> wrapper1=new QueryWrapper<>();
|
||||
wrapper1.eq("PARENT_ID", "0").eq("PARENT_IDS",",");
|
||||
TsResource user = new TsResource();
|
||||
user.setParentIds("");
|
||||
iTsResourceService.update(user,wrapper1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean dealData(TsResource tsResource,Map<String,TsResource> map){
|
||||
if (null!=tsResource.getParentId() && !"".equals(tsResource.getParentId()) && !"0".equals(tsResource.getParentId())){
|
||||
tsResource.setParentIds(tsResource.getParentIds()+tsResource.getParentId()+",");
|
||||
if (null!=map.get(tsResource.getParentId())) {
|
||||
tsResource.setParentId(map.get(tsResource.getParentId()).getParentId());
|
||||
}else {
|
||||
tsResource.setParentId(tsResource.getMiddleParentId());
|
||||
return true;
|
||||
}
|
||||
return dealData(tsResource,map);
|
||||
}else {
|
||||
tsResource.setParentId(tsResource.getMiddleParentId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+342
-341
@@ -1,341 +1,342 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.*;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarInterpretationForeignStandardService;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarInterpretationNationalStandardService;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarStandardComplianceProductAssessService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准法规准入清单详情表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--标准法规库--标准合规评估结果")
|
||||
@RequestMapping("/${restPath}/sarStandardComplianceAssessResult")
|
||||
public class SarStandardComplianceAssessResultController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarStandardComplianceAssessResultController.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISarStandardComplianceProductAssessService iSarStandardComplianceProductAssessService;
|
||||
|
||||
@Autowired
|
||||
private ISarInterpretationForeignStandardService iSarInterpretationForeignStandardService;
|
||||
@Autowired
|
||||
private ISarInterpretationNationalStandardService iSarInterpretationNationalStandardService;
|
||||
|
||||
@ApiOperation(value = "条件查询标准清单")
|
||||
@GetMapping("/standard")
|
||||
public ResponseMessage<Object> selectStandard(SarStandardsInfoEO eo) throws Exception {
|
||||
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select(" STAND_ID,ANY_VALUE(STAND_NUMBER) as STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
if (eo.getStandName() != null ) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().replace(" ",""));
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
}
|
||||
if (eo.getType() != null && !eo.getType().trim().equals("")) {
|
||||
queryWrapper.like("type", eo.getType().trim());
|
||||
}
|
||||
queryWrapper.groupBy("STAND_ID,STAND_NAME,STAND_TYPE");
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
} else {
|
||||
if (eo.getPosition() == 1) {
|
||||
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,risk_degree");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
}
|
||||
|
||||
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
|
||||
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
} else {
|
||||
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
}
|
||||
|
||||
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
|
||||
while(page.getRecords().remove(null));
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class InsertEntity<T>{
|
||||
List<Map> entityList;
|
||||
T eo;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "(插入/更新)标准清单")
|
||||
@PostMapping("/standard")
|
||||
public ResponseMessage insertStandard(@RequestBody InsertEntity<SarStandardsInfoEO> insertEntity) throws InvocationTargetException, IllegalAccessException {
|
||||
|
||||
SarStandardsInfoEO eo = insertEntity.eo;
|
||||
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
|
||||
List<SarStandardComplianceProductAssess> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarStandardComplianceProductAssess obj = new SarStandardComplianceProductAssess();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
|
||||
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(entityList);
|
||||
|
||||
} else {
|
||||
if (eo.getPosition() == 1) {
|
||||
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}else{
|
||||
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationForeignStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "条件查询标准涉及项目符合性清单")
|
||||
@GetMapping("/product")
|
||||
public ResponseMessage<IPage<SarStandardComplianceProductAssess>> selectProduct(SarStandardComplianceProductAssessEO eo) throws Exception {
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
if (eo.getType() != null) queryWrapper.eq("type", eo.getType());
|
||||
if (eo.getProductName() != null) queryWrapper.like("product_name", eo.getProductName());
|
||||
if (eo.getProductId() != null) queryWrapper.like("product_id", eo.getProductId());
|
||||
queryWrapper.orderByAsc("product_name");
|
||||
queryWrapper.orderByAsc("standard_item");
|
||||
|
||||
// if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
|
||||
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "标准涉及项目复合性详情")
|
||||
@GetMapping("/productNewDetail")
|
||||
public ResponseMessage<Map<String,IPage<SarStandardComplianceProductAssess>>> selectProductDetail(SarStandardComplianceProductAssessEO eo) throws Exception {
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
Map<String,IPage<SarStandardComplianceProductAssess>> map=new HashMap<>();
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper.eq("product_id", eo.getProductId());
|
||||
queryWrapper.and(sarStandardComplianceProductAssessQueryWrapper -> sarStandardComplianceProductAssessQueryWrapper.eq("no_involve","").or().isNull("no_involve"));
|
||||
queryWrapper.isNotNull("research_completion_time");
|
||||
queryWrapper.orderByAsc("product_name");
|
||||
queryWrapper.orderByAsc("standard_item");
|
||||
Page p1=new Page();
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
BeanUtils.copyProperties(page,p1);
|
||||
p1.setRecords(orderUtils(page.getRecords()));
|
||||
p1.setTotal(page.getTotal());
|
||||
map.put("unfit",p1);
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper1.eq("product_id", eo.getProductId());
|
||||
queryWrapper1.and(sarStandardComplianceProductAssessQueryWrapper -> sarStandardComplianceProductAssessQueryWrapper.ne("research_compliance","").or().isNotNull("research_compliance"));
|
||||
queryWrapper1.orderByAsc("product_name");
|
||||
queryWrapper1.orderByAsc("standard_item");
|
||||
IPage<SarStandardComplianceProductAssess> page1 = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper1);
|
||||
Page p2=new Page();
|
||||
BeanUtils.copyProperties(page1,p2);
|
||||
p2.setRecords(orderUtils(page1.getRecords()));
|
||||
p2.setTotal(page1.getTotal());
|
||||
map.put("fit",p2);
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper2.eq("product_id", eo.getProductId());
|
||||
queryWrapper2.and(sarStandardComplianceProductAssessQueryWrapper -> sarStandardComplianceProductAssessQueryWrapper.ne("no_involve","").and(sarStandardComplianceProductAssessQueryWrapper1 -> sarStandardComplianceProductAssessQueryWrapper1.isNotNull("no_involve")));
|
||||
queryWrapper2.orderByAsc("product_name");
|
||||
queryWrapper2.orderByAsc("standard_item");
|
||||
IPage<SarStandardComplianceProductAssess> page2 = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper2);
|
||||
page2.setRecords(orderUtils(page2.getRecords()));
|
||||
map.put("noFit",page2);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
private List<SarStandardComplianceProductAssess> orderUtils(List<SarStandardComplianceProductAssess> sarStandardCompliance){
|
||||
Map<Integer,List<SarStandardComplianceProductAssess>> stringMap=new HashMap<>();
|
||||
List<Integer> orderKey=new ArrayList<>();
|
||||
|
||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||
if (null!=s.getStandardItem()) {
|
||||
String[] as=(s.getStandardItem()+",").split(",");
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
orderKey.add(Integer.valueOf(as[0].trim().toString()));
|
||||
List<SarStandardComplianceProductAssess> assesses2 = new ArrayList<>();
|
||||
assesses2.add(s);
|
||||
stringMap.put(Integer.valueOf(as[0].trim().toString()), assesses2);
|
||||
}
|
||||
}else {
|
||||
if (null!=stringMap.get(0)) {
|
||||
stringMap.get(0).add(s);
|
||||
}else {
|
||||
List<SarStandardComplianceProductAssess> assesses = new ArrayList<>();
|
||||
assesses.add(s);
|
||||
stringMap.put(0,assesses);
|
||||
orderKey.add(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Collections.sort(orderKey,(o1, o2) -> {
|
||||
return (o1 -o2);
|
||||
});
|
||||
List<SarStandardComplianceProductAssess> res=new ArrayList<>();
|
||||
orderKey.forEach(integer -> {
|
||||
res.addAll(stringMap.get(integer));
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "标准涉及项目复合性")
|
||||
@GetMapping("/productNew")
|
||||
public ResponseMessage<IPage<unCountDTO>> selectProduct(unCountDTO eo) throws Exception {
|
||||
Page iPage = new Page<>();
|
||||
iPage.setCurrent(eo.getCurrent());
|
||||
iPage.setSize(eo.getSize());
|
||||
|
||||
IPage<unCountDTO> page = iSarStandardComplianceProductAssessService.selectPages(iPage, eo);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "插入标准涉及项目符合性清单")
|
||||
@PostMapping("/add")
|
||||
public ResponseMessage insertProduct(@RequestBody List<SarStandardComplianceProductAssess> eo) throws Exception {
|
||||
|
||||
eo.forEach(sarStandardComplianceProductAssess -> {
|
||||
sarStandardComplianceProductAssess.setId(UUIDUtils.randomUUID(32));
|
||||
sarStandardComplianceProductAssess.setInterpretationTime(new Date());
|
||||
});
|
||||
iSarStandardComplianceProductAssessService.saveBatch(eo);
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "条件查询技术审核符合性清单")
|
||||
@GetMapping("/interpretation")
|
||||
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
|
||||
if (eo.getPosition() == 1) {
|
||||
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
List<SarInterpretationNationalStandard> standards=iSarInterpretationNationalStandardService.getAllDatas(eo);
|
||||
Integer datasCount=iSarInterpretationNationalStandardService.getAllDatasCount(eo);
|
||||
iPage.setTotal(datasCount);
|
||||
iPage.setRecords(standards);
|
||||
while (iPage.getRecords().remove(null)) ;
|
||||
return Result.success(iPage);
|
||||
} else {
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
|
||||
//如果查询条件里标准编号不为空,查询
|
||||
if (eo.getStandNumber() != null) queryWrapper.like("STAND_NUMBER",eo.getStandNumber());
|
||||
//如果查询条件里标准名称不为空,查询
|
||||
if (eo.getStandName() != null) queryWrapper.like("STAND_NAME",eo.getStandName());
|
||||
//如果查询条件里具体章条不为空,查询
|
||||
if (eo.getSpecificItem() != null) queryWrapper.like("specific_item",eo.getSpecificItem());
|
||||
|
||||
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
|
||||
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "插入技术审核符合性清单")
|
||||
@PostMapping("/interpretation")
|
||||
public ResponseMessage insertInterpretation(InsertEntity<InterpretationEO> insertEntity) throws Exception {
|
||||
|
||||
InterpretationEO eo = insertEntity.eo;
|
||||
|
||||
if (eo.getPosition() == 1) {
|
||||
|
||||
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
|
||||
} else {
|
||||
|
||||
|
||||
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationForeignStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.*;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarInterpretationForeignStandardService;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarInterpretationNationalStandardService;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarStandardComplianceProductAssessService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 标准法规准入清单详情表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--标准法规库--标准合规评估结果")
|
||||
@RequestMapping("/${restPath}/sarStandardComplianceAssessResult")
|
||||
public class SarStandardComplianceAssessResultController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SarStandardComplianceAssessResultController.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISarStandardComplianceProductAssessService iSarStandardComplianceProductAssessService;
|
||||
|
||||
@Autowired
|
||||
private ISarInterpretationForeignStandardService iSarInterpretationForeignStandardService;
|
||||
@Autowired
|
||||
private ISarInterpretationNationalStandardService iSarInterpretationNationalStandardService;
|
||||
|
||||
@ApiOperation(value = "条件查询标准清单")
|
||||
@GetMapping("/standard")
|
||||
public ResponseMessage<Object> selectStandard(SarStandardsInfoEO eo) throws Exception {
|
||||
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select(" STAND_ID,ANY_VALUE(STAND_NUMBER) as STAND_NUMBER, STAND_NAME, STAND_TYPE");
|
||||
if (eo.getStandName() != null ) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().replace(" ",""));
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
}
|
||||
if (eo.getType() != null && !eo.getType().trim().equals("")) {
|
||||
queryWrapper.like("type", eo.getType().trim());
|
||||
}
|
||||
queryWrapper.groupBy("STAND_ID,STAND_NAME,STAND_TYPE");
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
} else {
|
||||
if (eo.getPosition() == 1) {
|
||||
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,risk_degree");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
}
|
||||
|
||||
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
|
||||
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
} else {
|
||||
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME");
|
||||
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
|
||||
}
|
||||
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
|
||||
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
|
||||
}
|
||||
|
||||
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
|
||||
while(page.getRecords().remove(null));
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class InsertEntity<T>{
|
||||
List<Map> entityList;
|
||||
T eo;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "(插入/更新)标准清单")
|
||||
@PostMapping("/standard")
|
||||
public ResponseMessage insertStandard(@RequestBody InsertEntity<SarStandardsInfoEO> insertEntity) throws InvocationTargetException, IllegalAccessException {
|
||||
|
||||
SarStandardsInfoEO eo = insertEntity.eo;
|
||||
|
||||
if (eo.getStandApplicationType() == 1) {
|
||||
|
||||
List<SarStandardComplianceProductAssess> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarStandardComplianceProductAssess obj = new SarStandardComplianceProductAssess();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
|
||||
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(entityList);
|
||||
|
||||
} else {
|
||||
if (eo.getPosition() == 1) {
|
||||
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}else{
|
||||
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationForeignStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "条件查询标准涉及项目符合性清单")
|
||||
@GetMapping("/product")
|
||||
public ResponseMessage<IPage<SarStandardComplianceProductAssess>> selectProduct(SarStandardComplianceProductAssessEO eo) throws Exception {
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
if (eo.getType() != null) queryWrapper.eq("type", eo.getType());
|
||||
if (eo.getProductName() != null) queryWrapper.like("product_name", eo.getProductName());
|
||||
if (eo.getProductId() != null) queryWrapper.like("product_id", eo.getProductId());
|
||||
queryWrapper.orderByAsc("product_name");
|
||||
queryWrapper.orderByAsc("standard_item");
|
||||
|
||||
// if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
|
||||
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "标准涉及项目复合性详情")
|
||||
@GetMapping("/productNewDetail")
|
||||
public ResponseMessage<Map<String,IPage<SarStandardComplianceProductAssess>>> selectProductDetail(SarStandardComplianceProductAssessEO eo) throws Exception {
|
||||
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
Map<String,IPage<SarStandardComplianceProductAssess>> map=new HashMap<>();
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper.eq("product_id", eo.getProductId());
|
||||
queryWrapper.and(sarStandardComplianceProductAssessQueryWrapper -> sarStandardComplianceProductAssessQueryWrapper.eq("no_involve","").or().isNull("no_involve"));
|
||||
queryWrapper.isNotNull("research_completion_time");
|
||||
queryWrapper.orderByAsc("product_name");
|
||||
queryWrapper.orderByAsc("standard_item");
|
||||
Page p1=new Page();
|
||||
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
|
||||
BeanUtils.copyProperties(page,p1);
|
||||
p1.setRecords(orderUtils(page.getRecords()));
|
||||
p1.setTotal(page.getTotal());
|
||||
map.put("unfit",p1);
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper1.eq("product_id", eo.getProductId());
|
||||
queryWrapper1.and(sarStandardComplianceProductAssessQueryWrapper -> sarStandardComplianceProductAssessQueryWrapper.ne("research_compliance","").isNotNull("research_compliance"));
|
||||
queryWrapper1.orderByAsc("product_name");
|
||||
queryWrapper1.orderByAsc("standard_item");
|
||||
IPage<SarStandardComplianceProductAssess> page1 = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper1);
|
||||
Page p2=new Page();
|
||||
BeanUtils.copyProperties(page1,p2);
|
||||
p2.setRecords(orderUtils(page1.getRecords()));
|
||||
p2.setTotal(page1.getTotal());
|
||||
map.put("fit",p2);
|
||||
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("STAND_ID", eo.getStandId());
|
||||
queryWrapper2.eq("product_id", eo.getProductId());
|
||||
queryWrapper2.and(sarStandardComplianceProductAssessQueryWrapper -> sarStandardComplianceProductAssessQueryWrapper.ne("no_involve","").and(sarStandardComplianceProductAssessQueryWrapper1 -> sarStandardComplianceProductAssessQueryWrapper1.isNotNull("no_involve")));
|
||||
queryWrapper2.orderByAsc("product_name");
|
||||
queryWrapper2.orderByAsc("standard_item");
|
||||
IPage<SarStandardComplianceProductAssess> page2 = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper2);
|
||||
page2.setRecords(orderUtils(page2.getRecords()));
|
||||
map.put("noFit",page2);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
private List<SarStandardComplianceProductAssess> orderUtils(List<SarStandardComplianceProductAssess> sarStandardCompliance){
|
||||
Map<Integer,List<SarStandardComplianceProductAssess>> stringMap=new HashMap<>();
|
||||
List<Integer> orderKey=new ArrayList<>();
|
||||
|
||||
for (SarStandardComplianceProductAssess s:sarStandardCompliance) {
|
||||
if (null!=s.getStandardItem()) {
|
||||
String[] as=(s.getStandardItem()+",").split(",");
|
||||
if (orderKey.contains(Integer.valueOf(as[0].trim().toString()))) {
|
||||
stringMap.get(Integer.valueOf(as[0].trim().toString())).add(s);
|
||||
} else {
|
||||
orderKey.add(Integer.valueOf(as[0].trim().toString()));
|
||||
List<SarStandardComplianceProductAssess> assesses2 = new ArrayList<>();
|
||||
assesses2.add(s);
|
||||
stringMap.put(Integer.valueOf(as[0].trim().toString()), assesses2);
|
||||
}
|
||||
}else {
|
||||
if (null!=stringMap.get(0)) {
|
||||
stringMap.get(0).add(s);
|
||||
}else {
|
||||
List<SarStandardComplianceProductAssess> assesses = new ArrayList<>();
|
||||
assesses.add(s);
|
||||
stringMap.put(0,assesses);
|
||||
orderKey.add(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Collections.sort(orderKey,(o1, o2) -> {
|
||||
return (o1 -o2);
|
||||
});
|
||||
List<SarStandardComplianceProductAssess> res=new ArrayList<>();
|
||||
orderKey.forEach(integer -> {
|
||||
res.addAll(stringMap.get(integer));
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "标准涉及项目复合性")
|
||||
@GetMapping("/productNew")
|
||||
public ResponseMessage<IPage<unCountDTO>> selectProduct(unCountDTO eo) throws Exception {
|
||||
Page iPage = new Page<>();
|
||||
iPage.setCurrent(eo.getCurrent());
|
||||
iPage.setSize(eo.getSize());
|
||||
|
||||
IPage<unCountDTO> page = iSarStandardComplianceProductAssessService.selectPages(iPage, eo);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "插入标准涉及项目符合性清单")
|
||||
@PostMapping("/add")
|
||||
public ResponseMessage insertProduct(@RequestBody List<SarStandardComplianceProductAssess> eo) throws Exception {
|
||||
|
||||
eo.forEach(sarStandardComplianceProductAssess -> {
|
||||
sarStandardComplianceProductAssess.setId(UUIDUtils.randomUUID(32));
|
||||
sarStandardComplianceProductAssess.setInterpretationTime(new Date());
|
||||
});
|
||||
iSarStandardComplianceProductAssessService.saveBatch(eo);
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "条件查询技术审核符合性清单")
|
||||
@GetMapping("/interpretation")
|
||||
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
|
||||
if (eo.getPosition() == 1) {
|
||||
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
List<SarInterpretationNationalStandard> standards=iSarInterpretationNationalStandardService.getAllDatas(eo);
|
||||
Integer datasCount=iSarInterpretationNationalStandardService.getAllDatasCount(eo);
|
||||
iPage.setTotal(datasCount);
|
||||
iPage.setRecords(standards);
|
||||
while (iPage.getRecords().remove(null)) ;
|
||||
return Result.success(iPage);
|
||||
} else {
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
|
||||
//如果查询条件里标准编号不为空,查询
|
||||
if (eo.getStandNumber() != null) queryWrapper.like("STAND_NUMBER",eo.getStandNumber());
|
||||
//如果查询条件里标准名称不为空,查询
|
||||
if (eo.getStandName() != null) queryWrapper.like("STAND_NAME",eo.getStandName());
|
||||
//如果查询条件里具体章条不为空,查询
|
||||
if (eo.getSpecificItem() != null) queryWrapper.like("specific_item",eo.getSpecificItem());
|
||||
|
||||
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
|
||||
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
|
||||
while (page.getRecords().remove(null)) ;
|
||||
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "插入技术审核符合性清单")
|
||||
@PostMapping("/interpretation")
|
||||
public ResponseMessage insertInterpretation(InsertEntity<InterpretationEO> insertEntity) throws Exception {
|
||||
|
||||
InterpretationEO eo = insertEntity.eo;
|
||||
|
||||
if (eo.getPosition() == 1) {
|
||||
|
||||
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
|
||||
} else {
|
||||
|
||||
|
||||
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < insertEntity.entityList.size(); i++) {
|
||||
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
|
||||
BeanUtils.populate(obj, insertEntity.entityList.get(i));
|
||||
entityList.add(obj);
|
||||
}
|
||||
iSarInterpretationForeignStandardService.saveOrUpdateBatch(entityList);
|
||||
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
+17
-17
@@ -99,12 +99,12 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
//不改传参强行置换
|
||||
searchList.forEach(sarAdvanceSearchVO -> {
|
||||
if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
}
|
||||
});
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_standards_info");
|
||||
// searchList.forEach(sarAdvanceSearchVO -> {
|
||||
// if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
// }
|
||||
// });
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
@@ -143,12 +143,12 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
//不改传参强行置换
|
||||
searchList.forEach(sarAdvanceSearchVO -> {
|
||||
if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
}
|
||||
});
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_standards_info");
|
||||
// searchList.forEach(sarAdvanceSearchVO -> {
|
||||
// if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
// }
|
||||
// });
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
@@ -228,11 +228,11 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
//不改传参强行置换
|
||||
searchList.forEach(sarAdvanceSearchVO -> {
|
||||
if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
}
|
||||
});
|
||||
// searchList.forEach(sarAdvanceSearchVO -> {
|
||||
// if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
// }
|
||||
// });
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_standards_info");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.sys.common.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,7 +29,6 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String endPutTime;
|
||||
|
||||
|
||||
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
@@ -168,6 +168,15 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String CBCD;
|
||||
private String CYCD;
|
||||
private String CYBZ;
|
||||
private String isKU;
|
||||
|
||||
public String getIsKU() {
|
||||
return isKU;
|
||||
}
|
||||
|
||||
public void setIsKU(String isKU) {
|
||||
this.isKU = isKU;
|
||||
}
|
||||
|
||||
public String getLLCS() {
|
||||
return LLCS;
|
||||
|
||||
+6
-6
@@ -1817,12 +1817,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
if (org.apache.commons.lang.StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(), SarAdvanceSearchVO.class);
|
||||
//不改传参强行置换
|
||||
searchList.forEach(sarAdvanceSearchVO -> {
|
||||
if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
}
|
||||
});
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_standards_info");
|
||||
// searchList.forEach(sarAdvanceSearchVO -> {
|
||||
// if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
// }
|
||||
// });
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
|
||||
@@ -73,6 +73,9 @@ public interface ITsUserService extends IService<TsUser> {
|
||||
|
||||
List<String> getResourceUserId(String userId);
|
||||
|
||||
//获取当前用户的 数据查看权限 针对于企业标准
|
||||
List<String> getResourceDataUserId(String userId);
|
||||
|
||||
/**
|
||||
* 导入人员数据
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,8 @@ import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
||||
import com.adc.da.slrs.sarUser.entity.*;
|
||||
import com.adc.da.slrs.sarUser.dao.TsUserDao;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.tsRoleMeunData.entity.TsRoleMenuData;
|
||||
import com.adc.da.slrs.tsRoleMeunData.service.ITsRoleMenuDataService;
|
||||
import com.adc.da.sync.service.SyncUserService;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.utils.util.ListUtil;
|
||||
@@ -35,6 +37,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -65,6 +68,8 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
||||
private TsPositionDao tsPositionDao;
|
||||
@Autowired
|
||||
private ITsInstitutionService tsInstitutionService;
|
||||
@Autowired
|
||||
ITsRoleMenuDataService iTsRoleMenuDataService;
|
||||
|
||||
|
||||
public void deleteUser(){
|
||||
@@ -277,6 +282,21 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
||||
List<String> roleIds=tsPositionService.getRoleIdsByPositionIds(positionIds);
|
||||
return tsRoleService.getResourceIdsByRoleIds(roleIds);
|
||||
|
||||
}
|
||||
/**
|
||||
* 查询当前登录的用户资源
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
@Override
|
||||
public List<String> getResourceDataUserId(String userId) {
|
||||
List<String> positionIds=tsUserDao.selectPositionIds(userId);
|
||||
List<String> roleIds=tsPositionService.getRoleIdsByPositionIds(positionIds);
|
||||
QueryWrapper<TsRoleMenuData> wrapper=new QueryWrapper<>();
|
||||
wrapper.select("MENU_ID");
|
||||
wrapper.in("ROLE_ID",roleIds);
|
||||
List<TsRoleMenuData> tsRoleMenuData=iTsRoleMenuDataService.list(wrapper);
|
||||
return tsRoleMenuData.stream().map(TsRoleMenuData::getMenuId).distinct().collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.adc.da.slrs.tsRoleMeunData.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.tsRoleMeunData.service.ITsRoleMenuDataService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.tsRoleMeunData.entity.TsRoleMenuData;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|TsRoleMenuData|")
|
||||
@RequestMapping("/${restPath}/tsRoleMeunData/ts-role-menu-data")
|
||||
public class TsRoleMenuDataController extends BaseController<TsRoleMenuData> {
|
||||
|
||||
@Autowired
|
||||
private ITsRoleMenuDataService iTsRoleMenuDataService;
|
||||
|
||||
|
||||
@ApiOperation("角色与菜单关联控制右侧数据列表")
|
||||
@PostMapping("/saveBatch")
|
||||
public ResponseMessage<Object> disable(@RequestBody TsRoleMenuData tsRoleMenuData){
|
||||
//上来就给他 清了 能满足清空 修改 新增
|
||||
QueryWrapper<TsRoleMenuData> wrapper=new QueryWrapper<>();
|
||||
wrapper.eq("ROLE_ID",tsRoleMenuData.getRoleId());
|
||||
iTsRoleMenuDataService.remove(wrapper);
|
||||
|
||||
if (StringUtils.isNotBlank(tsRoleMenuData.getMenuIds())){
|
||||
List<String> menus=new ArrayList<>();
|
||||
if (tsRoleMenuData.getMenuIds().contains(",")){
|
||||
menus.addAll(new ArrayList<>(Arrays.asList(tsRoleMenuData.getMenuIds().split(","))));
|
||||
}else {
|
||||
menus.add(tsRoleMenuData.getMenuIds());
|
||||
}
|
||||
List<TsRoleMenuData> res=new ArrayList<>();
|
||||
menus.forEach(s -> {
|
||||
TsRoleMenuData tsRoleMenuData1=new TsRoleMenuData();
|
||||
tsRoleMenuData1.setRoleId(tsRoleMenuData.getRoleId());
|
||||
tsRoleMenuData1.setMenuId(s);
|
||||
res.add(tsRoleMenuData1);
|
||||
});
|
||||
iTsRoleMenuDataService.saveBatch(res);
|
||||
return Result.success();
|
||||
}else {
|
||||
return Result.error("请选择菜单");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询与角色绑定的菜单--支持多个角色查询")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<Object> list(String ids){
|
||||
//判断disableFlag是否填入正确
|
||||
List<String> list=new ArrayList<>();
|
||||
if (ids.contains(",")){
|
||||
list.addAll(new ArrayList<>(Arrays.asList(ids.split(","))));
|
||||
}else {
|
||||
list.add(ids);
|
||||
}
|
||||
QueryWrapper<TsRoleMenuData> wrapper=new QueryWrapper<>();
|
||||
wrapper.in("ROLE_ID",list);
|
||||
List<TsRoleMenuData> tsRoleMenuData=iTsRoleMenuDataService.list(wrapper);
|
||||
return Result.success(tsRoleMenuData.stream().map(TsRoleMenuData::getMenuId).distinct().collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.tsRoleMeunData.dao;
|
||||
|
||||
import com.adc.da.slrs.tsRoleMeunData.entity.TsRoleMenuData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
public interface TsRoleMenuDataDao extends BaseMapper<TsRoleMenuData> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.adc.da.slrs.tsRoleMeunData.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="TsRoleMenuData对象", description="")
|
||||
public class TsRoleMenuData extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "角色id")
|
||||
@TableField("ROLE_ID")
|
||||
private String roleId;
|
||||
|
||||
@ApiModelProperty(value = "菜单id")
|
||||
@TableField("MENU_ID")
|
||||
private String menuId;
|
||||
|
||||
@ApiModelProperty(value = "菜单id")
|
||||
@TableField(exist = false)
|
||||
private String menuIds;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.tsRoleMeunData.service;
|
||||
|
||||
import com.adc.da.slrs.tsRoleMeunData.entity.TsRoleMenuData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
public interface ITsRoleMenuDataService extends IService<TsRoleMenuData> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.tsRoleMeunData.service.impl;
|
||||
|
||||
import com.adc.da.slrs.tsRoleMeunData.entity.TsRoleMenuData;
|
||||
import com.adc.da.slrs.tsRoleMeunData.dao.TsRoleMenuDataDao;
|
||||
import com.adc.da.slrs.tsRoleMeunData.service.ITsRoleMenuDataService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-03-16
|
||||
*/
|
||||
@Service
|
||||
public class TsRoleMenuDataServiceImpl extends ServiceImpl<TsRoleMenuDataDao, TsRoleMenuData> implements ITsRoleMenuDataService {
|
||||
|
||||
}
|
||||
@@ -42,6 +42,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
standTypeList.add(SarTypeEnum.INLAND_STAND.getValue());
|
||||
standTypeList.add(SarTypeEnum.FOREIGN_STAND.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.LAWS_STAND.getValue());
|
||||
lawsTypeList.add(SarTypeEnum.FOREIGN_LAWS.getValue());
|
||||
standStateList.add("DRAFT");
|
||||
standStateList.add("ADVICE");
|
||||
standStateList.add("RADYSUBMIT");
|
||||
@@ -142,6 +143,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
} else if (lawsTypeList.contains(sarType)) {
|
||||
if (SarTypeEnum.FOREIGN_LAWS.getValue().equals(sarType)) {
|
||||
lawsForeignAttrFieldList.add(detailsEO);
|
||||
fieldInfoBuilderLaws.append(detailsEO.getAttrField() + ",");
|
||||
}
|
||||
if (SarTypeEnum.LAWS_STAND.getValue().equals(sarType)) {
|
||||
lawsStandAttrFieldList.add(detailsEO);
|
||||
@@ -150,7 +152,6 @@ public class InitStandAttrUtil implements ApplicationRunner {
|
||||
if (SarTypeEnum.INLAND_LAWS.getValue().equals(sarType)) {
|
||||
lawsInlandAttrFieldList.add(detailsEO);
|
||||
}
|
||||
fieldInfoBuilderLaws.append(detailsEO.getAttrField() + ",");
|
||||
fieldInfoNameBuilderLaws.append(detailsEO.getAttrName() + ",");
|
||||
queryFieldListLaws.add(detailsEO.getAttrField());
|
||||
if (StandAttrTypeEnum.SELECT_OPTION.getValue().equals(attrType) || StandAttrTypeEnum.SEL_OPTS.getValue().equals(attrType)) {
|
||||
|
||||
Reference in New Issue
Block a user