demand: tms-运输管理-货物组批次-新增/修改组批次校验件数、重量体积时只校验运输号相同的 tms-运输管理-货物组批次-查询批次详情接口-查询运单剩余件数、重量、体积时只查询运输号相同的

This commit is contained in:
aike 2025-12-12 11:02:50 +08:00
parent f80f9983ec
commit 7de119b530
5 changed files with 44 additions and 30 deletions

View File

@ -130,13 +130,16 @@ public interface EmisTmsSiteBatchMapper extends BaseMapper<EmisTmsSiteBatch>
*
* @param startSiteCode 起始网点编码
* @param nextSiteCode 下一网点编码
* @param carNo 运输号
* @param billCode 运单号
* @param id
* @return TMS组批次列表
*/
List<EmisTmsSiteBatch> selectTmsSiteBatchBySiteAndBillCode(@Param("startSiteCode") String startSiteCode,
List<EmisTmsSiteBatch> selectTmsSiteBatchBySiteAndBillCode(
@Param("startSiteCode") String startSiteCode,
@Param("nextSiteCode") String nextSiteCode,
@Param("billCode") String billCode, @Param("id")Long id);
@Param("carNo") String carNo,
@Param("billCode") String billCode, @Param("id") Long id);
/**
* 验重

View File

@ -46,12 +46,14 @@ public interface IEmisTmsSiteBatchService extends IDataAuditService
*
* @param startSiteCode 起始网点编码
* @param nextSiteCode 下一网点编码
* @param carNo
* @param billCode 运单号
* @param id
* @return TMS组批次列表
*/
public List<EmisTmsSiteBatch> selectTmsSiteBatchBySiteAndBillCode(String startSiteCode, String nextSiteCode,
String billCode, Long id);
public List<EmisTmsSiteBatch> selectTmsSiteBatchBySiteAndBillCode(
String startSiteCode, String nextSiteCode,
String carNo, String billCode, Long id);
/**
* 查询一级网点TMS组批次列表

View File

@ -149,6 +149,7 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
String batchNo = emisTmsSiteBatchDtl.getBatchNo();
String startSiteCode = (String) emisTmsSiteBatchDtl.getParams().get("startSiteCode");
String nextSiteCode = (String) emisTmsSiteBatchDtl.getParams().get("nextSiteCode");
String carNo = (String) emisTmsSiteBatchDtl.getParams().get("carNo");
String supplierCode = (String) emisTmsSiteBatchDtl.getParams().get("supplierCode");
// 参数校验
@ -161,6 +162,9 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
if (StringUtils.isBlank(nextSiteCode)) {
throw new EmisBizError(EmisBizErrorType.FAIL, "下一网点编码不能为空");
}
if (StringUtils.isBlank(carNo)) {
throw new EmisBizError(EmisBizErrorType.FAIL, "运输号不能为空");
}
// 查询运单信息
EmisWaybill emisWaybill = emisWaybillMapper.selectEmisWaybillByBillCode(billCode);
@ -200,6 +204,7 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
List<EmisTmsSiteBatch> existingBatches = emisTmsSiteBatchMapper.selectTmsSiteBatchBySiteAndBillCode(
startSiteCode,
nextSiteCode,
carNo,
billCode,
null);

View File

@ -111,8 +111,8 @@ public class EmisTmsSiteBatchServiceImpl extends EmisBaseService implements IEmi
@Override
public List<EmisTmsSiteBatch> selectTmsSiteBatchBySiteAndBillCode(String startSiteCode, String nextSiteCode,
String billCode, Long id) {
return emisTmsSiteBatchMapper.selectTmsSiteBatchBySiteAndBillCode(startSiteCode, nextSiteCode, billCode, id);
String carNo, String billCode, Long id) {
return emisTmsSiteBatchMapper.selectTmsSiteBatchBySiteAndBillCode(startSiteCode, nextSiteCode, carNo, billCode, id);
}
/**
@ -209,6 +209,7 @@ public class EmisTmsSiteBatchServiceImpl extends EmisBaseService implements IEmi
List<EmisTmsSiteBatch> existingBatches = selectTmsSiteBatchBySiteAndBillCode(
oldSiteBatch.getStartSiteCode(),
oldSiteBatch.getNextSiteCode(),
oldSiteBatch.getCarNo(),
itemDtl.getBillCode(), itemDtl.getId());
if (itemDtl.getId() != null) {
existingBatches = existingBatches.stream().filter(i -> !itemDtl.getBatchNo().equals(i.getBatchNo()))

View File

@ -577,6 +577,9 @@
left join emis_waybill w on d.bill_code = w.bill_code and w.del_flag = '0'
where b.start_site_code = #{startSiteCode}
and b.next_site_code = #{nextSiteCode}
<if test="carNo != null and carNo != ''">
and b.car_no = #{carNo}
</if>
and d.bill_code = #{billCode}
and b.del_flag = '0'
and d.del_flag = '0'