Merge pull request 'demand: 当选择孟加拉进口产品时,运单号要自动去除T,TMS、APP、OMS、小程序同步修改' (#307) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/307
This commit is contained in:
commit
ce905110a1
@ -3316,18 +3316,18 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
}
|
||||
|
||||
// 如果是孟加拉单子,把运单号变为 12位
|
||||
if("0880".equals(emisWaybillSave.getReceiveCountry()) || "0880".equals(emisWaybillSave.getSendCountry())){
|
||||
if(emisWaybillSave.getBillCode().length()==14 && emisWaybillSave.getBillCode().startsWith("T7080")){
|
||||
String str =emisWaybillSave.getBillCode();
|
||||
String prefix=str.substring(0,6);
|
||||
String other = str.substring(8);
|
||||
|
||||
String billCode=prefix+other;
|
||||
// - 收件国家为 孟加拉:把运单号变为 12 位
|
||||
// - 发件国家为 孟加拉:运单号 去除前缀 'T'
|
||||
String billCodeRaw = emisWaybillSave.getBillCode();
|
||||
if (billCodeRaw != null && billCodeRaw.length() == 14 && billCodeRaw.startsWith("T7080")) {
|
||||
if ("0880".equals(emisWaybillSave.getReceiveCountry())) {
|
||||
String prefix = billCodeRaw.substring(0, 6);
|
||||
String other = billCodeRaw.substring(8);
|
||||
String billCode = prefix + other;
|
||||
emisWaybillSave.setBillCode(billCode);
|
||||
|
||||
} else if ("0880".equals(emisWaybillSave.getSendCountry())) {
|
||||
emisWaybillSave.setBillCode(billCodeRaw.substring(1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 设定为业务开单
|
||||
@ -3578,18 +3578,18 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
// 设定为客户下单,下单时间为当前时间
|
||||
this.resetOmsWaybillData(emisWaybillSave);
|
||||
|
||||
// 如果是孟加拉单子,把运单号变为 12位
|
||||
if("0880".equals(emisWaybillSave.getReceiveCountry()) || "0880".equals(emisWaybillSave.getSendCountry())){
|
||||
if(emisWaybillSave.getBillCode().length()==14 && emisWaybillSave.getBillCode().startsWith("T7080")){
|
||||
String str =emisWaybillSave.getBillCode();
|
||||
String prefix=str.substring(0,6);
|
||||
String other = str.substring(8);
|
||||
|
||||
String billCode=prefix+other;
|
||||
// - 收件国家为 孟加拉:把运单号变为 12 位
|
||||
// - 发件国家为 孟加拉:运单号 去除前缀 'T'
|
||||
String billCodeRaw = emisWaybillSave.getBillCode();
|
||||
if (billCodeRaw != null && billCodeRaw.length() == 14 && billCodeRaw.startsWith("T7080")) {
|
||||
if ("0880".equals(emisWaybillSave.getReceiveCountry())) {
|
||||
String prefix = billCodeRaw.substring(0, 6);
|
||||
String other = billCodeRaw.substring(8);
|
||||
String billCode = prefix + other;
|
||||
emisWaybillSave.setBillCode(billCode);
|
||||
|
||||
} else if ("0880".equals(emisWaybillSave.getSendCountry())) {
|
||||
emisWaybillSave.setBillCode(billCodeRaw.substring(1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 公共计算部分
|
||||
@ -3770,18 +3770,18 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
*/
|
||||
private void addNewWaybillByApi(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||
|
||||
// 如果是孟加拉单子,把运单号变为 12位
|
||||
if("0880".equals(emisWaybillSave.getReceiveCountry()) || "0880".equals(emisWaybillSave.getSendCountry())){
|
||||
if(emisWaybillSave.getBillCode().length()==14 && emisWaybillSave.getBillCode().startsWith("T7080")){
|
||||
String str =emisWaybillSave.getBillCode();
|
||||
String prefix=str.substring(0,6);
|
||||
String other = str.substring(8);
|
||||
|
||||
String billCode=prefix+other;
|
||||
// - 收件国家为 孟加拉:把运单号变为 12 位
|
||||
// - 发件国家为 孟加拉:运单号 去除前缀 'T'
|
||||
String billCodeRaw = emisWaybillSave.getBillCode();
|
||||
if (billCodeRaw != null && billCodeRaw.length() == 14 && billCodeRaw.startsWith("T7080")) {
|
||||
if ("0880".equals(emisWaybillSave.getReceiveCountry())) {
|
||||
String prefix = billCodeRaw.substring(0, 6);
|
||||
String other = billCodeRaw.substring(8);
|
||||
String billCode = prefix + other;
|
||||
emisWaybillSave.setBillCode(billCode);
|
||||
|
||||
} else if ("0880".equals(emisWaybillSave.getSendCountry())) {
|
||||
emisWaybillSave.setBillCode(billCodeRaw.substring(1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// api 开单
|
||||
@ -5481,18 +5481,18 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
*/
|
||||
private void addNewWaybillByExternal(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||
|
||||
// 如果是孟加拉单子,把运单号变为 12位
|
||||
if("0880".equals(emisWaybillSave.getReceiveCountry()) || "0880".equals(emisWaybillSave.getSendCountry())){
|
||||
if(emisWaybillSave.getBillCode().length()==14 && emisWaybillSave.getBillCode().startsWith("T7080")){
|
||||
String str =emisWaybillSave.getBillCode();
|
||||
String prefix=str.substring(0,6);
|
||||
String other = str.substring(8);
|
||||
|
||||
String billCode=prefix+other;
|
||||
// - 收件国家为 孟加拉:把运单号变为 12 位
|
||||
// - 发件国家为 孟加拉:运单号 去除前缀 'T'
|
||||
String billCodeRaw = emisWaybillSave.getBillCode();
|
||||
if (billCodeRaw != null && billCodeRaw.length() == 14 && billCodeRaw.startsWith("T7080")) {
|
||||
if ("0880".equals(emisWaybillSave.getReceiveCountry())) {
|
||||
String prefix = billCodeRaw.substring(0, 6);
|
||||
String other = billCodeRaw.substring(8);
|
||||
String billCode = prefix + other;
|
||||
emisWaybillSave.setBillCode(billCode);
|
||||
|
||||
} else if ("0880".equals(emisWaybillSave.getSendCountry())) {
|
||||
emisWaybillSave.setBillCode(billCodeRaw.substring(1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 设定为客户下单,下单时间为当前时间
|
||||
|
||||
Loading…
Reference in New Issue
Block a user