This commit is contained in:
linfso 2024-06-05 17:53:47 +08:00
parent 5fdbfda70b
commit e60312c83e
4 changed files with 49 additions and 0 deletions

View File

@ -97,6 +97,9 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
public int updatePrintStatus(EmisWaybill emisWaybill);
// 更新派件状态
public int updateDispatchStatus(EmisWaybill emisWaybill);
// 更新为签收
public int updateSignStatus(EmisWaybill emisWaybill);

View File

@ -395,6 +395,26 @@ public class EmisBaseService {
}
/**
* 更新派件状态
* @param billCode
*/
public void updateDispatchStatus(String billCode,String dispatchSiteCode,String dispatchManCode,Date dispatchDate) {
String mainBillCode = billCode;
if(billCode.startsWith("T7080") && billCode.length()>14 ){
mainBillCode=billCode.substring(0,14);
}
EmisWaybill waybill = new EmisWaybill();
waybill.setBillCode(mainBillCode);
waybill.setDispatchManCode(dispatchManCode);
waybill.setDispatchSiteCode(dispatchSiteCode);
waybill.setDispatchDate(dispatchDate);
waybill.setWaybillStatus(WaybillStatus.SENT.statusCode);
emisWaybillMapper.updateSignStatus(waybill);
}
/**
* 更新为未签收状态
* @param billCode

View File

@ -397,6 +397,15 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
emisTmsScanRecord.setDispatchOrSendManPhone(getCurrentUser().getPhonenumber());
}
// 更新总运单派件员
updateDispatchStatus(emisTmsScanRecord.getBillCode(),
emisTmsScanRecord.getScanSiteCode(),
emisTmsScanRecord.getDispatchOrSendManCode(),
emisTmsScanRecord.getScanDate()
);
// 改变当前站点
changeWaybillCurrentSite(emisTmsScanRecord.getBillCode(),emisTmsScanRecord.getScanSiteCode());
}
// 签收扫描
else if(ScanType.SIGNED.opCode.equals(scanType)){
@ -442,6 +451,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
emisTmsScanRecord.getPicUrl()
);
changeWaybillCurrentSite(emisTmsScanRecord.getBillCode(),emisTmsScanRecord.getScanSiteCode());
}
// 留仓
else if(ScanType.HOLD.opCode.equals(scanType)){
@ -464,6 +475,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
emisTmsScanPicInfo.preInsert();
emisTmsScanPicInfoMapper.insertEmisTmsScanPicInfo(emisTmsScanPicInfo);
changeWaybillCurrentSite(emisTmsScanRecord.getBillCode(),emisTmsScanRecord.getScanSiteCode());
}
// 转单扫描
else if(ScanType.TRANSFER.opCode.equals(scanType)){
@ -483,6 +496,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
// 更新waybill做转单
wayBillTransfer(emisTmsScanRecord.getBillCode(),transferCode,transferBillcode,destCity);
changeWaybillCurrentSite(emisTmsScanRecord.getBillCode(),emisTmsScanRecord.getScanSiteCode());
}
// 问题件
else if(ScanType.ISSUE.opCode.equals(scanType)){

View File

@ -1067,6 +1067,17 @@
where bill_code=#{billCode}
</update>
<update id="updateDispatchStatus" parameterType="EmisWaybill">
update emis_waybill set
dispatch_man_code = #{dispatchManCode},
dispatch_date = #{dispatchDate},
dispatch_site_code = #{dispatchSiteCode}
<if test="updateBy != null and updateBy != ''">,update_by = #{updateBy}</if>
<if test="updateSite != null and updateSite != ''">,update_site = #{updateSite}</if>
where bill_code=#{billCode}
</update>
<update id="updateUnSignStatus" parameterType="EmisWaybill">
update emis_waybill
set sign_man=null,