md
This commit is contained in:
parent
99eeedf40c
commit
9574a52ac1
@ -607,24 +607,33 @@ public class EmisBaseService {
|
||||
}
|
||||
|
||||
|
||||
public EmisProblemType getEmisProblemTypebyTypeId(Integer typeId){
|
||||
return emisProblemTypeMapper.selectEmisProblemTypeById(typeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新问题件状态
|
||||
* @param billCode
|
||||
* 登记问题件
|
||||
* @param waybillProblemInfo
|
||||
*/
|
||||
public void updateProblemStatus(String billCode,Integer problemType,String problemCause) {
|
||||
public void registerWaybillProblemInfo(EmisWaybillProblemInfo waybillProblemInfo){
|
||||
|
||||
emisWaybillProblemInfoMapper.insertEmisWaybillProblemInfo(waybillProblemInfo);
|
||||
|
||||
String billCode=waybillProblemInfo.getBillCode();
|
||||
// 更新运单状态为问题件
|
||||
String mainBillCode = billCode;
|
||||
if(billCode.startsWith("T7080") && billCode.length()>14 ){
|
||||
mainBillCode=billCode.substring(0,14);
|
||||
}
|
||||
|
||||
// 记录延迟天数
|
||||
EmisProblemType emisProblemType =getEmisProblemTypebyTypeId(waybillProblemInfo.getProblemType());
|
||||
|
||||
EmisWaybill waybill = new EmisWaybill();
|
||||
waybill.setBillCode(mainBillCode);
|
||||
waybill.setBlIsQuestion("1");
|
||||
waybill.setProblemType(problemType);
|
||||
waybill.setProblemCause(problemCause);
|
||||
|
||||
// 记录延迟天数
|
||||
EmisProblemType emisProblemType =getEmisProblemTypebyTypeId(problemType);
|
||||
waybill.setProblemType(waybillProblemInfo.getProblemType());
|
||||
waybill.setProblemCause(waybillProblemInfo.getProblemCause());
|
||||
waybill.setProblemDelayDays(emisProblemType.getDelayDay());
|
||||
|
||||
// 重新计算预估时间
|
||||
@ -648,18 +657,31 @@ public class EmisBaseService {
|
||||
waybill.preUpdate();
|
||||
emisWaybillMapper.updateProblemStatus(waybill);
|
||||
|
||||
}
|
||||
// 判断是否需要发问题件短信
|
||||
if( "1".equals(emisProblemType.getIsSendSms()) ) {
|
||||
|
||||
public EmisProblemType getEmisProblemTypebyTypeId(Integer typeId){
|
||||
return emisProblemTypeMapper.selectEmisProblemTypeById(typeId);
|
||||
}
|
||||
//发送寄件短信
|
||||
String content="尊敬的用户:您的运单${name}从${Sendingcountry}寄往${Receivingcountry}因${Problemtype}的问题导致货物时效延误预计送达时间${time},详询400-025-7080感谢您对探路速运的支持!";
|
||||
String sendingcountry=oldEmisWaybill.getSendCountryName();
|
||||
String receivingcountry=oldEmisWaybill.getReceiveCountryName();
|
||||
content = content.replace("${Sendingcountry}",receivingcountry);
|
||||
content = content.replace("${Receivingcountry}",sendingcountry);
|
||||
content = content.replace("${name}",mainBillCode);
|
||||
|
||||
EmisSmsSendRecord emisSmsSendRecord = new EmisSmsSendRecord();
|
||||
emisSmsSendRecord.setBillCode(mainBillCode);
|
||||
emisSmsSendRecord.setSmsType("2"); // 签收短信
|
||||
emisSmsSendRecord.setPhone(waybill.getReceiveMobile());
|
||||
emisSmsSendRecord.setContent(content);
|
||||
emisSmsSendRecord.setSendSiteCode(waybillProblemInfo.getRegisterSiteCode());
|
||||
emisSmsSendRecord.setSendSiteName(waybillProblemInfo.getRegisterSiteName());
|
||||
emisSmsSendRecord.setSendManCode(waybillProblemInfo.getRegisterManCode());
|
||||
emisSmsSendRecord.setSendManName(waybillProblemInfo.getRegisterManName());
|
||||
|
||||
sendBizSmsMessage(emisSmsSendRecord);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 登记问题件
|
||||
* @param waybillProblemInfo
|
||||
*/
|
||||
public void registerWaybillProblemInfo(EmisWaybillProblemInfo waybillProblemInfo){
|
||||
emisWaybillProblemInfoMapper.insertEmisWaybillProblemInfo(waybillProblemInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -412,20 +412,15 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
// 判断是否需要发寄件短信
|
||||
String billCode=emisTmsScanRecord.getBillCode();
|
||||
|
||||
boolean isSubBill=false;
|
||||
// 判断是否是子单
|
||||
String mainBillCode = "";
|
||||
String subBillSuffix = "";
|
||||
|
||||
if(billCode.startsWith("T7080") && billCode.length()>14 ){
|
||||
isSubBill = true;
|
||||
mainBillCode=billCode.substring(0,14);
|
||||
subBillSuffix=billCode.substring(14);
|
||||
}else{
|
||||
mainBillCode=billCode;
|
||||
}
|
||||
|
||||
EmisWaybill waybill=getWaybillByBillCode(emisTmsScanRecord.getBillCode());
|
||||
EmisWaybill waybill=getWaybillByBillCode(mainBillCode);
|
||||
if( "1".equals(waybill.getBlMessage()) ) {
|
||||
|
||||
//发送寄件短信
|
||||
@ -497,6 +492,39 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
// 改变当前站点
|
||||
changeWaybillCurrentSite(emisTmsScanRecord.getBillCode(),emisTmsScanRecord.getScanSiteCode());
|
||||
|
||||
// // 判断是否需要发派件短信
|
||||
// String billCode=emisTmsScanRecord.getBillCode();
|
||||
// // 判断是否是子单
|
||||
// String mainBillCode = "";
|
||||
// if(billCode.startsWith("T7080") && billCode.length()>14 ){
|
||||
// mainBillCode=billCode.substring(0,14);
|
||||
// }else{
|
||||
// mainBillCode=billCode;
|
||||
// }
|
||||
//
|
||||
// EmisWaybill waybill=getWaybillByBillCode(mainBillCode);
|
||||
// if( "1".equals(waybill.getBlMessage()) ) {
|
||||
//
|
||||
// //发送寄件短信
|
||||
// String content="尊敬的客户:您寄往${Nationalcity}的快递${name}已被签收,感谢您使用探路速运。";
|
||||
// String nationalcity=waybill.getReceiveCountryName()+""+waybill.getReceiveProvinceName();
|
||||
// content = content.replace("${Nationalcity}",nationalcity);
|
||||
// content = content.replace("${name}",mainBillCode);
|
||||
//
|
||||
// EmisSmsSendRecord emisSmsSendRecord = new EmisSmsSendRecord();
|
||||
// emisSmsSendRecord.setBillCode(emisTmsScanRecord.getBillCode());
|
||||
// emisSmsSendRecord.setSmsType("2"); // 派送短信
|
||||
// emisSmsSendRecord.setPhone(waybill.getReceiveMobile());
|
||||
// emisSmsSendRecord.setContent(content);
|
||||
// emisSmsSendRecord.setSendSiteCode(emisTmsScanRecord.getScanSiteCode());
|
||||
// emisSmsSendRecord.setSendSiteName(emisTmsScanRecord.getScanSite());
|
||||
// emisSmsSendRecord.setSendManCode(emisTmsScanRecord.getScanManCode());
|
||||
// emisSmsSendRecord.setSendManName(emisTmsScanRecord.getScanMan());
|
||||
//
|
||||
// sendBizSmsMessage(emisSmsSendRecord);
|
||||
//
|
||||
// }
|
||||
}
|
||||
// 签收扫描
|
||||
else if(ScanType.SIGNED.opCode.equals(scanType)){
|
||||
@ -552,6 +580,39 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
changeWaybillCurrentSite(emisTmsScanRecord.getBillCode(),emisTmsScanRecord.getScanSiteCode());
|
||||
|
||||
// 判断是否需要发寄件短信
|
||||
String billCode=emisTmsScanRecord.getBillCode();
|
||||
// 判断是否是子单
|
||||
String mainBillCode = "";
|
||||
if(billCode.startsWith("T7080") && billCode.length()>14 ){
|
||||
mainBillCode=billCode.substring(0,14);
|
||||
}else{
|
||||
mainBillCode=billCode;
|
||||
}
|
||||
|
||||
EmisWaybill waybill=getWaybillByBillCode(mainBillCode);
|
||||
if( "1".equals(waybill.getBlMessage()) ) {
|
||||
|
||||
//发送寄件短信
|
||||
String content="尊敬的客户:您寄往${Nationalcity}的快递${name}已被签收,感谢您使用探路速运。";
|
||||
String nationalcity=waybill.getReceiveCountryName()+""+waybill.getReceiveProvinceName();
|
||||
content = content.replace("${Nationalcity}",nationalcity);
|
||||
content = content.replace("${name}",mainBillCode);
|
||||
|
||||
EmisSmsSendRecord emisSmsSendRecord = new EmisSmsSendRecord();
|
||||
emisSmsSendRecord.setBillCode(emisTmsScanRecord.getBillCode());
|
||||
emisSmsSendRecord.setSmsType("2"); // 签收短信
|
||||
emisSmsSendRecord.setPhone(waybill.getReceiveMobile());
|
||||
emisSmsSendRecord.setContent(content);
|
||||
emisSmsSendRecord.setSendSiteCode(emisTmsScanRecord.getScanSiteCode());
|
||||
emisSmsSendRecord.setSendSiteName(emisTmsScanRecord.getScanSite());
|
||||
emisSmsSendRecord.setSendManCode(emisTmsScanRecord.getScanManCode());
|
||||
emisSmsSendRecord.setSendManName(emisTmsScanRecord.getScanMan());
|
||||
|
||||
sendBizSmsMessage(emisSmsSendRecord);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// 留仓
|
||||
else if(ScanType.HOLD.opCode.equals(scanType)){
|
||||
@ -647,14 +708,13 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
waybillProblemInfo.setProblemTitle(remark);
|
||||
waybillProblemInfo.setFilePath(picUrl);
|
||||
|
||||
waybillProblemInfo.setRegisterSiteName(emisTmsScanRecord.getScanSite());
|
||||
waybillProblemInfo.setRegisterManName(emisTmsScanRecord.getScanMan());
|
||||
|
||||
if(emisTmsScanRecord.getScanSiteCode().equals(notifySite)){
|
||||
waybillProblemInfo.setIsSendSiteRegister("1");
|
||||
}
|
||||
registerWaybillProblemInfo(waybillProblemInfo);
|
||||
|
||||
// 更新运单状态为问题件
|
||||
updateProblemStatus(emisTmsScanRecord.getBillCode(),problemType,waybillProblemInfo.getProblemCause());
|
||||
|
||||
}
|
||||
// 合包
|
||||
else if(ScanType.CO_PACKING.opCode.equals(scanType)){
|
||||
|
||||
@ -98,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and bill_code = #{billCode}
|
||||
and sms_type = #{smsType}
|
||||
and phone = #{phone}
|
||||
and content = #{content}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user