mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增开始开料的小板开料中状态判断
This commit is contained in:
+8
@@ -85,5 +85,13 @@ public class BoardLayoutResultSummary {
|
|||||||
*/
|
*/
|
||||||
private List<String> placedBlockIds;
|
private List<String> placedBlockIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始开料板ID列表
|
||||||
|
*/
|
||||||
|
private List<String> startCutBlockIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束开料板ID列表
|
||||||
|
*/
|
||||||
|
private List<String> endCutBlockIds;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -421,6 +421,15 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
|||||||
*/
|
*/
|
||||||
int updatePlanPlateCutStatus(@Param("planId") Long planId, @Param("orderIds") List<Long> orderIds, @Param("plateNos") List<String> plateNoList);
|
int updatePlanPlateCutStatus(@Param("planId") Long planId, @Param("orderIds") List<Long> orderIds, @Param("plateNos") List<String> plateNoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新计划板件开料中状态
|
||||||
|
*
|
||||||
|
* @param planId
|
||||||
|
* @param orderIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updatePlanPlateCuttingStatus(@Param("planId") Long planId, @Param("orderIds") List<Long> orderIds, @Param("plateNos") List<String> plateNoList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据板件id列表查询板件信息
|
* 根据板件id列表查询板件信息
|
||||||
*
|
*
|
||||||
|
|||||||
+5
-1
@@ -1853,6 +1853,10 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
if (planDO.getStatus().equals(PlanStatusEnum.OPENING.getStatus()) || planDO.getStatus().equals(PlanStatusEnum.OPENED.getStatus())) {
|
if (planDO.getStatus().equals(PlanStatusEnum.OPENING.getStatus()) || planDO.getStatus().equals(PlanStatusEnum.OPENED.getStatus())) {
|
||||||
throw new ServiceException(PLAN_PLATE_IS_CUT);
|
throw new ServiceException(PLAN_PLATE_IS_CUT);
|
||||||
}
|
}
|
||||||
|
List<String> optimizatePlateNoList = layoutResultSummary.stream().flatMap(summary -> summary.getStartCutBlockIds().stream()).toList();
|
||||||
|
|
||||||
|
// 更新开料中状态
|
||||||
|
plateMapper.updatePlanPlateCuttingStatus(planId, orderIds, optimizatePlateNoList);
|
||||||
|
|
||||||
List<OrderDO> orderDOS = orderMapper.selectByIds(orderIds);
|
List<OrderDO> orderDOS = orderMapper.selectByIds(orderIds);
|
||||||
AssertUtils.notEmpty(orderDOS, ORDER_PLAN_ORDERS_EMPTY);
|
AssertUtils.notEmpty(orderDOS, ORDER_PLAN_ORDERS_EMPTY);
|
||||||
@@ -1876,7 +1880,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
|||||||
if (planDO.getStatus().equals(PlanStatusEnum.OPENED.getStatus())) {
|
if (planDO.getStatus().equals(PlanStatusEnum.OPENED.getStatus())) {
|
||||||
throw new ServiceException(PLAN_OPTIMIZE_DATA_ALL_OPENED);
|
throw new ServiceException(PLAN_OPTIMIZE_DATA_ALL_OPENED);
|
||||||
}
|
}
|
||||||
List<String> optimizatePlateNoList = layoutResultSummary.stream().flatMap(summary -> summary.getPlacedBlockIds().stream()).toList();
|
List<String> optimizatePlateNoList = layoutResultSummary.stream().flatMap(summary -> summary.getEndCutBlockIds().stream()).toList();
|
||||||
// 累计开料大板数量
|
// 累计开料大板数量
|
||||||
int endCutBoardCount = layoutResultSummary.stream().mapToInt(BoardLayoutResultSummary::getEndCutBoardCount).sum();
|
int endCutBoardCount = layoutResultSummary.stream().mapToInt(BoardLayoutResultSummary::getEndCutBoardCount).sum();
|
||||||
|
|
||||||
|
|||||||
+16
@@ -1542,6 +1542,22 @@
|
|||||||
UPDATE order_plate op
|
UPDATE order_plate op
|
||||||
SET op.is_cutted = 2
|
SET op.is_cutted = 2
|
||||||
WHERE op.deleted = false
|
WHERE op.deleted = false
|
||||||
|
AND op.is_cutted in ( 0,1 )
|
||||||
|
AND op.order_id in
|
||||||
|
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||||
|
#{orderId}
|
||||||
|
</foreach>
|
||||||
|
AND op.plan_id = #{planId}
|
||||||
|
AND op.plate_no in
|
||||||
|
<foreach collection="plateNos" item="plateNo" open="(" close=")" separator=",">
|
||||||
|
#{plateNo}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePlanPlateCuttingStatus">
|
||||||
|
UPDATE order_plate op
|
||||||
|
SET op.is_cutted = 1
|
||||||
|
WHERE op.deleted = false
|
||||||
AND op.is_cutted = 0
|
AND op.is_cutted = 0
|
||||||
AND op.order_id in
|
AND op.order_id in
|
||||||
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||||
|
|||||||
Reference in New Issue
Block a user