Commit 469d8fda authored by 竹天卫's avatar 竹天卫

样品处理 派发任务 完成接口 可以进行修改 上传附件

parent d5951a08
...@@ -538,7 +538,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -538,7 +538,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
public BaseResponse<String> getMaxCementCode() { public BaseResponse<String> getMaxCementCode() {
Object obj = redisUtil.getString("maxCementCode"); Object obj = redisUtil.getString("maxCementCode");
String maxCementCode = ""; String maxCementCode = "";
if (obj == null) { String regex = "[0-9]{2}\\-[0-9]{4}";
if (obj == null || !obj.toString().matches(regex) ) {
maxCementCode = sampleMapper.getMaxCementCode(); maxCementCode = sampleMapper.getMaxCementCode();
} else { } else {
maxCementCode = obj.toString(); maxCementCode = obj.toString();
...@@ -974,7 +975,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -974,7 +975,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (sampleHandle == null) { if (sampleHandle == null) {
return BaseResponse.errorMsg("信息错误"); return BaseResponse.errorMsg("信息错误");
} }
if (sampleHandle.getStatus() != 1) { if (sampleHandle.getStatus() != 1 && sampleHandle.getStatus() != 2 ) {
return BaseResponse.errorMsg("状态错误"); return BaseResponse.errorMsg("状态错误");
} }
if (loginUser.getId() != sampleHandle.getUserId()) { if (loginUser.getId() != sampleHandle.getUserId()) {
...@@ -1305,7 +1306,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -1305,7 +1306,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (distribution == null) { if (distribution == null) {
return BaseResponse.errorMsg("信息错误"); return BaseResponse.errorMsg("信息错误");
} }
if (distribution.getStatus() != 1) { if (distribution.getStatus() != 1 && distribution.getStatus() != 2) {
return BaseResponse.errorMsg("状态错误"); return BaseResponse.errorMsg("状态错误");
} }
distribution.setStatus(2).setFinishTime(LocalDateTime.now()); distribution.setStatus(2).setFinishTime(LocalDateTime.now());
......
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