Merge remote-tracking branch 'origin/master'
This commit is contained in:
+356
-132
@@ -726,6 +726,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getInfoById(String id, String cut) {
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
//标准选择字段
|
||||
List<OnlCgformField> standardOnlCgformFieldList = fieldList.stream()
|
||||
.filter(e -> FieldTypeEnum.STANDARD.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
List<String> standFieldList = standardOnlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//通过id查询数据
|
||||
List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
|
||||
@@ -738,129 +744,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//查询所有
|
||||
List<Map<String, Object>> 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<String> replacedStandardIdList = new ArrayList<>();//代替标准
|
||||
|
||||
//对应标准,代替标准,被代替标准对应的编码
|
||||
List<String> correspondingStandardNameList = new ArrayList<>();//对应标准编码
|
||||
List<String> replaceStandardNameList = new ArrayList<>();//代替标准编码
|
||||
List<String> replacedStandardNameList = new ArrayList<>();//被代替标准编码
|
||||
|
||||
List<Map<String, Object>> listCorrespondingStandard = new ArrayList<>();
|
||||
List<Map<String, Object>> listReplaceStandard = new ArrayList<>();
|
||||
List<Map<String, Object>> listReplacedStandard = new ArrayList<>();
|
||||
|
||||
|
||||
//处理被代替标准和对应标准
|
||||
for (Map<String, Object> map : mapList) {
|
||||
Map<String, Object> stringObjectMap = new HashMap<>();
|
||||
//对应标准处理
|
||||
if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) {
|
||||
for (String s : correspondingStandardId.split(",")) {
|
||||
Map<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea);
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
|
||||
//过滤出下拉选
|
||||
List<OnlCgformField> onlCgformFieldList = fieldList.stream()
|
||||
@@ -1005,22 +892,34 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
} else {
|
||||
//处理字段类型为文件之外的字段
|
||||
if (dataList.size() != 0) {
|
||||
List<String> standardNameList = new ArrayList<>();//对应标准编码
|
||||
List<Map<String, Object>> 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<String, Object> map1 : mapList) {
|
||||
//对应标准处理
|
||||
if (ObjectUtils.isNotEmpty(entry.getValue())) {
|
||||
for (String s : entry.getValue().toString().split(",")) {
|
||||
Map<String, Object> 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 +949,331 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// public List<Map<String, Object>> getInfoById(String id, String cut) {
|
||||
// //通过id查询数据
|
||||
// List<Map<String, Object>> dataList = bussDocumentLibraryEOMapper.selectMapsAll(id);
|
||||
//
|
||||
// List<Map<String, Object>> result = new ArrayList<>(); // 要返回的结果
|
||||
// if (dataList.isEmpty()){
|
||||
// // 取不到数据,直接返回空结果
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// //查询所有
|
||||
// List<Map<String, Object>> 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<String> replacedStandardIdList = new ArrayList<>();//代替标准
|
||||
//
|
||||
// //对应标准,代替标准,被代替标准对应的编码
|
||||
// List<String> correspondingStandardNameList = new ArrayList<>();//对应标准编码
|
||||
// List<String> replaceStandardNameList = new ArrayList<>();//代替标准编码
|
||||
// List<String> replacedStandardNameList = new ArrayList<>();//被代替标准编码
|
||||
//
|
||||
// List<Map<String, Object>> listCorrespondingStandard = new ArrayList<>();
|
||||
// List<Map<String, Object>> listReplaceStandard = new ArrayList<>();
|
||||
// List<Map<String, Object>> listReplacedStandard = new ArrayList<>();
|
||||
//
|
||||
//
|
||||
// //处理被代替标准和对应标准
|
||||
// for (Map<String, Object> map : mapList) {
|
||||
// Map<String, Object> stringObjectMap = new HashMap<>();
|
||||
// //对应标准处理
|
||||
// if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) {
|
||||
// for (String s : correspondingStandardId.split(",")) {
|
||||
// Map<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<OnlCgformArea> areaList = onlCgformAreaServiceImpl.queryList(onlCgformArea);
|
||||
// //字段属性
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
//
|
||||
// //过滤出下拉选
|
||||
// List<OnlCgformField> onlCgformFieldList = fieldList.stream()
|
||||
// .filter(e -> FieldTypeEnum.PULL_SINGLE.getValue().equals(e.getFieldShowType())
|
||||
// || FieldTypeEnum.PULL_MORE.getValue().equals(e.getFieldShowType()))
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// //过滤出树形字段
|
||||
// List<OnlCgformField> treeFieldList = fieldList.stream()
|
||||
// .filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType()))
|
||||
// .collect(Collectors.toList());
|
||||
//
|
||||
// //下拉选字段
|
||||
// List<String> fieldPullList = onlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//
|
||||
// //数据字典
|
||||
// List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
//
|
||||
// //树形数据字典
|
||||
// List<SysCategory> categoryList = sysCategoryService.list();
|
||||
// //处理树形数据字典
|
||||
// dataList.get(0).entrySet().forEach(entry -> {
|
||||
// //下拉选处理数据字典
|
||||
// treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
// });
|
||||
//
|
||||
// //下拉单选和下拉多选数据字典处理
|
||||
// List<OnlCgformField> 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<String, Object> mapTemp = new HashMap<>();
|
||||
// List<Map<String, Object>> resultTemp = new ArrayList<>();
|
||||
// List<OnlCgformField> 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<String, Object> map = new HashMap<>();
|
||||
// //处理文件
|
||||
// if (FieldTypeEnum.FILE.getValue().equals(fieldShowType)) {
|
||||
// //处理文本信息和关联信息区域之外的区域中文件类型字段返归结果格式
|
||||
// if(!"文本信息".equals(onlCgformAreaTemp.getShowArea()) && !"关联信息".equals(onlCgformAreaTemp.getShowArea())){
|
||||
// List<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId(value);
|
||||
// List<String> fileIdList = fileInfos.stream().map(OSSFile::getId).collect(Collectors.toList());
|
||||
// Map<String, Object> 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<OSSFile> fileInfos = iOSSFileService.getFileInfosByConnectId(value);
|
||||
// //多文件处理
|
||||
// if (fileInfos.size() > 1) {
|
||||
// if (fileInfos.size() != 0) {
|
||||
// int i = 0;
|
||||
// for (OSSFile fileInfo : fileInfos) {
|
||||
// if (i == 0) {
|
||||
// Map<String, Object> 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<SarFileSplitInfoEO> 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<String, Object> 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<SarFileSplitInfoEO> 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<String, Object> 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<SarFileSplitInfoEO> 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<String, Object> 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<String, Object> map, String field_show_type,
|
||||
String fieldShowType2, String dict_field, String dictField,
|
||||
|
||||
+8
@@ -274,6 +274,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
wrapperInfo.in(DummyContentChangeEO::getParentId,dummyInventoryBaseEO.getId());
|
||||
List<DummyContentChangeEO> dummyContentChangeEOInfoList = iDummyContentChangeEOService.list(wrapperInfo);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(dummyContentChangeEOInfoList)){
|
||||
//3.对比基础表数据
|
||||
//3.1截止到现在发布,期间修改的数据(基础)
|
||||
//最新的数据为-->dummyInventoryBaseEOList
|
||||
@@ -410,6 +411,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
dummyContentChangeEOMapper.update(null,infoUpdateWrapper);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
||||
throw new JeroBootException("维护清单为空,发布失败");
|
||||
}else{
|
||||
throw new JeroBootException("The maintenance list is empty, and publishing failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//撤回,需要发消息
|
||||
|
||||
+14
@@ -7,6 +7,7 @@ import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.project.entity.ProjectRelatedPersonnel;
|
||||
import com.jero.modules.project.service.IProjectRelatedPersonnelService;
|
||||
import com.jero.modules.project.util.ExcelLangUtils;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -197,4 +198,17 @@ public class ProjectRelatedPersonnelController extends JeroController<ProjectRel
|
||||
Map<String, Object> 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<SysUser> certificationEngineerList = projectRelatedPersonnelService.queryCertificationEngineer(projectId);
|
||||
return Result.OK(certificationEngineerList);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -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<ProjectRelated
|
||||
|
||||
ProjectRelatedPersonnel queryByProjectIdAndDutyTerritory(String projectId, String dutyTerritory);
|
||||
|
||||
List<SysUser> queryCertificationEngineer(String projectId);
|
||||
}
|
||||
|
||||
+25
@@ -759,4 +759,29 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
updateById(projectRelatedPersonnel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> queryCertificationEngineer(String projectId) {
|
||||
QueryWrapper<ProjectRelatedPersonnel> queryWrapper = new QueryWrapper<>();
|
||||
List<ProjectRelatedPersonnel> list = list(queryWrapper.eq("project_id",projectId));
|
||||
|
||||
List<String> certificationEngineerList = list.stream().map(e -> e.getCertificationEngineer()).collect(Collectors.toList());
|
||||
|
||||
StringBuilder userIdBuilder=new StringBuilder();
|
||||
List<SysUser> 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<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
userqueryWrapper.in("id ", userIdList);
|
||||
certificationEngineerUsers = sysUserMapper.selectList(userqueryWrapper);
|
||||
}
|
||||
return certificationEngineerUsers;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -789,4 +789,5 @@ module.exports = {
|
||||
yellow: 'yellow',
|
||||
resultReported:'Result Reported',
|
||||
TheDoesNotContainData:'The maintenance list of the virtual list does not contain data',
|
||||
number:'No',
|
||||
}
|
||||
@@ -794,4 +794,5 @@ module.exports = {
|
||||
yellow:'黄',
|
||||
resultReported:'结果报告',
|
||||
TheDoesNotContainData:'该虚拟清单的维护清单中没有数据,是否需要添加',
|
||||
number:'序号',
|
||||
}
|
||||
@@ -277,7 +277,7 @@
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -125,9 +125,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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user