Commit 546705a0 authored by wangqiang's avatar wangqiang

IED计划导入导出增加校核、批准等用户

parent 0b73fc7b
......@@ -281,9 +281,22 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
}
//编制
extIEDPlanVO.setEditor(extIEDPlanExcelVO.getEditor());
//校核
extIEDPlanVO.setChecker(extIEDPlanExcelVO.getChecker());
//审核
extIEDPlanVO.setAuditor(extIEDPlanExcelVO.getAuditor());
//审定
extIEDPlanVO.setInvestigator(extIEDPlanExcelVO.getInvestigator());
//批准
extIEDPlanVO.setRatifier(extIEDPlanExcelVO.getRatifier());
Map<String, Object> dynamicAttrs = new HashMap<>();
dynamicAttrs.put("editorName", userUtils.getUserById(Long.valueOf(extIEDPlanExcelVO.getEditor())).getName());
dynamicAttrs.put("checkerName", userUtils.getUserById(Long.valueOf(extIEDPlanExcelVO.getChecker())).getName());
dynamicAttrs.put("auditorName", userUtils.getUserById(Long.valueOf(extIEDPlanExcelVO.getAuditor())).getName());
dynamicAttrs.put("investigatorName", userUtils.getUserById(Long.valueOf(extIEDPlanExcelVO.getInvestigator())).getName());
dynamicAttrs.put("ratifierName", userUtils.getUserById(Long.valueOf(extIEDPlanExcelVO.getRatifier())).getName());
extIEDPlanVO.setDynamicAttrs(dynamicAttrs);
extIEDPlanVO.setChecker(extIEDPlanExcelVO.getChecker());
extIEDPlanVO.setAuditor(extIEDPlanExcelVO.getAuditor());
......@@ -473,6 +486,21 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
extIEDPlanExcelVO.setEditor(String.valueOf(dxUserInfoVO.getId()));
}
}
//校核不能为空,判断该用户是否存在,存在的话,将用户id保存
if (StringUtils.isEmpty(extIEDPlanExcelVO.getChecker())) {
errorString.append("解析到数据第" + excelDataRow + "行文件编号为:" + extIEDPlanExcelVO.getFileNumber() + "的编写者不能为空!!");
errorList.add(errorString);
return;
} else {
DxUserInfoVO dxUserInfoVO = userUtils.getUserByName(extIEDPlanExcelVO.getChecker());
if (ObjectUtils.isEmpty(dxUserInfoVO)) {
errorString.append("解析到数据第" + excelDataRow + "行文件编号为:" + extIEDPlanExcelVO.getFileNumber() + "的校核在系统中未查到!!");
errorList.add(errorString);
return;
} else {
extIEDPlanExcelVO.setChecker(String.valueOf(dxUserInfoVO.getId()));
}
}
//审核不是空,判断该用户是否存在,存在的话,将用户id保存
if (!StringUtils.isEmpty(extIEDPlanExcelVO.getAuditor())) {
DxUserInfoVO dxUserInfoVO = userUtils.getUserByName(extIEDPlanExcelVO.getAuditor());
......
......@@ -152,11 +152,11 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
if (!ObjectUtil.isEmpty(extIEDPlanVO.getFileSubmitTime())) {
extIEDPlanExcelVO.setFileSubmitTime(extIEDPlanVO.getFileSubmitTime().format(DateTimeFormatter.ISO_DATE));
}
extIEDPlanExcelVO.setEditor(extIEDPlanVO.getEditor());
extIEDPlanExcelVO.setChecker(extIEDPlanVO.getChecker());
extIEDPlanExcelVO.setAuditor(extIEDPlanVO.getAuditor());
extIEDPlanExcelVO.setInvestigator(extIEDPlanVO.getInvestigator());
extIEDPlanExcelVO.setRatifier(extIEDPlanVO.getRatifier());
extIEDPlanExcelVO.setEditor(extIEDPlanVO.getDynamicAttrs().get("userName").toString());
extIEDPlanExcelVO.setChecker(extIEDPlanVO.getDynamicAttrs().get("checkerName").toString());
extIEDPlanExcelVO.setAuditor(extIEDPlanVO.getDynamicAttrs().get("auditorName").toString());
extIEDPlanExcelVO.setInvestigator(extIEDPlanVO.getDynamicAttrs().get("investigatorName").toString());
extIEDPlanExcelVO.setRatifier(extIEDPlanVO.getDynamicAttrs().get("ratifierName").toString());
extIEDPlanExcelVO.setNote(extIEDPlanVO.getNote());
//获取密级code
String secretCode = CommonUtils.searchDictDataValueByDictCode(Constants.SECRET_CODE, extIEDPlanVO.getSecretCode());
......@@ -204,6 +204,14 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
dynamicAttrs.put("phase", extIEDPlanVO.getPhase());
//编写者
dynamicAttrs.put("editor", extIEDPlanVO.getEditor());
//校核
dynamicAttrs.put("checker", extIEDPlanVO.getChecker());
//审核
dynamicAttrs.put("auditor", extIEDPlanVO.getAuditor());
//审定
dynamicAttrs.put("investigator", extIEDPlanVO.getInvestigator());
//批准
dynamicAttrs.put("ratifier", extIEDPlanVO.getRatifier());
//设置动态属性
dxDocumentVO.setDynamicAttrs(dynamicAttrs);
//创建时间
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment