Explorar el Código

手动模式修改、订单审核多选

yejian hace 3 años
padre
commit
1f5b73f708
Se han modificado 11 ficheros con 199 adiciones y 138 borrados
  1. 2 1
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/OrderService.java
  2. 2 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/WorkpieceService.java
  3. 27 21
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/OrderServiceImpl.java
  4. 83 87
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskNodeServiceImpl.java
  5. 13 1
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/WorkpieceServiceImpl.java
  6. 3 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/dao/BomProcedureMapper.java
  7. 46 23
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/ManualTaskOperatorUtil.java
  8. 4 0
      imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/BomProcedureMapper.xml
  9. 2 3
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/OrderController.java
  10. 15 2
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/WorkpieceController.java
  11. 2 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/dto/OrderUpdateDTO.java

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

@@ -1,6 +1,7 @@
 package com.github.zuihou.business.operationManagementCenter.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.R;
 import com.github.zuihou.base.service.SuperService;
 import com.github.zuihou.business.operationManagementCenter.dto.OrderSaveDTO;
 import com.github.zuihou.business.operationManagementCenter.dto.OrderUpdateDTO;
@@ -58,7 +59,7 @@ public interface OrderService extends SuperService<Order> {
     /**
      * 修改审核状态
      */
-    Order updateStatus(OrderUpdateDTO data);
+    R updateStatus(OrderUpdateDTO data);
 
     /**
      * 修改数据

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

@@ -78,4 +78,6 @@ public interface WorkpieceService extends SuperService<TWorkpiece> {
     R executeManualTask(ManualInfo manualInfo) throws Exception;
 
     R productLineRunMode()  throws Exception;
+
+    R measuringProgramName() throws Exception;
 }

+ 27 - 21
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/OrderServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.R;
 import com.github.zuihou.base.service.SuperServiceImpl;
 import com.github.zuihou.business.DemoLine.DemoCacheKey;
 import com.github.zuihou.business.DemoLine.DemoLineConstant;
@@ -212,30 +213,35 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public Order updateStatus(OrderUpdateDTO data) {
-        Order bean = BeanPlusUtil.toBean(data, Order.class);
-        //如果是审核通过,订单状态修改为进行中
-        if("2".equals(bean.getAuditStatus())){
-            Order oriBean = baseMapper.selectById(bean.getId());
-            oriBean.setOrderStatus("2");
-            //待计划、待排产、待生产状态。
-            oriBean.setPlanStatus("1");
-            oriBean.setSchedulingStatus("1");
-            oriBean.setProduceStatus("1");
-
-            Map map = new HashMap();
-            BeanUtil.copyProperties(oriBean, map);
-
-            List<OrderProduct>productList = orderProductService.list(Wraps.<OrderProduct>lbQ().eq(OrderProduct::getOrderId,oriBean.getId()));
+    public R updateStatus(OrderUpdateDTO data) {
+        for(Long id : data.getIds()){
+            Order bean = new Order();
+            bean.setId(id);
+            bean.setAuditStatus(data.getAuditStatus());
+            //如果是审核通过,订单状态修改为进行中
+            if("2".equals(bean.getAuditStatus())){
+                Order oriBean = baseMapper.selectById(bean.getId());
+                oriBean.setOrderStatus("2");
+                //待计划、待排产、待生产状态。
+                oriBean.setPlanStatus("1");
+                oriBean.setSchedulingStatus("1");
+                oriBean.setProduceStatus("1");
+
+                Map map = new HashMap();
+                BeanUtil.copyProperties(oriBean, map);
+
+                List<OrderProduct>productList = orderProductService.list(Wraps.<OrderProduct>lbQ().eq(OrderProduct::getOrderId,oriBean.getId()));
+
+                List<Map> mapList= getProductMapList(productList);
+                map.put("orderProductList",mapList);
+                //生成计划
+                planService.saveDefaultPlanByOrder(map,null);
+            }
 
-            List<Map> mapList= getProductMapList(productList);
-            map.put("orderProductList",mapList);
-            //生成计划
-            planService.saveDefaultPlanByOrder(map,null);
+            updateById(bean);
         }
 
-        updateById(bean);
-        return bean;
+        return R.success();
     }
 
     private List<Map>getProductMapList(List<OrderProduct>productList){

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

@@ -13,6 +13,7 @@ import com.github.zuihou.business.DemoLine.DemoLineConstant;
 import com.github.zuihou.business.edgeLibrary.dao.StockInfoMapper;
 import com.github.zuihou.business.edgeLibrary.dao.StockLogMapper;
 import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
+import com.github.zuihou.business.edgeLibrary.entity.StockLog;
 import com.github.zuihou.business.edgeLibrary.entity.Storge;
 import com.github.zuihou.business.edgeLibrary.service.StockInfoService;
 import com.github.zuihou.business.edgeLibrary.service.StorgeService;
@@ -26,6 +27,7 @@ import com.github.zuihou.business.productionReadyCenter.dao.*;
 import com.github.zuihou.business.productionReadyCenter.entity.*;
 import com.github.zuihou.business.productionReadyCenter.service.*;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourcePositionMapper;
+import com.github.zuihou.business.productionResourceCenter.entity.ProductionresourceConf;
 import com.github.zuihou.business.productionResourceCenter.entity.ProductionresourcePosition;
 import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
 import com.github.zuihou.business.productionResourceCenter.service.ProductionresourcePositionService;
@@ -1582,98 +1584,75 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
         JSONObject taskInfosObject = JSONObject.parseObject(taskInfos);
         List<String> taskNodes = JSONArray.parseArray(taskInfosObject.getString("taskNodes"),String.class);
         ManualInfo manualInfo = JSONObject.parseObject(taskInfosObject.getString("taskInfo"),ManualInfo.class);
-
-        if(manualInfo.getNextTaskNodeIndex() == -1
-                || (manualInfo.getNextTaskNodeIndex() != -1 && manualInfo.getNextTaskNodeIndex() > taskNodes.size() -1)){
-            // 只有机器人需要记录库位信息变化,设备序工件本身在设备上无需更新库位信息
-
-
+        // 动作指令,完成直接返回成功
+        if(manualInfo.getNextTaskNodeIndex() == -1){
             return R.success();
         }else{
-            // 继续执行后续结点
-            Map<String,Object> processInfo =  ManualTaskOperatorUtil.judgeProcessInfo((LinkedList<String>) taskNodes,manualInfo);
-            JSONObject returnDataObject = new JSONObject();
-
-            // 组装参数
-            String returnData = "";
-            //组装接口参数
-            HttpHeaders headers = new HttpHeaders();
-            headers.setContentType(MediaType.parseMediaType("application/json;charset=UTF-8"));
-
-            //回调参数构建
-            String jsonParam = ManualTaskOperatorUtil.getRequestParam(processInfo.get("location").toString(),manualInfo,processInfo.get("deviceUrl").toString(),processInfo.get("devicePort").toString());
-
-            HttpEntity<String> formEntity = new HttpEntity<String>(jsonParam, headers);
-            //调用接口
-            try {
-                returnData = restTemplate.postForObject(processInfo.get("hostSyetemTaskUrl").toString(), formEntity, String.class);
-                returnDataObject = JSONObject.parseObject(returnData);
-                if("true".equals(returnDataObject.get("result"))){
-                    // 放入redis,方便回调的时候判断是否是最后一个结点,如果是最后一个结点不在做任何逻辑,更新相应的库位信息
-                    Map<String, Object> currentTask = new HashMap<String, Object>();
-                    List<String> remindTaskNodes = (List<String>) processInfo.get("remindTaskNodes");
-                    currentTask.put("taskNodes",remindTaskNodes);
-                    currentTask.put("taskInfo",manualInfo);
-                    JSONObject redisTask = new JSONObject();
-                    redisTask.putAll(currentTask);
-                    msgUtil.redis_set(manualInfo.getManualId(),redisTask.toJSONString());
+            if(manualInfo.getNextTaskNodeIndex() > taskNodes.size() -1){
+                Map queryMap = new HashMap();
+                queryMap.put("pointId", manualInfo.getStartoperation());
+                queryMap.put("resourceId", manualInfo.getStartResourceId());
+
+                List<ProductionresourcePosition> sourceList = productionresourcePositionMapper.getStorgeIdByResource(queryMap);
+
+                queryMap.clear();
+                queryMap.put("pointId", manualInfo.getEndoperation());
+                queryMap.put("resourceId", manualInfo.getEndResourceId());
+                List<ProductionresourcePosition> targetList = productionresourcePositionMapper.getStorgeIdByResource(queryMap);
+
+                // 先将原库位上所有物料信息读取出来
+                List<StockInfo> stockInfos = stockInfoMapper.selectList(Wraps.<StockInfo>lbQ().eq(StockInfo::getStorgeId, sourceList.get(0).getStorgeId()));
+
+                for(StockInfo stockInfo : stockInfos){
+                    // 更新出库信息
+                    saveStockLog(stockInfo,BizConstant.STOCK_TYPE_OUT);
+                    // 更新入库信息
+                    stockInfo.setStorgeId(targetList.get(0).getStorgeId());
+                    saveStockLog(stockInfo,BizConstant.STOCK_TYPE_IN);
+                    // 更新库位物料信息
+                    stockInfoMapper.updateById(stockInfo);
+                }
+                return R.success();
+            }else{
+                // 继续执行后续结点
+                Map<String,Object> processInfo =  ManualTaskOperatorUtil.judgeProcessInfo((LinkedList<String>) taskNodes,manualInfo);
+                JSONObject returnDataObject = new JSONObject();
+
+                // 组装参数
+                String returnData = "";
+                //组装接口参数
+                HttpHeaders headers = new HttpHeaders();
+                headers.setContentType(MediaType.parseMediaType("application/json;charset=UTF-8"));
+
+                //回调参数构建
+                String jsonParam = ManualTaskOperatorUtil.getRequestParam(processInfo.get("location").toString(),manualInfo,processInfo.get("deviceUrl").toString(),processInfo.get("devicePort").toString());
+
+                HttpEntity<String> formEntity = new HttpEntity<String>(jsonParam, headers);
+                //调用接口
+                try {
+                    returnData = restTemplate.postForObject(processInfo.get("hostSyetemTaskUrl").toString(), formEntity, String.class);
+                    returnDataObject = JSONObject.parseObject(returnData);
+                    if("true".equals(returnDataObject.get("result"))){
+                        // 放入redis,方便回调的时候判断是否是最后一个结点,如果是最后一个结点不在做任何逻辑,更新相应的库位信息
+                        Map<String, Object> currentTask = new HashMap<String, Object>();
+                        List<String> remindTaskNodes = (List<String>) processInfo.get("remindTaskNodes");
+                        currentTask.put("taskNodes",remindTaskNodes);
+                        currentTask.put("taskInfo",manualInfo);
+                        JSONObject redisTask = new JSONObject();
+                        redisTask.putAll(currentTask);
+                        msgUtil.redis_set(manualInfo.getManualId(),redisTask.toJSONString());
+                    }
+                }catch (Exception e) {
+                    e.printStackTrace();
+                    JSONObject errJsonObject = new JSONObject();
+                    errJsonObject.put("msg", e.getMessage());
+                    returnData = errJsonObject.toJSONString();
+                    log.error("调用接口发生异常" + e.getMessage());
+                    return R.fail(returnDataObject.getString("msg"));
                 }
-            }catch (Exception e) {
-                e.printStackTrace();
-                JSONObject errJsonObject = new JSONObject();
-                errJsonObject.put("msg", e.getMessage());
-                returnData = errJsonObject.toJSONString();
-                log.error("调用接口发生异常" + e.getMessage());
-                return R.fail(returnDataObject.getString("msg"));
+                return R.success(returnDataObject.getString("msg"));
             }
-            return R.success(returnDataObject.getString("msg"));
         }
-
-//        String srcStorgeId = callBackJson.getString("srcPosition");
-//        String targetStorgeId = callBackJson.getString("targetPostion");
-//        String goodsId = callBackJson.getString("goodsId");
-//        Map queryMap = new HashMap();
-//        queryMap.put("pointId", srcStorgeId);
-//        List<ProductionresourcePosition> list = productionresourcePositionMapper.getPPList(queryMap);
-//
-//        List<ProductionresourcePosition> targetlist = productionresourcePositionMapper.selectList(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getPointId, targetStorgeId));
-//
-//        R<String> result =  R.success("");;
-//
-//        if(CollectionUtil.isEmpty(targetlist))
-//            return result;
-//
-//
-//        for(ProductionresourcePosition p:list){
-//            String stockGoodsId = p.getGoodsId()==null?"":p.getGoodsId().toString();
-//            if(!goodsId.equals(stockGoodsId))
-//                continue;
-//
-//            if("1".equals(p.getCategory())||"2".equals(p.getCategory())){//托盘夹具
-//                BomProcedureTray tray = new BomProcedureTray();
-//                tray.setTrayId(p.getGoodsId());
-//                result = stockInfoService.procedureTrayStockOut(tray, p.getStorgeId());
-//                if (result.getIsSuccess()) {
-//                    result = stockInfoService.procedureTrayStockIn(tray, targetlist.get(0).getStorgeId(), result.getData(), "");
-//                }
-//            }
-//
-//            if("4".equals(p.getCategory())){//原材料
-//                BomProcedureMeterial meterial = new BomProcedureMeterial();
-//                meterial.setMeterialId(p.getGoodsId());
-//                R<String> ckresult = stockInfoService.meterialStockOut(meterial,  p.getStorgeId(), "");
-//                R<String> rkresult = null;
-//                if (ckresult.getIsSuccess()) {
-//                    rkresult = stockInfoService.meterialStockIn(meterial, targetlist.get(0).getStorgeId(), ckresult.getData(),"");
-//                }
-//            }
-//            if (!result.getIsSuccess()) {
-//                break;
-//            }
-//        }
-//        return result;
-
-
     }
 
     @Override
@@ -1762,4 +1741,21 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
         baseMapper.delete(taskNodeWrapper);
     }
 
+    public StockLog saveStockLog(StockInfo stockBean, String type) {
+        StockLog logBean = new StockLog();
+        String no = codeRuleService.getBillCode(CodeRuleModule.CODE_RULE_STOCKLOG);
+        logBean.setNo(no);
+        logBean.setUniqueCode(stockBean.getUniqueCode());
+        logBean.setStorgeId(stockBean.getStorgeId());
+        logBean.setNum(stockBean.getNum());
+        logBean.setGoodsId(stockBean.getGoodsId());
+        logBean.setGoodsType(stockBean.getGoodsType());
+        logBean.setTurnTaskNo(stockBean.getTurnTaskNo());
+        logBean.setOptType(type);
+        logBean.setFeedTaskNo(stockBean.getFeedTaskNo());
+        logBean.setSpecId(stockBean.getSpecId());
+        stockLogMapper.insert(logBean);
+        return logBean;
+    }
+
 }

+ 13 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/WorkpieceServiceImpl.java

@@ -16,6 +16,8 @@ import com.github.zuihou.business.operationManagementCenter.entity.TaskNode;
 import com.github.zuihou.business.operationManagementCenter.service.TaskNodeService;
 import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
 import com.github.zuihou.business.productionReadyCenter.dao.BBomMapper;
+import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureMapper;
+import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
 import com.github.zuihou.business.productionReadyCenter.entity.MToolClamp;
 import com.github.zuihou.business.productionReadyCenter.entity.Tray;
 import com.github.zuihou.business.productionReadyCenter.service.MToolClampService;
@@ -99,6 +101,8 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
     private RestTemplate restTemplate;
     @Autowired
     private MsgUtil msgUtil;
+    @Autowired
+    private BomProcedureMapper bomProcedureMapper;
 
     private static LinkedList<String> robotTaskNodes = new LinkedList<>();
     static {
@@ -449,7 +453,7 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
 
     @Override
     public R executeManualTask(ManualInfo manualInfo) throws Exception {
-
+        BaseContextHandler.setTenant("0000");
         Map<String,Object> processInfo =  ManualTaskOperatorUtil.judgeFirstProcessInfo(robotTaskNodes, robotNoMoveTaskNodes,manualInfo);
         JSONObject returnDataObject = new JSONObject();
 
@@ -498,9 +502,17 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
 
     @Override
     public R productLineRunMode() throws Exception{
+        BaseContextHandler.setTenant("0000");
         QueryWrapper<ZZone> zZoneWrapper = new QueryWrapper<ZZone>();
         zZoneWrapper.eq("status",1);
         return R.success(zZoneMapper.selectList(zZoneWrapper));
     }
 
+    @Override
+    public R measuringProgramName() throws Exception{
+        BaseContextHandler.setTenant("0000");
+        return R.success(bomProcedureMapper.selectMeasuringProgramNames());
+
+    }
+
 }

+ 3 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/dao/BomProcedureMapper.java

@@ -5,6 +5,8 @@ import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
 
 import org.springframework.stereotype.Repository;
 
+import java.util.List;
+
 /**
  * <p>
  * Mapper 接口
@@ -17,4 +19,5 @@ import org.springframework.stereotype.Repository;
 @Repository
 public interface BomProcedureMapper extends SuperMapper<BomProcedure> {
 
+    List<BomProcedure> selectMeasuringProgramNames();
 }

+ 46 - 23
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/ManualTaskOperatorUtil.java

@@ -64,8 +64,8 @@ public class ManualTaskOperatorUtil {
             data.put("labelContent",manualInfo.getLabelContent());
         }else if("measuring".equals(manualType)) {
             // 测量
-            data.put("remotePath",manualInfo.getWorkpieceId());
-            data.put("remotePath",manualInfo.getExecProgram());
+            data.put("workId",manualInfo.getWorkpieceId());
+            data.put("workType",manualInfo.getExecProgram());
         }else{
             // 机器人相关
             data.put("location",location);
@@ -107,12 +107,14 @@ public class ManualTaskOperatorUtil {
                 int currentIndex = 0;
                 String taskType = robotNoMoveTaskNodes.get(currentIndex);
                 int nextTaskNodeIndex = currentIndex +1;
-                if("get".equals(taskType)){
-                    String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
+                if("move".equals(taskType)){
+                    String hostSyetemTaskUrl = hostSyetemUrl + "/api/MoveRobotPosition";
                     String location = manualInfo.getStartpointId();
                     setProcessInfo(robotNoMoveTaskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
                 }
-                manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
+                if(nextTaskNodeIndex < robotNoMoveTaskNodes.size() -1){
+                    manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex + 1);
+                }
             }else if("framework".equals(unit)){
                 int currentIndex = 0;
                 String taskType = robotNoMoveTaskNodes.get(currentIndex);
@@ -211,18 +213,43 @@ public class ManualTaskOperatorUtil {
                 int currentIndex = manualInfo.getNextTaskNodeIndex();
                 int nextTaskNodeIndex = currentIndex +1;
                 String taskType = taskNodes.get(currentIndex);
-                // 舱体(智能单元) 代码先写死,6个动作,后续根据resource_code表中获取
-                // 执行第一个任务
-                if("get".equals(taskType)){
-                    String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
-                    String location = manualInfo.getStartpointId();
-                    setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
-                }else if("put".equals(taskType)){
-                    String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
-                    String location = manualInfo.getEndpointId();
-                    setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+
+                if(taskNodes.size() == 6){
+                    // 舱体(柔性线) 代码先写死,6个动作,后续根据resource_code表中获取
+                    // 执行第一个任务
+                    if("get".equals(taskType) && currentIndex == 1){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
+                        String location = manualInfo.getStartpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }else if("put".equals(taskType) && currentIndex == 2){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
+                        String location = manualInfo.getStartpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }else if("move".equals(taskType) && currentIndex == 3){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/MoveRobotPosition";
+                        String location = manualInfo.getStartpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }if("get".equals(taskType) && currentIndex == 4){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
+                        String location = manualInfo.getStartpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }else if("put".equals(taskType) && currentIndex == 5){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
+                        String location = manualInfo.getStartpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }
+                    manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
+                }else if(taskNodes.size() == 3 && currentIndex == 1){
+                    if("get".equals(taskType) ){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
+                        String location = manualInfo.getStartpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }else if("put".equals(taskType) && currentIndex == 2){
+                        String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
+                        String location = manualInfo.getEndpointId();
+                        setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
+                    }
                 }
-                manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
             }else if("framework".equals(unit)){
                 int currentIndex = manualInfo.getNextTaskNodeIndex();
                 int nextTaskNodeIndex = currentIndex +1;
@@ -254,11 +281,11 @@ public class ManualTaskOperatorUtil {
                     }
                     manualInfo.setNextTaskNodeIndex(nextTaskNodeIndex);
                 }else if(taskNodes.size() == 3){
-                    if("get".equals(taskType)){
+                    if("get".equals(taskType) && currentIndex == 1){
                         String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
                         String location = manualInfo.getStartpointId();
                         setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
-                    }else if("put".equals(taskType)){
+                    }else if("put".equals(taskType) && currentIndex == 2){
                         String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
                         String location = manualInfo.getEndpointId();
                         setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
@@ -270,11 +297,7 @@ public class ManualTaskOperatorUtil {
                 String taskType = taskNodes.get(currentIndex);
                 // 保障平台(质量中心)
                 // 执行第一个任务
-                if("get".equals(taskType)){
-                    String hostSyetemTaskUrl = hostSyetemUrl + "/api/GetIntelligenceUnit";
-                    String location = manualInfo.getStartpointId();
-                    setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);
-                }else if("put".equals(taskType) && currentIndex == 2){
+                if("put".equals(taskType)){
                     String hostSyetemTaskUrl = hostSyetemUrl + "/api/SendIntelligenceUnit";
                     String location = manualInfo.getEndpointId();
                     setProcessInfo(taskNodes, processInfo, hostSyetemTaskUrl, location, deviceUrl, devicePort);

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

@@ -26,4 +26,8 @@
         no, name, type, bom_id, audit_status, prepare_workHours, content, rated_workHours, key_flag
     </sql>
 
+    <select id="selectMeasuringProgramNames" resultType="com.github.zuihou.business.productionReadyCenter.entity.BomProcedure">
+        select distinct program_test_programe from imcs_b_bom_procedure where program_test_programe is not null
+    </select>
+
 </mapper>

+ 2 - 3
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/OrderController.java

@@ -138,9 +138,8 @@ public class OrderController extends SuperController<OrderService, Long, Order,
 
     @ApiOperation(value = "审核状态", notes = "审核状态")
     @PostMapping("/updateStatus")
-    public R<Order> updateStatus(@RequestBody OrderUpdateDTO model) {
-        Order order = baseService.updateStatus(model);
-        return success(order);
+    public R updateStatus(@RequestBody OrderUpdateDTO model) {
+        return baseService.updateStatus(model);
     }
 
     @ApiOperation(value = "更新优先级", notes = "更新优先级")

+ 15 - 2
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/WorkpieceController.java

@@ -20,6 +20,7 @@ import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
 import com.github.zuihou.business.productionResourceCenter.entity.ProductionresourcePosition;
 import com.github.zuihou.business.websocket.WebSocketServer;
 import com.github.zuihou.common.util.StringUtil;
+import com.github.zuihou.context.BaseContextHandler;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
 import com.github.zuihou.file.entity.File;
@@ -227,8 +228,9 @@ public class WorkpieceController extends SuperController<WorkpieceService, Long,
 
 
     @ApiOperation(value = "手动任务", notes = "手动任务")
-    @PostMapping("/manualTask")
+    @PostMapping("/handMode/manualTask")
     public R manualTask(@RequestBody ManualInfo manualInfo) {
+        BaseContextHandler.setTenant("0000");
         log.info("开始执行手动任务,参数是{}", manualInfo.toString());
         try {
             return baseService.executeManualTask(manualInfo);
@@ -241,7 +243,7 @@ public class WorkpieceController extends SuperController<WorkpieceService, Long,
     }
 
     @ApiOperation(value = "产线状态", notes = "产线状态")
-    @PostMapping("/productLineRunMode")
+    @PostMapping("/handMode/productLineRunMode")
     public R productLineRunMode() {
         try {
             return baseService.productLineRunMode();
@@ -250,4 +252,15 @@ public class WorkpieceController extends SuperController<WorkpieceService, Long,
             return R.fail("查询产线状态发生异常:" + e.getMessage());
         }
     }
+
+    @ApiOperation(value = "获取三座标测量程序名", notes = "获取三座标测量程序名")
+    @PostMapping("/handMode/measuringProgramName")
+    public R measuringProgramName() {
+        try {
+            return baseService.measuringProgramName();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail("查询三坐标测量测试发生异常:" + e.getMessage());
+        }
+    }
 }

+ 2 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/dto/OrderUpdateDTO.java

@@ -137,4 +137,6 @@ public class OrderUpdateDTO implements Serializable {
      * 明细列表
      */
     private List<OrderProductUpdateDTO> orderProductList;
+
+    private List<Long> ids;
 }