This commit is contained in:
linfso 2024-06-22 10:22:27 +08:00
parent 6853e3b02b
commit 8eb4864f03
2 changed files with 41 additions and 3 deletions

View File

@ -1098,6 +1098,26 @@ public class EmisBaseService {
} }
/**
* 根据月结客户名称获取月结客户编号
* @param name
* @return
*/
public EmisCustomerUser getCustomerUserByName(String name){
if(StringUtils.isEmpty(name)){
return null;
}
EmisCustomerUser queryEmisCustomerUser = new EmisCustomerUser();
queryEmisCustomerUser.setCustomerName(name);
List<EmisCustomerUser> list=emisCustomerUserMapper.selectEmisCustomerUserList(queryEmisCustomerUser);
if(CollectionUtils.isEmpty(list)){
return null;
}
return list.get(0);
}
/** /**
* 获取打印信息 * 获取打印信息
* @param billCode * @param billCode
@ -1779,6 +1799,11 @@ public class EmisBaseService {
* @return * @return
*/ */
public EmisCountry getCountryByName(String name) { public EmisCountry getCountryByName(String name) {
if(StringUtils.isEmpty(name)){
return null;
}
EmisCountry emisCountry = new EmisCountry(); EmisCountry emisCountry = new EmisCountry();
emisCountry.setName(name); emisCountry.setName(name);
List<EmisCountry> list=emisCountryMapper.selectEmisCountryList(emisCountry); List<EmisCountry> list=emisCountryMapper.selectEmisCountryList(emisCountry);

View File

@ -346,6 +346,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
} }
emisWaybillSave.setPaymentType(paymentType); emisWaybillSave.setPaymentType(paymentType);
// 月结方式获取月结客户的编码和名称
if("2".equals(paymentType)
|| "4".equals(paymentType)
|| "5".equals(paymentType)
){
EmisCustomerUser emisCustomerUser=getCustomerUserByMonthlyPayCode(emisWaybillSave.getCustNo());
emisWaybillSave.setCustomerCode(emisCustomerUser.getCustomerCode());
emisWaybillSave.setCustomerName(emisCustomerUser.getCustomerName());
}
// 报关方式 // 报关方式
String customsEclaration=DictUtils.getDictValue("emis_declare_mode",emisWaybillSave.getCustomsEclaration()); String customsEclaration=DictUtils.getDictValue("emis_declare_mode",emisWaybillSave.getCustomsEclaration());
if(customsEclaration==null){ if(customsEclaration==null){
@ -366,6 +377,10 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "找不到目的地"); throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "找不到目的地");
} }
emisWaybillSave.setDestinationCode(destination.getDestCode());
emisWaybillSave.setDispatchUnderlingSiteCode(destination.getSiteCode());
try { try {
// 计算体积重量 // 计算体积重量
calcVolumeWeight(emisWaybillSave); calcVolumeWeight(emisWaybillSave);
@ -391,9 +406,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
* @return * @return
*/ */
private String getCountryCodeByName(String name){ private String getCountryCodeByName(String name){
if(StringUtils.isEmpty(name)){
return null;
}
EmisCountry country=getCountryByName(name); EmisCountry country=getCountryByName(name);
if(country!=null){ if(country!=null){