Compare commits
10
Commits
04e772f8c7
...
7984c0338a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7984c0338a | ||
|
|
2773657f7b | ||
|
|
e2fff404d5 | ||
|
|
a30d1d1271 | ||
|
|
e23025ed2b | ||
|
|
9c399ca46e | ||
|
|
9e5e68574e | ||
|
|
9b6da7cd0f | ||
|
|
89c108ec06 | ||
|
|
6825b99d9c |
+4
-1
@@ -348,7 +348,10 @@ public class ActSarItemsBussEOService {
|
||||
String prcName = String.valueOf(standMap.get("prcName"));
|
||||
String prcCreateUser = String.valueOf(standMap.get("prcCreateUser"));
|
||||
String standType = String.valueOf(standMap.get("standType"));
|
||||
String DTQBBHBUSS = String.valueOf(standMap.get("DTQBBHBUSS"));
|
||||
String DTQBBHBUSS = null;
|
||||
if (standMap.get("DTQBBHBUSS") != null) {
|
||||
DTQBBHBUSS = String.valueOf(standMap.get("DTQBBHBUSS"));
|
||||
}
|
||||
String standNum = String.valueOf(standMap.get("standNum"));//制修订时顺序号
|
||||
String madelSub = String.valueOf(standMap.get("madelSub")); // 培训文件
|
||||
// String isJudge = String.valueOf(standMap.get("ifIn")); //是否经过技术评估
|
||||
|
||||
+117
@@ -7,11 +7,15 @@ import com.adc.da.search.util.InitStandAttrSearchUtil;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.sys.sarResource.entity.SysTsResource;
|
||||
import com.adc.da.sys.sarResource.service.ISysTsResourceService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.assertj.core.util.Lists;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
@@ -54,6 +58,8 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
|
||||
@Resource
|
||||
private ISarMenuStandardService sarMenuStandardService;
|
||||
@Resource
|
||||
private ISysTsResourceService tsResourceService;
|
||||
|
||||
|
||||
@Autowired
|
||||
@@ -360,6 +366,64 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 处理菜单名称
|
||||
List<String> menuNameList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSystem())) {
|
||||
ArrayList<String> menuIdList = new ArrayList<>();
|
||||
Collections.addAll(menuIdList, searchInfoEO.getStandSystem().split(","));
|
||||
// 如果是1,2,3 则代表顶级目录,无需特意查询
|
||||
if (menuIdList.contains("1") || menuIdList.contains("2") || menuIdList.contains("3")) {
|
||||
menuNameList = Lists.emptyList();
|
||||
}else {
|
||||
LambdaQueryWrapper<SysTsResource> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(SysTsResource::getId, menuIdList);
|
||||
List<SysTsResource> tsResourceList = tsResourceService.list(wrapper);
|
||||
List<SysTsResource> childTsResourceList = new ArrayList<>();
|
||||
for (SysTsResource sysTsResource : tsResourceList) {
|
||||
LambdaQueryWrapper<SysTsResource> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysTsResource::getParentId, sysTsResource.getId());
|
||||
List<SysTsResource> TsResources=tsResourceService.list(queryWrapper);
|
||||
for(SysTsResource tsResource : TsResources){
|
||||
childTsResourceList.add(tsResource);
|
||||
recursionGetChildren(tsResource, childTsResourceList);
|
||||
}
|
||||
}
|
||||
tsResourceList.addAll(childTsResourceList);
|
||||
Set<SysTsResource> tsResourceSet = new HashSet<>(tsResourceList);
|
||||
|
||||
List<String> tempList = tsResourceSet.stream().map(SysTsResource::getMenuName).collect(Collectors.toList());
|
||||
if ("bussstand".equals(searchInfoEO.getSelectIndex())) {
|
||||
// 和ES中的类别对应
|
||||
for (String menuName : tempList) {
|
||||
menuNameList.add(getReplaceStandSortStr(menuName));
|
||||
}
|
||||
} else if ("stand".equals(searchInfoEO.getSelectIndex())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSystem())) {
|
||||
// 使用正则表达式提取括号内的内容
|
||||
Pattern pattern = Pattern.compile("(([^()]+))");
|
||||
for (String menuName : tempList) {
|
||||
Matcher matcher = pattern.matcher(menuName);
|
||||
if (matcher.find()) {
|
||||
String contentInBrackets = matcher.group(1);
|
||||
menuNameList.add(contentInBrackets);
|
||||
} else {
|
||||
menuNameList.add(menuName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!menuNameList.isEmpty()) {
|
||||
// menuNameList.forEach(each -> boolQueryBuilder.must(QueryBuilders.matchQuery("standSort","*"+each+"*")));
|
||||
// }
|
||||
if (!menuNameList.isEmpty()) {
|
||||
// 国标包含GB/T
|
||||
if (menuNameList.contains("GB")) {
|
||||
menuNameList.add("GB/T");
|
||||
}
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("standSort.keyword", menuNameList));
|
||||
}
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder).setTrackTotalHits(true);
|
||||
|
||||
// 获取查询到的结果
|
||||
@@ -2186,6 +2250,59 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
log.info(response.getHits().toString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void recursionGetChildren(SysTsResource parent, List<SysTsResource> childTsResourceList){
|
||||
|
||||
LambdaQueryWrapper<SysTsResource> tsResourceQueryWrapper=new LambdaQueryWrapper<>();
|
||||
tsResourceQueryWrapper.eq(SysTsResource::getParentId,parent.getId());
|
||||
List<SysTsResource> children=tsResourceService.list(tsResourceQueryWrapper);
|
||||
for(SysTsResource tsResource:children){
|
||||
childTsResourceList.add(tsResource);
|
||||
recursionGetChildren(tsResource, childTsResourceList);
|
||||
}
|
||||
}
|
||||
|
||||
public String getReplaceStandSortStr(String standSort){
|
||||
switch (standSort){
|
||||
case "A类标准(技术条件)":
|
||||
return "Q/FT A";
|
||||
case "B类标准(技术基础)":
|
||||
return "Q/FT B";
|
||||
case "C类标准(产品标准)":
|
||||
return "Q/FT C";
|
||||
case "E类标准(发动机)":
|
||||
return "Q/FT E";
|
||||
case " F类标准(仿真分析)":
|
||||
return "Q/FT F";
|
||||
case "G类标准":
|
||||
return "Q/FT G";
|
||||
case "M类标准(工程机械)":
|
||||
return "Q/FT M";
|
||||
case "P类标准(工艺工装)":
|
||||
return "Q/FT P";
|
||||
case "Q类标准(质量评审)":
|
||||
return "Q/FT Q";
|
||||
case "T类标准(试验标准)":
|
||||
return "Q/FT T";
|
||||
case "R类标准(设计规范)":
|
||||
return "Q/FT R";
|
||||
case "V类标准(评价标准)":
|
||||
return "Q/FT V";
|
||||
case "X类标准(出口车)":
|
||||
return "Q/FT X";
|
||||
case "Z类标准(指导性技术文件)":
|
||||
return "Q/FT Z";
|
||||
case "S类标准(产品试制标准)":
|
||||
return "Q/FT S";
|
||||
case "Y类标准(标杆研究标准)":
|
||||
return "Q/FT Y";
|
||||
case "参考标准":
|
||||
return "FT";
|
||||
default:
|
||||
return "其他企业标准";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -175,10 +175,10 @@ public class SendBussMQService {
|
||||
saveMap.put("id",infoEO.getId());
|
||||
saveMap.put("standSortOrder",esStateOrder(String.valueOf(infoEO.getStandSort()),dicMap));
|
||||
|
||||
// saveMap.put("standSort",infoEO.getStandSort());
|
||||
// saveMap.put("stand_sort",infoEO.getStandSort());
|
||||
saveMap.put("standSort",convertStandSort(infoEO.getId()));
|
||||
saveMap.put("stand_sort",convertStandSort(infoEO.getId()));
|
||||
saveMap.put("standSort",infoEO.getStandSort());
|
||||
saveMap.put("stand_sort",infoEO.getStandSort());
|
||||
// saveMap.put("standSort",convertStandSort(infoEO.getId()));
|
||||
// saveMap.put("stand_sort",convertStandSort(infoEO.getId()));
|
||||
if(StringUtils.isNotEmpty(infoEO.getStandSort())){
|
||||
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
|
||||
saveMap.put("standSortShow",codeName);
|
||||
|
||||
@@ -132,10 +132,10 @@ public class SendStandMQService {
|
||||
saveMap.put("countryShow",codeName);
|
||||
}
|
||||
saveMap.put("standSortOrder",esStateOrder(String.valueOf(infoEO.getStandSort()),dicMap));
|
||||
// saveMap.put("standSort",infoEO.getStandSort());
|
||||
// saveMap.put("stand_sort",infoEO.getStandSort());
|
||||
saveMap.put("standSort",convertStandSort(infoEO.getId()));
|
||||
saveMap.put("stand_sort",convertStandSort(infoEO.getId()));
|
||||
saveMap.put("standSort",infoEO.getStandSort());
|
||||
saveMap.put("stand_sort",infoEO.getStandSort());
|
||||
// saveMap.put("standSort",convertStandSort(infoEO.getId()));
|
||||
// saveMap.put("stand_sort",convertStandSort(infoEO.getId()));
|
||||
if (StringUtils.isNotEmpty(infoEO.getStandSort())) {
|
||||
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
|
||||
saveMap.put("standSortShow",codeName);
|
||||
|
||||
+32
-7
@@ -313,6 +313,14 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
@Override
|
||||
public ResponseMessage<?> importEsRevisePlan(MultipartFile file) throws Exception {
|
||||
String userId = LoginUserUtil.getUserId();
|
||||
LambdaQueryWrapper<TsUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(TsUser::getUserId, userId);
|
||||
List<TsUser> currentLoginUserList = tsUserService.list(queryWrapper);
|
||||
if (currentLoginUserList.size() < 1) {
|
||||
return Result.error("请先登录");
|
||||
}
|
||||
TsUser userInfo = currentLoginUserList.get(0);
|
||||
|
||||
//获取文件全称
|
||||
String fileNameStr = file.getOriginalFilename();
|
||||
//获取最后.的位置
|
||||
@@ -497,6 +505,7 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
return Result.error("第" + index + "条记录的起草责任单位不能为空");
|
||||
}
|
||||
if (StringUtils.isNotBlank(esRevisePlan.getDrafter())) {
|
||||
List<String> drafterNameList = new ArrayList<>();
|
||||
int tempCount = 1;
|
||||
for (String drafter : esRevisePlan.getDrafter().split(",")) {
|
||||
LambdaQueryWrapper<TsUser> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -504,16 +513,20 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
wrapper.eq(TsUser::getState, "1");
|
||||
wrapper.eq(TsUser::getValidFlag, "0");
|
||||
wrapper.eq(TsUser::getDisableFlag,"0");
|
||||
int count = tsUserService.count(wrapper);
|
||||
if (count < 1) {
|
||||
List<TsUser> list = tsUserService.list(wrapper);
|
||||
if (list.size() < 1) {
|
||||
return Result.error("第" + index + "条记录的第"+tempCount+"个起草人不存在");
|
||||
}
|
||||
String drafterName = list.get(0).getUname() + "(" + list.get(0).getAccount() + ")";
|
||||
drafterNameList.add(drafterName);
|
||||
tempCount++;
|
||||
}
|
||||
esRevisePlan.setDrafterName(String.join(",",drafterNameList));
|
||||
}else {
|
||||
return Result.error("第" + index + "条记录的起草人不能为空");
|
||||
}
|
||||
if (StringUtils.isNotBlank(esRevisePlan.getResPerson())) {
|
||||
List<String> resPersonNameList = new ArrayList<>();
|
||||
int tempCount = 1;
|
||||
for (String resPerson : esRevisePlan.getResPerson().split(",")) {
|
||||
LambdaQueryWrapper<TsUser> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -521,11 +534,14 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
wrapper.eq(TsUser::getState, "1");
|
||||
wrapper.eq(TsUser::getValidFlag, "0");
|
||||
wrapper.eq(TsUser::getDisableFlag,"0");
|
||||
int count = tsUserService.count(wrapper);
|
||||
if (count < 1) {
|
||||
List<TsUser> list = tsUserService.list(wrapper);
|
||||
if (list.size() < 1) {
|
||||
return Result.error("第" + index + "条记录的第"+tempCount+"个内部评审责任人不存在");
|
||||
}
|
||||
String resPersonName = list.get(0).getUname() + "(" + list.get(0).getAccount() + ")";
|
||||
resPersonNameList.add(resPersonName);
|
||||
}
|
||||
esRevisePlan.setResPersonName(String.join(",",resPersonNameList));
|
||||
}else {
|
||||
return Result.error("第" + index + "条记录的内部评审责任人不能为空");
|
||||
}
|
||||
@@ -535,10 +551,12 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
wrapper.eq(TsUser::getState, "1");
|
||||
wrapper.eq(TsUser::getValidFlag, "0");
|
||||
wrapper.eq(TsUser::getDisableFlag,"0");
|
||||
int count = tsUserService.count(wrapper);
|
||||
if (count < 1) {
|
||||
List<TsUser> list = tsUserService.list(wrapper);
|
||||
if (list.size() < 1) {
|
||||
return Result.error("第" + index + "条记录的技术委员会评审负责人不存在");
|
||||
}
|
||||
String wgLeaderName = list.get(0).getUname() + "(" + list.get(0).getAccount() + ")";
|
||||
esRevisePlan.setWgLeaderName(wgLeaderName);
|
||||
}else {
|
||||
return Result.error("第" + index + "条记录的技术委员会评审负责人不能为空");
|
||||
}
|
||||
@@ -615,7 +633,14 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
ProcessRollBackEO rollBackEO=new ProcessRollBackEO();
|
||||
rollBackEO.setType("25");
|
||||
rollBackEO.setId("enterpriseStandardSystemRevisionPlan");
|
||||
String jsonString = JSONObject.toJSONString(esRevisePlan);
|
||||
JSONObject jsonObject =(JSONObject) JSONObject.toJSON(esRevisePlan);
|
||||
jsonObject.put("addFlag",1);
|
||||
jsonObject.put("esId",objectResponseMessage.getData().toString());
|
||||
jsonObject.put("prcCreateUser",userId);
|
||||
jsonObject.put("prcCreateUserName",userInfo.getUname());
|
||||
jsonObject.put("nowEsId",objectResponseMessage.getData().toString());
|
||||
jsonObject.put("type","5");
|
||||
String jsonString = JSONObject.toJSONString(jsonObject);
|
||||
rollBackEO.setJson(jsonString);
|
||||
rollBackEO.setUserId(userId);
|
||||
Wrapper<String> stringWrapper = workFlowFeignClient.activiti_define_start_rollBack(rollBackEO);
|
||||
|
||||
-85
@@ -1,85 +0,0 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.entity;
|
||||
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
|
||||
/**
|
||||
* @author: Mzaxd
|
||||
* @Date: 2023/11/15 17:36
|
||||
*/
|
||||
public enum StandCategoryEnum {
|
||||
// INLAND 类型的枚举实例
|
||||
INLAND_GB("INLAND", "GB", 0),
|
||||
INLAND_GBT("INLAND", "GB/T", 1),
|
||||
INLAND_QCT("INLAND", "QC/T", 2),
|
||||
INLAND_JT("INLAND", "JT", 3),
|
||||
INLAND_JB("INLAND", "JB", 4),
|
||||
INLAND_GA("INLAND", "GA", 5),
|
||||
INLAND_GJB("INLAND", "GJB", 6),
|
||||
INLAND_HJ("INLAND", "HJ", 7),
|
||||
|
||||
// FOREIGN 类型的枚举实例
|
||||
FOREIGN_ECE("FOREIGN", "ECE", 0),
|
||||
FOREIGN_EU("FOREIGN", "EU", 1),
|
||||
FOREIGN_EC("FOREIGN", "EC", 2),
|
||||
FOREIGN_EEC("FOREIGN", "EEC", 3),
|
||||
FOREIGN_ISO("FOREIGN", "ISO", 4),
|
||||
FOREIGN_IEC("FOREIGN", "IEC", 5),
|
||||
FOREIGN_GTR("FOREIGN", "GTR", 6),
|
||||
FOREIGN_CFR("FOREIGN", "CFR", 7),
|
||||
FOREIGN_JASO("FOREIGN", "JASO", 8),
|
||||
FOREIGN_JIS("FOREIGN", "JIS", 9),
|
||||
FOREIGN_GSO("FOREIGN", "GSO", 10),
|
||||
FOREIGN_GOST("FOREIGN", "GOST", 11),
|
||||
FOREIGN_ΓOCT("FOREIGN", "ΓOCT", 12),
|
||||
FOREIGN_TP("FOREIGN", "TP", 13),
|
||||
FOREIGN_SASO("FOREIGN", "SASO", 14),
|
||||
FOREIGN_UAE("FOREIGN", "UAE", 15),
|
||||
FOREIGN_CONTRAN("FOREIGN", "CONTRAN", 16),
|
||||
FOREIGN_DENATRAN("FOREIGN", "DENATRAN", 17),
|
||||
FOREIGN_ABNT_NBR("FOREIGN", "ABNT NBR", 18),
|
||||
FOREIGN_NBR("FOREIGN", "NBR", 19),
|
||||
FOREIGN_INMETRO("FOREIGN", "INMETRO", 20),
|
||||
FOREIGN_CONAMA("FOREIGN", "CONAMA", 21),
|
||||
FOREIGN_Normative_Instruction("FOREIGN", "Normative Instruction", 22),
|
||||
FOREIGN_ADR("FOREIGN", "ADR", 23),
|
||||
;
|
||||
|
||||
private final String standType;
|
||||
private final String standSort;
|
||||
private final int sortValue;
|
||||
|
||||
StandCategoryEnum(String standType, String standSort, int sortValue) {
|
||||
this.standType = standType;
|
||||
this.standSort = standSort;
|
||||
this.sortValue = sortValue;
|
||||
}
|
||||
|
||||
// 根据 standSort 返回 value 的静态方法
|
||||
public static int getSortByStandType(String standType, String standSort) {
|
||||
for (StandCategoryEnum category : StandCategoryEnum.values()) {
|
||||
if (category.getStandType().equals(standType) && category.getStandSort().equals(standSort)) {
|
||||
return category.getSortValue();
|
||||
}
|
||||
// 给国标 外标默认值
|
||||
if (category.getStandType().equals("INLAND")) {
|
||||
return 8;
|
||||
} else if (category.getStandType().equals("FOREIGN")) {
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
throw new AdcDaBaseException("标准类型错误");
|
||||
}
|
||||
|
||||
// Getter 方法
|
||||
public String getStandType() {
|
||||
return standType;
|
||||
}
|
||||
|
||||
public String getStandSort() {
|
||||
return standSort;
|
||||
}
|
||||
|
||||
public int getSortValue() {
|
||||
return sortValue;
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.adc.da.slrs.sarMenuStandard.entity;
|
||||
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author: Mzaxd
|
||||
* @Date: 2023/11/15 17:36
|
||||
*/
|
||||
@Component
|
||||
public class StandCategorySortUtil {
|
||||
|
||||
// 构造器
|
||||
public static Integer getSortByStandType(List<TsDicType> gbSortDictList,
|
||||
List<TsDicType> fbSortDictList,
|
||||
List<TsDicType> esSortDictList,
|
||||
String standType, String standSort) {
|
||||
switch (standType) {
|
||||
case "INLAND":
|
||||
for (TsDicType gbSortDict : gbSortDictList) {
|
||||
if (gbSortDict.getDicTypeName().equals(standSort)) {
|
||||
return gbSortDict.getShowIndex().intValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "FOREIGN":
|
||||
for (TsDicType fbSortDict : fbSortDictList) {
|
||||
if (fbSortDict.getDicTypeName().equals(standSort)) {
|
||||
return fbSortDict.getShowIndex().intValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ENTERPRISE":
|
||||
for (TsDicType esSortDict : esSortDictList) {
|
||||
if (esSortDict.getDicTypeName().equals(standSort)) {
|
||||
return esSortDict.getShowIndex().intValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ public class StandSystemDTO {
|
||||
@ApiModelProperty(value = "节点Id")
|
||||
private String menuId;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", width = 10, orderNum = "0")
|
||||
private Integer standIndex;
|
||||
|
||||
@Excel(name = "体系结构", width = 40, orderNum = "1")
|
||||
@ApiModelProperty(value = "体系结构")
|
||||
private String standSystem;
|
||||
@@ -49,8 +53,11 @@ public class StandSystemDTO {
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
@Excel(name = "标准状态", width = 25, orderNum = "4")
|
||||
private String standState;
|
||||
|
||||
private List<String> standStateList;
|
||||
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private String textStatus;
|
||||
|
||||
@@ -156,11 +163,22 @@ public class StandSystemDTO {
|
||||
@ApiModelProperty(value = "导出文件名称")
|
||||
private String exportName;
|
||||
|
||||
@ApiModelProperty(value = "标准号")
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "年代号")
|
||||
private String yearNumber;
|
||||
|
||||
public void setSelectIds(String selectIds) {
|
||||
this.selectIds = selectIds;
|
||||
this.selectIdList = java.util.Arrays.asList(selectIds.split(","));
|
||||
}
|
||||
|
||||
public void setStandState(String standState) {
|
||||
this.standState = standState;
|
||||
this.standStateList = java.util.Arrays.asList(standState.split(","));
|
||||
}
|
||||
|
||||
public void setStartReleaseDate(Date startReleaseDate) {
|
||||
this.startReleaseDate = startReleaseDate;
|
||||
if (startReleaseDate != null) {
|
||||
|
||||
+23
-4
@@ -14,7 +14,7 @@ import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO;
|
||||
import com.adc.da.slrs.sarMenuStandard.dao.SarMenuStandardNewDao;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.SarMenuStandardNew;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.StandCategoryEnum;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.StandCategorySortUtil;
|
||||
import com.adc.da.slrs.sarMenuStandard.entity.StandSystemDTO;
|
||||
import com.adc.da.slrs.sarMenuStandard.service.ISarMenuStandardNewService;
|
||||
import com.adc.da.slrs.sarResource.dao.TsResourceDao;
|
||||
@@ -282,11 +282,20 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
// 企标标准状态字典
|
||||
List<TsDicType> esStateDictList = dicItemService.selectAllDicTypeNameByDicCode("TEXTSTATUSBUSS");
|
||||
|
||||
// 国标排序字典
|
||||
List<TsDicType> gbSortDictList = dicItemService.selectAllDicTypeNameByDicCode("ES_INLAND");
|
||||
// 外标排序字典
|
||||
List<TsDicType> fbSortDictList = dicItemService.selectAllDicTypeNameByDicCode("ES_FOREIGN");
|
||||
// 企标排序字典
|
||||
List<TsDicType> esSortDictList = dicItemService.selectAllDicTypeNameByDicCode("ES_BUSS");
|
||||
|
||||
// 构造体系路径 && 设置标准内部类别排序号 && 翻译
|
||||
for (StandSystemDTO dto : resultList) {
|
||||
String fullPath = pathMap.get(dto.getMenuId());
|
||||
dto.setStandSystem(fullPath);
|
||||
dto.setStandCategorySort(StandCategoryEnum.getSortByStandType(dto.getDataSource(), dto.getStandSort()));
|
||||
dto.setStandCategorySort(StandCategorySortUtil.getSortByStandType(
|
||||
gbSortDictList, fbSortDictList, esSortDictList, dto.getDataSource(), dto.getStandSort())
|
||||
);
|
||||
// 设置体系排序号
|
||||
SarMenuStandard node = SarMenuStandard.findNodeById(targetNode, dto.getMenuId());
|
||||
dto.setSystemSort(node.getSystemSort());
|
||||
@@ -325,7 +334,9 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
// 每个类别的标准内部按照类别排序
|
||||
resultList.sort(Comparator.comparingInt(StandSystemDTO::getSystemSort)
|
||||
.thenComparingInt(StandSystemDTO::getStandTypeSort)
|
||||
.thenComparingInt(StandSystemDTO::getStandCategorySort));
|
||||
.thenComparingInt(StandSystemDTO::getStandCategorySort)
|
||||
.thenComparing(StandSystemDTO::getStandNumber)
|
||||
.thenComparing(StandSystemDTO::getYearNumber, Comparator.reverseOrder()));
|
||||
}
|
||||
|
||||
// 手动分页
|
||||
@@ -342,6 +353,11 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
|
||||
// 获取当前页面的数据
|
||||
List<StandSystemDTO> pageList = resultList.subList(start, end);
|
||||
int standIndex = 1;
|
||||
for (StandSystemDTO dto : pageList) {
|
||||
dto.setStandIndex(standIndex);
|
||||
standIndex++;
|
||||
}
|
||||
|
||||
// 使用MyBatis Plus的Page类来构造分页对象
|
||||
Page<StandSystemDTO> page = new Page<>(pageNum, pageSize, total);
|
||||
@@ -382,6 +398,9 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
List<StandSystemDTO> dataList;
|
||||
standSystemDTO.setPage(1);
|
||||
standSystemDTO.setPageSize(Integer.MAX_VALUE);
|
||||
if (StringUtils.isBlank(standSystemDTO.getExportName())) {
|
||||
standSystemDTO.setExportName("标准体系");
|
||||
}
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + ReadExcel.encodeFileName(standSystemDTO.getExportName() + ".xlsx",
|
||||
@@ -418,7 +437,7 @@ public class SarMenuStandardNewServiceNewImpl extends ServiceImpl<SarMenuStandar
|
||||
@Override
|
||||
public void deleteMenuStandard(String menuId) {
|
||||
// 先找到节点的名字
|
||||
String menuName = getById(menuId).getMenuName();
|
||||
String menuName = getById(menuId).getMenuName();
|
||||
// 删除主表中的节点
|
||||
LambdaUpdateWrapper<SarMenuStandard> menuUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||
menuUpdateWrapper.eq(SarMenuStandard::getId, menuId);
|
||||
|
||||
@@ -199,7 +199,9 @@
|
||||
WHEN gb.STAND_TYPE = 'INLAND' THEN 1
|
||||
WHEN gb.STAND_TYPE = 'FOREIGN' THEN 2
|
||||
END AS standTypeSort,
|
||||
sms.ID AS menuId
|
||||
sms.ID AS menuId,
|
||||
gb.STAND_NUMBER AS standNumber,
|
||||
gb.STAND_YEAR AS yearNumber
|
||||
FROM
|
||||
`sar_standards_info` AS gb
|
||||
LEFT JOIN `sar_stand_attr_info` AS gba ON gb.ID = gba.STAND_ID
|
||||
@@ -252,6 +254,13 @@
|
||||
<if test="param.draftUserName != null and param.draftUserName != ''">
|
||||
AND gba.WSSMR LIKE CONCAT('%',#{param.draftUserName},'%')
|
||||
</if>
|
||||
<!--状态-->
|
||||
<if test="param.standStateList != null and param.standStateList.size() > 0">
|
||||
AND gb.TEXT_STATUS IN
|
||||
<foreach item="item" index="index" collection="param.standStateList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--搜索条件数据来源-->
|
||||
<if test="param.dataSource != null and param.dataSource != ''">
|
||||
AND gb.STAND_TYPE = #{param.dataSource}
|
||||
|
||||
-1
@@ -47,7 +47,6 @@
|
||||
<if test="flieM.endDataUploadTime != null ">
|
||||
AND fm.data_upload_time <= #{flieM.endDataUploadTime}
|
||||
</if>
|
||||
group by fm.id
|
||||
order by fm.data_upload_time desc
|
||||
</select>
|
||||
|
||||
|
||||
+10
-20
@@ -1287,26 +1287,9 @@
|
||||
'ENTERPRISE' AS dataSource,
|
||||
sms.ID AS menuId,
|
||||
3 AS standTypeSort,
|
||||
CASE
|
||||
when es.stand_code like concat('%', 'Q/FT A', '%') THEN 0
|
||||
when es.stand_code like concat('%', 'Q/FT B', '%') THEN 1
|
||||
when es.stand_code like concat('%', 'Q/FT E', '%') THEN 2
|
||||
when es.stand_code like concat('%', 'Q/FT F', '%') THEN 3
|
||||
when es.stand_code like concat('%', 'Q/FT G', '%') THEN 4
|
||||
when es.stand_code like concat('%', 'Q/FT M', '%') THEN 5
|
||||
when es.stand_code like concat('%', 'Q/FT Q', '%') THEN 6
|
||||
when es.stand_code like concat('%', 'Q/FT R', '%') THEN 7
|
||||
when es.stand_code like concat('%', 'Q/FT S', '%') THEN 8
|
||||
when es.stand_code like concat('%', 'Q/FT T', '%') THEN 9
|
||||
when es.stand_code like concat('%', 'Q/FT V', '%') THEN 10
|
||||
when es.stand_code like concat('%', 'Q/FT X', '%') THEN 11
|
||||
when es.stand_code like concat('%', 'Q/FT Y', '%') THEN 12
|
||||
when es.stand_code like concat('%', 'Q/FT Z', '%') THEN 13
|
||||
when es.stand_code like concat('%', 'Q/QCBFC', '%') THEN 14
|
||||
when es.stand_code like concat('%', '雷萨企标Q/FL', '%') THEN 15
|
||||
when es.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
|
||||
ELSE 17
|
||||
END AS standCategorySort
|
||||
es.stand_sort AS standSort,
|
||||
es.stand_number AS standNumber,
|
||||
es.STAND_YEAR AS yearNumber
|
||||
FROM
|
||||
`sar_bussioness_stand` AS es
|
||||
LEFT JOIN `sar_buss_stand_attr_info` AS esa ON es.ID = esa.STAND_ID
|
||||
@@ -1357,6 +1340,13 @@
|
||||
<if test="param.draftUserName != null and param.draftUserName != ''">
|
||||
AND esa.QCRBUSS LIKE CONCAT('%',#{param.draftUserName},'%')
|
||||
</if>
|
||||
<!--标准状态-->
|
||||
<if test="param.standStateList != null and param.standStateList.size() > 0">
|
||||
AND es.TEXT_STATUS_BUSS IN
|
||||
<foreach item="item" index="index" collection="param.standStateList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--数据来源-->
|
||||
<if test="param.dataSource != null and param.dataSource != ''">
|
||||
AND 'ENTERPRISE' = #{param.dataSource}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<resultMap id="codeAndName" type="com.adc.da.slrs.tsDictionaryType.entity.TsDicType">
|
||||
<result property="dicTypeCode" column="dicTypeCode"/>
|
||||
<result property="dicTypeName" column="dicTypeName"/>
|
||||
<result property="showIndex" column="showIndex"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getSearchMenu" resultMap="searchMenu">
|
||||
@@ -37,7 +38,7 @@
|
||||
select DIC_TYPE_NAME from ts_dictype where DIC_TYPE_CODE = #{typeCode}
|
||||
</select>
|
||||
<select id="selectAllDicTypeNameByDicCode" resultMap="codeAndName">
|
||||
select DIC_TYPE_CODE as dicTypeCode, DIC_TYPE_NAME as dicTypeName from ts_dictype
|
||||
select DIC_TYPE_CODE as dicTypeCode, DIC_TYPE_NAME as dicTypeName, SHOW_INDEX as showIndex from ts_dictype
|
||||
where DIC_ID = (select id from ts_dictionary where DICTIONARY_CODE = #{dicCode})
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user