Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service
This commit is contained in:
commit
c60525ffcf
@ -3128,6 +3128,16 @@ public class EmisBaseService {
|
||||
return sysUserMapper.selectUserByEmpName(empName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
*
|
||||
* @param sysUser
|
||||
* @return 用户列表
|
||||
*/
|
||||
public List<SysUser> getEmisStaffListByEmpName(SysUser sysUser) {
|
||||
return sysUserMapper.selectUserList(sysUser);
|
||||
}
|
||||
|
||||
public SysUser getEmisStaffBySiteCodeAndEmpName(String ownerSiteCode,String empName){
|
||||
return sysUserMapper.selectUserBySiteCodeAndEmpName(ownerSiteCode,empName);
|
||||
}
|
||||
|
||||
@ -19,9 +19,6 @@ package com.xdadan.erp.emis.service.impl;
|
||||
import com.deepoove.poi.data.Pictures;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import com.googlecode.aviator.AviatorEvaluator;
|
||||
import com.xdadan.erp.common.annotation.audit.DataAuditLog;
|
||||
import com.xdadan.erp.common.annotation.audit.OperateType;
|
||||
import com.xdadan.erp.common.annotation.filter.jackson.JacksonFilter;
|
||||
import com.xdadan.erp.common.config.PayConfig;
|
||||
import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||
import com.xdadan.erp.common.core.redis.RedissonService;
|
||||
@ -64,6 +61,7 @@ package com.xdadan.erp.emis.service.impl;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 运单列表Service业务层处理
|
||||
@ -932,6 +930,16 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
emisWaybillSave.setTakePieceEmployeeCode(empUser.getEmpCode());
|
||||
}
|
||||
|
||||
// 收款人备注
|
||||
List<SysUser> payeeUsers = getSysUsers(emisWaybillSave.getPayee());
|
||||
if (CollectionUtil.isEmpty(payeeUsers)) {
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "回款联系人不支持回款");
|
||||
}
|
||||
List<SysUser> salesmenUsers = getSysUsers(emisWaybillSave.getSalesmen());
|
||||
if (CollectionUtil.isEmpty(salesmenUsers)) {
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "销售联系人不支持回款");
|
||||
}
|
||||
|
||||
// 包装类型
|
||||
String packTypeStr = emisWaybillSave.getPackType();
|
||||
if(StringUtils.isEmpty(packTypeStr)){
|
||||
@ -1080,6 +1088,18 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
|
||||
}
|
||||
|
||||
private List<SysUser> getSysUsers(String userName) {
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setEmpName(userName);
|
||||
List<SysUser> userList = getEmisStaffListByEmpName(sysUser);
|
||||
List<SysUser> users = userList.stream()
|
||||
.filter(i -> i.getEmpName() != null &&
|
||||
i.getEmpName().equals(userName) &&
|
||||
"1".equals(i.getBlPayeeRemark()))
|
||||
.collect(Collectors.toList());
|
||||
return users;
|
||||
}
|
||||
|
||||
|
||||
private void cvtWaybillDraftToRealByOms(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user