Bladeren bron

fix: 优化交互参数

wang.sq@aliyun.com 5 maanden geleden
bovenliggende
commit
8d54555380

+ 2 - 0
imcs-admin-boot/imcs-authority-server/src/main/resources/application-test.yml

@@ -32,6 +32,8 @@ zuihou:
     password: Aa1
     fileIp: 192.168.11.240
     filePath: smb://192.168.11.240/report/
+  three_dimensiona:
+    file_path: Y:\three-dimensional
   file:
     remoteInputDataPath: smb://SOFLEX-PCS:SOFLEX-PCS@192.168.0.2/SOFLEX_PCS_iGen_CASC1_INPUT/ERP_DATA/
   machineCuttingTools:

+ 4 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/impl/StorgeServiceImpl.java

@@ -634,8 +634,8 @@ public class StorgeServiceImpl extends SuperCacheServiceImpl<StorgeMapper, Storg
         if(isFetched) {
             //todo wang.sq三坐标调用地址释放, $需要换地址$
             // 查询三坐标是否允许取
-            String fetchStatus = msgUtil.getCcsData("/api/GetMiddleThreeCoordinates", params, taskNode);
-            //String fetchStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
+            //String fetchStatus = msgUtil.getCcsData("/api/GetMiddleThreeCoordinates", params, taskNode);
+            String fetchStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
 
             JSONObject fetchObject = JSONObject.parseObject(fetchStatus);
             logger.warn("三坐标节点{}取查询接口返回{}", taskNode.getId(), fetchObject.toJSONString());
@@ -657,8 +657,8 @@ public class StorgeServiceImpl extends SuperCacheServiceImpl<StorgeMapper, Storg
             //三坐标中间放操作
             // 查询三坐标是否允许放
             //todo wang.sq三坐标调用地址释放$需要换地址$
-            String sendStatus = msgUtil.getCcsData("/api/QueryThreeCoordinatesFreePos", params, taskNode);
-            //String sendStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
+            //String sendStatus = msgUtil.getCcsData("/api/QueryThreeCoordinatesFreePos", params, taskNode);
+            String sendStatus = "{\"taskID\":null,\"taskNodeID\":null,\"result\":\"true\",\"resultMsg\":\"设备已离线:192.168.0.10\",\"concurrency\":\"false\",\"data\":null}";
 
             JSONObject sendObject = JSONObject.parseObject(sendStatus);
             logger.warn("三坐标节点{}放查询接口返回{}", taskNode.getId(), sendObject.toJSONString());

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

@@ -598,9 +598,9 @@ public class TaskWorkNode {
                                                 }
 
                                                 //todo $需要换地址$
-                                                //returnData = "{\"result\": \"true\"}";
+                                                returnData = "{\"result\": \"true\"}";
                                                 HttpEntity<String> formEntity = new HttpEntity<String>(jsonParam, headers);
-                                                returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
+                                                //returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
 
                                             }
 

+ 2 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/ProductionresourcePositionService.java

@@ -90,4 +90,6 @@ public interface ProductionresourcePositionService extends SuperService<Producti
     List<ProductionresourcePosition> getFreeProductionAgvResourcePositionByIds(String[] idArr);
 
     List<ProductionresourcePosition> getFreeProductionresourcePositionByIdsAndType(String [] idArr,Long storgeTypeId);
+
+
 }

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

@@ -38,6 +38,8 @@ import com.github.zuihou.common.constant.ParameterKey;
 import com.github.zuihou.common.util.StringUtil;
 import com.github.zuihou.database.mybatis.conditions.Wraps;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
+import com.github.zuihou.tenant.entity.Productionresource;
+import com.github.zuihou.tenant.service.ProductionresourceService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -110,6 +112,9 @@ public class ToolRobotNodeServiceImpl implements ToolNodeOperationService {
     @Autowired
     private ProductionresourcePositionMapper productionresourcePositionMapper;
 
+    @Autowired
+    private ProductionresourceService productionresourceService;
+
     @Override
     public void initResource(ToolTaskNode taskNode, ToolTask task, Map dataMap) {
         String moduleName = dataMap.get("moduleName") == null ? "" : dataMap.get("moduleName").toString();
@@ -420,18 +425,18 @@ public class ToolRobotNodeServiceImpl implements ToolNodeOperationService {
 
 
                 // 根据起始点位,获取点位属于的类型
-                StorgeType locationStorgeType  = null;
-                StorgeType ltargetStorgeType = null;
+                Productionresource locationStorgeType  = null;
+                Productionresource ltargetStorgeType = null;
                 if(!startStore.getPointId().isEmpty()){
-                    locationStorgeType = storgeTypeService.findOneByPointId(startStore.getPointId());
+                    locationStorgeType = productionresourceService.findOneByPointId(startStore.getPointId());
                 }
                 if(!tartgetToolStorge.getPointId().isEmpty()){
-                    ltargetStorgeType = storgeTypeService.findOneByPointId(tartgetToolStorge.getPointId());
+                    ltargetStorgeType = productionresourceService.findOneByPointId(tartgetToolStorge.getPointId());
                 }
 
                 Map locationMap = new HashMap();
-                locationMap.put("locationArea", locationStorgeType==null?"": locationStorgeType.getStorgeType());  //当前区域
-                locationMap.put("destLocationArea", ltargetStorgeType ==null?"": ltargetStorgeType.getStorgeType());  //目的区域
+                locationMap.put("locationDevice", locationStorgeType==null?"": locationStorgeType.getCode());  //当前区域
+                locationMap.put("destLocationDevice", ltargetStorgeType ==null?"": ltargetStorgeType.getCode());  //目的区域
                 locationMap.put("location", startStore.getPointId());
                 locationMap.put("destLocation", tartgetToolStorge.getPointId());
                 dataMap.put("data", locationMap);

+ 8 - 11
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/strategy/impl/CacheRobotStrategy.java

@@ -38,6 +38,7 @@ import com.github.zuihou.database.mybatis.conditions.Wraps;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
 import com.github.zuihou.exception.BizException;
+import com.github.zuihou.tenant.entity.Productionresource;
 import com.github.zuihou.tenant.service.ProductionresourceService;
 import com.google.common.collect.Maps;
 import lombok.extern.slf4j.Slf4j;
@@ -253,22 +254,19 @@ public class CacheRobotStrategy implements RobotStrategy {
         }
 
         // 根据起始点位,获取点位属于的类型
-        StorgeType locationStorgeType  = null;
-        StorgeType ltargetStorgeType = null;
-        if(!targetStorge.getPointId().isEmpty()){
-
-            locationStorgeType = storgeTypeService.findOneByPointId(startStorge.getPointId());
+        Productionresource locationStorgeType  = null;
+        Productionresource ltargetStorgeType = null;
+        if(!startStorge.getPointId().isEmpty()){
+            locationStorgeType = productionresourceService.findOneByPointId(startStorge.getPointId());
         }
-
         if(!targetStorge.getPointId().isEmpty()){
-            ltargetStorgeType = storgeTypeService.findOneByPointId(targetStorge.getPointId());
+            ltargetStorgeType = productionresourceService.findOneByPointId(targetStorge.getPointId());
         }
 
-
         //满足条件--机器人空闲,设备或线边库有一个空闲
         Map locationMap = new HashMap();
-        locationMap.put("locationArea", locationStorgeType==null?"": locationStorgeType.getStorgeType());  //当前区域
-        locationMap.put("destLocationArea", ltargetStorgeType ==null?"": ltargetStorgeType.getStorgeType());  //目的区域
+        locationMap.put("locationDevice", locationStorgeType==null?"": locationStorgeType.getCode());  //当前区域
+        locationMap.put("destLocationDevice", ltargetStorgeType ==null?"": ltargetStorgeType.getCode());  //目的区域
         locationMap.put("location", startStorge.getPointId());  //零件当前位置
         locationMap.put("destLocation", targetStorge.getPointId()); //机器人缓存位
         locationMap.put("taskType", DictionaryKey.TASK_TYPE.get("CARRY"));
@@ -417,7 +415,6 @@ public class CacheRobotStrategy implements RobotStrategy {
             }
         }
 
-
         if ("1".equals(xbkFlag)) {
 
             ProductionresourcePosition position = xbkList.get(0);

+ 6 - 6
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/strategy/impl/NoCacheRobotStrategy.java

@@ -134,19 +134,19 @@ public class NoCacheRobotStrategy implements RobotStrategy {
 
 
         // 根据起始点位,获取点位属于的类型
-        StorgeType locationStorgeType  = null;
-        StorgeType ltargetStorgeType = null;
+        Productionresource locationStorgeType  = null;
+        Productionresource ltargetStorgeType = null;
         if(!startStore.getPointId().isEmpty()){
-            locationStorgeType = storgeTypeService.findOneByPointId(startStore.getPointId());
+            locationStorgeType = productionresourceService.findOneByPointId(startStore.getPointId());
         }
         if(!targetStorge.getPointId().isEmpty()){
-            ltargetStorgeType = storgeTypeService.findOneByPointId(targetStorge.getPointId());
+            ltargetStorgeType = productionresourceService.findOneByPointId(targetStorge.getPointId());
         }
 
         //目的地为缓存位
         Map locationMap = new HashMap();
-        locationMap.put("locationArea", locationStorgeType==null?"": locationStorgeType.getStorgeType());  //当前区域
-        locationMap.put("destLocationArea", ltargetStorgeType ==null?"": ltargetStorgeType.getStorgeType());  //目的区域
+        locationMap.put("locationDevice", locationStorgeType==null?"": locationStorgeType.getCode());  //当前区域
+        locationMap.put("destLocationDevice", ltargetStorgeType ==null?"": ltargetStorgeType.getCode());  //目的区域
         locationMap.put("location",startStore.getPointId());
         locationMap.put("destLocation",targetStorge.getPointId());
         returnMap.put("data", locationMap);

+ 4 - 2
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/dao/ProductionresourceMapper.java

@@ -32,7 +32,7 @@ public interface ProductionresourceMapper extends SuperMapper<Productionresource
      * @param code 边缘盒子/生产资源编码
      * @return
      */
-    Productionresource getByCode(@Param("code") String code);
+    //Productionresource getByCode(@Param("code") String code);
 
     /**
      * 获取边缘盒子数据
@@ -65,9 +65,11 @@ public interface ProductionresourceMapper extends SuperMapper<Productionresource
     List<Map> selectSql(String sql);
 
 
-    List<Map>getList(Map map);
+    //List<Map>getList(Map map);
 
     List<Map> getStations(Map params);
 
     List<Productionresource> getByIndition(Map params);
+
+    Productionresource findOneByPointId(String param);
 }

+ 2 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/service/ProductionresourceService.java

@@ -117,4 +117,6 @@ public interface ProductionresourceService extends SuperCacheService<Productionr
 
     List<Productionresource> getByIndition(Map<String,String> params);
 
+    Productionresource findOneByPointId(String param);
+
 }

+ 5 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/service/impl/ProductionresourceServiceImpl.java

@@ -1135,4 +1135,9 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
     public List<Productionresource> getByIndition(Map<String, String> params) {
         return baseMapper.getByIndition(params);
     }
+
+    @Override
+    public Productionresource findOneByPointId(String param) {
+        return  baseMapper.findOneByPointId(param);
+    }
 }

+ 11 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/resources/mapper_tenant/base/defaults/ProductionresourceMapper.xml

@@ -98,4 +98,15 @@
         id DESC
 
     </select>
+
+
+    <select id="findOneByPointId" resultType="com.github.zuihou.tenant.entity.Productionresource">
+        SELECT
+            itp.*
+        FROM
+            zuihou_base_yj_0000.`imcs_p_productionresource_position` ippp
+            LEFT JOIN zuihou_base_yj_0000.imcs_tenant_productionresource itp ON ippp.resource_id = itp.id
+        WHERE
+        ippp.point_id = #{pointId}
+    </select>
 </mapper>