PDA复核数量更改
This commit is contained in:
+1
@@ -226,6 +226,7 @@ public class ReviewOrderDomainService {
|
||||
if (pending == null) {
|
||||
pending = BigDecimal.ZERO;
|
||||
}
|
||||
d.setMaterialPlanQty(pending);
|
||||
d.setPendingReviewQty(pending);
|
||||
d.setReviewedQty(BigDecimal.ZERO);
|
||||
d.setCancelQty(BigDecimal.ZERO);
|
||||
|
||||
@@ -52,6 +52,9 @@ public class ReviewMaterialDetail extends BaseVOEntity {
|
||||
|
||||
private BigDecimal cancelQty;
|
||||
|
||||
@ApiModelProperty("物料计划数量(拣货明细实际拣货数量快照,复核过程不修改)")
|
||||
private BigDecimal materialPlanQty;
|
||||
|
||||
private String receiptOrderNumber;
|
||||
|
||||
private String lotNo;
|
||||
|
||||
+3
@@ -64,6 +64,9 @@ public class ReviewMaterialDetailPO extends BaseVOEntity {
|
||||
@ApiModelProperty("取消复核数量")
|
||||
private BigDecimal cancelQty;
|
||||
|
||||
@ApiModelProperty("物料计划数量(拣货实际拣货数量,生成复核明细时落库)")
|
||||
private BigDecimal materialPlanQty;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -84,6 +85,15 @@ public class ReviewOrderPO extends BaseVOEntity {
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("物料种类(明细中不重复的物料基础信息数量)")
|
||||
private Integer materialKindCount;
|
||||
|
||||
@ApiModelProperty("物料总数量(各明细计划数量合计,计划量=待复核+已复核,来源于拣货数量)")
|
||||
private BigDecimal totalPlanQty;
|
||||
|
||||
@ApiModelProperty("复核总数量(各明细已复核数量合计)")
|
||||
private BigDecimal totalReviewedQty;
|
||||
|
||||
/** 详情与上架单一致:头字段扁平 + 明细列表 */
|
||||
@ApiModelProperty("复核明细")
|
||||
private List<ReviewMaterialDetailPO> materialDetailList;
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
<result property="updateByName" column="update_by_name"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="materialKindCount" column="material_kind_count"/>
|
||||
<result property="totalPlanQty" column="total_plan_qty"/>
|
||||
<result property="totalReviewedQty" column="total_reviewed_qty"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.mhd.wms.domain.reviewOrder.repository.po.ReviewMaterialDetailPO" id="ReviewMaterialDetailResult">
|
||||
@@ -50,6 +53,7 @@
|
||||
<result property="pendingReviewQty" column="pending_review_qty"/>
|
||||
<result property="reviewedQty" column="reviewed_qty"/>
|
||||
<result property="cancelQty" column="cancel_qty"/>
|
||||
<result property="materialPlanQty" column="material_plan_qty"/>
|
||||
<result property="receiptOrderNumber" column="receipt_order_number"/>
|
||||
<result property="lotNo" column="lot_no"/>
|
||||
<result property="batchNumber" column="batch_number"/>
|
||||
@@ -168,12 +172,25 @@
|
||||
</choose>
|
||||
</sql>
|
||||
|
||||
<!-- 复核单列表查询 -->
|
||||
<!-- 复核单列表查询(头表 + 明细聚合:种类数、计划总量、已复核总量) -->
|
||||
<select id="queryList" parameterType="com.mhd.wms.domain.reviewOrder.repository.todo.ReviewOrderDO"
|
||||
resultMap="ReviewOrderResult">
|
||||
select
|
||||
<include refid="reviewOrderSelectColumns"/>
|
||||
<include refid="reviewOrderSelectColumns"/>,
|
||||
ifnull(agg.material_kind_count, 0) as material_kind_count,
|
||||
ifnull(agg.total_plan_qty, 0) as total_plan_qty,
|
||||
ifnull(agg.total_reviewed_qty, 0) as total_reviewed_qty
|
||||
from review_order a
|
||||
left join (
|
||||
select
|
||||
d.review_order_id,
|
||||
count(distinct d.material_base_info_id) as material_kind_count,
|
||||
sum(ifnull(d.material_plan_qty, ifnull(d.pending_review_qty, 0) + ifnull(d.reviewed_qty, 0))) as total_plan_qty,
|
||||
sum(ifnull(d.reviewed_qty, 0)) as total_reviewed_qty
|
||||
from review_material_detail d
|
||||
where d.del_flag = 1
|
||||
group by d.review_order_id
|
||||
) agg on a.review_order_id = agg.review_order_id
|
||||
<where>
|
||||
<include refid="reviewOrderWhere"/>
|
||||
</where>
|
||||
@@ -214,6 +231,7 @@
|
||||
d.pending_review_qty,
|
||||
d.reviewed_qty,
|
||||
d.cancel_qty,
|
||||
d.material_plan_qty,
|
||||
d.receipt_order_number,
|
||||
d.lot_no,
|
||||
d.batch_number,
|
||||
|
||||
Reference in New Issue
Block a user