fix: 企标新增-稽查内容报错
This commit is contained in:
+14
-7
@@ -54,6 +54,7 @@ import org.springframework.stereotype.Component;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -140,6 +141,13 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
infoPage.setRecords(processResultMapPageList(infoPage.getRecords(), fieldListSelect));
|
infoPage.setRecords(processResultMapPageList(infoPage.getRecords(), fieldListSelect));
|
||||||
// 是否收藏判断标识
|
// 是否收藏判断标识
|
||||||
collectionFlag(infoPage.getRecords());
|
collectionFlag(infoPage.getRecords());
|
||||||
|
|
||||||
|
// // 企标独有权限
|
||||||
|
// if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
||||||
|
// // 是否能查看详情
|
||||||
|
// this.detailFlag(infoPage.getRecords());
|
||||||
|
// }
|
||||||
|
|
||||||
// 待处理
|
// 待处理
|
||||||
return infoPage;
|
return infoPage;
|
||||||
}
|
}
|
||||||
@@ -474,7 +482,10 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
String standardNumber = esUtil.generateStandardNumber(parameterMap);
|
String standardNumber = esUtil.generateStandardNumber(parameterMap);
|
||||||
parameterMap.put(FieldCommon.STANDARD_NUMBER, standardNumber);
|
parameterMap.put(FieldCommon.STANDARD_NUMBER, standardNumber);
|
||||||
}
|
}
|
||||||
|
// 提前处理企标的稽查内容,否则后面转换会报错
|
||||||
|
List<LinkedHashMap> checkList = (List<LinkedHashMap>) parameterMap.get(FieldCommon.CHECK_LIST);
|
||||||
|
List<EnterpriseStandardInspectContent> inspectContents = this.convertList(checkList);
|
||||||
|
parameterMap.put(FieldCommon.CHECK_LIST, null);
|
||||||
// 法规编号不能为空
|
// 法规编号不能为空
|
||||||
String standardNumber = (String) parameterMap.get(FieldCommon.STANDARD_NUMBER);
|
String standardNumber = (String) parameterMap.get(FieldCommon.STANDARD_NUMBER);
|
||||||
if (StringUtils.isBlank(standardNumber)) {
|
if (StringUtils.isBlank(standardNumber)) {
|
||||||
@@ -541,18 +552,14 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
|
|
||||||
// 执行企标独有的逻辑
|
// 执行企标独有的逻辑
|
||||||
if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
if (module.equals(TableNameEnum.ENTERPRISE_STANDARDS.getValue())) {
|
||||||
this.enterpriseStandardAdd(parameterMap, id, standardNumber);
|
this.enterpriseStandardAdd(inspectContents, id, standardNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return MessageUtils.getMessage(ResultCommon.OK);
|
return MessageUtils.getMessage(ResultCommon.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enterpriseStandardAdd(Map<String, Object> parameterMap, String standardId, String standardNo) {
|
public void enterpriseStandardAdd(List<EnterpriseStandardInspectContent> inspectContents, String standardId, String standardNo) {
|
||||||
// 保存新增企标时的稽查内容
|
// 保存新增企标时的稽查内容
|
||||||
// 转换稽查内容
|
|
||||||
List<LinkedHashMap> checkList = (List<LinkedHashMap>) parameterMap.get(FieldCommon.CHECK_LIST);
|
|
||||||
List<EnterpriseStandardInspectContent> inspectContents = this.convertList(checkList);
|
|
||||||
// 设置标准Id和标准编号
|
// 设置标准Id和标准编号
|
||||||
for (EnterpriseStandardInspectContent inspectContent : inspectContents) {
|
for (EnterpriseStandardInspectContent inspectContent : inspectContents) {
|
||||||
inspectContent.setStandardId(standardId);
|
inspectContent.setStandardId(standardId);
|
||||||
|
|||||||
Reference in New Issue
Block a user