diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index 64ab6ab80..73953ca9e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -612,99 +612,17 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null); - //对应标准id - String correspondingStandard = (String) dataList.get(0).get("corresponding_standard"); - //代替标准id - String replaceStandardTemp = (String) dataList.get(0).get("replace_standard"); //处理被代替标准和对应标准 - List replaceStandardNameList = new ArrayList<>();//代替标准 List replacedStandardNameList = new ArrayList<>();//被代替标准 - List replacedStandardIdList = new ArrayList<>();//被代替标准 - List correspondingStandardNameList = new ArrayList<>();//对应标准 for (Map map : mapList) { - //对应标准处理 - if (StringUtils.isNotBlank(correspondingStandard) && correspondingStandard.contains((String) map.get("id"))) { - for (String s : correspondingStandard.split(",")) { - if (s.equals((String) map.get("id"))) { - correspondingStandardNameList.add((String) map.get("serial_number")); - } else { - boolean flag = isId(s); - if (!flag && !correspondingStandardNameList.contains(s)) { - correspondingStandardNameList.add(s); - } - } - } - } else { - //处理已删除的文档的对应标准 - if (StringUtils.isNotBlank(correspondingStandard)) { - for (String s : correspondingStandard.split(",")) { - boolean flag = isId(s); - if (!flag && !correspondingStandardNameList.contains(s)) { - correspondingStandardNameList.add(s); - } - } - } - } - //代替标准 - if (StringUtils.isNotBlank(replaceStandardTemp) && replaceStandardTemp.contains((String) map.get("id"))) { - for (String s : replaceStandardTemp.split(",")) { - if (s.equals((String) map.get("id"))) { - replaceStandardNameList.add((String) map.get("serial_number")); - } else { - boolean flag = isId(s); - if (!flag && !replaceStandardNameList.contains(s)) { - replaceStandardNameList.add(s); - } - } - } - } else { - //处理已删除的代替标准 - if (StringUtils.isNotBlank(replaceStandardTemp)) { - for (String s : replaceStandardTemp.split(",")) { - boolean flag = isId(s); - if (!flag && !replaceStandardNameList.contains(s)) { - replaceStandardNameList.add(s); - } - } - } - - } //被代替标准 String replaceStandard = (String) map.get("replace_standard"); - if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) { + if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains((String) dataList.get(0).get("serial_number"))) { String serialNumber = (String) map.get("serial_number"); replacedStandardNameList.add(serialNumber); - replacedStandardIdList.add((String) map.get("id")); } } - //对应标准中文 -// if (correspondingStandardNameList.size() != 0) { - dataList.get(0).put("corresponding_standard", StringUtils.join(correspondingStandardNameList, ",")); - dataList.get(0).put("corresponding_standard_id", correspondingStandard); -// } -// if (replacedStandardNameList.size() != 0) { dataList.get(0).put("replaced_standard", StringUtils.join(replacedStandardNameList, ",")); -// dataList.get(0).put("replaced_standard_id", StringUtils.join(replacedStandardIdList, ",")); -// } -// if (replaceStandardNameList.size() != 0) { - dataList.get(0).put("replace_standard", StringUtils.join(replaceStandardNameList, ",")); - dataList.get(0).put("replace_standard_id", replaceStandardTemp); -// } - //代替标准中文 -// String replaceStandard = (String) dataList.get(0).get("replace_standard"); -// if (StringUtils.isNotBlank(replaceStandard)) { -// LambdaQueryWrapper queryWrapperTemp = new LambdaQueryWrapper<>(); -// queryWrapperTemp.in(BussDocumentLibraryEO::getId, Arrays.asList(replaceStandard.split(","))); -// List> dataListTemp = bussDocumentLibraryEOMapper.selectMaps(queryWrapperTemp); -// if (dataListTemp.size() != 0) { -// List replaceStandardListNew = new ArrayList<>(); -// for (Map map : dataListTemp) { -// replaceStandardListNew.add((String) map.get("serial_number")); -// } -// dataList.get(0).put("replace_standard", StringUtils.join(replaceStandardListNew, ",")); -// dataList.get(0).put("replace_standard_id", replaceStandard); -// } -// } for (Map.Entry entry : dataList.get(0).entrySet()) { if(treeList.contains(entry.getKey())){ String value = (String) entry.getValue(); @@ -717,6 +635,131 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> getDocumentInfoById(String id, String cut) { +// //字段属性 +// List fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); +// List treeOnlCgformFieldList = fieldList.stream().filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList()); +// List treeList = treeOnlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); +// List onlCgformFieldDateMoreList = fieldList.stream().filter(e -> FieldTypeEnum.DATE_MORE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList()); +// List dateMoreList = onlCgformFieldDateMoreList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); +// //通过id查询数据 +// List> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id); +// //多选日期 +// for (Map.Entry entry : dataList.get(0).entrySet()) { +// String key = entry.getKey(); +// if(dateMoreList.contains(key) && ObjectUtils.isNotEmpty(entry.getValue())){ +// String value = (String) entry.getValue(); +// entry.setValue(Arrays.asList(value.split(","))); +// } +// } +// +// //查询所有 +// List> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null); +// //对应标准id +// String correspondingStandard = (String) dataList.get(0).get("corresponding_standard"); +// //代替标准id +// String replaceStandardTemp = (String) dataList.get(0).get("replace_standard"); +// //处理被代替标准和对应标准 +// List replaceStandardNameList = new ArrayList<>();//代替标准 +// List replacedStandardNameList = new ArrayList<>();//被代替标准 +// List replacedStandardIdList = new ArrayList<>();//被代替标准 +// List correspondingStandardNameList = new ArrayList<>();//对应标准 +// for (Map map : mapList) { +// //对应标准处理 +// if (StringUtils.isNotBlank(correspondingStandard) && correspondingStandard.contains((String) map.get("id"))) { +// for (String s : correspondingStandard.split(",")) { +// if (s.equals((String) map.get("id"))) { +// correspondingStandardNameList.add((String) map.get("serial_number")); +// } else { +// boolean flag = isId(s); +// if (!flag && !correspondingStandardNameList.contains(s)) { +// correspondingStandardNameList.add(s); +// } +// } +// } +// } else { +// //处理已删除的文档的对应标准 +// if (StringUtils.isNotBlank(correspondingStandard)) { +// for (String s : correspondingStandard.split(",")) { +// boolean flag = isId(s); +// if (!flag && !correspondingStandardNameList.contains(s)) { +// correspondingStandardNameList.add(s); +// } +// } +// } +// } +// //代替标准 +// if (StringUtils.isNotBlank(replaceStandardTemp) && replaceStandardTemp.contains((String) map.get("id"))) { +// for (String s : replaceStandardTemp.split(",")) { +// if (s.equals((String) map.get("id"))) { +// replaceStandardNameList.add((String) map.get("serial_number")); +// } else { +// boolean flag = isId(s); +// if (!flag && !replaceStandardNameList.contains(s)) { +// replaceStandardNameList.add(s); +// } +// } +// } +// } else { +// //处理已删除的代替标准 +// if (StringUtils.isNotBlank(replaceStandardTemp)) { +// for (String s : replaceStandardTemp.split(",")) { +// boolean flag = isId(s); +// if (!flag && !replaceStandardNameList.contains(s)) { +// replaceStandardNameList.add(s); +// } +// } +// } +// +// } +// //被代替标准 +// String replaceStandard = (String) map.get("replace_standard"); +// if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) { +// String serialNumber = (String) map.get("serial_number"); +// replacedStandardNameList.add(serialNumber); +// replacedStandardIdList.add((String) map.get("id")); +// } +// } +// //对应标准中文 +//// if (correspondingStandardNameList.size() != 0) { +// dataList.get(0).put("corresponding_standard", StringUtils.join(correspondingStandardNameList, ",")); +// dataList.get(0).put("corresponding_standard_id", correspondingStandard); +//// } +//// if (replacedStandardNameList.size() != 0) { +// dataList.get(0).put("replaced_standard", StringUtils.join(replacedStandardNameList, ",")); +//// dataList.get(0).put("replaced_standard_id", StringUtils.join(replacedStandardIdList, ",")); +//// } +//// if (replaceStandardNameList.size() != 0) { +// dataList.get(0).put("replace_standard", StringUtils.join(replaceStandardNameList, ",")); +// dataList.get(0).put("replace_standard_id", replaceStandardTemp); +//// } +// //代替标准中文 +//// String replaceStandard = (String) dataList.get(0).get("replace_standard"); +//// if (StringUtils.isNotBlank(replaceStandard)) { +//// LambdaQueryWrapper queryWrapperTemp = new LambdaQueryWrapper<>(); +//// queryWrapperTemp.in(BussDocumentLibraryEO::getId, Arrays.asList(replaceStandard.split(","))); +//// List> dataListTemp = bussDocumentLibraryEOMapper.selectMaps(queryWrapperTemp); +//// if (dataListTemp.size() != 0) { +//// List replaceStandardListNew = new ArrayList<>(); +//// for (Map map : dataListTemp) { +//// replaceStandardListNew.add((String) map.get("serial_number")); +//// } +//// dataList.get(0).put("replace_standard", StringUtils.join(replaceStandardListNew, ",")); +//// dataList.get(0).put("replace_standard_id", replaceStandard); +//// } +//// } +// for (Map.Entry entry : dataList.get(0).entrySet()) { +// if(treeList.contains(entry.getKey())){ +// String value = (String) entry.getValue(); +// if(StringUtils.isNotBlank(value)){ +// dataList.get(0).put(entry.getKey(), Arrays.asList(value.split(","))); +// }else{ +// dataList.get(0).put(entry.getKey(), null); +// } +// } +// } +// return dataList; +// } /** * 详情数据查询 @@ -726,6 +769,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> getInfoById(String id, String cut) { + //字段属性 + List fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); + //标准选择字段 + List standardOnlCgformFieldList = fieldList.stream() + .filter(e -> FieldTypeEnum.STANDARD.getValue().equals(e.getFieldShowType())).collect(Collectors.toList()); + List standFieldList = standardOnlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); //通过id查询数据 List> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id); @@ -738,129 +787,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null); - //原始对应标准,代替标准,被代替标准(原始数据存的是iD) - String correspondingStandardId = ""; - String replaceStandardId = "";//代替标准 - if (!dataList.isEmpty()) { - correspondingStandardId = (String) dataList.get(0).get("corresponding_standard");//对应标准 - replaceStandardId = (String) dataList.get(0).get("replace_standard");//代替标准 - } - - //被代替标准 - List replacedStandardIdList = new ArrayList<>();//代替标准 - - //对应标准,代替标准,被代替标准对应的编码 - List correspondingStandardNameList = new ArrayList<>();//对应标准编码 - List replaceStandardNameList = new ArrayList<>();//代替标准编码 - List replacedStandardNameList = new ArrayList<>();//被代替标准编码 - - List> listCorrespondingStandard = new ArrayList<>(); - List> listReplaceStandard = new ArrayList<>(); - List> listReplacedStandard = new ArrayList<>(); - - - //处理被代替标准和对应标准 - for (Map map : mapList) { - Map stringObjectMap = new HashMap<>(); - //对应标准处理 - if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) { - for (String s : correspondingStandardId.split(",")) { - Map mapTemp = new HashMap<>(); - if (s.equals((String) map.get("id"))) { - correspondingStandardNameList.add((String) map.get("serial_number")); - mapTemp.put("title", (String) map.get("serial_number")); - mapTemp.put("id", (String) map.get("id")); - if (ObjectUtils.isNotEmpty(mapTemp)) { - listCorrespondingStandard.add(mapTemp); - } - } else { - boolean flag = isId(s); - if (!flag && !correspondingStandardNameList.contains(s)) { - correspondingStandardNameList.add(s); - mapTemp.put("title", s); - mapTemp.put("id", ""); - if (ObjectUtils.isNotEmpty(mapTemp)) { - listCorrespondingStandard.add(mapTemp); - } - } - } - } - } else { - if (StringUtils.isNotBlank(correspondingStandardId)) { - for (String s : correspondingStandardId.split(",")) { - Map mapTemp = new HashMap<>(); - boolean flag = isId(s); - if (!flag && !correspondingStandardNameList.contains(s)) { - correspondingStandardNameList.add(s); - mapTemp.put("title", s); - mapTemp.put("id", ""); - if (ObjectUtils.isNotEmpty(mapTemp)) { - listCorrespondingStandard.add(mapTemp); - } - } - } - } - - } - //代替标准 - if (StringUtils.isNotBlank(replaceStandardId) && replaceStandardId.contains((String) map.get("id"))) { - for (String s : replaceStandardId.split(",")) { - Map mapTemp = new HashMap<>(); - if (s.equals((String) map.get("id"))) { - replaceStandardNameList.add((String) map.get("serial_number")); - mapTemp.put("title", (String) map.get("serial_number")); - mapTemp.put("id", (String) map.get("id")); - if (ObjectUtils.isNotEmpty(mapTemp)) { - listReplaceStandard.add(mapTemp); - } - } else { - boolean flag = isId(s); - if (!flag && !replaceStandardNameList.contains(s)) { - replaceStandardNameList.add(s); - mapTemp.put("title", s); - mapTemp.put("id", ""); - if (ObjectUtils.isNotEmpty(mapTemp)) { - listReplaceStandard.add(mapTemp); - } - } - } - } - } else { - if (StringUtils.isNotBlank(replaceStandardId)) { - for (String s : replaceStandardId.split(",")) { - Map mapTemp = new HashMap<>(); - boolean flag = isId(s); - if (!flag && !replaceStandardNameList.contains(s)) { - replaceStandardNameList.add(s); - mapTemp.put("title", s); - mapTemp.put("id", ""); - if (ObjectUtils.isNotEmpty(mapTemp)) { - listReplaceStandard.add(mapTemp); - } - } - } - } - } - //被代替标准 - String replaceStandard = (String) map.get("replace_standard"); - if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) { - replacedStandardIdList.add((String) map.get("id")); - String serialNumber = (String) map.get("serial_number"); - replacedStandardNameList.add(serialNumber); - stringObjectMap.put("title", (String) map.get("serial_number")); - stringObjectMap.put("id", (String) map.get("id")); - if (ObjectUtils.isNotEmpty(stringObjectMap)) { - listReplacedStandard.add(stringObjectMap); - } - } - } - //区域管理 OnlCgformArea onlCgformArea = new OnlCgformArea(); onlCgformArea.setIsModel(ModuleEnum.DOCUMENT_LIBRARY.getValue()); List areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea); - //字段属性 - List fieldList = onlCgformFieldService.getFieldList("1"); //过滤出下拉选 List onlCgformFieldList = fieldList.stream() @@ -1005,22 +935,34 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl standardNameList = new ArrayList<>();//对应标准编码 + List> listStandard = new ArrayList<>(); String finalValue = value; dataList.get(0).entrySet().forEach(entry -> { if (onlCgformField.getDbFieldName().equals(entry.getKey())) { - if (onlCgformField.getDbFieldName().equals("replace_standard")) { - //代替标准 - map.put("value", StringUtils.join(replaceStandardNameList, ",")); - map.put("list", listReplaceStandard); - } else if (onlCgformField.getDbFieldName().equals("replaced_standard")) { - //被代替标准 - map.put("value", StringUtils.join(replacedStandardNameList, ",")); - map.put("list", listReplacedStandard); - } else if (onlCgformField.getDbFieldName().equals("corresponding_standard")) { - //对应标准 - map.put("value", StringUtils.join(correspondingStandardNameList, ",")); - map.put("list", listCorrespondingStandard); - } else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) { + //标准类型字段处理 + if(standFieldList.contains(entry.getKey())){ + if(ObjectUtils.isNotEmpty(entry.getValue())){ + for (Map map1 : mapList) { + //对应标准处理 + if (ObjectUtils.isNotEmpty(entry.getValue())) { + for (String s : entry.getValue().toString().split(",")) { + Map mapTemp1 = new HashMap<>(); + if (s.equals((String) map1.get("serial_number"))) { + standardNameList.add((String) map1.get("serial_number")); + mapTemp1.put("title", (String) map1.get("serial_number")); + mapTemp1.put("id", (String) map1.get("id")); + if (ObjectUtils.isNotEmpty(mapTemp1)) { + listStandard.add(mapTemp1); + } + } + } + } + } + map.put("value", entry.getValue().toString()); + map.put("list", listStandard); + } + }else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) { map.put("value", finalValue); } else { map.put("value", entry.getValue()); @@ -1050,6 +992,331 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> getInfoById(String id, String cut) { +// //通过id查询数据 +// List> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id); +// +// List> result = new ArrayList<>(); // 要返回的结果 +// if (dataList.isEmpty()){ +// // 取不到数据,直接返回空结果 +// return result; +// } +// +// //查询所有 +// List> mapList = bussDocumentLibraryEOMapper.selectMapsAll(null); +// +// //原始对应标准,代替标准,被代替标准(原始数据存的是iD) +// String correspondingStandardId = ""; +// String replaceStandardId = "";//代替标准 +// if (!dataList.isEmpty()) { +// correspondingStandardId = (String) dataList.get(0).get("corresponding_standard");//对应标准 +// replaceStandardId = (String) dataList.get(0).get("replace_standard");//代替标准 +// } +// +// //被代替标准 +// List replacedStandardIdList = new ArrayList<>();//代替标准 +// +// //对应标准,代替标准,被代替标准对应的编码 +// List correspondingStandardNameList = new ArrayList<>();//对应标准编码 +// List replaceStandardNameList = new ArrayList<>();//代替标准编码 +// List replacedStandardNameList = new ArrayList<>();//被代替标准编码 +// +// List> listCorrespondingStandard = new ArrayList<>(); +// List> listReplaceStandard = new ArrayList<>(); +// List> listReplacedStandard = new ArrayList<>(); +// +// +// //处理被代替标准和对应标准 +// for (Map map : mapList) { +// Map stringObjectMap = new HashMap<>(); +// //对应标准处理 +// if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) { +// for (String s : correspondingStandardId.split(",")) { +// Map mapTemp = new HashMap<>(); +// if (s.equals((String) map.get("id"))) { +// correspondingStandardNameList.add((String) map.get("serial_number")); +// mapTemp.put("title", (String) map.get("serial_number")); +// mapTemp.put("id", (String) map.get("id")); +// if (ObjectUtils.isNotEmpty(mapTemp)) { +// listCorrespondingStandard.add(mapTemp); +// } +// } else { +// boolean flag = isId(s); +// if (!flag && !correspondingStandardNameList.contains(s)) { +// correspondingStandardNameList.add(s); +// mapTemp.put("title", s); +// mapTemp.put("id", ""); +// if (ObjectUtils.isNotEmpty(mapTemp)) { +// listCorrespondingStandard.add(mapTemp); +// } +// } +// } +// } +// } else { +// if (StringUtils.isNotBlank(correspondingStandardId)) { +// for (String s : correspondingStandardId.split(",")) { +// Map mapTemp = new HashMap<>(); +// boolean flag = isId(s); +// if (!flag && !correspondingStandardNameList.contains(s)) { +// correspondingStandardNameList.add(s); +// mapTemp.put("title", s); +// mapTemp.put("id", ""); +// if (ObjectUtils.isNotEmpty(mapTemp)) { +// listCorrespondingStandard.add(mapTemp); +// } +// } +// } +// } +// +// } +// //代替标准 +// if (StringUtils.isNotBlank(replaceStandardId) && replaceStandardId.contains((String) map.get("id"))) { +// for (String s : replaceStandardId.split(",")) { +// Map mapTemp = new HashMap<>(); +// if (s.equals((String) map.get("id"))) { +// replaceStandardNameList.add((String) map.get("serial_number")); +// mapTemp.put("title", (String) map.get("serial_number")); +// mapTemp.put("id", (String) map.get("id")); +// if (ObjectUtils.isNotEmpty(mapTemp)) { +// listReplaceStandard.add(mapTemp); +// } +// } else { +// boolean flag = isId(s); +// if (!flag && !replaceStandardNameList.contains(s)) { +// replaceStandardNameList.add(s); +// mapTemp.put("title", s); +// mapTemp.put("id", ""); +// if (ObjectUtils.isNotEmpty(mapTemp)) { +// listReplaceStandard.add(mapTemp); +// } +// } +// } +// } +// } else { +// if (StringUtils.isNotBlank(replaceStandardId)) { +// for (String s : replaceStandardId.split(",")) { +// Map mapTemp = new HashMap<>(); +// boolean flag = isId(s); +// if (!flag && !replaceStandardNameList.contains(s)) { +// replaceStandardNameList.add(s); +// mapTemp.put("title", s); +// mapTemp.put("id", ""); +// if (ObjectUtils.isNotEmpty(mapTemp)) { +// listReplaceStandard.add(mapTemp); +// } +// } +// } +// } +// } +// //被代替标准 +// String replaceStandard = (String) map.get("replace_standard"); +// if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) { +// replacedStandardIdList.add((String) map.get("id")); +// String serialNumber = (String) map.get("serial_number"); +// replacedStandardNameList.add(serialNumber); +// stringObjectMap.put("title", (String) map.get("serial_number")); +// stringObjectMap.put("id", (String) map.get("id")); +// if (ObjectUtils.isNotEmpty(stringObjectMap)) { +// listReplacedStandard.add(stringObjectMap); +// } +// } +// } +// +// //区域管理 +// OnlCgformArea onlCgformArea = new OnlCgformArea(); +// onlCgformArea.setIsModel(ModuleEnum.DOCUMENT_LIBRARY.getValue()); +// List areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea); +// //字段属性 +// List fieldList = onlCgformFieldService.getFieldList("1"); +// +// //过滤出下拉选 +// List onlCgformFieldList = fieldList.stream() +// .filter(e -> FieldTypeEnum.PULL_SINGLE.getValue().equals(e.getFieldShowType()) +// || FieldTypeEnum.PULL_MORE.getValue().equals(e.getFieldShowType())) +// .collect(Collectors.toList()); +// +// //过滤出树形字段 +// List treeFieldList = fieldList.stream() +// .filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())) +// .collect(Collectors.toList()); +// +// //下拉选字段 +// List fieldPullList = onlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); +// +// //数据字典 +// List sysDictItems = sysDictItemServiceImpl.selectItemsAll(); +// +// //树形数据字典 +// List categoryList = sysCategoryService.list(); +// //处理树形数据字典 +// dataList.get(0).entrySet().forEach(entry -> { +// //下拉选处理数据字典 +// treeDictItem(categoryList, entry, treeFieldList, cut,null); +// }); +// +// //下拉单选和下拉多选数据字典处理 +// List finalFieldList = fieldList; +// dataList.get(0).entrySet().forEach(entry -> { +// if (fieldPullList.contains(entry.getKey())) { +// //下拉选处理数据字典 +// dictItem(sysDictItems, entry, cut, finalFieldList,null); +// } +// }); +// +// if (fieldList.size() != 0) { +// //过滤出表单字段(is_show_form-->表单是否显示0否 1是) +// fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList()); +// } +// +// for (OnlCgformArea onlCgformAreaTemp : areaList) { +// String areaName = ""; +// if (CutEnum.CN.getValue().equals(cut)) { +// areaName = onlCgformAreaTemp.getShowArea(); +// } else { +// areaName = onlCgformAreaTemp.getEnName(); +// } +// Map mapTemp = new HashMap<>(); +// List> resultTemp = new ArrayList<>(); +// List fieldListTemp = fieldList.stream().filter(e -> onlCgformAreaTemp.getId().equals(e.getShowArea())).collect(Collectors.toList()); +// for (OnlCgformField onlCgformField : fieldListTemp) { +// //字段 +// String dbFieldName = onlCgformField.getDbFieldName(); +// //字段类型 +// String fieldShowType = onlCgformField.getFieldShowType(); +// String value = ""; +// if (FieldTypeEnum.DATE_SINGLE.getValue().equals(fieldShowType)) { +// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); +// if (ObjectUtils.isNotEmpty(dataList.get(0).get(dbFieldName))) { +// value = sdf.format(dataList.get(0).get(dbFieldName)); +// } +// } else { +// value = String.valueOf(dataList.get(0).get(dbFieldName)); +// if("null".equals(value)){ +// value = ""; +// } +// } +// Map map = new HashMap<>(); +// //处理文件 +// if (FieldTypeEnum.FILE.getValue().equals(fieldShowType)) { +// //处理文本信息和关联信息区域之外的区域中文件类型字段返归结果格式 +// if(!"文本信息".equals(onlCgformAreaTemp.getShowArea()) && !"关联信息".equals(onlCgformAreaTemp.getShowArea())){ +// List fileInfos = iOSSFileService.getFileInfosByConnectId(value); +// List fileIdList = fileInfos.stream().map(OSSFile::getId).collect(Collectors.toList()); +// Map mapNew = new HashMap<>(); +// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null); +// mapNew.put("value",fileIdList); +// resultTemp.add(mapNew); +// }else{ +// if (StringUtils.isNotBlank(value)) { +// List fileInfos = iOSSFileService.getFileInfosByConnectId(value); +// //多文件处理 +// if (fileInfos.size() > 1) { +// if (fileInfos.size() != 0) { +// int i = 0; +// for (OSSFile fileInfo : fileInfos) { +// if (i == 0) { +// Map mapNew = new HashMap<>(); +// mapNew.put("value", fileInfo); +// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null); +// mapNew.put("count", fileInfos.size()); +// // 添加标准分解单跳转 +// List infoEOList = sarFileSplitInfoService.queryByFileId(fileInfo.getId()); +// if (CollectionUtil.isNotEmpty(infoEOList)) { +// mapNew.put("splitFlag", 1); +// mapNew.put("splitInfoId", infoEOList.get(0).getId()); +// } else{ +// mapNew.put("splitFlag", 0); +// } +// +// resultTemp.add(mapNew); +// i++; +// } else { +// Map mapNew = new HashMap<>(); +// mapNew.put("value", fileInfo); +// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null); +// // 添加标准分解单跳转 +// List infoEOList = sarFileSplitInfoService.queryByFileId(fileInfo.getId()); +// if (CollectionUtil.isNotEmpty(infoEOList)) { +// mapNew.put("splitFlag", 1); +// mapNew.put("splitInfoId", infoEOList.get(0).getId()); +// } else{ +// mapNew.put("splitFlag", 0); +// } +// resultTemp.add(mapNew); +// } +// } +// } +// } else if (fileInfos.size() == 1) { +// //单个文件处理 +// Map mapNew = new HashMap<>(); +// mapNew.put("count", fileInfos.size()); +// mapNew.put("value", fileInfos.get(0)); +// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null); +// // 添加标准分解单跳转 +// List infoEOList = sarFileSplitInfoService.queryByFileId(fileInfos.get(0).getId()); +// if (CollectionUtil.isNotEmpty(infoEOList)) { +// mapNew.put("splitFlag", 1); +// mapNew.put("splitInfoId", infoEOList.get(0).getId()); +// } else{ +// mapNew.put("splitFlag", 0); +// } +// resultTemp.add(mapNew); +// } +// } else { +// Map mapNew = new HashMap<>(); +// mapNew.put("value", ""); +// mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName, null); +// resultTemp.add(mapNew); +// } +// } +// } else { +// //处理字段类型为文件之外的字段 +// if (dataList.size() != 0) { +// String finalValue = value; +// dataList.get(0).entrySet().forEach(entry -> { +// if (onlCgformField.getDbFieldName().equals(entry.getKey())) { +// if (onlCgformField.getDbFieldName().equals("replace_standard")) { +// //代替标准 +// map.put("value", StringUtils.join(replaceStandardNameList, ",")); +// map.put("list", listReplaceStandard); +// } else if (onlCgformField.getDbFieldName().equals("replaced_standard")) { +// //被代替标准 +// map.put("value", StringUtils.join(replacedStandardNameList, ",")); +// map.put("list", listReplacedStandard); +// } else if (onlCgformField.getDbFieldName().equals("corresponding_standard")) { +// //对应标准 +// map.put("value", StringUtils.join(correspondingStandardNameList, ",")); +// map.put("list", listCorrespondingStandard); +// } else if (FieldTypeEnum.DATE_SINGLE.getValue().equals(onlCgformField.getFieldShowType())) { +// map.put("value", finalValue); +// } else { +// map.put("value", entry.getValue()); +// } +// } +// }); +// } +// mapPut(cut, map, "field_show_type", +// onlCgformField.getFieldShowType(), "dict_field", +// onlCgformField.getDictField(), "db_field_name", +// onlCgformField.getDbFieldName(), "db_field_txt", +// onlCgformField.getDbFieldTxt(), "db_field_en_name", +// onlCgformField.getDbFieldEnName(), "area", areaName, null); +// } +// if (map.size() != 0) { +// resultTemp.add(map); +// } +// } +// if (CutEnum.CN.getValue().equals(cut)) { +// areaName = onlCgformAreaTemp.getShowArea(); +// mapTemp.put(areaName, resultTemp); +// } else { +// areaName = onlCgformAreaTemp.getEnName(); +// mapTemp.put(areaName, resultTemp); +// } +// result.add(mapTemp); +// } +// return result; +// } private void mapPut(String cut, Map map, String field_show_type, String fieldShowType2, String dict_field, String dictField, @@ -3004,7 +3271,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> datas = bussDocumentLibraryEOMapper.getInfoList(" " + StringUtils.join(conditionFieldList, ","), condition); - //处理对应标准,代替标准,被代替标准(由id转中文) + //处理被代替标准(由id转中文) getStandard(datas); //部分导出 String partId = (String) map.get("id"); @@ -3113,44 +3380,67 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl data : datas) { - String idTemp = (String) data.get("id"); - String correspondingStandard = (String) data.get("corresponding_standard"); - String replaceStandard = (String) data.get("replace_standard"); - StringBuilder correspondingStandardSb = new StringBuilder(); - StringBuilder replaceStandardSb = new StringBuilder(); + String idTemp = (String) data.get("serial_number"); StringBuilder replacedStandardSb = new StringBuilder(); datasTemp.forEach(entry -> { - String id = (String) entry.get("id"); String replaceStandardTemp = (String) entry.get("replace_standard"); - //对应标准 - if (StringUtils.isNotBlank(correspondingStandard) && correspondingStandard.contains(id)) { - correspondingStandardSb.append((String) entry.get("serial_number") + ","); - } - //代替标准 - if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) { - replaceStandardSb.append((String) entry.get("serial_number") + ","); - } //被代替标准 if (StringUtils.isNotBlank(replaceStandardTemp) && replaceStandardTemp.contains(idTemp)) { replacedStandardSb.append((String) entry.get("serial_number") + ","); } }); - //对应标准 - if (StringUtils.isNotBlank(correspondingStandardSb)) { - String correspondingStandardStr = correspondingStandardSb.substring(0, correspondingStandardSb.length() - 1); - data.put("corresponding_standard", correspondingStandardStr); - } - //代替标准 - if (StringUtils.isNotBlank(replaceStandardSb)) { - String replaceStandardStr = replaceStandardSb.substring(0, replaceStandardSb.length() - 1); - data.put("replace_standard", replaceStandardStr); - } if (StringUtils.isNotBlank(replacedStandardSb)) { String replacedStandardStr = replacedStandardSb.substring(0, replacedStandardSb.length() - 1); data.put("replaced_standard", replacedStandardStr); } } } +// private void getStandard(List> datas) { +// List> datasTemp = new ArrayList<>(); +// for (Map data : datas) { +// Map mapTemp = new HashMap<>(); +// mapCopy(data, mapTemp); +// datasTemp.add(mapTemp); +// } +// for (Map data : datas) { +// String idTemp = (String) data.get("id"); +// String correspondingStandard = (String) data.get("corresponding_standard"); +// String replaceStandard = (String) data.get("replace_standard"); +// StringBuilder correspondingStandardSb = new StringBuilder(); +// StringBuilder replaceStandardSb = new StringBuilder(); +// StringBuilder replacedStandardSb = new StringBuilder(); +// datasTemp.forEach(entry -> { +// String id = (String) entry.get("id"); +// String replaceStandardTemp = (String) entry.get("replace_standard"); +// //对应标准 +// if (StringUtils.isNotBlank(correspondingStandard) && correspondingStandard.contains(id)) { +// correspondingStandardSb.append((String) entry.get("serial_number") + ","); +// } +// //代替标准 +// if (StringUtils.isNotBlank(replaceStandard) && replaceStandard.contains(id)) { +// replaceStandardSb.append((String) entry.get("serial_number") + ","); +// } +// //被代替标准 +// if (StringUtils.isNotBlank(replaceStandardTemp) && replaceStandardTemp.contains(idTemp)) { +// replacedStandardSb.append((String) entry.get("serial_number") + ","); +// } +// }); +// //对应标准 +// if (StringUtils.isNotBlank(correspondingStandardSb)) { +// String correspondingStandardStr = correspondingStandardSb.substring(0, correspondingStandardSb.length() - 1); +// data.put("corresponding_standard", correspondingStandardStr); +// } +// //代替标准 +// if (StringUtils.isNotBlank(replaceStandardSb)) { +// String replaceStandardStr = replaceStandardSb.substring(0, replaceStandardSb.length() - 1); +// data.put("replace_standard", replaceStandardStr); +// } +// if (StringUtils.isNotBlank(replacedStandardSb)) { +// String replacedStandardStr = replacedStandardSb.substring(0, replacedStandardSb.length() - 1); +// data.put("replaced_standard", replacedStandardStr); +// } +// } +// } public void createDatas(Workbook workbook, Sheet sheet, List> datas, String header, List fieldList, String cut) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); @@ -4377,28 +4667,28 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl> listBySerialNumber = getListBySerialNumber(value); - String serialNumberStr = ""; - StringBuilder sb = new StringBuilder(); - List list = new ArrayList<>(); - for (Map stringObjectMap : listBySerialNumber) { - sb.append((String) stringObjectMap.get("id") + ","); - list.add((String) stringObjectMap.get("serial_number")); - } - if (StringUtils.isNotBlank(value)) { - for (String s : value.split(",")) { - if (!list.contains(s)) { - sb.append(s); - } - } - } - if (ObjectUtils.isNotEmpty(sb)) { - String substring = sb.toString(); - if (substring.endsWith(",") || substring.endsWith(",")){ - substring = substring.substring(0, substring.length() - 1); - } - value = substring; - } +// List> listBySerialNumber = getListBySerialNumber(value); +// String serialNumberStr = ""; +// StringBuilder sb = new StringBuilder(); +// List list = new ArrayList<>(); +// for (Map stringObjectMap : listBySerialNumber) { +// sb.append((String) stringObjectMap.get("id") + ","); +// list.add((String) stringObjectMap.get("serial_number")); +// } +// if (StringUtils.isNotBlank(value)) { +// for (String s : value.split(",")) { +// if (!list.contains(s)) { +// sb.append(s); +// } +// } +// } +// if (ObjectUtils.isNotEmpty(sb)) { +// String substring = sb.toString(); +// if (substring.endsWith(",") || substring.endsWith(",")){ +// substring = substring.substring(0, substring.length() - 1); +// } +// value = substring; +// } } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java index 2977294a0..472632e2e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/dummy/service/impl/DummyInventoryBaseEOServiceImpl.java @@ -274,6 +274,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl dummyContentChangeEOInfoList = iDummyContentChangeEOService.list(wrapperInfo); + if(CollectionUtils.isNotEmpty(dummyContentChangeEOInfoList)){ //3.对比基础表数据 //3.1截止到现在发布,期间修改的数据(基础) //最新的数据为-->dummyInventoryBaseEOList @@ -410,6 +411,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl objectMap = this.projectRelatedPersonnelService.queryPersonByProjectId(projectId, dutyTerritory); return Result.OK(objectMap); } + + /** + * 通过projectId查询认证工程师 + * + * @return + */ + @AutoLog(value = "项目库-相关人员维护表-根据projectId查询认证工程师") + @ApiOperation(value="项目库-相关人员维护表-根据projectId查询认证工程师", notes="项目库-相关人员维护表-根据projectId查询认证工程师") + @GetMapping(value = "/queryCertificationEngineer") + public Result queryCertificationEngineer(@RequestParam(name="projectId",required=true) String projectId){ + List certificationEngineerList = projectRelatedPersonnelService.queryCertificationEngineer(projectId); + return Result.OK(certificationEngineerList); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectTaskInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectTaskInventoryEO.java index 602d8e90a..469c17fef 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectTaskInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectTaskInventoryEO.java @@ -231,4 +231,17 @@ public class ProjectTaskInventoryEO implements Serializable { /**中英文切换**/ @TableField(exist = false) private String cut; + + /**设计符合性流程-结束前三天发送消息标识0未发 1已发**/ + private String designSendMsgFlag; + /**设计符合性流程-结束当天发送消息标识0未发 1已发**/ + private String designSendMsgCurrentFlag; + /**prehomo确认流程-结束前三天发送消息标识0未发 1已发**/ + private String prehomoSendMsgFlag; + /**prehomo确认流程-结束当天发送消息标识0未发 1已发**/ + private String prehomoSendMsgCurrentFlag; + /**验证符合性流程-结束前三天发送消息标识0未发 1已发**/ + private String verifySendMsgFlag; + /**验证符合性流程-结束当天发送消息标识0未发 1已发**/ + private String verifySendMsgCurrentFlag; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java index cae7a657c..5bb417eb4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/job/InventoryAffirmJob.java @@ -10,7 +10,6 @@ import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLibraryBaseMapper; import com.jero.modules.project.mapper.ProjectNameInfoEOMapper; import com.jero.modules.project.service.IProjectLawsInventoryEOService; -import com.jero.modules.system.entity.SysUser; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -19,7 +18,6 @@ import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Autowired; -import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectRelatedPersonnelService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectRelatedPersonnelService.java index 3cb185df3..f4cccaab2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectRelatedPersonnelService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectRelatedPersonnelService.java @@ -3,6 +3,7 @@ package com.jero.modules.project.service; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.common.api.vo.Result; import com.jero.modules.project.entity.ProjectRelatedPersonnel; +import com.jero.modules.system.entity.SysUser; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; @@ -85,4 +86,5 @@ public interface IProjectRelatedPersonnelService extends IService queryCertificationEngineer(String projectId); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java index 065e57268..81d4990ce 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectRelatedPersonnelServiceImpl.java @@ -759,4 +759,29 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl queryCertificationEngineer(String projectId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List list = list(queryWrapper.eq("project_id",projectId)); + + List certificationEngineerList = list.stream().map(e -> e.getCertificationEngineer()).collect(Collectors.toList()); + + StringBuilder userIdBuilder=new StringBuilder(); + List certificationEngineerUsers = new ArrayList<>(); + if(CollectionUtils.isNotEmpty(certificationEngineerList)){ + for(String certificationEngineerId :certificationEngineerList){ + if(StringUtils.isNotBlank(certificationEngineerId)) { + userIdBuilder.append(certificationEngineerId).append(","); + } + } + String userId = userIdBuilder.substring(0, userIdBuilder.toString().length() - 1); + List userIdList = Arrays.asList(userId.split(",")); + userIdList.stream().distinct().collect(Collectors.toList()); + QueryWrapper userqueryWrapper = new QueryWrapper<>(); + userqueryWrapper.in("id ", userIdList); + certificationEngineerUsers = sysUserMapper.selectList(userqueryWrapper); + } + return certificationEngineerUsers; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java index d590e58ae..7ee6a67b2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectTaskInventoryDetailEOServiceImpl.java @@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.*; +import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -61,24 +62,28 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl list = new ArrayList<>(); - + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); List userIdList = Arrays.asList(projectTaskInventoryDetailEO.getUserIds().split(",")); - userIdList.forEach(userId -> { - ProjectTaskInventoryDetailEO taskInventoryDetailEO = new ProjectTaskInventoryDetailEO(); - BeanUtils.copyProperties(projectTaskInventoryDetailEO,taskInventoryDetailEO); - taskInventoryDetailEO.setUserId(userId); - list.add(taskInventoryDetailEO); - }); + //过滤掉当前操作人。 + userIdList = userIdList.stream().distinct().filter(userId-> !org.apache.commons.lang3.StringUtils.equals(userId,currentUser.getId())).collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(userIdList)){ + userIdList.forEach(userId -> { + ProjectTaskInventoryDetailEO taskInventoryDetailEO = new ProjectTaskInventoryDetailEO(); + BeanUtils.copyProperties(projectTaskInventoryDetailEO,taskInventoryDetailEO); + taskInventoryDetailEO.setUserId(userId); + list.add(taskInventoryDetailEO); + }); - //先删后加,确保一个用户只有一个任务。 - QueryWrapper deleteWrapper = new QueryWrapper<>(); - deleteWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getActiProcInstId,projectTaskInventoryDetailEO.getActiProcInstId()); - deleteWrapper.lambda().in(ProjectTaskInventoryDetailEO::getUserId,userIdList); - this.baseMapper.delete(deleteWrapper); + //先删后加,确保一个用户只有一个任务。 + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getActiProcInstId,projectTaskInventoryDetailEO.getActiProcInstId()); + deleteWrapper.lambda().in(ProjectTaskInventoryDetailEO::getUserId,userIdList); + this.baseMapper.delete(deleteWrapper); - super.saveBatch(list); + super.saveBatch(list); - sendMessage(projectTaskInventoryDetailEO,userIdList); + sendMessage(projectTaskInventoryDetailEO,userIdList); + } } } @@ -92,7 +97,7 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl> get_list_by_instance(@RequestParam("prcNum") String prcNum,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){ - return workFlowFeignClient.get_list_by_instance(prcNum,sortWord,shunxu); + public List> get_list_by_instance(@RequestParam("prcNum") String prcNum,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){ + return workFlowFeignClient.get_list_by_instance(prcNum,cut,prcType,sortWord,shunxu); } @AutoLog(value = "获取图片") @@ -143,8 +143,8 @@ public class workFlowController { @AutoLog(value = "根据流程实例id查询流程历史") @ApiOperation(value="根据流程实例id查询流程历史", notes="根据流程实例id查询流程历史") @GetMapping("/queryProcessHistoryByPrcId") - public List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){ - return workFlowFeignClient.queryProcessHistoryByPrcId(prcId,sortWord,shunxu); + public List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){ + return workFlowFeignClient.queryProcessHistoryByPrcId(prcId,cut,prcType,sortWord,shunxu); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java index dc34d7814..e5f56b9ed 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java @@ -47,4 +47,6 @@ public class TaskCommonQuery { @ApiModelProperty(value = "高级搜索字符串") private String advanceSearchVOStr; + + private String cut; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java index 7231bd33a..ce81e57d2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java @@ -87,7 +87,7 @@ public interface WorkFlowFeignClient { * @return */ @RequestMapping(value = "/bat-wkflow/task/get_list_by_instance",method = RequestMethod.GET) - List> get_list_by_instance(@RequestParam("prcNum") String prcNum, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu); + List> get_list_by_instance(@RequestParam("prcNum") String prcNum, @RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu); /** * 获取图片 @@ -125,6 +125,6 @@ public interface WorkFlowFeignClient { * @return */ @RequestMapping(value = "/bat-wkflow/task/queryProcessHistoryByPrcId",method = RequestMethod.GET) - List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu); + List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId, @RequestParam("cut") String cut,@RequestParam("prcType") String prcType,@RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java index b76158465..a79bf2d65 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java @@ -103,8 +103,8 @@ public class WorkFlowFeignClientImpl{ * @param shunxu * @return */ - public List> get_list_by_instance(@RequestParam("prcNum") String prcNum, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu){ - return workFlowFeignClient.get_list_by_instance(prcNum,sortWord,shunxu); + public List> get_list_by_instance(@RequestParam("prcNum") String prcNum,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu){ + return workFlowFeignClient.get_list_by_instance(prcNum,cut,prcType,sortWord,shunxu); } /** @@ -145,7 +145,7 @@ public class WorkFlowFeignClientImpl{ * @param shunxu * @return */ - public List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu){ - return workFlowFeignClient.queryProcessHistoryByPrcId(prcId,sortWord,shunxu); + public List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu){ + return workFlowFeignClient.queryProcessHistoryByPrcId(prcId,cut,prcType,sortWord,shunxu); } } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index d55486d53..6b58bafed 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -613,8 +613,8 @@ module.exports = { Transfer: 'Transfer', CertificationDirectory: 'Certification directory', TaskRequirements: 'Task requirements', - CertificationProgress: 'Certification progress', - CurrentProjectStatusEvaluation: 'Current project status evaluation', + CertificationProgress: 'Homo Progress', + CurrentProjectStatusEvaluation: 'Current State', NiONumber: 'NiO number', ParameterName: 'Parameter name', ParameterDescription: 'Parameter description', @@ -789,4 +789,7 @@ module.exports = { yellow: 'yellow', resultReported:'Result Reported', TheDoesNotContainData:'The maintenance list of the virtual list does not contain data', + number:'No', + Deadline:'Deadline', + toBeConfirmed:'To be confirmed', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index adfe46fe3..f23b64a57 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -483,6 +483,7 @@ module.exports = { nonConformity: '不符合', Tracked: '待追踪', notInvolved: '不涉及', + toBeConfirmed:'待确认', Operator: '操作人', role: '角色', operationContent: '操作内容', @@ -794,4 +795,6 @@ module.exports = { yellow:'黄', resultReported:'结果报告', TheDoesNotContainData:'该虚拟清单的维护清单中没有数据,是否需要添加', + number:'序号', + Deadline:'截止时间', } \ No newline at end of file diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index cc4edb1aa..0e2b2642b 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -3,43 +3,78 @@
- +
+
+ +
+
- - +
+
+ + {{ item.label }} - - - + + +
+
-
22
+
+ +
-
22
+
+ +
-
22
+
+ +
-
22
+
+ +
-
22
+
+ +
-
22
+
+ +
-
22
+
+ +
-
22
+
+
+
+ + + + {{ item.label }} + + + +
+
+ +
+
+
- @@ -67,6 +102,9 @@ export default { }, watch: { + detailDate(newold,oldold) { + console.log(newold,oldold,'ll') + } } } diff --git a/jero-web/src/components/UpdateLog/index.vue b/jero-web/src/components/UpdateLog/index.vue index 123e1c951..2035ca5a8 100644 --- a/jero-web/src/components/UpdateLog/index.vue +++ b/jero-web/src/components/UpdateLog/index.vue @@ -16,7 +16,7 @@ class="table" :columns="columns" :pagination="false" - :scroll="{y: 400}" + :scroll="{y: 420}" :data-source="dataSource" :loading="loading" > @@ -56,11 +56,12 @@ loading:false, pageNo: 1, pageSize: 10, + queryId:{}, total: 0, columns: [ { title: this.$t('OperationDetails'), - dataIndex: 'content', + dataIndex: 'logContent', align: 'center', ellipsis: true, scopedSlots: { customRender: 'content' } @@ -78,9 +79,10 @@ mounted() { }, methods:{ - getList(){ + getList(data){ this.visible = true this.pageNo = 1 + this.queryId = data this.bussLogList() }, onChange(page, pageSize) { @@ -96,7 +98,7 @@ let query = { pageNo: this.pageNo, pageSize: this.pageSize, - documentId: this.$route.query.id + ...this.queryId } this.loading = true getAction(this.url.logList, query).then((res) => { @@ -114,5 +116,8 @@ \ No newline at end of file diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 3373728b2..745e0c38e 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -27,7 +27,7 @@ - + diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index 116e3e610..15c4addf6 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -270,7 +270,8 @@ importZipUrl: '/dummy/dummyInventoryInfoEO/importData', exportData: '/dummy/dummyInventoryInfoEO/exportData', exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate', - getSysCategoryTree: '/sys/category/getSysCategoryTree' + getSysCategoryTree: '/sys/category/getSysCategoryTree', + logList:'/dummy/dummyLogEO/page', }, loading: false, dataSource: [], @@ -589,7 +590,7 @@ this.getList() }, UpdateLogClick() { - this.$refs.UpdateLogRef.getList() + this.$refs.UpdateLogRef.getList({dummyInventoryBaseId:this.$route.query.id}) }, searchQuery() { this.getList() diff --git a/jero-web/src/views/documentTools/virtualList/index.vue b/jero-web/src/views/documentTools/virtualList/index.vue index 79968de21..ee46bab76 100644 --- a/jero-web/src/views/documentTools/virtualList/index.vue +++ b/jero-web/src/views/documentTools/virtualList/index.vue @@ -277,7 +277,7 @@ _this.$message.success(_this.$t('OperationSuccessful')) _this.getList() } else { - _this.$message.warning(_this.$t('operationFailed')) + _this.$message.warning(res.message) } }) } diff --git a/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue b/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue index 26f9c325c..53c28a1dd 100644 --- a/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/taskListProcess/index.vue @@ -225,6 +225,7 @@ terminationProcess() { this.textLoading = this.$t('terminationProcessing') this.loading = true + this.queryBy.reviewResult = 'termination of task' this.completeTask({ flag: 2 }) }, adopt() { @@ -238,6 +239,11 @@ sendBack() { this.textLoading = this.$t('Returning') this.loading = true + if (this.queryBy.reviewResult == 'inconformity' || this.queryBy.reviewResult == 'to track'){ + + }else{ + this.queryBy.reviewResult = 'to be confirmed' + } this.completeTask({ flag: 1 }) }, submit() { diff --git a/jero-web/src/views/projectManagement/components/TaskList.vue b/jero-web/src/views/projectManagement/components/TaskList.vue index 9faf6dce2..273e6a4da 100644 --- a/jero-web/src/views/projectManagement/components/TaskList.vue +++ b/jero-web/src/views/projectManagement/components/TaskList.vue @@ -52,43 +52,49 @@ >
- 1212sdfdsf
- 责任领土 + 1212sdfdsf
+ hahahaha
-
- {{$t('cutoffTime')}}: {{result.designDueDate}}
- {{$t('ProcessStatus')}}: {{result.designFlowTaskStatus}}
- {{result.designStatus}} +
+ {{$t('Deadline')}}: {{result.designDueDate}}
+ {{$t('ProcessStatus')}}: {{result.designStatus}}
+ + {{statusText[result.designFlowTaskStatus]}} +
-
+
-
- {{$t('cutoffTime')}}: {{result.prehomoDueDate}}
- {{$t('ProcessStatus')}}: {{result.prehomoFlowTaskStatus}}
- {{result.prehomoTaskStatus}} +
+ {{$t('Deadline')}}: {{result.prehomoDueDate}}
+ {{$t('ProcessStatus')}}: {{result.prehomoTaskStatus}}
+ + {{statusText[result.prehomoFlowTaskStatus]}} +
-
+
-
- {{$t('cutoffTime')}}: {{result.verifyDueDate}}
- {{$t('ProcessStatus')}}: {{result.verifyFlowTaskStatus}}
- {{result.verifyStatus}} +
+ {{$t('Deadline')}}: {{result.verifyDueDate}}
+ {{$t('ProcessStatus')}}: {{result.verifyStatus}}
+ + {{statusText[result.verifyFlowTaskStatus]}} +
-
+
@@ -125,9 +131,9 @@ return { columns: [ { - title: this.$t('serialNumber'), + title: this.$t('number'), align: 'center', - width: 80, + width: 70, customRender: function(t, r, index) { return parseInt(index) + 1 } @@ -136,6 +142,7 @@ title: this.$t('standardInformation'), align: 'center', dataIndex: 'standard', + width: 200, scopedSlots: { customRender: 'standardInformation' } }, { @@ -183,6 +190,21 @@ 'haveDone': '已办', 'showData': '展示数据' }, + color: { + 'conformity': 'accordColor', + 'inconformity': 'nonConformityColor', + 'to track': 'TrackedColor', + 'uninvolved': 'notInvolvedColor', + 'to be confirmed': 'submittedColor' + }, + statusText: { + 'conformity': this.$t('accord'), + 'inconformity': this.$t('nonConformity'), + 'to track': this.$t('Tracked'), + 'uninvolved': this.$t('notInvolved'), + 'to be confirmed': this.$t('toBeConfirmed') + }, + queryParam: {}, url: { list: '/project/projectTaskInventoryEO/list' @@ -209,7 +231,7 @@ handleExport() { }, - verifyTaskClick(val, num) { + verifyTaskClick(val, num,isTrue) { let query = {} switch (num) { case 1: @@ -221,7 +243,7 @@ id: this.$route.query.id, studioEngineer: this.$route.query.studioEngineer, serialNumber: val.serialNumber, - TaskKey: val.designTaskDefinitionKey, + TaskKey: isTrue ? val.designTaskDefinitionKey : 'hhhhh', flowType: 2, Sponsor: 'designInitiatorName', personLiable: 'designDutyName', @@ -229,7 +251,7 @@ deliverableTemplate: 'designDeliverableTemplate', projectName: this.$route.query.projectName, projectNameId: this.$route.query.projectNameId, - primaryKeyId: val.designTaskDetailId + primaryKeyId: val.designTaskDetailId, } break case 2: @@ -240,7 +262,7 @@ studioEngineer: this.$route.query.studioEngineer, projectLibraryId: this.$route.query.id, serialNumber: val.serialNumber, - TaskKey: val.prehomoTaskDefinitionKey, + TaskKey: isTrue ? val.prehomoTaskDefinitionKey : 'hhhh', flowType: 3, id: this.$route.query.id, Sponsor: 'prehomoInitiatorName', @@ -249,7 +271,7 @@ deliverableTemplate: 'prehomoDeliverableTemplate', projectName: this.$route.query.projectName, projectNameId: this.$route.query.projectNameId, - primaryKeyId: val.prehomoTaskDetailId + primaryKeyId: val.prehomoTaskDetailId, } break case 3: @@ -261,7 +283,7 @@ studioEngineer: this.$route.query.studioEngineer, serialNumber: val.serialNumber, projectTaskInventoryId: val.projectLawsInventoryId, - TaskKey: val.verifyTaskDefinitionKey, + TaskKey: isTrue ? val.verifyTaskDefinitionKey : 'hhhhh', flowType: 4, Sponsor: 'verifyInitiatorName', personLiable: 'verifyDutyName', @@ -269,7 +291,7 @@ deliverableTemplate: 'verifyDeliverableTemplate', projectName: this.$route.query.projectName, projectNameId: this.$route.query.projectNameId, - primaryKeyId: val.verifyTaskDetailId + primaryKeyId: val.verifyTaskDetailId, } break } @@ -379,7 +401,7 @@ height: calc(100% + 32px); top: -16px; left: -16px; - border: 1px seagreen solid; + border: 1px #00B3BE solid; } .content-box-jiao { @@ -387,22 +409,70 @@ right: 0; width: 0; height: 0; - border-right: 30px solid red; - border-bottom: 30px solid transparent + border-right: 14px solid #00B3BE; + border-bottom: 14px solid transparent } .box-content { margin-bottom: 8px; display: inline-block; text-align: left; + font-weight: 400; + color: #040B29; + } + + .box-content-a { + margin-bottom: 8px; + display: inline-block; + text-align: left; + font-weight: 400; + } + + .box-content-index { + margin-bottom: 8px; + display: inline-block; + text-align: left; + font-weight: 400; + color: #040B29; + } + + .box-content-index:last-child { + margin-bottom: 0; } .box-content-color { - padding: 6px 14px; - box-sizing: border-box; - background: #1ABBC4; - color: #2F8DF3; + width: 78px; + height: 32px; + display: inline-block; border-radius: 4px; + text-align: center; + font-size: 14px; + line-height: 32px; + } + + .accordColor { + background: #96ecad; + color: #26BD4B; + } + + .nonConformityColor { + background: #eeaeae; + color: #E83030; + } + + .TrackedColor { + background: #f0d7b1; + color: #FDA71C; + } + + .notInvolvedColor { + background: #e2edf8; + color: #707486; + } + + .submittedColor { + color: #00B3BE; + background: #94e0e4; } .Current-color { diff --git a/jero-web/src/views/projectManagement/components/fixedPlateForm.vue b/jero-web/src/views/projectManagement/components/fixedPlateForm.vue index 26fc25c51..7be6ec98d 100644 --- a/jero-web/src/views/projectManagement/components/fixedPlateForm.vue +++ b/jero-web/src/views/projectManagement/components/fixedPlateForm.vue @@ -46,7 +46,12 @@ versionsName: [ { required: true, - message: this.$t('publishComment') + this.$t('cannotEmpty'), + message: this.$t('versionName') + this.$t('cannotEmpty'), + trigger: 'blur' + }, + { + max: 200, + message: this.$t('versionName') + this.$t('cannotExceed') + 200 + this.$t('Characters'), trigger: 'blur' } ]