فهرست منبع

fix:物料rfid校验

wang.sq@aliyun.com 3 روز پیش
والد
کامیت
06558528e5

+ 3 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/MachineCuttingToolServiceImpl.java

@@ -281,6 +281,9 @@ public class MachineCuttingToolServiceImpl extends SuperCacheServiceImpl<Machine
 
                 chuli.put("success",LocalDateTime.now()+ "_机床刀具数据同步数据成功,设备编号:" + productionresource.getName() + ";请求信息:" + JSONObject.toJSONString(jsonObject) + ";返回结果:" + JSONObject.toJSONString(resultObj));
             } catch (Exception e) {
+                // 如果查询失败,移除机床刀具数据
+                baseMapper.delete(Wraps.<MachineCuttingTool>lbQ().eq(MachineCuttingTool::getMachineId, productionresource.getId()));
+
                 e.printStackTrace();
                 chuli.put("error", LocalDateTime.now() + "机床刀具数据同步数据异常,设备编号:" + productionresource.getName() + ";异常信息:" + e.getMessage());
                 timingLogPo.setExecuteResult("刀具数据同步异常:"+e.getMessage()).setErrorCode("ERROR_JCDJTB").setErrorMsg("机床刀具数据同步数据异常");