add:增加子卷质检判断
This commit is contained in:
@@ -74,7 +74,22 @@
|
||||
</select>
|
||||
<select id="queryContainerNameBySaleOrder" resultType="org.nl.b_lms.pdm.subpackagerelation.dto.PdmBiSubpackagerelationDto">
|
||||
SELECT a.*,
|
||||
b.*,
|
||||
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,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.StopWatch;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -199,13 +198,17 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
if (whereJson.get("type").toString().equals(PackageInfoIvtEnum.REQUEST_SOURCE.code("PC"))) {
|
||||
//订单号
|
||||
if (!whereJson.containsKey("sale_order_name")) {
|
||||
return Collections.emptyList();
|
||||
throw new BadRequestException("订单号不能为空!");
|
||||
}
|
||||
pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.queryContainerNameBySaleOrder(whereJson.get("sale_order_name").toString(), null);
|
||||
} else {
|
||||
//子卷号
|
||||
if (!whereJson.containsKey("container_name")) {
|
||||
return Collections.emptyList();
|
||||
throw new BadRequestException("子卷号不能为空!");
|
||||
}
|
||||
List<BstIvtPackageinfoivt> ivtList = packageinfoivtService.list(new QueryWrapper<BstIvtPackageinfoivt>().eq("container_name", whereJson.get("container_name").toString()).eq("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("合格品")));
|
||||
if (CollectionUtils.isEmpty(ivtList)) {
|
||||
throw new BadRequestException("该子卷未质检或品质不符合要求,请扫码质检!");
|
||||
}
|
||||
pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.queryContainerNameBySaleOrder(null, whereJson.get("container_name").toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user