Commit f844b1c0 authored by 侯彦文's avatar 侯彦文

进度计划优化提示信息

parent ca129144
...@@ -292,47 +292,47 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -292,47 +292,47 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
private StringBuffer checkPlan(PlanExcelVO excelVO, int i, StringBuffer buffer) { private StringBuffer checkPlan(PlanExcelVO excelVO, int i, StringBuffer buffer) {
//校验 //校验
if (StringUtils.isEmpty(excelVO.getNumber())) { if (StringUtils.isEmpty(excelVO.getNumber())) {
buffer.append(String.format("第%s行的计划编号为空", i + 1) + "</br>"); buffer.append(String.format("第%s行的计划编号为空", i + 1) + "<br/>");
}else{ }else{
//校验编号是否已存在 //校验编号是否已存在
ExtPlanVO extPlanVOByNumber = this.searchByNumber(excelVO.getNumber()); ExtPlanVO extPlanVOByNumber = this.searchByNumber(excelVO.getNumber());
if (!StringUtils.isEmpty(extPlanVOByNumber)) { if (!StringUtils.isEmpty(extPlanVOByNumber)) {
buffer.append(String.format("第%s行计划编号已存在", i + 1) + "</br>"); buffer.append(String.format("第%s行计划编号已存在", i + 1) + "<br/>");
} }
} }
if (StringUtils.isEmpty(excelVO.getName())) { if (StringUtils.isEmpty(excelVO.getName())) {
buffer.append(String.format("第%s行的计划名称为空", i + 1) + "</br>"); buffer.append(String.format("第%s行的计划名称为空", i + 1) + "<br/>");
} }
if (StringUtils.isEmpty(excelVO.getStartTime())) { if (StringUtils.isEmpty(excelVO.getStartTime())) {
buffer.append(String.format("第%s行,请填写正确的计划开始时间的日期格式", i + 1) + "</br>"); buffer.append(String.format("第%s行,请填写正确的计划开始时间的日期格式", i + 1) + "<br/>");
} }
if (StringUtils.isEmpty(excelVO.getFeedbackType())) { if (StringUtils.isEmpty(excelVO.getFeedbackType())) {
buffer.append(String.format("第%s行的反馈类型为空", i + 1) + "</br>"); buffer.append(String.format("第%s行的反馈类型为空", i + 1) + "<br/>");
} }
if (StringUtils.isEmpty(excelVO.getPlanExecutor())) { if (StringUtils.isEmpty(excelVO.getPlanExecutor())) {
buffer.append(String.format("第%s行的计划执行人为空", i + 1) + "</br>"); buffer.append(String.format("第%s行的计划执行人为空", i + 1) + "<br/>");
}else{ }else{
DxUserInfoVO userByName = dxUserInfoFeign.getUserByName(excelVO.getPlanExecutor()); DxUserInfoVO userByName = dxUserInfoFeign.getUserByName(excelVO.getPlanExecutor());
if (StringUtils.isEmpty(userByName)) { if (StringUtils.isEmpty(userByName)) {
buffer.append(String.format("第%s行计划执行人不存在", i + 1) + "</br>"); buffer.append(String.format("第%s行计划执行人不存在", i + 1) + "<br/>");
} else { } else {
excelVO.setPlanExecutorId(userByName.getId()); excelVO.setPlanExecutorId(userByName.getId());
} }
} }
if (StringUtils.isEmpty(excelVO.getCompleteTime())) { if (StringUtils.isEmpty(excelVO.getCompleteTime())) {
buffer.append(String.format("第%s行,请填写正确的计划完成时间的日期格式", i + 1) + "</br>"); buffer.append(String.format("第%s行,请填写正确的计划完成时间的日期格式", i + 1) + "<br/>");
} }
// 密级校验 // 密级校验
String secretCode = excelVO.getSecretCode(); String secretCode = excelVO.getSecretCode();
String secretCodeKey = this.searchDictDataByDictCode(Constants.SECRET_CODE, secretCode); String secretCodeKey = this.searchDictDataByDictCode(Constants.SECRET_CODE, secretCode);
if (StringUtils.isEmpty(secretCodeKey)) { if (StringUtils.isEmpty(secretCodeKey)) {
buffer.append(String.format("第%s行密级格式不正确!", i + 1) + "</br>"); buffer.append(String.format("第%s行密级格式不正确!", i + 1) + "<br/>");
} }
if (!StringUtils.isEmpty(excelVO.getSuperPlanCode())) { if (!StringUtils.isEmpty(excelVO.getSuperPlanCode())) {
//校验父级编号 //校验父级编号
ExtPlanVO extPlanVO = this.searchByNumber(excelVO.getSuperPlanCode()); ExtPlanVO extPlanVO = this.searchByNumber(excelVO.getSuperPlanCode());
if (ObjectUtils.isEmpty(extPlanVO)) { if (ObjectUtils.isEmpty(extPlanVO)) {
buffer.append(String.format("第%s行父级编号不存在", i + 1) + "</br>"); buffer.append(String.format("第%s行父级编号不存在", i + 1) + "<br/>");
} }
} }
...@@ -440,36 +440,36 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -440,36 +440,36 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
for (ExtPlanDocLinkVO planDocLink : extPlanVO.getExtPlanDocLinks()) { for (ExtPlanDocLinkVO planDocLink : extPlanVO.getExtPlanDocLinks()) {
if (!ObjectUtils.isEmpty(planDocLink.getTarget())) { if (!ObjectUtils.isEmpty(planDocLink.getTarget())) {
if (!extPlanVO.getNumber().equals(excelVO.getNumber())) { if (!extPlanVO.getNumber().equals(excelVO.getNumber())) {
stringBuffer.append(String.format("第%s行的计划编号不允许修改", i + 1) + "</br>"); stringBuffer.append(String.format("第%s行的计划编号不允许修改", i + 1) + "<br/>");
} }
if (!extPlanVO.getName().equals(excelVO.getName())) { if (!extPlanVO.getName().equals(excelVO.getName())) {
stringBuffer.append(String.format("第%s行的计划名称不允许修改", i + 1) + "</br>" ); stringBuffer.append(String.format("第%s行的计划名称不允许修改", i + 1) + "<br/>" );
} }
int compare = extPlanVO.getStartTime().compareTo(excelVO.getStartTime()); int compare = extPlanVO.getStartTime().compareTo(excelVO.getStartTime());
if (compare != 0) { if (compare != 0) {
stringBuffer.append(String.format("第%s行的计划开始时间不允许修改", i + 1) + "</br>"); stringBuffer.append(String.format("第%s行的计划开始时间不允许修改", i + 1) + "<br/>");
} }
if (!extPlanVO.getFeedbackType().equals(excelVO.getFeedbackType())) { if (!extPlanVO.getFeedbackType().equals(excelVO.getFeedbackType())) {
stringBuffer.append(String.format("第%s行的计划反馈类型不允许修改", i + 1) + "</br>"); stringBuffer.append(String.format("第%s行的计划反馈类型不允许修改", i + 1) + "<br/>");
} }
if (!extPlanVO.getPlanExecutor().equals(excelVO.getPlanExecutor())) { if (!extPlanVO.getPlanExecutor().equals(excelVO.getPlanExecutor())) {
stringBuffer.append(String.format("第%s行的计划执行人不允许修改", i + 1) + "</br>"); stringBuffer.append(String.format("第%s行的计划执行人不允许修改", i + 1) + "<br/>");
} }
DxDocumentVO doc = planDocLink.getTarget(); DxDocumentVO doc = planDocLink.getTarget();
if (Constants.REVIEWING.equals(doc.getState())) { if (Constants.REVIEWING.equals(doc.getState())) {
if (!StringUtil.equals(extPlanVO.getBusinessPlanType(), excelVO.getBusinessPlanType())) { if (!StringUtil.equals(extPlanVO.getBusinessPlanType(), excelVO.getBusinessPlanType())) {
stringBuffer.append(String.format("第%s行的计划业务计划类型不允许修改", i + 1)); stringBuffer.append(String.format("第%s行的计划业务计划类型不允许修改", i + 1)+ "<br/>");
} }
if (!StringUtil.equals(extPlanVO.getContractNo(), excelVO.getContractNo())) { if (!StringUtil.equals(extPlanVO.getContractNo(), excelVO.getContractNo())) {
stringBuffer.append(String.format("第%s行的计划合同编号不允许修改", i + 1)); stringBuffer.append(String.format("第%s行的计划合同编号不允许修改", i + 1)+ "<br/>");
} }
if (!StringUtil.equals(extPlanVO.getSuperPlanCode(), excelVO.getSuperPlanCode())) { if (!StringUtil.equals(extPlanVO.getSuperPlanCode(), excelVO.getSuperPlanCode())) {
stringBuffer.append(String.format("第%s行的计划父级计划编号不允许修改", i + 1)); stringBuffer.append(String.format("第%s行的计划父级计划编号不允许修改", i + 1)+ "<br/>");
} }
if (!StringUtil.equals(extPlanVO.getProjectCode(), excelVO.getProjectCode())) { if (!StringUtil.equals(extPlanVO.getProjectCode(), excelVO.getProjectCode())) {
stringBuffer.append(String.format("第%s行的计划项目代号不允许修改", i + 1)); stringBuffer.append(String.format("第%s行的计划项目代号不允许修改", i + 1)+ "<br/>");
} }
} }
} }
...@@ -477,7 +477,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V ...@@ -477,7 +477,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
break; break;
//已完成 //已完成
case Constants.COMPLETED: case Constants.COMPLETED:
stringBuffer.append(String.format("第%s行的计划已完成,不允许修改", i + 1) + "</br>"); stringBuffer.append(String.format("第%s行的计划已完成,不允许修改", i + 1) + "<br/>");
break; break;
} }
} }
......
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