Quellcode durchsuchen

fix:修改mes任务接受数据

wang.sq@aliyun.com vor 1 Monat
Ursprung
Commit
6786c59850

+ 2 - 5
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/externalApi/service/impl/MesNoticeServiceImpl.java

@@ -84,15 +84,12 @@ public class MesNoticeServiceImpl extends SuperServiceImpl<MesNoticeMapper, MesN
         MesNotice mesNotice1 = baseMapper.selectById(id);
 
         // 新增到log日志界面
-        int count = mesNoticeLogService.count(Wraps.<MesNoticeLog>lbQ().eq(MesNoticeLog::getNoticeId, mesNotice1.getId()).eq(MesNoticeLog::getStatus, mesNotice1.getStatus()));
         MesNoticeLog mesNoticeLog = new MesNoticeLog();
         BeanUtils.copyProperties(mesNotice1,mesNoticeLog);
         mesNoticeLog.setNoticeId(mesNotice1.getId());
         mesNoticeLog.setId(null);
-        if(count<=0){
-            mesNoticeLogService.save(mesNoticeLog);
-        }
-        
+        mesNoticeLogService.save(mesNoticeLog);
+
         return mesNotice1;
     }
 

+ 5 - 1
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/MesController.java

@@ -1002,8 +1002,12 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
             String drawingNo = (qualityInfo != null) ? dataInfo.getString("DrawNumber") : dataInfo.getString("graphno");
             String idnr = (qualityInfo != null) ? null : dataInfo.getString("idnr");
 
+            if(drawingNo ==null || processNo ==null){
+                throw new BizException("图号与工序号不能为空");
+            }
+
             // 数字话检测系统点单号需要拼接,才能保证唯一
-            externalTaskCode = (qualityInfo != null) ? (workOrderNo +"&"+ externalTaskCode ) : workOrderNo;
+            externalTaskCode = (qualityInfo != null) ? (workOrderNo +"&"+ externalTaskCode ) : null;
             workOrderNo = (qualityInfo != null) ? (workOrderNo +"&"+ processNo +"&"+serialNo) : workOrderNo;
 
             //获取默认虚拟原材料