diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java index 4d2e6a0e8..522602a18 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java @@ -436,7 +436,7 @@ public interface PlateMapper extends BaseMapperX { * @param planId * @return */ - List selectPlanAllCuttedOrderIdList(@Param("planId") Long planId); + List selectPlanAllCuttedOrderIdList(@Param("planId") Long planId, @Param("orderIds") List orderIds); /** * 查询排单板件信息 diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java index 8c2e1c062..469e3f4e4 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java @@ -1886,7 +1886,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService { int updatedCount = plateMapper.updatePlanPlateCutStatus(planId, orderIds, optimizatePlateNoList); // 查询已全部开料的订单号 - List allCuttedOrderIdList = plateMapper.selectPlanAllCuttedOrderIdList(planId); + List allCuttedOrderIdList = plateMapper.selectPlanAllCuttedOrderIdList(planId, orderIds); // 更新已全部开料和全部打包的订单为生产完成 if (CollUtil.isNotEmpty(allCuttedOrderIdList)) { diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml index 6bbf04744..a013b62eb 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml @@ -1564,9 +1564,17 @@ FROM order_plate op WHERE op.order_id = o.id AND op.plan_id = #{planId} + AND op.order_id in + + #{orderId} + AND op.deleted = false AND op.is_cutted in (0, 1)) AND o.deleted = false + AND o.id in + + #{orderId} +