|
|
@@ -443,9 +443,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
contactBook.setMobile(t.getContactMobile());
|
|
|
organizationContactBookMapper.insertSelective(contactBook);
|
|
|
}
|
|
|
- Admin admin = adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
|
|
|
+ Admin a = adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
|
|
|
if (StringUtils.isBlank(t.getOrderDep())) {
|
|
|
- t.setOrderDep(admin.getDepartmentId());
|
|
|
+ t.setOrderDep(a.getDepartmentId());
|
|
|
}
|
|
|
//订单提交
|
|
|
if (isSubmit==1) {
|
|
|
@@ -458,7 +458,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
|
//特批逻辑处理
|
|
|
if (t2.getApproval()==ApprovalNewState.ZCDSH.getCode()){
|
|
|
- if (admin.getId().equals(AFTConstants.CAOJIN_AID)){
|
|
|
+ if (a.getId().equals(AFTConstants.CAOJIN_AID)){
|
|
|
t.setApproval(ApprovalNewState.DSZDSH.getCode());
|
|
|
}else {
|
|
|
t.setApproval(ApprovalNewState.ZCDSH.getCode());
|
|
|
@@ -487,15 +487,20 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
updateOrderMid(t);
|
|
|
List<String> aids = new ArrayList<>();
|
|
|
Integer type;
|
|
|
- AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
aids.addAll(adminMapper.listNameByDepAndName(a.getDepartmentId(), AFTConstants.SALESMAN_ADMIN));
|
|
|
type=NoticeStatus.ORDER_START.getCode();
|
|
|
-
|
|
|
TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(t2.getOrderNo());
|
|
|
pushGeneralSendNoticeAndEmail(aids, type,order, TokenManager.getAdminId(),t.getApproval());
|
|
|
if (t.getOrderDep()!=null){
|
|
|
- OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
|
|
|
- t.setExamineName(dep.getManagerName());
|
|
|
+ List<Admin> admins = adminMapper.listAdminBydepIdAndRoleType(t.getOrderDep(),AFTConstants.SALESMAN_ADMIN);
|
|
|
+ if (admins.isEmpty()){
|
|
|
+ OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
|
|
|
+ admins = adminMapper.listAdminBydepIdAndRoleType(dep.getSuperId(),AFTConstants.SALESMAN_ADMIN);
|
|
|
+ }
|
|
|
+ StringBuffer str =new StringBuffer();
|
|
|
+ for (Admin admin : admins) {
|
|
|
+ if (!str.toString().contains(admin.getName()))str.append(admin.getName()).append(",");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (t2.getApproval().equals(ApprovalNewState.ZCBH.getCode()) ||
|