Sfoglia il codice sorgente

示范线验证云箭代码修改,后续调整成云箭需改回DemolineConstant,DictionaryKey里面的基础数据

yejian 3 anni fa
parent
commit
4936d541b0

+ 6 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/DemoLine/DemoLineConstant.java

@@ -36,7 +36,12 @@ public interface DemoLineConstant {
     //缓存位
     String DEMOLINE_RJQR_HCW = "DEMOLINE_RJQR_HCW";
     //柔性机器人的三个点位
-    String DEMOLINE_RJQR_ZS = "124";
+
+    // 示范线配置
+    String DEMOLINE_RJQR_ZS = "123";
+    // 云箭配置
+//    String DEMOLINE_RJQR_ZS = "124";
+
     String DEMOLINE_RJQR_KW1 = "126";
     String DEMOLINE_RJQR_KW2 = "125";
 

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

@@ -330,9 +330,9 @@ public class TaskWorkNode {
                                 agvParam.putAll(agvData);
                                 //缓存执行当前节点传参
                                 msgUtil.redis_set(CacheKey.TASK_CURRENT_NODE_PARAMS + "_" + taskNode.getId(), agvParam.toJSONString());
-                                R addHikTask = agvHikOrderInfoService.addHikTask(agvData);
-
-//                                R addAgvTask = externalApiService.processTransferJob(agvData);
+//                                R addHikTask = agvHikOrderInfoService.addHikTask(agvData);
+                                agvData.put("transferType","agv");
+                                R addAgvTask = externalApiService.processTransferJob(agvData);
 
                             }
                         } else {
@@ -799,6 +799,10 @@ public class TaskWorkNode {
         Long bomZzoneId = bom.getZoneId();
         ZZone bomzZone = zoneService.getById(bomZzoneId);
 
+        ZZoneProductionresource zoneProductionresource = zZoneProductionresourceMapper.selectOne(Wraps.<ZZoneProductionresource>lbQ().eq(ZZoneProductionresource::getResourceId,taskNode.getResourceId()));
+        //获取产线ID
+        ZZone resourceZone = zoneService.getById(zoneProductionresource.getZoneId());
+
         // 判断该节点使用那条线的plc
         Map<String, String> plcInfo = DictionaryKey.PLC_CATEGORY.get(zone.getNo());
 
@@ -966,7 +970,12 @@ public class TaskWorkNode {
                 //目标地址和类型
                 robotList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[]{taskNode.getResourceId().toString()});
 
-                dataMap.put("method", "GetServoStacker");
+                if(resourceZone.getName().equals("质量中心")){
+                    dataMap.put("method", "GetQualityCenter");
+                }else{
+                    dataMap.put("method", "GetServoStacker");
+                }
+
                 ProductionresourcePosition po = logical(robotList,dataMap);
                 if (po != null) {
                     // 线边库轮询判断后续节点目标地址是否时接驳位
@@ -1022,7 +1031,11 @@ public class TaskWorkNode {
 
             } else if (count == 1) {
                 targetStorge = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId()) == null ? null : (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId());
-                dataMap.put("method", "SendServoStacker");
+                if(resourceZone.getName().equals("质量中心")){
+                    dataMap.put("method", "SendQualityCenter");
+                }else{
+                    dataMap.put("method", "SendServoStacker");
+                }
                 dataMap.put("toStorge", targetStorge);
 
                 Storge startStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);

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

@@ -276,6 +276,8 @@ public class MachineNodeServiceImpl implements NodeOperationService {
                         map.put("method", "UploadFile");
                         JSONObject data = new JSONObject();
                         data.put("fileName", fileList.get(0).get("fileName"));
+                        Module module  = moduleService.getOne(new LbqWrapper<Module>().eq(Module::getId, productionresource.getModuleId()));
+                        data.put("remotePath", module.getCncFilePath());
                         map.put("data", data);
                         //msgUtil.redis_set(DemoCacheKey.DEMOLINE_PROGRAME_NAMES + task.getCompleteBatchNo(), fileName, 1, TimeUnit.DAYS);
                         map.put("result", true);
@@ -294,8 +296,7 @@ public class MachineNodeServiceImpl implements NodeOperationService {
                     //String fileNames[] = fileName.split(",");
                     JSONObject data = new JSONObject();
                     data.put("remotePath", procedureProgramList.get(0).getSubmittedFileName());
-//                    map.put("data", data);
-                    map.remove("data");
+                    map.put("data", data);
                     map.put("method", "StartNCProgram");
                     map.put("result", true);
                 }

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

@@ -414,7 +414,11 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                 if(CollectionUtil.isNotEmpty(flikustockInfos)){//
                     startStore = storgeMapper.selectById(flikustockInfos.get(0).getStorgeId());
                 }
-                dataMap.put("method", "GetServoStacker");
+                if(zZone.getName().equals("质量中心")){
+                    dataMap.put("method", "GetQualityCenter");
+                }else{
+                    dataMap.put("method", "GetServoStacker");
+                }
                 // begin modify by yejian on 20220510 for 条件检验先检查机器人,在检查目标库位
                 ProductionresourcePosition po = logical(robotList,flikustockInfos,taskNode);
                 log.info("节点{}检查机器人资源条件返回{}",taskNode.getId(),po);
@@ -530,7 +534,13 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                 }
             }else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {
                 Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
-                dataMap.put("method", "SendServoStacker");
+
+                if(zZone.getName().equals("质量中心")){
+                    dataMap.put("method", "SendQualityCenter");
+                }else{
+                    dataMap.put("method", "SendServoStacker");
+                }
+
                 dataMap.put("toStorge", targetStorge);
                 dataMap.put("fromStorge", currentStore);
 

+ 3 - 15
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/basics/dto/CustPageDTO.java

@@ -1,23 +1,11 @@
 package com.github.zuihou.business.basics.dto;
 
-import java.time.LocalDateTime;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.github.zuihou.base.entity.Entity;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import javax.validation.constraints.NotEmpty;
-import javax.validation.constraints.NotNull;
-import org.hibernate.validator.constraints.Length;
-import org.hibernate.validator.constraints.Range;
-import lombok.Data;
-import lombok.Builder;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-import lombok.AllArgsConstructor;
-import lombok.ToString;
+import lombok.*;
 import lombok.experimental.Accessors;
-import com.github.zuihou.common.constant.DictionaryType;
+import org.hibernate.validator.constraints.Length;
+
 import java.io.Serializable;
 
 /**

+ 35 - 17
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/constant/DictionaryKey.java

@@ -16,7 +16,7 @@ public interface DictionaryKey {
     //线边库最大库位数
     final Integer RESOURCE_MAX_NUM = 20;
     //指定接口URL地址
-    final String INSTRUCTION_URL = "http://192.168.10.161:5200/";
+    final String INSTRUCTION_URL = "http://192.168.170.252:5200/";
     //PLC
     String INTERFACETYPE_PLC = "01";
     //生产加工接口
@@ -87,8 +87,13 @@ public interface DictionaryKey {
     //云箭机器人
     Map<String, String> YJ_ROBOT_NODES = new HashMap<String, String>(){
         {
-            put("1", "舱体_机器人");
-            put("2", "保障中心_伺服舵机");
+            // 云箭配置
+//            put("1", "舱体_机器人");
+//            put("2", "保障中心_伺服舵机");
+//            put("3", "框体_机器人");
+            // 示范线配置
+            put("1", "柔性线_机器人_手抓");
+            put("2", "质量中心_机器人");
             put("3", "框体_机器人");
         }
     };
@@ -121,32 +126,45 @@ public interface DictionaryKey {
     //设备关联线边库
     Map<String, String> YJ_ZONE_XBK = new HashMap<String, String>(){
         {
-            put("智能生产保障系统-capsule", "BZ_02");
-            put("智能生产保障系统-framework", "BZ_03");
-            put("框体类加工单元", "KT_01,KT_02,KT_03");
-            put("舱体类加工单元", "CT_01,CT_02,CT_03");
-            put("利库", "BZ_01");
-//            put("质量中心机器人", "Qxianbianku");
-//            put("智能单元机器人", "Zxianbianku");
-//            put("柔性线机器人","Rxianbianku");
+            // 云箭配置
+//            put("智能生产保障系统-capsule", "BZ_02");
+//            put("智能生产保障系统-framework", "BZ_03");
+//            put("框体类加工单元", "KT_01,KT_02,KT_03");
+//            put("舱体类加工单元", "CT_01,CT_02,CT_03");
+//            put("plateAndClamp", "BZ_01");
+
+            // 示范线配置
+            put("质量中心-capsule", "XBK_01");
+            put("舱体类加工单元", "XBK_03,XBK_04");
+            put("plateAndClamp", "XBK_01");
         }
     };
 
 
     Map<String, String> YJ_ZONE_JBW = new HashMap<String, String>(){
         {
-            put("智能生产保障系统", "BZ_361,BZ_362,BZ_363");
-            put("框体类加工单元", "KT_121,KT_122");
-            put("舱体类加工单元", "CT_121,CT_122");
+            // 云箭配置
+//            put("智能生产保障系统", "BZ_361,BZ_362,BZ_363");
+//            put("框体类加工单元", "KT_121,KT_122");
+//            put("舱体类加工单元", "CT_121,CT_122");
+
+            // 示范线配置
+            put("质量中心", "R3,R4");
+            put("柔性线", "R1,R2");
         }
     };
 
     //设备分类
     Map<String, Map<String, String>> PLC_CATEGORY = new HashMap<String, Map<String, String>>(){
         {
-            put("capsule", new HashMap<String,String>(){{put("url", "192.168.170.150");put("port", "102");}});
-            put("framework", new HashMap<String,String>(){{put("url", "192.168.170.170");put("port", "102");}});
-            put("safeguard", new HashMap<String,String>(){{put("url", "192.168.170.130");put("port", "102");}});
+            // 云箭配置
+//            put("capsule", new HashMap<String,String>(){{put("url", "192.168.170.150");put("port", "102");}});
+//            put("framework", new HashMap<String,String>(){{put("url", "192.168.170.170");put("port", "102");}});
+//            put("safeguard", new HashMap<String,String>(){{put("url", "192.168.170.130");put("port", "102");}});
+
+            // 示范线配置
+            put("capsule", new HashMap<String,String>(){{put("url", "192.168.170.71");put("port", "102");}});
+            put("safeguard", new HashMap<String,String>(){{put("url", "192.168.170.61");put("port", "102");}});
         }
     };
     List<Long> CHECK_AGV_STATION = new ArrayList<>();