demand: TMS系统 - 运输管理 - 货物组批次编辑相同运单移除后又添加显示0bug修复
committer: heyu
This commit is contained in:
parent
128608c85a
commit
30c0a798dc
@ -112,4 +112,14 @@ public interface EmisTmsSiteBatchDtlMapper extends BaseMapper<EmisTmsSiteBatchDt
|
||||
* @param billCode 运单号
|
||||
*/
|
||||
void updatetWaybillBatchStatus(@Param("list") List<String> batchNos, @Param("billCode") String billCode);
|
||||
|
||||
/**
|
||||
* 根据批次号和运单号查询批次明细
|
||||
*
|
||||
* @param batchNo 批次号
|
||||
* @param billCode 运单号
|
||||
* @return 批次明细
|
||||
*/
|
||||
EmisTmsSiteBatchDtl selectEmisTmsSiteBatchDtlByBatchNoAndBillCode(@Param("batchNo") String batchNo,
|
||||
@Param("billCode") String billCode);
|
||||
}
|
||||
|
||||
@ -132,6 +132,7 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
|
||||
}
|
||||
|
||||
String billCode = emisTmsSiteBatchDtl.getBillCode();
|
||||
String batchNo = emisTmsSiteBatchDtl.getBatchNo();
|
||||
String startSiteCode = (String) emisTmsSiteBatchDtl.getParams().get("startSiteCode");
|
||||
String nextSiteCode = (String) emisTmsSiteBatchDtl.getParams().get("nextSiteCode");
|
||||
String supplierCode = (String) emisTmsSiteBatchDtl.getParams().get("supplierCode");
|
||||
@ -140,6 +141,9 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
|
||||
if (StringUtils.isBlank(billCode)) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, "运单号不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(batchNo)) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, "批次号不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(startSiteCode)) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, "起始网点编码不能为空");
|
||||
}
|
||||
@ -157,11 +161,21 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
|
||||
EmisTmsSiteBatchDtl result = new EmisTmsSiteBatchDtl();
|
||||
result.setWaybillDetail(emisWaybill);
|
||||
|
||||
// 根据批次号、运单号查询emis_tms_site_batch_dtl,如果存在,直接返回数据
|
||||
EmisTmsSiteBatchDtl existingBatchDtl = emisTmsSiteBatchDtlMapper
|
||||
.selectEmisTmsSiteBatchDtlByBatchNoAndBillCode(batchNo, billCode);
|
||||
if (existingBatchDtl != null) {
|
||||
result.setBatchParcelQty(existingBatchDtl.getBatchParcelQty());
|
||||
result.setBatchWeight(existingBatchDtl.getBatchWeight());
|
||||
result.setBatchVolume(existingBatchDtl.getBatchVolume());
|
||||
return result;
|
||||
}
|
||||
|
||||
// 查询运输计划规则
|
||||
EmisTransPlanRule emisTransPlanRule = new EmisTransPlanRule();
|
||||
emisTransPlanRule.setStartSiteCode(startSiteCode);
|
||||
emisTransPlanRule.setNextSiteCode(nextSiteCode);
|
||||
// emisTransPlanRule.setSupplierCode(supplierCode);
|
||||
// emisTransPlanRule.setSupplierCode(supplierCode);
|
||||
emisTransPlanRule.setLineCode(emisWaybill.getTransLineType());
|
||||
emisTransPlanRule.setProductType(emisWaybill.getProductType());
|
||||
|
||||
|
||||
@ -256,4 +256,14 @@
|
||||
and bill_code = #{billCode}
|
||||
and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<!-- 根据批次号和运单号查询批次明细 -->
|
||||
<select id="selectEmisTmsSiteBatchDtlByBatchNoAndBillCode" resultMap="BaseEmisTmsSiteBatchDtlResult">
|
||||
select id, bill_code, batch_no, scan_date, scan_status, group_status, scan_man, scan_site, batch_volume, batch_parcel_qty, batch_weight, waybill_batch_status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_tms_site_batch_dtl
|
||||
where batch_no = #{batchNo}
|
||||
and bill_code = #{billCode}
|
||||
and del_flag = '0'
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user