oyq28 пре 1 недеља
родитељ
комит
05571c11cf

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

@@ -22,8 +22,8 @@ public class RestTemplateConfig {
     @Bean
     public ClientHttpRequestFactory simpleClientHttpRequestFactory() {
         SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
-        factory.setReadTimeout(5000);//单位为ms
-        factory.setConnectTimeout(10000);//单位为ms
+        factory.setReadTimeout(3000000);//单位为ms
+        factory.setConnectTimeout(3000000);//单位为ms
         return factory;
     }
 

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

@@ -284,6 +284,7 @@ public interface YunjianConstant {
 
     String YUNJIAN_XBK_SCHEDULE = "YUNJIAN_XBK_SCHEDULE";
     String YUNJIAN_SCHEDULE_LIST =  "YUNJIAN_SCHEDULE_LIST";
+    String YUNJIAN_LABEL_STATUS = "YUNJIAN_LABEL_STATUS";
 
 
 

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

@@ -3,11 +3,13 @@ package com.github.zuihou.business.productionResourceCenter.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.github.zuihou.business.DemoLine.DemoCacheKey;
 import com.github.zuihou.business.DemoLine.DemoLineConstant;
+import com.github.zuihou.business.DemoLine.YunjianConstant;
 import com.github.zuihou.business.edgeLibrary.entity.Storge;
 import com.github.zuihou.business.edgeLibrary.service.StorgeService;
 import com.github.zuihou.business.modelingCenter.entity.MModuleField;
@@ -244,8 +246,11 @@ public class MachineNodeServiceImpl implements NodeOperationService {
                 if("2".equals(functionType) && moduleInstructions.size() == 1){
                     instructionUrl = instructionUrl.replace("8083","8081");
                     //打标
-//                    map.put("zkIp", ZK_ip_rxx);
-//                    map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "print");
+                    if(ObjectUtil.isNotEmpty(msgUtil.redis_get(YunjianConstant.YUNJIAN_LABEL_STATUS+"_"+task.getId().toString()))){
+                        map.put("result", false);
+                        return map;
+                    }
+
                     //获取打标指令编码imcs_t_workpiece
                     map.put("method", moduleInstructions.get(0).getCode());
                     map.put("url",plcInfo.get("url"));
@@ -277,6 +282,7 @@ public class MachineNodeServiceImpl implements NodeOperationService {
                     String nextBatchNo = incrementBatchNo(completeBatchNoFormat(order.getBatchNo())); //生成下一个编号
                     order.setBatchNo(nextBatchNo); //更新订单编号
                     orderMapper.updateById(order); //保存到数据库
+                    msgUtil.redis_set(YunjianConstant.YUNJIAN_LABEL_STATUS+"_"+task.getId().toString(), task.getId(), 2, TimeUnit.DAYS );
                     map.put("data", data);
                     map.put("result", true);
                 }

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

@@ -788,10 +788,12 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                         for(Storge jqrHcwStorge : jrqHcwStorges){
                             Long jqrHcwStorgeTaskNodeId = jqrHcwStorge.getCampId();
                             if(null==jqrHcwStorgeTaskNodeId) {
-                                jqrHcwStorgeTaskNodeId = workpieceService.getOne(new LbqWrapper<TWorkpiece>().eq(TWorkpiece::getStorgeId, jqrHcwStorge.getId()).eq(TWorkpiece::getIsEnd, "0")).getTaskNodeId();
-                                if(null == jqrHcwStorgeTaskNodeId){
+                               TWorkpiece hcwWorkpiece = workpieceService.getOne(new LbqWrapper<TWorkpiece>().eq(TWorkpiece::getStorgeId, jqrHcwStorge.getId()).eq(TWorkpiece::getIsEnd, "0"));
+                                if(null == hcwWorkpiece){
                                     msgUtil.createWarnLog(jqrHcwStorge.getName()+"与零件数据不一致", "DataException");
                                     break;
+                                }else{
+                                    jqrHcwStorgeTaskNodeId = hcwWorkpiece.getTaskNodeId();
                                 }
                             }
                             TaskNode jqrHcwStorgeTaskNode = taskNodeService.getById(jqrHcwStorgeTaskNodeId);