|
@@ -108,7 +108,7 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
}
|
|
|
if (VERIFIED.equals(reportRecordsDo.getCheckstatus())) {
|
|
|
log.error("当前报工记录已检验无法再次检验");
|
|
|
- return R.error("该作业已被检验");
|
|
|
+ return R.error("该作业已被其他人检验");
|
|
|
}
|
|
|
apsReportRecordsService.update(new LambdaUpdateWrapper<ApsReportRecordsDo>().eq(ApsReportRecordsDo::getId, id)
|
|
|
.set(ApsReportRecordsDo::getCheckstatus, VERIFIED));
|
|
@@ -289,6 +289,16 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
return R.error("该作业已被其他人检验");
|
|
|
}
|
|
|
locks.computeIfAbsent(id, k -> currentUser.getId());
|
|
|
+ // 获取报工记录
|
|
|
+ ApsReportRecordsDo reportRecordsDo = apsReportRecordsService.getById(id);
|
|
|
+ if (reportRecordsDo == null) {
|
|
|
+ log.error("无法根据ID:{}获取到报工记录", id);
|
|
|
+ return R.error("无法获取到报工记录");
|
|
|
+ }
|
|
|
+ if (VERIFIED.equals(reportRecordsDo.getCheckstatus())) {
|
|
|
+ log.error("当前报工记录已检验无法再次检验");
|
|
|
+ return R.error("该作业已被其他人检验");
|
|
|
+ }
|
|
|
log.debug("报工检验前校验成功");
|
|
|
return R.ok();
|
|
|
}
|