md
This commit is contained in:
parent
3a3f5ead9f
commit
d999fabfa0
@ -80,5 +80,7 @@ public interface EmisCustomerUserMapper extends BaseMapper<EmisCustomerUser>
|
||||
public EmisCustomerUser selectEmisCustomerUserByPhone(String phone);
|
||||
|
||||
|
||||
public EmisCustomerUser selectMonthCustomerByName(String name);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1107,22 +1107,16 @@ public class EmisBaseService {
|
||||
|
||||
|
||||
/**
|
||||
* 根据月结客户名称获取月结客户编号
|
||||
* 根据月结客户名称获取月结客户
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public EmisCustomerUser getCustomerUserByName(String name){
|
||||
public EmisCustomerUser getMonthCustomerByName(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);
|
||||
return emisCustomerUserMapper.selectMonthCustomerByName(name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -326,6 +326,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
emisWaybillSave.setSendCity(sendCityCode);
|
||||
emisWaybillSave.setSendCounty(sendDistrictCode);
|
||||
|
||||
|
||||
// 取件方式
|
||||
String pickupMethod=DictUtils.getDictValue("emis_qujian_fangshi",emisWaybillSave.getPickupMethod());
|
||||
if(pickupMethod==null){
|
||||
@ -355,8 +356,14 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "包装类型不正确");
|
||||
}
|
||||
|
||||
packTypeStr=WaybillHelper.formatQueryValue(packTypeStr);
|
||||
|
||||
String packTypeCvtStr="";
|
||||
String [] packTypeArr = packTypeStr.split(",");
|
||||
if(packTypeArr.length<=0){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "包装类型不正确");
|
||||
}
|
||||
|
||||
for(String itemLabel:packTypeArr){
|
||||
if(StringUtils.isEmpty(itemLabel)){
|
||||
continue;
|
||||
@ -365,14 +372,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
if(StringUtils.isEmpty(dictValue)){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "包装类型["+itemLabel+"]不正确");
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(dictValue)) {
|
||||
packTypeCvtStr = packTypeCvtStr + dictValue + ",";
|
||||
}
|
||||
packTypeCvtStr = packTypeCvtStr + dictValue + ",";
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(packTypeCvtStr)){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "包装类型不正确");
|
||||
}
|
||||
String [] packTypeCvtArr=packTypeCvtStr.split(",");
|
||||
if(packTypeCvtArr.length<=0){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "包装类型不正确");
|
||||
}
|
||||
|
||||
emisWaybillSave.setPackType(packTypeCvtStr);
|
||||
|
||||
|
||||
@ -386,7 +396,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
// 付款方式
|
||||
String paymentType=DictUtils.getDictValue("emis_payment_type",emisWaybillSave.getPaymentType());
|
||||
if(paymentType==null){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "付款方式不正确");
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "支付方式不正确");
|
||||
}
|
||||
emisWaybillSave.setPaymentType(paymentType);
|
||||
|
||||
@ -395,9 +405,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
|| "4".equals(paymentType)
|
||||
|| "5".equals(paymentType)
|
||||
){
|
||||
EmisCustomerUser emisCustomerUser=getCustomerUserByMonthlyPayCode(emisWaybillSave.getCustNo());
|
||||
EmisCustomerUser emisCustomerUser=getMonthCustomerByName(emisWaybillSave.getCustNo());
|
||||
if(emisCustomerUser==null){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "月结账号不存在");
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "月结客户不存在");
|
||||
}
|
||||
emisWaybillSave.setCustomerCode(emisCustomerUser.getCustomerCode());
|
||||
emisWaybillSave.setCustomerName(emisCustomerUser.getCustomerName());
|
||||
@ -422,6 +432,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
emisWaybillSave.setCustomsClear(customsClear);
|
||||
|
||||
if(StringUtils.isEmpty(emisWaybillSave.getBlMessage())){
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "发送寄件/签收短信不正确");
|
||||
}
|
||||
|
||||
if("是".equals(emisWaybillSave.getBlMessage())){
|
||||
emisWaybillSave.setBlMessage("1");
|
||||
}else{
|
||||
emisWaybillSave.setBlMessage("0");
|
||||
}
|
||||
|
||||
|
||||
// 计算目的地
|
||||
EmisDestination destination=calcDestSiteByBase(receiveCountryCode,transLine.getLineCode(),rcvProviceCode,rcvCityCode,rcvDistrictCode,emisWaybillSave.getReceiveAddress());
|
||||
if(destination==null){
|
||||
|
||||
@ -378,4 +378,10 @@
|
||||
where a.phone = #{phone}
|
||||
</select>
|
||||
|
||||
<select id="selectMonthCustomerByName" parameterType="string" resultMap="EmisCustomerUserResult">
|
||||
select id, customer_code, customer_name, customer_name_en, simple_name, contact, phone, mobile, customer_type, settled_type, user_type, company, lic_no, dept_id, avatar, sex, invitation_info, login_ip, login_date, nick_name, union_id, openid, monthly_pay_code, user_name, password, owner_site, biz_site, biz_site_name, country, province, city, county, town, address, email, post_code, real_name, id_no, payee, salesmen, data_from, bl_open_oms, bl_sms, op_emp_code, first_signing_day, status, order_num, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_customer_user a
|
||||
where a.del_flag='0' and a.customer_type='2' and a.customer_name = #{customerName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user