|
@@ -433,34 +433,35 @@ public class ReportController {
|
|
|
return msg;
|
|
|
} else {
|
|
|
auditorSettingList = new ArrayList<>();
|
|
|
+ projectAuditorId = new String[auditorSettingArray.length];
|
|
|
for (int i=0;i<auditorSettingArray.length; i++) {
|
|
|
String str = auditorSettingArray[i];
|
|
|
if (str.contains("@")) {
|
|
|
str = str.replaceAll("@", ",");
|
|
|
}
|
|
|
ReportAuditorSetting reportAuditorSetting = JSONObject.parseObject(str, ReportAuditorSetting.class);
|
|
|
+ //避免字段为空字符串
|
|
|
+ if ("".equals(reportAuditorSetting.getAuditorFirst())) {
|
|
|
+ reportAuditorSetting.setAuditorFirst(null);
|
|
|
+ }
|
|
|
+ if ("".equals(reportAuditorSetting.getAuditorSec())) {
|
|
|
+ reportAuditorSetting.setAuditorSec(null);
|
|
|
+ }
|
|
|
+ if ("".equals(reportAuditorSetting.getAuditorThird())) {
|
|
|
+ reportAuditorSetting.setAuditorThird(null);
|
|
|
+ }
|
|
|
+
|
|
|
auditorSettingList.add(reportAuditorSetting);
|
|
|
//检查审核人层级是否设置满
|
|
|
- if (comTimeType.getAuditLevel() == 1 && reportAuditorSetting.getAuditorFirst() == null) {
|
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
- //msg.setError("请设置审核人");
|
|
|
- msg.setError(MessageUtils.message("profession.checker"));
|
|
|
- return msg;
|
|
|
- } else if (comTimeType.getAuditLevel() == 2 && (reportAuditorSetting.getAuditorFirst() == null || reportAuditorSetting.getAuditorSec() == null)) {
|
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
- //msg.setError("请设置审核人");
|
|
|
- msg.setError(MessageUtils.message("profession.checker"));
|
|
|
- return msg;
|
|
|
- }else if (comTimeType.getAuditLevel() == 3 && (reportAuditorSetting.getAuditorFirst() == null || reportAuditorSetting.getAuditorSec() == null
|
|
|
- || reportAuditorSetting.getAuditorThird() == null)) {
|
|
|
+ if (reportAuditorSetting.getAuditorFirst() == null) {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
//msg.setError("请设置审核人");
|
|
|
- msg.setError(MessageUtils.message("profession.checker"));
|
|
|
+ msg.setError("请至少设置第一审核人");
|
|
|
return msg;
|
|
|
}
|
|
|
//设置审核人为第一审核人
|
|
|
- projectAuditorId = new String[auditorSettingArray.length];
|
|
|
projectAuditorId[i] = reportAuditorSetting.getAuditorFirst();
|
|
|
+ System.out.println("第"+(i+1)+"个项目的第一审核人是:" +projectAuditorId[i]);
|
|
|
}
|
|
|
}
|
|
|
}else {
|