Browse Source

后台业务代码功能更新

oyq28 3 years ago
parent
commit
d48263c236
13 changed files with 238 additions and 136 deletions
  1. 7 4
      imcs-admin-boot/imcs-authority-server/src/main/java/com/github/zuihou/job/DashboardJob.java
  2. 11 33
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/impl/StockInfoServiceImpl.java
  3. 2 2
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/TaskNodeService.java
  4. 4 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/TaskService.java
  5. 3 3
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/InspectionServiceImpl.java
  6. 119 49
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskNodeServiceImpl.java
  7. 36 2
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskServiceImpl.java
  8. 33 35
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/RobotNodeServiceImpl.java
  9. 8 8
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/ZplPrinter.java
  10. 2 0
      imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/operationManagementCenter/TTaskMapper.xml
  11. 5 0
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/TaskController.java
  12. 7 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/entity/TWorkpiece.java
  13. 1 0
      imcs-admin-boot/imcs-jobs/imcs-jobs-core/pom.xml

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

@@ -2,6 +2,7 @@ package com.github.zuihou.job;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ReflectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -198,11 +199,13 @@ public class DashboardJob {
     public void updateExceptionJob(){
         BaseContextHandler.setTenant("0000");
         List<String> userIds = webSocketServer.getUserIds();
-        if(userIds.size()>0) {
+        if(userIds.size()>0 && CollectionUtil.isNotEmpty(userIds)) {
             userIds.forEach(item -> {
-                List<Session> sessions = webSocketServer.getSessions(item);
-                String userid = this.parseJWT(item).get("userid").toString();
-                this.broadCastData(userid, sessions);
+                if(StringUtil.isNotEmpty(item)) {
+                    List<Session> sessions = webSocketServer.getSessions(item);
+                    String userid = this.parseJWT(item).get("userid").toString();
+                    this.broadCastData(userid, sessions);
+                }
             });
         }
 

+ 11 - 33
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/impl/StockInfoServiceImpl.java

@@ -83,7 +83,7 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
     private MToolMeterialSpecsService toolMeterialSpecsService;
 
     @Autowired
-    private TrayService trayService;
+    private StockInfoService stockInfoService;
 
     @Override
     // 启用属性自动注入
@@ -407,31 +407,11 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
     }
 
     @Override
-    public R<String> procedureTrayStockIn(BomProcedureTray bomProcedureTray, Long storgeId, String uniqueCode,String completeBatchNo) {
+    public R<String> procedureTrayStockIn(StockInfo trayStock, Long storgeId, String uniqueCode,String completeBatchNo) {
+
         StockInfo infoBean = new StockInfo();
-        infoBean.setStorgeId(storgeId);
-        infoBean.setLockStatus("1");
-//        if("1".equals(bomProcedureTray.getBizType())){//托盘
-//            //Tray tray = trayService.getById(bomProcedureTray.getTrayId());
-//            infoBean.setGoodsId(bomProcedureTray.getTrayId());
-//            infoBean.setGoodsType(bomProcedureTray.getBizType());
-//            infoBean.setSpecId(bomProcedureTray.getTrayId());
-//        }else{//夹具其实也是来自于原材料数据
-//            //MToolMeterial meterial = toolMeterialService.getById(bomProcedureTray.getTrayId());
-//            infoBean.setGoodsId(bomProcedureTray.getSpecificationId());
-//            infoBean.setGoodsType("1");
-//            infoBean.setSpecId(bomProcedureTray.getSpecificationId());
-//        }
-        infoBean.setGoodsId(bomProcedureTray.getTrayId());
-        infoBean.setGoodsType(bomProcedureTray.getBizType());
-        infoBean.setSpecId(bomProcedureTray.getTrayId());
-        infoBean.setNum(1);
-        if(StringUtil.isEmpty(uniqueCode)){
-            //根据编码规则
-            uniqueCode = codeRuleService.getBillCode(CodeRuleModule.CODE_RULE_UNIQUE);
-        }
-        infoBean.setUniqueCode(uniqueCode);
-        infoBean.setCompleteBatchNo(completeBatchNo);
+        BeanUtil.copyProperties(trayStock, infoBean, new String[]{"id"});
+        infoBean.setStorgeId(storgeId).setLockStatus("1").setCompleteBatchNo(completeBatchNo);
         save(infoBean);
         //库存日志
         stockLogService.saveLog(infoBean,BizConstant.STOCK_TYPE_IN,completeBatchNo);
@@ -487,17 +467,15 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
 
 
     @Override
-    public R<String> procedureTrayStockOut(BomProcedureTray bomProcedureTray, Long storgeId,String completeBatchNo) {
-//        List<StockInfo>list = baseMapper.selectList(Wraps.<StockInfo>lbQ().eq(StockInfo::getStorgeId,storgeId).eq(StockInfo::getGoodsId,bomProcedureTray.getTrayId()).eq(StockInfo::getCompleteBatchNo,completeBatchNo));
-        List<StockInfo>list = baseMapper.selectList(Wraps.<StockInfo>lbQ().eq(StockInfo::getStorgeId,storgeId).eq(StockInfo::getGoodsId,bomProcedureTray.getTrayId()));
-        if(list==null||list.size()==0){
+    public R<String> procedureTrayStockOut(StockInfo trayStock, Long storgeId,String completeBatchNo) {
+        //List<StockInfo>list = baseMapper.selectList(Wraps.<StockInfo>lbQ().eq(StockInfo::getStorgeId,storgeId).eq(StockInfo::getGoodsId,bomProcedureTray.getTrayId()));
+        if(null == trayStock){
             return R.fail("没有此产品");
         }
-        StockInfo stockInfo = list.get(0);
-        baseMapper.deleteById(stockInfo.getId());
+        baseMapper.deleteById(trayStock.getId());
         //库存日志
-        stockLogService.saveLog(stockInfo,BizConstant.STOCK_TYPE_OUT,completeBatchNo);
-        return R.success(stockInfo.getUniqueCode());
+        stockLogService.saveLog(trayStock,BizConstant.STOCK_TYPE_OUT,completeBatchNo);
+        return R.success(trayStock.getUniqueCode());
     }
 
 

+ 2 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/TaskNodeService.java

@@ -52,14 +52,14 @@ public interface TaskNodeService extends SuperService<TaskNode> {
     /**
      * 工序原材料
      * @param autoNode
-     * @param type
+     *
      */
     R<String> BomProcedureMeterialStock(TaskNode taskNode, AutoNode autoNode, TTask task, String uniqueCode);
 
     /**
      * 托盘夹具
      * @param autoNode
-     * @param type
+     *
      */
     R<String> BomProcedureTrayStock(TaskNode taskNode,AutoNode autoNode,TTask task, String uniqueCode);
 

+ 4 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/TaskService.java

@@ -94,4 +94,8 @@ public interface TaskService extends SuperService<TTask> {
     int selectTotalMachineUseTime(Map params);
 
     R generateMarkCode(Map<String, Object> map);
+
+    R confirmCode(Map<String, Object> map);
+
+    Long getTaskStorge(TTask task);
 }

+ 3 - 3
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/InspectionServiceImpl.java

@@ -249,11 +249,11 @@ public class InspectionServiceImpl extends SuperServiceImpl<InspectionMapper, In
                     taskNode.setInterfaceType(DictionaryKey.INTERFACETYPE_WMS);
 
                     String taskType = bomProcedure.getType();
-                    if("上料".equals(taskType)){
+                    if(taskType.contains("上料")){
                         taskNode.setNodeType("1").setResourceId(task.getResourceId());
-                    }else if("下料".equals(taskType)){
+                    }else if(taskType.contains("下料")){
                         taskNode.setNodeType("2").setResourceId(task.getResourceId());
-                    }else if("翻面".equals(taskType)){
+                    }else if(taskType.contains("翻面")){
                         taskNode.setNodeType("4").setResourceId(task.getResourceId());
                     }else{
                         taskNode.setNodeType("0");

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

@@ -419,13 +419,13 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                         } else if ("4".equals(taskNode.getAutoNode().getCategory())) {
                             taskNode.setInterfaceType(DictionaryKey.INTERFACETYPE_WMS);
 
-                            if ("上料".equals(taskType)) {
+                            if (taskType.contains("上料")) {
                                 taskNode.setNodeType("1");
                                 taskNode.setResourceId(t.getResourceId());
-                            } else if ("下料".equals(taskType)) {
+                            } else if (taskType.contains("下料")) {
                                 taskNode.setNodeType("2");
                                 taskNode.setResourceId(t.getResourceId());
-                            } else if ("翻面".equals(taskType)) {
+                            } else if (taskType.contains("翻面")) {
                                 taskNode.setNodeType("4");
                                 taskNode.setResourceId(t.getResourceId());
                             } else {
@@ -887,12 +887,16 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                 procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
                         task.getProcedureTrayGroupId()));
         List<TTaskStockUniqueCode> stockUniqueCodeList = new ArrayList<TTaskStockUniqueCode>();
+        TWorkpiece currWorkpiece = workpieceService.getWorkPiece(taskNode.getId());
+        List<StockInfo> stockInfoList = this.getConnectTray(procedureTrayList, currWorkpiece.getIsReload());
         //获取
-        for (BomProcedureTray b : procedureTrayList) {
+        for (StockInfo b : stockInfoList) {
             Long stockId = getStockId(taskNode, autoNode, "0");
             //出入库配置
             String stockConf = autoNode.getStockConf();
+
             if (BizConstant.NODE_STOCK_CONF_OUT_IN.equals(stockConf)) {//先出库后入库
+
                 R<String> ckresult = stockInfoService.procedureTrayStockOut(b, stockId, null);
                 if (ckresult.getIsSuccess()) {
                     String uniqueCodeOut = ckresult.getData();
@@ -907,9 +911,9 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                         t.setAutoNodeId(autoNode.getId());
                         //工序业务类型(1-工序原材料2-托盘3-夹具)
                         //类型转换一下
-                        if ("1".equals(b.getBizType())) {
+                        if ("1".equals(b.getGoodsType())) {
                             t.setBizType("2");
-                        } else if ("2".equals(b.getBizType())) {
+                        } else if ("2".equals(b.getGoodsType())) {
                             t.setBizType("3");
                         }
                         t.setTaskId(taskNode.getTaskId()).setProcedureId(task.getProcedureId()).setBomBatchNo(task.getBomBatchNo()).setProcedureBizId(b.getId()).setUniqueCode(uniqueCodeOut);
@@ -1266,7 +1270,11 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                     isFalse(oriStorgeId.longValue() == storgeId.longValue(), "此码已经在当前库位,无需新料入库");
                 }
             }
-            rkresult = stockInfoService.procedureTrayStockIn(tray, storgeId, null, bean.getCompleteBatchNo());
+            TWorkpiece currWorkpiece = workpieceService.getWorkPiece(bean.getId());
+            List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+            List<StockInfo> trayStockList = stockInfoList.stream().filter(stockInfo->stockInfo.getGoodsId().equals(tray.getTrayId())).collect(Collectors.toList());
+            isFalse(trayStockList == null || trayStockList.size() == 0, "此码不在库中");
+            rkresult = stockInfoService.procedureTrayStockIn(trayStockList.get(0), storgeId, null, bean.getCompleteBatchNo());
         }
 
         if (rkresult.getIsSuccess()) {
@@ -1331,10 +1339,14 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
                 //判断输入的码不在当前库
                 isFalse(oriStorgeId.longValue() == storgeId.longValue(), "此码已经在当前库位,无需移库");
             }
+            TWorkpiece currWorkpiece = workpieceService.getWorkPiece(bean.getId());
+            List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+            List<StockInfo> trayStockList = stockInfoList.stream().filter(stockInfo->stockInfo.getGoodsId().equals(tray.getTrayId())).collect(Collectors.toList());
+            isFalse(trayStockList == null || trayStockList.size() == 0, "此码不在库中");
 
-            R<String> ckResult = stockInfoService.procedureTrayStockOut(tray, null, tray.getUniqueCode());
+            R<String> ckResult = stockInfoService.procedureTrayStockOut(trayStockList.get(0), null, tray.getUniqueCode());
             if (ckResult.getIsSuccess()) {
-                R<String> rkResult = stockInfoService.procedureTrayStockIn(tray, storgeId, tray.getUniqueCode(),
+                R<String> rkResult = stockInfoService.procedureTrayStockIn(trayStockList.get(0), storgeId, tray.getUniqueCode(),
                         bean.getCompleteBatchNo());
             }
         }
@@ -1505,6 +1517,10 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
         if (CollectionUtil.isNotEmpty(list)) {
             currWorkpiece = list.get(0);
         }
+        if(callBackJson.containsKey("isReload")){
+            currWorkpiece.setIsReload(1);
+            workpieceService.updateById(currWorkpiece);
+        }
 
         //处理出库入库
         R<String> r = demoLineStock(taskNode, task, callBackJson, currWorkpiece);
@@ -1879,6 +1895,7 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
         }
         // end modify by yejian on 20221019 for 滑台三座标结果返回需动态更新取位子
         String uniqueCode = callBackJson.containsKey("uniqueCode") ? callBackJson.getString("uniqueCode") : "";
+        boolean bool = StringUtil.isNotEmpty(uniqueCode) && taskService.confirmCode(new HashMap<String, Object>(){{put("uniqueCode" , uniqueCode);}}).getIsSuccess();
 
         //更新目标位置
         workpieceService.setWorkPieceStock(currWorkpiece, targetStorgeId, "", taskNode, uniqueCode);
@@ -1890,7 +1907,7 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             if (meterialList != null && meterialList.size() > 0) {//只有入库
                 //WMS只要把原材料入库
                 R<String> rkresult = stockInfoService.meterialStockIn(meterialList.get(0),
-                        Long.parseLong(targetStorgeId), "", task.getCompleteBatchNo());
+                        Long.parseLong(targetStorgeId), (bool)?uniqueCode:"", task.getCompleteBatchNo());
                 return rkresult;
             }
         }
@@ -1918,12 +1935,13 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             }
             List<BomProcedureTray> trayList =
                     procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
-                            task.getProcedureTrayGroupId()));
+                            task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
             R<String> result = null;
             if (trayList != null && trayList.size() > 0) {
-                for (BomProcedureTray tray : trayList) {
+                List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+                for (StockInfo tray : stockInfoList) {
                     //托盘不用入库
-                    if ("1".equals(tray.getBizType())) {
+                    if ("1".equals(tray.getGoodsType())) {
                         break;
                     }
                     result = stockInfoService.procedureTrayStockOut(tray, Long.parseLong(srcStorgeId),
@@ -1953,12 +1971,15 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
 //            (BomProcedureTray::getId,task.ge()));
             List<BomProcedureTray> trayList =
                     procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
-                            task.getProcedureTrayGroupId()));
+                            task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
             R<String> result = null;
             if (trayList != null && trayList.size() > 0) {
-                for (BomProcedureTray tray : trayList) {
-                    result = stockInfoService.procedureTrayStockOut(tray, Long.parseLong(srcStorgeId),
-                            task.getCompleteBatchNo());
+                List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+                for (StockInfo tray : stockInfoList) {
+                    if(StringUtil.isNotEmpty(srcStorgeId)) {
+                        result = stockInfoService.procedureTrayStockOut(tray, Long.parseLong(srcStorgeId),
+                                task.getCompleteBatchNo());
+                    }
                     if (result.getIsSuccess()) {
                         result = stockInfoService.procedureTrayStockIn(tray, Long.parseLong(targetStorgeId),
                                 result.getData(), task.getCompleteBatchNo());
@@ -1980,14 +2001,15 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             }
             List<BomProcedureTray> trayList =
                     procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
-                            task.getProcedureTrayGroupId()));
+                            task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
             R<String> result = null;
             if (trayList != null && trayList.size() > 0) {
-                for (BomProcedureTray tray : trayList) {
-                    result = stockInfoService.procedureTrayStockOut(tray, Long.parseLong(srcStorgeId),
+                List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+                for (StockInfo trayStock : stockInfoList) {
+                    result = stockInfoService.procedureTrayStockOut(trayStock, Long.parseLong(srcStorgeId),
                             task.getCompleteBatchNo());
                     if (result.getIsSuccess()) {
-                        result = stockInfoService.procedureTrayStockIn(tray, Long.parseLong(targetStorgeId),
+                        result = stockInfoService.procedureTrayStockIn(trayStock, Long.parseLong(targetStorgeId),
                                 result.getData(), task.getCompleteBatchNo());
                     }
                 }
@@ -2018,10 +2040,11 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
             }
             List<BomProcedureTray> trayList =
                     procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
-                            task.getProcedureTrayGroupId()));
+                            task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
             R<String> result = null;
             if (trayList != null && trayList.size() > 0) {
-                for (BomProcedureTray tray : trayList) {
+                List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+                for (StockInfo tray : stockInfoList) {
                     result = stockInfoService.procedureTrayStockOut(tray, Long.parseLong(srcStorgeId),
                             task.getCompleteBatchNo());
                     if (result.getIsSuccess()) {
@@ -2060,11 +2083,12 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
 
             List<BomProcedureTray> trayList =
                     procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId,
-                            task.getProcedureTrayGroupId()));
+                            task.getProcedureTrayGroupId()).orderByAsc(BomProcedureTray::getBizType));
             R<String> result = null;
             if (trayList != null && trayList.size() > 0) {
-                for (BomProcedureTray tray : trayList) {
-                    if ("1".equals(tray.getBizType())) {//托盘不用入库
+                List<StockInfo> stockInfoList = this.getConnectTray(trayList, currWorkpiece.getIsReload());
+                for (StockInfo tray : stockInfoList) {
+                    if ("1".equals(tray.getGoodsType())) {//托盘不用入库
                         break;
                     }
                     result = stockInfoService.procedureTrayStockIn(tray, Long.parseLong(targetStorgeId),
@@ -2619,13 +2643,6 @@ planId));
                         firstNode.getProcedureId()));
         List<Long> oldTrayIdList = oldTrayList.stream().map(t -> t.getTrayId()).collect(Collectors.toList());
 
-        /*List<TaskNode> taskNodeList = baseMapper.selectList(Wraps.<TaskNode>lbQ().eq(TaskNode::getCompleteBatchNo,
-        hisTask.getCompleteBatchNo()).orderByAsc(TaskNode::getCompleteBatchSort));
-        TaskNode firstTaskNode = taskNodeList.get(0);
-        List<BomProcedureTray>firsttrayList = procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().in
-        (BomProcedureTray::getProcedureId, firstTaskNode.getProcedureId()));
-        List<Long>firsttrayIdList = firsttrayList.stream().map(t->t.getTrayId()).collect(Collectors.toList());
-         */
         //判断翻面得托盘工装和翻面前得是否一致
         if (CollectionUtil.join(trayIdList, "").equals(CollectionUtil.join(oldTrayIdList, ""))) {
             return R.fail("无需呼叫");
@@ -2636,17 +2653,7 @@ planId));
             return R.fail("呼叫机器人尚未完成");
         }
         msgUtil.redis_set(YunjianConstant.YUNJIAN_FANMIAN + taskNodeId, YunjianConstant.YUNJIAN_FANMIAN + taskNodeId);
-        /*
-        //获取机器人
-        Long resourceId = getResourceIdByAutoCode("2");
-        //呼叫
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.put("taskNodeId",taskNodeId);
-        jsonObject.put(taskNodeId+"count", "0");
-        jsonObject.put("bizType", BizConstant.MQ_TASK_NODE_TYPE_VIRTUALLY);
-        jsonObject.put("functionName", "取");
-        jsonObject.put("resourceId",resourceId);
-        dynamicRabbitMq.sendMsg(resourceId.toString(),jsonObject.toString()); */
+
         List<Long> taskIds = this.list(new LbqWrapper<TaskNode>().eq(TaskNode::getCompleteBatchNo,
                 hisTask.getCompleteBatchNo()).gt(TaskNode::getCompleteBatchSort, hisTask.getCompleteBatchSort()).orderByAsc(TaskNode::getCompleteBatchSort)).stream().map(TaskNode::getId).collect(Collectors.toList());
 
@@ -2670,8 +2677,10 @@ planId));
         Storge currStorage = workpieceService.getWorkPieceStock(hisTask.getCompleteBatchNo(), false);
         jsonObject.put("srcPosition", currStorage.getId());
         //限定伺服舵机
-        jsonObject.put("targetPosition", "1496714517546008576");
-        jsonObject.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_TRAY_CRK);
+        //jsonObject.put("targetPostion", this.getLikuStockInList());
+        //ProductionresourcePosition position = productionresourcePositionService.getOne(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getName, "伺服舵机"));
+        jsonObject.put("targetPostion", "");
+        jsonObject.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_METERIAL_CK);
         this.taskNodeCallbackBiz(hisTask, tTask, taskNodeList, lg, jsonObject.toJSONString());
         return R.success("");
     }
@@ -2690,23 +2699,26 @@ planId));
         List<TaskNode> tailNodes = new ArrayList<TaskNode>();
         //获取最终回立库的两个节点
         List<TaskNode> backStockNodes = this.list(new LbqWrapper<TaskNode>().gt(TaskNode::getCompleteBatchSort,
-                taskNode.getCompleteBatchSort()).orderByDesc(TaskNode::getCompleteBatchSort).last("limit 2"));
+                taskNode.getCompleteBatchSort()).eq(TaskNode::getCompleteBatchNo, taskNode.getCompleteBatchNo()).orderByDesc(TaskNode::getCompleteBatchSort).last("limit 2"));
 
         Collections.reverse(backStockNodes);
         backStockNodes.stream().forEach(node -> {
             TaskNode backNode = new TaskNode();
             BeanUtil.copyProperties(node, backNode, "id");
-            backNode.setProcedureId(taskNode.getProcedureId()).setTaskId(taskNode.getTaskId());
+            backNode.setProcedureId(taskNode.getProcedureId()).setTaskId(taskNode.getTaskId()).setNodeType("4");
             tailNodes.add(backNode);
         });
 
         //重建最初获取工装节点
         List<TaskNode> switchNodes = this.list(new LbqWrapper<TaskNode>().lt(TaskNode::getCompleteBatchSort,
-                taskNode.getCompleteBatchSort()).orderByAsc(TaskNode::getCompleteBatchSort).last("limit 2"));
+                taskNode.getCompleteBatchSort()).eq(TaskNode::getCompleteBatchNo, taskNode.getCompleteBatchNo()).orderByAsc(TaskNode::getCompleteBatchSort).last("limit 3"));
         switchNodes.stream().forEach(node -> {
             TaskNode headNode = new TaskNode();
             BeanUtil.copyProperties(node, headNode, "id");
             headNode.setProcedureId(taskNode.getProcedureId()).setTaskId(taskNode.getTaskId()).setExeStatus("1").setExeResult(null).setStartTime(null).setEndTime(null).setFeedback("");
+            if(!headNode.getNodeType().equals("1")){
+                headNode.setNodeType("4");
+            }
             headNodes.add(headNode);
         });
 
@@ -2717,4 +2729,62 @@ planId));
         return tailNodes;
     }
 
+    /**
+     * 获取换装关联工装和托盘
+     *
+     * @return
+     */
+    private List<StockInfo> getConnectTray(List<BomProcedureTray> bomProcedureTrayList, int isReload){
+        List<StockInfo> stockInfoList = null;
+        List<Long> trayIds = bomProcedureTrayList.stream().map(tray->tray.getTrayId()).collect(Collectors.toList());
+        stockInfoList = stockInfoService.list(new LbqWrapper<StockInfo>().in(StockInfo::getGoodsId, trayIds).orderByAsc(StockInfo::getGoodsType));
+
+        if(CollectionUtil.isNotEmpty(stockInfoList) && stockInfoList.size()==2) {
+            boolean bool = stockInfoList.get(0).getStorgeId().equals(stockInfoList.get(1).getStorgeId());
+            if (!bool) {
+                //已经换装,以工装作为点位参考
+                if (isReload > 0) {
+                    stockInfoList = stockInfoService.list(new LbqWrapper<StockInfo>().eq(StockInfo::getStorgeId, stockInfoList.get(1).getStorgeId()).orderByAsc(StockInfo::getGoodsType));
+                } else {
+                    //未换装,以子盘作为点位参考
+                    stockInfoList = stockInfoService.list(new LbqWrapper<StockInfo>().eq(StockInfo::getStorgeId, stockInfoList.get(0).getStorgeId()).orderByAsc(StockInfo::getGoodsType));
+                }
+            }
+        }
+        return stockInfoList;
+    }
+
+    /**
+     * 立库获取终点位置,取空库位的数据
+     * @return
+     */
+    private long getLikuStockInList(){
+        List <StockInfo> returnList = null;
+
+        List<Productionresource> productionresources = productionresourceBizMapper.selectList(Wraps.<Productionresource>lbQ().like(Productionresource::getCode,DictionaryKey.YJ_ZONE_XBK.get("plateAndClamp")));
+        List<Long> productionresourceIds = productionresources.stream().map(t->t.getId()).collect(Collectors.toList());
+
+        if(CollectionUtil.isEmpty(productionresourceIds)){
+            return -1;
+        }
+        String resourceIds = "";
+        for(int i = 0; i < productionresourceIds.size(); i++){
+            if(i == productionresourceIds.size() - 1){
+                resourceIds = resourceIds + productionresourceIds.get(i);
+            }else{
+                resourceIds = resourceIds + productionresourceIds.get(i)+ ",";
+            }
+        }
+        Map queryMap = new HashMap();
+        queryMap.put("resourceIds",resourceIds);
+
+        // 判断夹具是否有可用的,查询330个库位信息中是否还有夹具
+
+        List<Long> allStockList = stockInfoMapper.getAvailableStorge(queryMap);
+        if(allStockList.size() > 0){
+            return allStockList.get(0);
+        }else{
+            return -1;
+        }
+    }
 }

+ 36 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskServiceImpl.java

@@ -29,11 +29,15 @@ import com.github.zuihou.business.operationManagementCenter.service.TaskService;
 import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
 import com.github.zuihou.business.productionReadyCenter.dao.*;
 import com.github.zuihou.business.productionReadyCenter.entity.*;
+import com.github.zuihou.business.productionReadyCenter.service.BomProcedureTrayService;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourcePositionMapper;
 import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
 import com.github.zuihou.business.productionResourceCenter.entity.*;
+import com.github.zuihou.business.productionResourceCenter.service.NodeOperationService;
+import com.github.zuihou.business.productionResourceCenter.service.ProductionresourcePositionService;
 import com.github.zuihou.business.productionResourceCenter.service.RepairService;
+import com.github.zuihou.business.productionResourceCenter.service.impl.RobotNodeServiceImpl;
 import com.github.zuihou.business.util.CommonUtil;
 import com.github.zuihou.business.util.MsgUtil;
 import com.github.zuihou.common.constant.*;
@@ -141,7 +145,10 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
     private BBomMapper bBomMapper;
     @Autowired
     private RestTemplate restTemplate;
-
+    @Autowired
+    private ProductionresourcePositionService productionresourcePositionService;
+    @Autowired
+    private BomProcedureTrayService procedureTrayService;
 
     @Override
     public List<TTask> createTaskByPlan(List<PlanProduct> planProductList, Map<Long,List<BomProcedure>> bomProcedureMap,String taskBatchNo) {
@@ -1184,7 +1191,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
 
             // 组织参数回调任务完成
             List<AAutoNodeLog> autoNodeLogList = autoNodeLogMapper.selectList(Wraps.<AAutoNodeLog>lbQ().eq(AAutoNodeLog::getTaskNodeId, taskNode.getId()));
-            AAutoNodeLog lg = autoNodeLogList.get(0);
+            AAutoNodeLog lg = autoNodeLogList.size()>0? autoNodeLogList.get(0): new AAutoNodeLog();
 
             JSONObject jsonObject = new JSONObject();
             //根据任务查出所有的自动化节点
@@ -1237,6 +1244,19 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
                         jsonObject.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_METERIAL_CK);
                     }
                     taskNodeService.taskNodeCallbackBiz(taskNode, tTask, taskNodeList, lg, jsonObject.toJSONString());
+                }else if("4".equals(processType)){
+                    //热处理上料申请
+                    //动态获取指定工装库位
+                    jsonObject.put("srcPosition", "");
+                    //jsonObject.put("srcPosition", this.getTaskStorge(tTask));
+                    ProductionresourcePosition position = productionresourcePositionService.getOne(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getName, "伺服舵机"));
+                    ProductionresourcePosition position2 = productionresourcePositionService.getOne(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getResourceId, tTask.getResourceId()));
+                    jsonObject.put("storeResourceId", position.getResourceId());
+                    jsonObject.put("targetPostion", currstorge.getId());
+                    //jsonObject.put("targetPostion", position2.getStorgeId());
+                    jsonObject.put("targetxbk","0");
+                    jsonObject.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_TRAY_CRK);
+                    taskNodeService.taskNodeCallbackBiz(taskNode, tTask, taskNodeList, lg, jsonObject.toJSONString());
                 }
 
             }
@@ -1348,4 +1368,18 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
         data.put("uniqueCode",uniqueCode);
         return R.success(data);
     }
+
+    @Override
+    public R confirmCode(Map<String, Object> map) {
+        TWorkpiece tWorkpiece = workpieceMapper.selectOne(Wraps.<TWorkpiece>lbQ().eq(TWorkpiece::getUniqueCode, map.get("uniqueCode").toString()).eq(TWorkpiece::getIsEnd, "0"));
+        return tWorkpiece==null? R.fail("零件不存在") : R.success();
+    }
+
+    @Override
+    public Long getTaskStorge(TTask task) {
+        BomProcedureTray bomProcedureTray = procedureTrayService.getOne(new LbqWrapper<BomProcedureTray>().eq(BomProcedureTray::getProcedureId, task.getProcedureId()).eq(BomProcedureTray::getBizType, "2"));
+        long trayId = bomProcedureTray.getTrayId();
+        StockInfo stockInfo = stockInfoService.getOne(new LbqWrapper<StockInfo>().eq(StockInfo::getGoodsId,trayId));
+        return stockInfo.getStorgeId();
+    }
 }

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

@@ -377,6 +377,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
 
         TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
 
+        //新增是否替换工装
         if((taskNode.getCompleteBatchSort()==1 && count == 0)||(taskNode.getPrority()==4 && taskNode.getNodeType().equals("4"))){
             // 判断是否是单线单独运行
             if(1 == orderPlan.getSingleRunFlag()){
@@ -396,8 +397,6 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     //判断机器人是否为空
                     Map<String, List<ProductionresourcePosition>> jqrMap = robotList.stream().collect(groupingBy(ProductionresourcePosition::getPointId));
 
-
-
                     //获取当前位置
                     if(CollectionUtil.isNotEmpty(flikustockInfos)){//
                         startStore = storgeMapper.selectById(flikustockInfos.get(0).getStorgeId());
@@ -588,9 +587,14 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                                 //出入库类型
                                 if(taskNode.getCompleteBatchSort()==1){//TODO 条件后续再丰富
                                     dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_TRAY_CRK);
+                                }else if(returnMap.containsKey(DemoLineConstant.DEMOLINE_STOCK_TYPE)){
+                                    dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, returnMap.get(DemoLineConstant.DEMOLINE_STOCK_TYPE));
                                 }else {
                                     dataMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK);
                                 }
+                                if(returnMap.containsKey("isReload")){
+                                    dataMap.put("isReload", returnMap.get("isReload").toString());
+                                }
 
                                 //目的地为机器人手臂
                                 dataMap.put("toStorge", jqrStorge);
@@ -882,11 +886,14 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                 returnMap.put("storeResourceId",position.getResourceId());
                 returnMap.put("store",targetStorge);
             } */
+            //托盘夹具出库
             Long storgeId = getLikuStockInList();
             targetStorge = storgeService.getById(storgeId);
+            ProductionresourcePosition position = productionresourcePositionService.getOne(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getName, "伺服舵机"));
             returnMap.put("store", targetStorge);
+            returnMap.put("storeResourceId", position.getResourceId());
             returnMap.put("targetxbk","0");
-            returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_METERIAL_CRK);
+            returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_TRAY_CRK);
 
         }else if(count==3){//到线边库
             //获取翻面工序的托盘夹具
@@ -904,7 +911,9 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                 returnMap.put("storeResourceId",targetList.get(0).getResourceId());
                 returnMap.put("store", targetStorge);
                 returnMap.put("targetxbk","0");
-                returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_METERIAL_CRK);
+                //确认更新已翻面换装
+                returnMap.put("isReload", true);
+                returnMap.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_TRAY_CRK);
             }
         }
         /*else if(count==4){//到上下料站
@@ -1057,7 +1066,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
             // begin modify by yejian on 20220515 for 下料库位问题修改
             TaskNode beforTaskNode = taskNodeService.getNextNTaskNode(taskNode,-1);
             TaskNode baitingTaskNode = taskNodeService.getNextNTaskNode(beforTaskNode,-1);
-            if("下料".equals(bomProcedureType) && "04".equals(baitingTaskNode.getInterfaceType())){
+            if(bomProcedureType.contains("下料") && "04".equals(baitingTaskNode.getInterfaceType())){
                 // 下料特殊处理,动态查找可用立库位子存放下料后的子盘夹具
                 Long storgeId = getLikuStockInList();
                 targetStorge = storgeService.getById(storgeId);
@@ -1198,40 +1207,29 @@ public class RobotNodeServiceImpl implements NodeOperationService {
         List<ProductionresourcePosition> startProductionresourcePositions = productionresourcePositionMapper.selectList(Wraps.<ProductionresourcePosition>lbQ().in(ProductionresourcePosition::getResourceId, productionresourceIds).eq(ProductionresourcePosition::getStatus,"0"));
         List<Long> startProductionresourcePositionIds = startProductionresourcePositions.stream().map(t->t.getStorgeId()).collect(Collectors.toList());
 
-        List<BomProcedureTray>trayList = procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().in(BomProcedureTray::getProcedureId, task.getProcedureId()));
+        List<BomProcedureTray>trayList = procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getProcedureId, task.getProcedureId()));
         List<Long>trayIdList = trayList.stream().map(t->t.getTrayId()).collect(Collectors.toList());
         // 判断夹具是否有可用的,查询330个库位信息中是否还有夹具
 
-        List<StockInfo> allStockList = stockInfoMapper.selectList(Wraps.<StockInfo>lbQ().isNull(StockInfo::getCompleteBatchNo).in(StockInfo::getGoodsId,trayIdList).in(StockInfo::getStorgeId,startProductionresourcePositionIds).orderByAsc(StockInfo::getStorgeId));
-        if(CollectionUtil.isNotEmpty(allStockList)){
-            Map<Long,List<StockInfo>>map = allStockList.stream().collect(groupingBy(StockInfo::getStorgeId));
-            Long k = null;
-            for(Long key:map.keySet()){
-                k = key;
-                //优先有托盘夹具的
-                List<StockInfo> stockInfoList = map.get(key);
-                if(stockInfoList!=null&&stockInfoList.size()==2 ){
-
-                    // mofify by yejian on 20220722 for 初始化判断是否有子盘可用先判断去除上料完成后的工件在线边库暂存的问题,解决示范线问题,云箭子盘从立库拿不存在这个问题
-                    // 判断除了子盘夹具外是否还有工件在上面
-                    List<StockInfo> allStockInfos = stockInfoMapper.selectList(Wraps.<StockInfo>lbQ().in(StockInfo::getStorgeId,stockInfoList.get(0).getStorgeId()).orderByAsc(StockInfo::getStorgeId));
-                    if(allStockInfos.size() == 2){
-                        returnList = stockInfoList;
-                        break;
-                    }else if(allStockInfos.size() == 1){
-                        if(CollectionUtil.isEmpty(oneTray)){
-                            oneTray = stockInfoList;
-                        }
-                    }
-                }else if(stockInfoList!=null&&stockInfoList.size()==1 && task.getProcedureName().contains("翻面")){
-                    //人工翻面根据夹具获取新工装
-                    returnList = stockInfoMapper.selectList(new LbqWrapper<StockInfo>().eq(StockInfo::getStorgeId, stockInfoList.get(0).getStorgeId()));
+        List<StockInfo> allStockInfos = stockInfoMapper.selectList(Wraps.<StockInfo>lbQ().in(StockInfo::getGoodsId,trayIdList).in(StockInfo::getStorgeId,startProductionresourcePositionIds).orderByAsc(StockInfo::getWeight, StockInfo::getGoodsType));
+
+        if(CollectionUtil.isNotEmpty(allStockInfos)){
+            //托盘和夹具判断
+            if(allStockInfos.size() == 2){
+                //换装条件判断
+                boolean bool = allStockInfos.get(0).getStorgeId().equals(allStockInfos.get(1).getStorgeId());
+                if(bool){
+                    returnList = allStockInfos;
+                }else{
+                    returnList = stockInfoMapper.selectList(new LbqWrapper<StockInfo>().eq(StockInfo::getStorgeId, allStockInfos.get(1).getStorgeId()));
+                }
+            }else if(allStockInfos.size() == 1){
+                //单夹具判断
+                if(allStockInfos.get(0).getGoodsType().equals("2")){
+                    returnList = stockInfoMapper.selectList(new LbqWrapper<StockInfo>().eq(StockInfo::getStorgeId, allStockInfos.get(0).getStorgeId()));;
+                }else{
+                    returnList = allStockInfos;
                 }
-            }
-            // mofify by yejian on 20220722 for 修改只有一个子盘的出库
-            //只有托盘的
-            if(returnList == null){
-                returnList = oneTray;
             }
         }
         return returnList;

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

@@ -24,17 +24,17 @@ public class ZplPrinter {
     private String content = "";
 
     public static void main(String[] args) {
-
+        /*
         ZplPrinter p = new ZplPrinter("\\\\192.168.11.247\\ZDesigner ZT210-200dpi ZPL");
         String zpl2 = p.getZpl();
 
         printBarcode(p,"K&DD_202221390963&TASK_20222139490279&kT_DH001&KT001&000002");
         boolean result2 = p.print(zpl2);
-        System.out.println("result2=======" + result2);
+        System.out.println("result2=======" + result2); */
 
 
-        //  printBarcode();
-        // printQRCOde();
+        printBarcode();
+        printQRCOde();
 
     }
 
@@ -44,7 +44,7 @@ public class ZplPrinter {
             //String uniqueCode = "K&DD_202221390963&TASK_20222139490279&kT_DH001&KT001&000002";
             BufferedImage labelImg = ImageProducerUtil.createImage(uniqueCode);
             zpl2 = Image2Zpl.image2Zpl2(labelImg);
-            System.out.println("zpl2======="+zpl2);
+            //System.out.println("zpl2======="+zpl2);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -71,7 +71,7 @@ public class ZplPrinter {
         }
         String bar0Zpl = "^FO25,80^BY3,3.0,150^BCN,,Y,N,N^FD${data}^FS";//条码样式模板
         zplPrinter.setBarcode(electronicCode, bar0Zpl);
-        System.out.println(zplPrinter.getZpl());
+        //System.out.println(zplPrinter.getZpl());
         zplPrinter.print(zplPrinter.getZpl());
     }
 
@@ -90,9 +90,9 @@ public class ZplPrinter {
         codeZplPrinter.setChar(stockCode, 250, 135, 22, 22);
 
 //        content += "^PQ2";//打印2张
-        codeZplPrinter.print(codeZplPrinter.getZpl());
+        //codeZplPrinter.print(codeZplPrinter.getZpl());
 
-        codeZplPrinter.print(codeZplPrinter.getZpl());
+        //codeZplPrinter.print(codeZplPrinter.getZpl());
     }
 
 

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

@@ -295,6 +295,7 @@
           ibbp.name AS taskName,
           ibbp.remark AS content,
           ibbp.no AS taskNo,
+          ibbp.tray_conf AS trayConf,
           itt.task_no AS no,
           ibb.name,
           (SELECT itt1.no FROM  imcs_t_tray itt1, imcs_b_bom_procedure_tray ibbpt1 WHERE ibbpt1.biz_type = 1 AND itt1.id = ibbpt1.tray_id AND ibbpt1.procedure_id = ibbp.id) AS trayNo,
@@ -313,6 +314,7 @@
           ibbpt.armor_pic AS armorPic,
           ittn.id as taskNodeId,
           ittn.interface_type AS interfaceType,
+          ittn.node_name AS nodeName,
           ittn.exe_status AS exeStatus
         FROM
              imcs_p_plan ipp,

+ 5 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/TaskController.java

@@ -223,4 +223,9 @@ public class TaskController extends SuperController<TaskService, Long, TTask, TT
         return baseService.generateMarkCode(map);
     }
 
+
+    @PostMapping("/confirmCode")
+    public R confirmCode(@RequestBody Map<String,Object> map) {
+        return baseService.confirmCode(map);
+    }
 }

+ 7 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/entity/TWorkpiece.java

@@ -212,6 +212,13 @@ public class TWorkpiece extends Entity implements Serializable {
     @Excel(name = "工序ID")
     private Integer serialNo;
 
+    /**
+     * 流水号
+     */
+    @ApiModelProperty(value = "是否换装")
+    @TableField("is_reload")
+    @Excel(name = "是否换装")
+    private Integer isReload;
 
     /**
      * 零件名称

+ 1 - 0
imcs-admin-boot/imcs-jobs/imcs-jobs-core/pom.xml

@@ -46,6 +46,7 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
             <scope>provided</scope>
+            <version>5.2.8.RELEASE</version>
         </dependency>
 
         <dependency>