md
This commit is contained in:
parent
06499684e0
commit
ff352a2780
@ -1590,6 +1590,15 @@ public class EmisBaseService {
|
||||
return sysUserMapper.selectUserByUserName(empCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取快递员 by empName
|
||||
* @param empName
|
||||
* @return
|
||||
*/
|
||||
public SysUser getEmisStaffByEmpName(String empName){
|
||||
return sysUserMapper.selectUserByEmpName(empName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.googlecode.aviator.AviatorEvaluator;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||
import com.xdadan.erp.common.utils.DateUtils;
|
||||
import com.xdadan.erp.common.utils.DictUtils;
|
||||
import com.xdadan.erp.common.utils.SecurityUtils;
|
||||
@ -332,6 +333,22 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
emisWaybillSave.setPickupMethod(pickupMethod);
|
||||
|
||||
// 取件员或操作员
|
||||
if("1".equals(pickupMethod)){
|
||||
SysUser empUser=getEmisStaffByEmpName(emisWaybillSave.getOperateEmployeeName());
|
||||
if(empUser==null){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "快递员不正确");
|
||||
}
|
||||
emisWaybillSave.setOperateEmployeeCode(empUser.getEmpCode());
|
||||
}
|
||||
else if("2".equals(pickupMethod)){
|
||||
SysUser empUser=getEmisStaffByEmpName(emisWaybillSave.getOperateEmployeeName());
|
||||
if(empUser==null){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "快递员不正确");
|
||||
}
|
||||
emisWaybillSave.setTakePieceEmployeeCode(empUser.getEmpCode());
|
||||
}
|
||||
|
||||
// 包装类型
|
||||
String packTypeStr = emisWaybillSave.getPackType();
|
||||
if(StringUtils.isEmpty(packTypeStr)){
|
||||
@ -369,10 +386,15 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
|| "5".equals(paymentType)
|
||||
){
|
||||
EmisCustomerUser emisCustomerUser=getCustomerUserByMonthlyPayCode(emisWaybillSave.getCustNo());
|
||||
if(emisCustomerUser==null){
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "月结账号不存在");
|
||||
}
|
||||
emisWaybillSave.setCustomerCode(emisCustomerUser.getCustomerCode());
|
||||
emisWaybillSave.setCustomerName(emisCustomerUser.getCustomerName());
|
||||
emisWaybillSave.setPayee(emisCustomerUser.getPayee());
|
||||
emisWaybillSave.setSalesmen(emisCustomerUser.getSalesmen());
|
||||
}else{
|
||||
|
||||
emisWaybillSave.setCustNo(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user