opt:增加子卷重量校验
This commit is contained in:
@@ -73,42 +73,42 @@
|
||||
MAX(create_time) DESC
|
||||
</select>
|
||||
<select id="queryContainerNameBySaleOrder" resultType="org.nl.b_lms.pdm.subpackagerelation.dto.PdmBiSubpackagerelationDto">
|
||||
SELECT a.*,
|
||||
a.workorder_id,
|
||||
a.package_box_sn,
|
||||
a.quanlity_in_box,
|
||||
a.box_weight,
|
||||
a.sale_order_name,
|
||||
a.customer_name,
|
||||
a.customer_description,
|
||||
a.container_name,
|
||||
a.status,
|
||||
a.box_type,
|
||||
a.sap_pcsn,
|
||||
a.box_group,
|
||||
b.point_status,
|
||||
b.point_code,
|
||||
b.ivt_status,
|
||||
b.is_used,
|
||||
(CASE
|
||||
WHEN c.paper_tube_or_FRP = '1' THEN c.paper_tube_description
|
||||
WHEN c.paper_tube_or_FRP = '2' THEN c.FRP_description END) AS paper_tube_description,
|
||||
c.weight,
|
||||
c.paper_weight
|
||||
FROM `pdm_bi_subpackagerelation` a
|
||||
LEFT JOIN bst_ivt_packageinfoivt b ON a.container_name = b.container_name
|
||||
LEFT JOIN pdm_bi_slittingproductionplan c ON a.container_name = c.container_name
|
||||
WHERE b.point_status = '3'
|
||||
AND b.ivt_status = '3'
|
||||
AND b.is_used = '1'
|
||||
AND c.is_delete = '0'
|
||||
<if test="sale_order_name != null and sale_order_name != ''">
|
||||
AND a.sale_order_name = #{sale_order_name}
|
||||
</if>
|
||||
<if test="container_name != null and container_name != ''">
|
||||
AND a.container_name = #{container_name}
|
||||
</if>
|
||||
ORDER BY box_group
|
||||
SELECT
|
||||
a.workorder_id,
|
||||
a.package_box_sn,
|
||||
a.quanlity_in_box,
|
||||
a.box_weight,
|
||||
a.sale_order_name,
|
||||
a.customer_name,
|
||||
a.customer_description,
|
||||
a.container_name,
|
||||
a.status,
|
||||
a.box_type,
|
||||
a.sap_pcsn,
|
||||
a.box_group,
|
||||
(CASE
|
||||
WHEN c.paper_tube_or_FRP = '1' THEN c.paper_tube_description
|
||||
WHEN c.paper_tube_or_FRP = '2' THEN c.FRP_description END) AS paper_tube_description,
|
||||
c.weight,
|
||||
c.paper_weight,
|
||||
b.point_status,
|
||||
b.point_code,
|
||||
b.ivt_status,
|
||||
b.is_used
|
||||
FROM `pdm_bi_subpackagerelation` a
|
||||
LEFT JOIN bst_ivt_packageinfoivt b ON a.container_name = b.container_name
|
||||
LEFT JOIN pdm_bi_slittingproductionplan c ON a.container_name = c.container_name
|
||||
WHERE b.point_status = '3'
|
||||
AND b.ivt_status = '3'
|
||||
AND b.is_used = '1'
|
||||
AND c.is_delete = '0'
|
||||
<if test="sale_order_name != null and sale_order_name != ''">
|
||||
AND a.sale_order_name = #{sale_order_name}
|
||||
</if>
|
||||
<if test="container_name != null and container_name != ''">
|
||||
AND a.container_name = #{container_name}
|
||||
</if>
|
||||
ORDER BY box_group
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -220,6 +220,8 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
// int containerLength = getMaxNum(null, r.getPaper_tube_description());
|
||||
// r.setUn_plan_product_property3(Integer.toString(containerLength));
|
||||
if (whereJson.get("type").toString().equals(PackageInfoIvtEnum.REQUEST_SOURCE.code("PC"))) {
|
||||
// r.setWeight(r.getWeight() != null ? r.getPaper_weight() : "0");
|
||||
// r.setPaper_weight(r.getPaper_weight() != null ? r.getPaper_weight() : "0");
|
||||
if (r.getBox_group() != null) {
|
||||
r.setQuanlity_in_box(BigDecimal.valueOf(countByGroup.getOrDefault(r.getBox_group(), null)));
|
||||
} else {
|
||||
@@ -324,7 +326,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
if (totalWeight.compareTo(new BigDecimal(0)) == 0) {
|
||||
throw new BadRequestException("分切计划的子卷重量不能为0");
|
||||
}
|
||||
outBox(workIdList, containerNameList, deviceCode, maxBoxGroup,whereJson,totalWeight);
|
||||
// outBox(workIdList, containerNameList, deviceCode, maxBoxGroup,whereJson,totalWeight);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException(e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user