Selaa lähdekoodia

fix:工控端任务展示字段增加

wang.sq@aliyun.com 2 viikkoa sitten
vanhempi
commit
5914b5710a

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

@@ -520,7 +520,7 @@ public class MesNoticeServiceImpl extends SuperServiceImpl<MesNoticeMapper, MesN
         String s = this.addNoticeMore(needAddMesNotices, false);
 
         if (errorInfo != null && !errorInfo.toString().isEmpty()) {
-            return R.result(200, null,"打卡成功:<br>上报失败,需要手动触发:" + errorInfo.toString());
+            return R.result(200, null,"打卡成功:<br>数据同步到上游系统失败;<br>需要手动触发:" + errorInfo.toString());
         }
         return R.success(null,"打卡成功");
     }

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

@@ -3,6 +3,7 @@ package com.github.zuihou.business.mq;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.github.zuihou.authority.dto.priority.TaskNodePriorityDto;
 import com.github.zuihou.authority.service.common.ParameterService;
@@ -1128,6 +1129,16 @@ public class TaskWorkNode {
 //        }else{
 //            msgUtil.redis_set("repeatCheckOnCount"+taskNode.getId(),repeatCheckOnCount,10, TimeUnit.MINUTES);
         Map map = getCheckCon(taskNode, task, dataMap);
+
+        //判断起始点位是否相同,是的话,抛出异常,不允许执行
+        if(map.containsKey("fromStorge") && map.containsKey("toStorge")){
+            Storge fromStorge = (Storge)map.get("fromStorge");
+            Storge toStorge = (Storge)map.get("toStorge");
+            if(fromStorge.getStorgeTypeId() == toStorge.getStorgeTypeId()){
+                throw new BizException("起始点目的位置为同一类不允许下发任务");
+            }
+
+        }
         return map;
 //            boolean b = (boolean) map.get("result");
 //            if (!b) {

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

@@ -455,8 +455,8 @@ public class MachineNodeServiceImpl implements NodeOperationService {
                         order.setExternalTaskCode("null&null");
                     }
                     String programName = "0";
-                    if(procedure.getThreeDimensionalPrograme()!=null && !procedure.getThreeDimensionalPrograme().isEmpty()){
-                        programName = procedure.getThreeDimensionalPrograme();
+                    if(procedure.getThreeDimensionalDeviationPrograme()!=null && !procedure.getThreeDimensionalDeviationPrograme().isEmpty()){
+                        programName = procedure.getThreeDimensionalDeviationPrograme();
                     }else {
                         programName = mToolClamps.get(0).getDetectionProgram();
                     }

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

@@ -283,6 +283,19 @@ public class CacheRobotStrategy implements RobotStrategy {
                 }
             }
             targetStorge = hcwStorge;
+            // todo 临时锁点位问题
+//            if(startStorge.getStorgeTypeId()!= hcwStorge.getStorgeTypeId()){
+//                targetStorge = hcwStorge;
+//            }else {
+//                if(startStorge.getStorgeTypeId()!= hcwStorge.getStorgeTypeId()){
+//                    // 线边库标识
+//                    returnMap.put( taskNode.getId() + YunjianConstant.CUN_XBK, "1");
+//                }
+//                //锁定目标线边库库位
+//                targetStorge.setCompleteBatchNo(taskNode.getCompleteBatchNo());
+//                storgeService.lockStorge(targetStorge, taskNode.getId());
+//            }
+
             returnMap.put(YunjianConstant.YUNJIAN_XBKFLAG, "1");
             returnMap.put(YunjianConstant.YUNJIAN_HCW_XBKFLAG, "1");
             msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId(), targetStorge, 10, TimeUnit.DAYS);

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

@@ -458,8 +458,8 @@ public class MsgUtil implements ApplicationContextAware {
                     }
 
                     String programName = "0";
-                    if(procedure.getThreeDimensionalPrograme()!=null && !procedure.getThreeDimensionalPrograme().isEmpty()){
-                        programName = procedure.getThreeDimensionalPrograme();
+                    if(procedure.getThreeDimensionalDeviationPrograme()!=null && !procedure.getThreeDimensionalDeviationPrograme().isEmpty()){
+                        programName = procedure.getThreeDimensionalDeviationPrograme();
                     }else {
                         programName = mToolClamps.get(0).getDetectionProgram();
                     }

+ 4 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/operationManagementCenter/TTaskMapper.xml

@@ -317,10 +317,12 @@
 
     <select id="getStationTasks" resultType="java.util.Map">
         SELECT
+          ioo.batch_no AS batchNo,
           itt.id,
           itt.order_id AS orderId,
           itt.procedure_order AS procedureOrder,
           itt.procedure_sort AS procedureSort,
+          ipp.order_no as orderNo,
           ipp.prority AS prority,
           ibbp.name AS taskName,
           INSTR(ibbp.name, '下料') AS funcType,
@@ -353,6 +355,7 @@
           ittn.exe_status AS exeStatus
         FROM
              imcs_p_plan ipp,
+             imcs_o_order ioo,
              imcs_t_task itt,
              imcs_t_task_node ittn,
              imcs_b_bom_procedure ibbp,
@@ -362,6 +365,7 @@
              imcs_m_meterial imm
         WHERE 1=1
         AND ipp.id = itt.plan_id
+        AND ioo.id = ipp.order_id
         AND ipp.produce_status = '2'
         AND itt.status IN  ('2')
         AND itt.id = ittn.task_id