Browse Source

修改录入RFID数据信息

oyq28 8 tháng trước cách đây
mục cha
commit
3739ad84a7

+ 2 - 2
imcs-admin-boot/imcs-authority-server/src/main/java/com/github/zuihou/job/DashboardJob.java

@@ -350,7 +350,7 @@ public class DashboardJob {
 
     //成航发
     //机床报警信息数据采集
-    @Scheduled(cron = "*/5 * * * * ?")
+    //@Scheduled(cron = "*/10 * * * * ?")
     public void toolWarinCJ()  {
         Set<Map.Entry<String, String>> entries = map.entrySet();
         entries.stream().parallel().forEach(vo->{
@@ -398,7 +398,7 @@ public class DashboardJob {
 
     //成航发
     //PLC报警信息数据采集
-    @Scheduled(cron = "*/5 * * * * ?")
+    @Scheduled(cron = "*/10 * * * * ?")
     public void plcWarinCJ()  {
         try{
             Object map = msgUtil.redis_get(CacheKey.PLC_COSTOM_ADDRESS);

+ 13 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/mq/TaskWorkNode.java

@@ -1123,6 +1123,19 @@ public class TaskWorkNode {
                         dataMap.put("fromStorge", startStore);
                         dataMap.put("toStorge", targetStorge);
 
+                        /**
+                         * 塞入RFID芯片数据
+                         */
+                        Map map=new HashMap<>();
+                        map.put("storgeId",startStore.getId());
+                        List<StockInfo> stockInfoList=stockInfoMapper.getGoodsListBystorgeId(map);
+                        String uniqueCode = taskMapper.getNodeDataToRfidUse(taskNode.getId());
+                        stockInfoList.forEach(vo->{
+                            if("夹具".equals(vo.getCategoryDesc())){
+                                this.msgUtil.redis_set(DemoCacheKey.RFID+taskNode.getId(), vo.getBrandNo()+"&"+uniqueCode, 2L, TimeUnit.DAYS);
+                            }
+                        });
+
                         // 机器人移动到redis记录实时位子
                         msgUtil.redis_set(taskNode.getResourceId()+"postion",startStore.getPointId());
                     }else{

+ 11 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskNodeServiceImpl.java

@@ -1688,7 +1688,11 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             autoNodeLogMapper.updateAllById(lg);
         }
         msgUtil.redis_del(repeatKey);
-
+        /**
+         * 删除RFID缓存数据
+         */
+        msgUtil.redis_del(DemoCacheKey.RFID+taskNodeId);
+        msgUtil.redis_del(DemoCacheKey.RFID+taskNodeId+"_null");
         Date endTime = new Date();
         log.warn("任务回调用时:{}秒", cn.hutool.core.date.DateUtil.between(startTime,endTime, DateUnit.SECOND));
         return R.success();
@@ -3127,6 +3131,12 @@ planId));
         }
         if (bool) {
             this.saveBatch(fanMNodes);
+            if(fanMNodes.size()==1){
+                TaskNode taskNode = fanMNodes.get(0);
+                if("机械手放到立库".equals(taskNode.getNodeName())){
+                    this.msgUtil.redis_set(DemoCacheKey.RFID+taskNode.getId()+"_null", 1, 2L, TimeUnit.DAYS);
+                }
+            }
         }else{
             return R.fail("节点数据更新失败");
         }

+ 6 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/RobotNodeServiceImpl.java

@@ -477,7 +477,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                                 log.warn("节点{}检查目标库位是否满足返回{}",taskNode.getId(),targetStorge.getPointId());
 
                                 //获取当前节点RFID
-                                String newRfid = getRFID(taskNode.getId(), taskNode.getTaskId(), startStore.getId());
+                                //String newRfid = getRFID(taskNode.getId(), taskNode.getTaskId(), startStore.getId());
 
                                 String targetxbk = returnMap.get("targetxbk")==null?null:(String)returnMap.get("targetxbk");
                                 jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
@@ -503,7 +503,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                                 }
 
                                 //记录当前节点RFID
-                                msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_RFID + taskNode.getId(), newRfid, 10, TimeUnit.DAYS);
+                                //msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_RFID + taskNode.getId(), newRfid, 10, TimeUnit.DAYS);
 
                                 dataMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY")); //移动类型
 
@@ -527,6 +527,10 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                                 dataMap.put("result", true);
                                 dataMap.put("fromStorge", startStore);
                                 dataMap.put("toStorge", targetStorge);
+                                /*List<String> pointList=Arrays.asList("201","202");
+                                if(pointList.contains(startStore.getPointId()) && pointList.contains(targetStorge.getPointId())){
+                                    throw new BizException("目标库位有问题");
+                                }*/
 
                                 // 机器人移动到redis记录实时位子
                                 msgUtil.redis_set(taskNode.getResourceId()+"postion",targetStorge.getPointId());

+ 4 - 2
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/AAutoNodeLogMapper.xml

@@ -61,9 +61,11 @@
             aanl.feedback,-- 运行时信息
             aanl.call_back,-- 回调信息
             aanl.task_id,-- 任务id
-            aanl.task_node_id-- 任务节点ID
+            aanl.task_node_id,-- 任务节点ID
+            taskNode.exe_status as nodeExeStatus,-- 执行状态
+            taskNode.exe_result as nodeExeResult-- 执行结果
         FROM
-            imcs_a_auto_node_log aanl
+            imcs_a_auto_node_log aanl left join imcs_t_task_node taskNode on aanl.task_node_id=taskNode.id
         ORDER BY
             aanl.execute_time DESC
     </select>

+ 4 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/AAutoNodeLog.java

@@ -260,6 +260,10 @@ public class AAutoNodeLog extends Entity<Long> {
      */
     @TableField(exist = false)
     private String nodeNo;
+    @TableField(exist = false)
+    private String nodeExeStatus;
+    @TableField(exist = false)
+    private String nodeExeResult;
 
 
     /**