diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index 27af13b9..544f2154 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -425,7 +425,7 @@ public class ResultRecordController extends AbstractController { @RequestMapping("/recordIdsSubmit") public R recordIdsSubmit(String recordIds) { if (StringUtil.isBlank(recordIds)) { - return R.error("请选择状态为待提交的记录"); + return R.error("请选择提交"); } List records = new ArrayList<>(); String ids[] = recordIds.split(","); @@ -436,7 +436,7 @@ public class ResultRecordController extends AbstractController { } } } - if (recordIds == null) { + if (records == null) { return R.error("请选择状态为待提交的记录"); } List resultRecords = resultRecordService.selectResultRecordByIds(records); @@ -447,16 +447,18 @@ public class ResultRecordController extends AbstractController { } - R r = null; for (ResultRecord resultRecord : resultRecords) { r = resultRecordService.approval(resultRecord.getId(), getUserId()); + if (!r.isSuccess()) { + return r; + } } - if(r != null && r.isSuccess()){//批量提交 - StaffEntity mySelf = (StaffEntity)r.get("from"); - StaffEntity toSelf = (StaffEntity)r.get("to"); - WorkMsgTypeEnum workMsgTypeEnum = (WorkMsgTypeEnum)r.get("type"); + if (r != null && r.isSuccess()) {//批量提交 + StaffEntity mySelf = (StaffEntity) r.get("from"); + StaffEntity toSelf = (StaffEntity) r.get("to"); + WorkMsgTypeEnum workMsgTypeEnum = (WorkMsgTypeEnum) r.get("type"); sendWorkMSG(mySelf, toSelf, workMsgTypeEnum, 0L, 2); }