fix: 隐藏已完成的日计划作业
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.code.nl.module.lms.controller.admin.dailyplan.vo;
|
||||
|
||||
import cn.code.nl.framework.common.pojo.PageParam;
|
||||
import cn.code.nl.module.lms.enums.DailyPlanOrderStatusEnum;
|
||||
import cn.code.nl.module.lms.enums.DailyPlanStrategyTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.AssertTrue;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -18,6 +19,10 @@ public class DailyPlanWorkPageReqVO extends PageParam {
|
||||
@NotNull(message = "订单状态不能为空")
|
||||
private Integer orderStatus;
|
||||
|
||||
@Schema(description = "作业类型:1-备货,2-套管")
|
||||
@NotNull(message = "作业类型不能为空")
|
||||
private Integer workType;
|
||||
|
||||
@Schema(description = "日计划编码或订单号")
|
||||
private String planOrOrderCode;
|
||||
|
||||
@@ -29,4 +34,10 @@ public class DailyPlanWorkPageReqVO extends PageParam {
|
||||
return orderStatus == null || DailyPlanOrderStatusEnum.IN_PROGRESS.getCode().equals(orderStatus)
|
||||
|| DailyPlanOrderStatusEnum.CANCELED.getCode().equals(orderStatus);
|
||||
}
|
||||
|
||||
@AssertTrue(message = "作业类型只能是备货或套管")
|
||||
public boolean isWorkTypeValid() {
|
||||
return workType == null || DailyPlanStrategyTypeEnum.STOCKING.getCode().equals(workType)
|
||||
|| DailyPlanStrategyTypeEnum.SLEEVING.getCode().equals(workType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,10 @@
|
||||
WHERE deleted = b'0'
|
||||
AND order_status = #{reqVO.orderStatus}
|
||||
AND #{reqVO.orderStatus} IN (1, 3)
|
||||
AND (
|
||||
(#{reqVO.workType} = 1 AND stocked_qty < plan_qty + append_qty)
|
||||
OR (#{reqVO.workType} = 2 AND sleeved_qty < plan_qty + append_qty)
|
||||
)
|
||||
<include refid="planOrOrderCodeCondition"/>
|
||||
<include refid="materialKeywordCondition"/>
|
||||
ORDER BY sort_seq ASC, daily_plan_id ASC
|
||||
|
||||
Reference in New Issue
Block a user