提交人瞩

This commit is contained in:
quyixiao 2020-08-26 16:14:51 +08:00
parent 4a6b4d7a2f
commit d5eb363f93

View File

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