Parcourir la source

Merge remote-tracking branch 'origin/master' into master

姚云青 il y a 3 ans
Parent
commit
3eb100624a

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

@@ -7,6 +7,7 @@ import com.github.zuihou.business.operationManagementCenter.dto.PlanZoneSaveDTO;
 import com.github.zuihou.business.operationManagementCenter.entity.Inspection;
 import com.github.zuihou.business.operationManagementCenter.entity.Inspection;
 import com.github.zuihou.business.operationManagementCenter.entity.Order;
 import com.github.zuihou.business.operationManagementCenter.entity.Order;
 import com.github.zuihou.business.operationManagementCenter.entity.PlanZone;
 import com.github.zuihou.business.operationManagementCenter.entity.PlanZone;
+import com.github.zuihou.business.operationManagementCenter.entity.TaskNode;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 
 
 /**
 /**
@@ -22,6 +23,8 @@ public interface InspectionService extends SuperService<Inspection> {
 
 
     IPage<Inspection> pageList(IPage page, LbqWrapper<Inspection> wrapper);
     IPage<Inspection> pageList(IPage page, LbqWrapper<Inspection> wrapper);
 
 
-
     Boolean check(InspectionSaveDTO model);
     Boolean check(InspectionSaveDTO model);
+
+    TaskNode createTaskNode(InspectionSaveDTO model);
+
 }
 }

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

@@ -5,15 +5,63 @@ import com.github.zuihou.base.service.SuperServiceImpl;
 import com.github.zuihou.business.operationManagementCenter.dao.InspectionMapper;
 import com.github.zuihou.business.operationManagementCenter.dao.InspectionMapper;
 import com.github.zuihou.business.operationManagementCenter.dto.InspectionSaveDTO;
 import com.github.zuihou.business.operationManagementCenter.dto.InspectionSaveDTO;
 import com.github.zuihou.business.operationManagementCenter.entity.Inspection;
 import com.github.zuihou.business.operationManagementCenter.entity.Inspection;
+import com.github.zuihou.business.operationManagementCenter.entity.TTask;
+import com.github.zuihou.business.operationManagementCenter.entity.TWorkpiece;
+import com.github.zuihou.business.operationManagementCenter.entity.TaskNode;
 import com.github.zuihou.business.operationManagementCenter.service.InspectionService;
 import com.github.zuihou.business.operationManagementCenter.service.InspectionService;
+import com.github.zuihou.business.operationManagementCenter.service.PlanService;
+import com.github.zuihou.business.operationManagementCenter.service.TaskService;
+import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
+import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
+import com.github.zuihou.business.productionReadyCenter.service.BomProcedureService;
+import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
+import com.github.zuihou.business.productionResourceCenter.entity.Productionresource;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
+import com.github.zuihou.business.productionResourceCenter.entity.ResourceBusiness;
+import com.github.zuihou.business.productionResourceCenter.service.ResourceAutoCodeService;
+import com.github.zuihou.business.productionResourceCenter.service.ResourceBusinessService;
+import com.github.zuihou.common.constant.CodeRuleModule;
+import com.github.zuihou.common.constant.DictionaryKey;
 import com.github.zuihou.database.mybatis.auth.DataScope;
 import com.github.zuihou.database.mybatis.auth.DataScope;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.tenant.service.CodeRuleService;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.compress.utils.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
 @Slf4j
 @Slf4j
 @Service
 @Service
 public class InspectionServiceImpl extends SuperServiceImpl<InspectionMapper, Inspection> implements InspectionService {
 public class InspectionServiceImpl extends SuperServiceImpl<InspectionMapper, Inspection> implements InspectionService {
+
+    private final String INSPECTION_RESOURCE_NAME = "三坐标_质检";
+
+    @Autowired
+    private TaskService taskService;
+
+    @Autowired
+    private ResourceAutoCodeService resourceAutoCodeService;
+
+    @Autowired
+    private ResourceBusinessService resourceBusinessService;
+
+    @Autowired
+    private CodeRuleService codeRuleService;
+
+    @Autowired
+    private BomProcedureService bomProcedureService;
+
+    @Autowired
+    private ProductionresourceBizMapper productionresourceBizMapper;
+
+    @Autowired
+    private WorkpieceService workpieceService;
+
     @Override
     @Override
     public IPage<Inspection> pageList(IPage page, LbqWrapper<Inspection> wrapper) {
     public IPage<Inspection> pageList(IPage page, LbqWrapper<Inspection> wrapper) {
         return baseMapper.pageList(page, wrapper, new DataScope());
         return baseMapper.pageList(page, wrapper, new DataScope());
@@ -23,4 +71,116 @@ public class InspectionServiceImpl extends SuperServiceImpl<InspectionMapper, In
     public Boolean check(InspectionSaveDTO model) {
     public Boolean check(InspectionSaveDTO model) {
         return true;
         return true;
     }
     }
+
+
+    /**
+     * 获取具体的生产资源
+     * @param resourceType
+     * @return
+     */
+    private Long getResourceIdByAutoCode(String resourceType){
+        String robotName = DictionaryKey.YJ_ROBOT_NODES.get(resourceType);
+        Productionresource productionresource =  productionresourceBizMapper.selectOne(new LbqWrapper<Productionresource>().eq(Productionresource::getName, robotName));
+        return productionresource.getId();
+    }
+
+
+    @Override
+    public TaskNode createTaskNode(InspectionSaveDTO model) {
+
+        List<TaskNode> taskNodeList = Lists.newArrayList();
+
+        TTask task = taskService.getById(model.getTaskId());
+
+        //在零件抽检工序末尾新增三坐标检测序节点
+        LbqWrapper<TTask> lbqWrapper = new LbqWrapper<TTask>();
+        lbqWrapper.eq(TTask::getProcedureId, task.getProcedureId()).eq(TTask::getPlanId, model.getPlanId());
+        //获得抽检工序对应任务
+        TWorkpiece tWorkpiece = workpieceService.getById(model.getWorkpieceId());
+
+        BomProcedure bomProcedure = bomProcedureService.getById(task.getProcedureId());
+
+        if(null ==task || null == bomProcedure){
+            return null;
+        }
+        LbqWrapper<ResourceBusiness> resourceBusinessWrapper = new LbqWrapper<ResourceBusiness>();
+        resourceBusinessWrapper.eq(ResourceBusiness::getName, INSPECTION_RESOURCE_NAME);
+        ResourceBusiness resourceBusiness = resourceBusinessService.getOne(resourceBusinessWrapper);
+        List<ResourceAutoCode> autoCodeList = resourceAutoCodeService.list(new LbqWrapper<ResourceAutoCode>().eq(ResourceAutoCode::getBusinessId, resourceBusiness.getId()).orderByAsc(ResourceAutoCode::getParentId).orderByAsc(ResourceAutoCode::getWeight));
+
+        List<ResourceAutoCode> parentResourceAutoCodeList = autoCodeList.stream().filter(a->a.getParentId().longValue()==0L).collect(Collectors.toList());
+
+        for (int parentCount = 0; parentCount< parentResourceAutoCodeList.size(); parentCount++) {
+            //父节点
+            ResourceAutoCode pautoCode = parentResourceAutoCodeList.get(parentCount);
+            List<ResourceAutoCode> childResourceAutoCodeList = autoCodeList.stream().filter(a->pautoCode.getId().toString().equals(a.getParentId().toString())).collect(Collectors.toList());
+            List<ResourceAutoCode> agvlist = childResourceAutoCodeList.stream().filter(a->"2".equals(a.getCategory())).collect(Collectors.toList());
+            for (int count = 0; count < childResourceAutoCodeList.size(); count++) { //子节点
+                ResourceAutoCode autoCode = childResourceAutoCodeList.get(count);
+                ResourceAutoCode nextAutoCode = null;
+                if(count < childResourceAutoCodeList.size() -1){
+                    nextAutoCode = childResourceAutoCodeList.get(count + 1);
+                }
+                TaskNode taskNode = new TaskNode();
+                // 包含agv动作
+                if(count == 0  && agvlist.size() > 0){
+                    taskNode.setFindAgvFlag("1");
+                }else{
+                    taskNode.setFindAgvFlag("0");
+                }
+
+                taskNode.setTaskId(task.getId()).setOrderId(task.getOrderId())
+                        .setTaskNodeNo(codeRuleService.getBillCode(CodeRuleModule.CODE_RULE_TASK_NODE));
+                taskNode.setAutoNode(autoCode).setNodeNo(autoCode.getNo()).setCompleteBatchNo(task.getCompleteBatchNo())
+                        .setExeStatus("1").setPrority(autoCode.getWeight()).setNodeName(autoCode.getName());
+
+                //依据设备类型判断调用接口类型
+                if("1".equals(taskNode.getAutoNode().getCategory())){
+                    taskNode.setInterfaceType(DictionaryKey.INTERFACETYPE_PLC);
+                    //加工设备的设备ID来源于加工任务设备
+                    taskNode.setResourceId(task.getResourceId()).setTargetResourceId(task.getResourceId());
+                }else if("3".equals(taskNode.getAutoNode().getCategory())){
+                    String command = autoCode.getCommand();
+                    taskNode.setInterfaceType(DictionaryKey.INTERFACETYPE_PLC);
+                    //根据配置确定操作设备ID
+                    //String resourceType = autoCode.getResourceId()!=null? autoCode.getResourceId().toString() : null;
+                    // 放,判断后一个动作节点是否是agv搬运,如果是,这个targetResourceId设置成空
+                    if("2".equals(command)){
+                        // 最后一个节点
+                        if(count == childResourceAutoCodeList.size() - 1){
+                            taskNode.setTargetResourceId(task.getResourceId());
+                        }else{
+                            if(null == nextAutoCode.getResourceId()){
+                                taskNode.setTargetResourceId(null);
+                            }
+                        }
+                    }
+
+                    if(null!= autoCode.getResourceId()) {
+                        taskNode.setResourceId(getResourceIdByAutoCode(autoCode.getResourceId().toString()));
+                    }
+                }
+                else if("2".equals(taskNode.getAutoNode().getCategory())){
+                    taskNode.setInterfaceType(DictionaryKey.INTERFACETYPE_AGV);
+                }else if("4".equals(taskNode.getAutoNode().getCategory())){
+                    taskNode.setInterfaceType(DictionaryKey.INTERFACETYPE_WMS);
+
+                    String taskType = bomProcedure.getType();
+                    if("上料".equals(taskType)){
+                        taskNode.setNodeType("1").setResourceId(task.getResourceId());
+                    }else if("下料".equals(taskType)){
+                        taskNode.setNodeType("2").setResourceId(task.getResourceId());
+                    }else if("翻面".equals(taskType)){
+                        taskNode.setNodeType("4").setResourceId(task.getResourceId());
+                    }else{
+                        taskNode.setNodeType("0");
+                    }
+                }
+                //taskNode.setCompleteBatchSort(i);
+                taskNodeList.add(taskNode);
+            }
+        }
+        taskNodeList.forEach(System.out::println);
+        return null;
+    }
 }
 }

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

@@ -37,7 +37,6 @@
         from (
         from (
         select a.*,b.order_no as orderNo,b.order_name orderName,b.source,b.order_status as orderStatus,c.bomDesc,ifnull(b.produce_num,0) as produceNum, c.bomId, c.partsNo,c.partsAlias,c.bomAlias,c.pdeliveryTime,b.delivery_time deliveryTime,c.order_product_id,d.id as zoneId, d.org_id,
         select a.*,b.order_no as orderNo,b.order_name orderName,b.source,b.order_status as orderStatus,c.bomDesc,ifnull(b.produce_num,0) as produceNum, c.bomId, c.partsNo,c.partsAlias,c.bomAlias,c.pdeliveryTime,b.delivery_time deliveryTime,c.order_product_id,d.id as zoneId, d.org_id,
         ifnull(v.completeCount ,0) as completeNum,unqualifiedBomNum,
         ifnull(v.completeCount ,0) as completeNum,unqualifiedBomNum,
---         group_concat(t.id) as workpieceIds,
         CASE WHEN ifnull(w.taskCount,0)=0 then 0 else  round(100 *( wcCount / taskCount),2) end process,ifnull(c.plan_bom_num,0) as planBomNum,d.name as zoenDesc from imcs_p_plan a
         CASE WHEN ifnull(w.taskCount,0)=0 then 0 else  round(100 *( wcCount / taskCount),2) end process,ifnull(c.plan_bom_num,0) as planBomNum,d.name as zoenDesc from imcs_p_plan a
         left join (
         left join (
         select ord.* from imcs_o_order ord
         select ord.* from imcs_o_order ord
@@ -51,7 +50,6 @@
         imcs_z_zone d on d.id = b.zone_id
         imcs_z_zone d on d.id = b.zone_id
         LEFT JOIN ( SELECT t.plan_id, count(1) taskCount,  sum(CASE WHEN t. STATUS = '3' THEN 1 ELSE 0 END) wcCount FROM imcs_t_task t GROUP BY t.plan_id) w ON a.id = w.plan_id
         LEFT JOIN ( SELECT t.plan_id, count(1) taskCount,  sum(CASE WHEN t. STATUS = '3' THEN 1 ELSE 0 END) wcCount FROM imcs_t_task t GROUP BY t.plan_id) w ON a.id = w.plan_id
         LEFT JOIN ( SELECT i.plan_id, sum(CASE WHEN i.is_end = '1' THEN 1 ELSE 0 END) completeCount,sum(CASE WHEN i.test_result = '0' THEN 1 ELSE 0 END) unqualifiedBomNum FROM imcs_t_workpiece i GROUP BY i.plan_id ) v ON a.id = v.plan_id
         LEFT JOIN ( SELECT i.plan_id, sum(CASE WHEN i.is_end = '1' THEN 1 ELSE 0 END) completeCount,sum(CASE WHEN i.test_result = '0' THEN 1 ELSE 0 END) unqualifiedBomNum FROM imcs_t_workpiece i GROUP BY i.plan_id ) v ON a.id = v.plan_id
-        LEFT JOIN imcs_t_workpiece t on c.plan_id = t.plan_id
         where 1=1
         where 1=1
         <if test="taskBatchNo != null and taskBatchNo != ''">
         <if test="taskBatchNo != null and taskBatchNo != ''">
             and a.id in(select plan_id from imcs_t_task where task_batch_no = #{taskBatchNo})
             and a.id in(select plan_id from imcs_t_task where task_batch_no = #{taskBatchNo})

+ 34 - 24
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/operationManagementCenter/InspectionController.java

@@ -10,8 +10,10 @@ import com.github.zuihou.business.operationManagementCenter.dto.InspectionPageDT
 import com.github.zuihou.business.operationManagementCenter.dto.InspectionSaveDTO;
 import com.github.zuihou.business.operationManagementCenter.dto.InspectionSaveDTO;
 import com.github.zuihou.business.operationManagementCenter.dto.InspectionUpdateDTO;
 import com.github.zuihou.business.operationManagementCenter.dto.InspectionUpdateDTO;
 import com.github.zuihou.business.operationManagementCenter.entity.Inspection;
 import com.github.zuihou.business.operationManagementCenter.entity.Inspection;
+import com.github.zuihou.business.operationManagementCenter.entity.TTask;
 import com.github.zuihou.business.operationManagementCenter.entity.TWorkpiece;
 import com.github.zuihou.business.operationManagementCenter.entity.TWorkpiece;
 import com.github.zuihou.business.operationManagementCenter.service.InspectionService;
 import com.github.zuihou.business.operationManagementCenter.service.InspectionService;
+import com.github.zuihou.business.operationManagementCenter.service.TaskService;
 import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
 import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
 import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
 import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
 import com.github.zuihou.business.productionReadyCenter.service.BBomService;
 import com.github.zuihou.business.productionReadyCenter.service.BBomService;
@@ -53,6 +55,9 @@ public class InspectionController extends SuperController<InspectionService, Lon
     @Autowired
     @Autowired
     private ZZoneService zZoneService;
     private ZZoneService zZoneService;
 
 
+    @Autowired
+    private TaskService taskService;
+
     @Override
     @Override
     public void query(PageParams<InspectionPageDTO> params, IPage<Inspection> page, Long defSize) {
     public void query(PageParams<InspectionPageDTO> params, IPage<Inspection> page, Long defSize) {
         InspectionPageDTO data = params.getModel();
         InspectionPageDTO data = params.getModel();
@@ -72,36 +77,40 @@ public class InspectionController extends SuperController<InspectionService, Lon
 
 
     @ApiOperation(value = "获取可抽检工序", notes = "获取可抽检工序")
     @ApiOperation(value = "获取可抽检工序", notes = "获取可抽检工序")
     @PostMapping("/procedure")
     @PostMapping("/procedure")
-    public R<List<BomProcedure>> procedure(@RequestBody Map map) {
+    public R<List<TTask>> procedure(@RequestBody Map map) {
         LbqWrapper<BomProcedure> wrapper = new LbqWrapper<BomProcedure>();
         LbqWrapper<BomProcedure> wrapper = new LbqWrapper<BomProcedure>();
         //满足当前零件、属于设备序、工艺允许配置抽检、按照优先级降序排列
         //满足当前零件、属于设备序、工艺允许配置抽检、按照优先级降序排列
         wrapper.eq(BomProcedure::getBomId, map.get("bomId")).eq(BomProcedure::getType, "设备序").eq(BomProcedure::getRandomCheckConf, "1").orderByDesc(BomProcedure::getSort);
         wrapper.eq(BomProcedure::getBomId, map.get("bomId")).eq(BomProcedure::getType, "设备序").eq(BomProcedure::getRandomCheckConf, "1").orderByDesc(BomProcedure::getSort);
-        if(map.containsKey("workpieceId")){
-            TWorkpiece workPiece = workpieceService.getById(map.get("workpieceId").toString());
-            String status = workPiece.getProduceStatus();
-            //零件工序已完成或状态不正常
-            if(StringUtil.isEmpty(status) || "3".equals(status)){
-                return fail("零件工序已完成或状态不正常");
-            }
-            if("2".equals(status)){
-                //零件加工进行中
-                Long procedureId = workPiece.getProcedureId();
-                int sort = bomProcedureService.getById(procedureId).getSort();
-                //在当前零件加工工序之后
-                wrapper.le(BomProcedure::getSort, sort);
-            }
-            Inspection inspection = baseService.getOne(new LbqWrapper<Inspection>().eq(Inspection::getWorkpieceId,workPiece.getId()));
-            //排除已经提交抽检的工序
-            if(null!= inspection && null!=inspection.getProcedureId()){
-                wrapper.ne(BomProcedure::getId, inspection.getProcedureId());
-            }
+        TWorkpiece workPiece = workpieceService.getById(map.get("workpieceId").toString());
+        String status = workPiece.getProduceStatus();
+
+        //零件工序已完成或状态不正常
+        if (StringUtil.isEmpty(status) || "3".equals(status)) {
+            return fail("零件工序已完成或状态不正常");
+        }
+        if ("2".equals(status)) {
+            //零件加工进行中
+            Long procedureId = workPiece.getProcedureId();
+            int sort = bomProcedureService.getById(procedureId).getSort();
+            //在当前零件加工工序之后
+            wrapper.le(BomProcedure::getSort, sort);
         }
         }
 
 
-        List<BomProcedure> dataList = bomProcedureService.list(wrapper).stream().filter(data->{
+        List<Long> idList = bomProcedureService.list(wrapper).stream().filter(data -> {
             //排除保障中心设备序
             //排除保障中心设备序
             Long zone_id = bBomService.getById(data.getBomId()).getZoneId();
             Long zone_id = bBomService.getById(data.getBomId()).getZoneId();
             return zZoneService.getById(zone_id).getNo() != "safeguard";
             return zZoneService.getById(zone_id).getNo() != "safeguard";
-        }).collect(Collectors.toList());
+        }).map(BomProcedure::getId).collect(Collectors.toList());
+        //获取已存在的工序的任务节点
+        LbqWrapper<TTask> taskLbqWrapper = new LbqWrapper<TTask>();
+        taskLbqWrapper.eq(TTask::getCompleteBatchNo, workPiece.getCompleteBatchNo()).eq(TTask::getPlanId, map.get("planId").toString()).in(TTask::getProcedureId, idList.toArray());
+
+        Inspection inspection = baseService.getOne(new LbqWrapper<Inspection>().eq(Inspection::getWorkpieceId, workPiece.getId()));
+        //排除已经提交抽检的工序
+        if (null != inspection && null != inspection.getTaskId()) {
+            taskLbqWrapper.ne(TTask::getId, inspection.getTaskId());
+        }
+        List<TTask> dataList = taskService.list(taskLbqWrapper);
         return success(dataList);
         return success(dataList);
     }
     }
 
 
@@ -109,8 +118,9 @@ public class InspectionController extends SuperController<InspectionService, Lon
     @PostMapping("/save")
     @PostMapping("/save")
     public R<Inspection> save(@RequestBody InspectionSaveDTO model) {
     public R<Inspection> save(@RequestBody InspectionSaveDTO model) {
         Inspection inspection = BeanUtil.toBean(model, Inspection.class);
         Inspection inspection = BeanUtil.toBean(model, Inspection.class);
-        if(baseService.check(model)) {
-            return baseService.save(inspection) ? success(inspection) : fail("新增失败");
+        if (baseService.check(model)) {
+            baseService.createTaskNode(model);
+            //return baseService.save(inspection) ? success(inspection) : fail("新增失败");
         }
         }
         return fail("新增条件判断失败");
         return fail("新增条件判断失败");
     }
     }

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

@@ -78,7 +78,7 @@ public class WorkpieceController extends SuperController<WorkpieceService, Long,
                 workpiece.getOrderNo()).eq(TWorkpiece::getBomId, workpiece.getBomId()).like(TWorkpiece::getBomNo,
                 workpiece.getOrderNo()).eq(TWorkpiece::getBomId, workpiece.getBomId()).like(TWorkpiece::getBomNo,
                 workpiece.getBomNo()).eq(TWorkpiece::getBomName, workpiece.getBomName()).like(TWorkpiece::getOrderNo, workpiece.getOrderNo()).eq(
                 workpiece.getBomNo()).eq(TWorkpiece::getBomName, workpiece.getBomName()).like(TWorkpiece::getOrderNo, workpiece.getOrderNo()).eq(
                 TWorkpiece::getPlanId, workpiece.getPlanId()).like(TWorkpiece::getPlanNo, workpiece.getPlanNo()).eq(TWorkpiece::getProduceStatus,
                 TWorkpiece::getPlanId, workpiece.getPlanId()).like(TWorkpiece::getPlanNo, workpiece.getPlanNo()).eq(TWorkpiece::getProduceStatus,
-                workpiece.getProduceStatus()).eq(TWorkpiece::getTestResult, workpiece.getTestResult()).like(TWorkpiece::getUniqueCode, workpiece.getUniqueCode());
+                workpiece.getProduceStatus()).eq(TWorkpiece::getTestResult, workpiece.getTestResult()).like(TWorkpiece::getUniqueCode, workpiece.getUniqueCode()).orderByAsc(TWorkpiece::getCreateTime);
 
 
         baseService.pageList(page, wrapper);
         baseService.pageList(page, wrapper);
     }
     }

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

@@ -72,6 +72,13 @@ public class InspectionPageDTO implements Serializable {
     @NotNull(message = "工序id不能为空")
     @NotNull(message = "工序id不能为空")
     private Long procedureId;
     private Long procedureId;
 
 
+    /**
+     * 任务id
+     */
+    @ApiModelProperty(value = "任务id")
+    @NotNull(message = "任务id不能为空")
+    private Long taskId;
+
     /**
     /**
      * 抽检状态
      * 抽检状态
      */
      */
@@ -114,4 +121,5 @@ public class InspectionPageDTO implements Serializable {
     @TableField(exist = false)
     @TableField(exist = false)
     private String zoneNo;
     private String zoneNo;
 
 
+
 }
 }

+ 4 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/dto/InspectionSaveDTO.java

@@ -65,11 +65,11 @@ public class InspectionSaveDTO implements Serializable {
     private Long zoneId;
     private Long zoneId;
 
 
     /**
     /**
-     * 工序id
+     * 任务id
      */
      */
-    @ApiModelProperty(value = "工序id")
-    @NotNull(message = "工序id不能为空")
-    private Long procedureId;
+    @ApiModelProperty(value = "任务id")
+    @NotNull(message = "任务id不能为空")
+    private Long taskId;
 
 
     /**
     /**
      * 工件id
      * 工件id

+ 4 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/dto/InspectionUpdateDTO.java

@@ -69,11 +69,11 @@ public class InspectionUpdateDTO implements Serializable {
     private Long zoneId;
     private Long zoneId;
 
 
     /**
     /**
-     * 工序id
+     * 任务id
      */
      */
-    @ApiModelProperty(value = "工序id")
-    @NotNull(message = "工序id不能为空")
-    private Long procedureId;
+    @ApiModelProperty(value = "任务id")
+    @NotNull(message = "任务id不能为空")
+    private Long taskId;
 
 
     /**
     /**
      * 抽检状态
      * 抽检状态

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

@@ -82,15 +82,15 @@ public class Inspection extends Entity<Long> {
     @Excel(name = "工件id")
     @Excel(name = "工件id")
     private Long workpieceId;
     private Long workpieceId;
 
 
-
     /**
     /**
      * 工序id
      * 工序id
      */
      */
-    @ApiModelProperty(value = "工序id")
-    @NotNull(message = "工序id不能为空")
-    @TableField("procedure_id")
+    @ApiModelProperty(value = "任务id")
+    @NotNull(message = "任务id不能为空")
+    @TableField("task_id")
     @Excel(name = "工序id")
     @Excel(name = "工序id")
-    private Long procedureId;
+    private Long taskId;
+
 
 
     /**
     /**
      * 抽检状态
      * 抽检状态
@@ -138,14 +138,18 @@ public class Inspection extends Entity<Long> {
     @TableField(exist = false)
     @TableField(exist = false)
     private String zoneNo;
     private String zoneNo;
 
 
+    @ApiModelProperty(value = "工序id")
+    @TableField(exist = false)
+    private Long procedureId;
 
 
     @Builder
     @Builder
-    public Inspection(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, Long bomId, Long orderId, Long zoneId, Long procedureId, Integer result, String report) {
+    public Inspection(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, Long bomId, Long orderId, Long zoneId, Long taskId, Long workpieceId, Integer result, String report) {
         super(id, createTime, createUser, updateTime, updateUser);
         super(id, createTime, createUser, updateTime, updateUser);
         this.bomId = bomId;
         this.bomId = bomId;
         this.orderId = orderId;
         this.orderId = orderId;
         this.zoneId = zoneId;
         this.zoneId = zoneId;
-        this.procedureId = procedureId;
+        this.taskId = taskId;
+        this.workpieceId = workpieceId;
         this.result = result;
         this.result = result;
         this.report = report;
         this.report = report;
     }
     }

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

@@ -325,17 +325,12 @@ public class Plan extends Entity<Long> {
     @Excel(name = "订单明细ID")
     @Excel(name = "订单明细ID")
     private Long orderProductId;
     private Long orderProductId;
 
 
-    @ApiModelProperty(value = "工件IDs")
-    @TableField(exist = false)
-    private String workpieceIds;
-
     @ApiModelProperty(value = "计划IDs")
     @ApiModelProperty(value = "计划IDs")
     @Length(max = 128, message = "计划IDs不能超过128")
     @Length(max = 128, message = "计划IDs不能超过128")
     @TableField(exist = false)
     @TableField(exist = false)
     private String planIds;
     private String planIds;
 
 
 
 
-
     @Builder
     @Builder
     public Plan(Long id, LocalDateTime createTime, LocalDateTime updateTime, 
     public Plan(Long id, LocalDateTime createTime, LocalDateTime updateTime, 
                     String planNo, Long orderId, String auditStatus, String remark,
                     String planNo, Long orderId, String auditStatus, String remark,