提交 be8cffec authored 作者: zhoushaopan's avatar zhoushaopan

fix(核查上链模块): 修复[不存在的数据]

修复[不存在的数据]
上级 7e892814
...@@ -349,7 +349,14 @@ public class DeviceCheckController { ...@@ -349,7 +349,14 @@ public class DeviceCheckController {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
Task task = taskRepo.findByBillIdAndBusinessType(id, 8).orElseThrow(() -> new ApiException("给出的bill id 不存在")); Optional<Task> byBillIdAndBusinessType = taskRepo.findByBillIdAndBusinessType(id, 8);
if (!byBillIdAndBusinessType.isPresent()) {
return ResponseEntity.ok(new ResultObj<>(new CheckDetailVo()));
}
Task task = byBillIdAndBusinessType.get();
if (task.getBillStatus() == 140 || task.getBillStatus() == 160) { if (task.getBillStatus() == 140 || task.getBillStatus() == 160) {
// log.info("[核查] 刷新在库/不在库,bill id :{}", id); // log.info("[核查] 刷新在库/不在库,bill id :{}", id);
refreshDetail(id); refreshDetail(id);
......
...@@ -84,6 +84,10 @@ public class CheckBlockServiceImpl implements CheckBlockService { ...@@ -84,6 +84,10 @@ public class CheckBlockServiceImpl implements CheckBlockService {
for (DeviceCheckDetail detail : details) { for (DeviceCheckDetail detail : details) {
CheckDetailVo data = deviceCheckController.findDetail(detail.getId()).getBody().getData(); CheckDetailVo data = deviceCheckController.findDetail(detail.getId()).getBody().getData();
if (data.getId() == null) {
log.info("[check] 发现脏数据");
continue;
}
String localFileMd5 = ""; String localFileMd5 = "";
List<FileRet> checkFileList = data.getCheckFileList(); List<FileRet> checkFileList = data.getCheckFileList();
if (checkFileList.size() == 1) { if (checkFileList.size() == 1) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论