demand: tms-扫描管理-扫描记录查询-删除扫描记录时,如果运单轨迹已结束,更新运单为未签收
This commit is contained in:
parent
fc3fed843d
commit
e7e0fd1c4e
@ -197,8 +197,28 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteEmisTmsScanRecordByIds(Long[] ids)
|
||||
{
|
||||
// 校验:如果扫描记录的blLastTrack=1,需要修改对应运单的bl_sign='0'
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (Long id : ids) {
|
||||
EmisTmsScanRecord record = selectEmisTmsScanRecordById(id);
|
||||
if (record != null && "1".equals(record.getBlLastTrack())) {
|
||||
String mainBillCode = record.getMainBillCode();
|
||||
if (StringUtils.isNotEmpty(mainBillCode)) {
|
||||
EmisWaybill waybill = getWaybillByBillCode(mainBillCode);
|
||||
if (waybill != null) {
|
||||
EmisWaybill updateWaybill = new EmisWaybill();
|
||||
updateWaybill.setBillCode(mainBillCode);
|
||||
updateWaybill.setWaybillStatus(waybill.getWaybillStatus());
|
||||
updateWaybill.setBlSign("0");
|
||||
emisWaybillMapper.changeWaybillStatusByBillCode(updateWaybill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return emisTmsScanRecordMapper.deleteEmisTmsScanRecordByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user