|
|
@@ -516,6 +516,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
t.setLiquidationStatus(LiquidationNewState.WAIT_PAY_FIRST_BALANCE.getCode());
|
|
|
}
|
|
|
}
|
|
|
+ if (t.getOrderDep()!=null){
|
|
|
+ OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
|
|
|
+ t.setExamineName(dep.getManagerName());
|
|
|
+ }
|
|
|
+
|
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
}
|
|
|
|
|
|
@@ -894,6 +899,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
TOrderNew t= new TOrderNew();
|
|
|
TOrderNew t2= checkDeleteSign(orderNo);
|
|
|
t.setOrderNo(orderNo);
|
|
|
+ t.setOrderDep(t2.getOrderDep());
|
|
|
List<String> aids = new ArrayList<>();
|
|
|
Integer type=null;
|
|
|
TOrderLog tl=new TOrderLog();
|
|
|
@@ -905,6 +911,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
t.setProcessStatus(ProcessStatus.YPCWZY.getCode());
|
|
|
//如果是转的暂时不删除外包信息
|
|
|
aids.add(departmentMapper.selectByPrimaryKey(t2.getOrderDep()).getFinanceId());
|
|
|
+
|
|
|
+
|
|
|
} else if(outsource==1) {
|
|
|
for (Admin admin : adminMapper.getAdminRoleNameList("外包审核员")) {
|
|
|
aids.add(admin.getId());
|
|
|
@@ -943,6 +951,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
type=NoticeStatus.ORDER_NO.getCode();
|
|
|
}
|
|
|
t.setOrderStatus(orderStatus);
|
|
|
+ //设置审核人员名称
|
|
|
+ pushExamineName(t2);
|
|
|
tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
if (aids.isEmpty()) {
|
|
|
throw new BusinessException(new Error( "邮件发送失败,对方设置邮箱错误","邮件发送失败,对方设置邮箱错误"));
|
|
|
@@ -951,7 +961,49 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
pushGeneralSendNoticeAndEmail(aids, type,order, TokenManager.getAdminId(),t2.getApproval());
|
|
|
return 1;
|
|
|
}
|
|
|
+ @Override
|
|
|
+ public void pushExamineName(TOrderNew t){
|
|
|
+ StringBuffer str =new StringBuffer();
|
|
|
+ if (t.getProcessStatus()==ProcessStatus.YPYXY.getCode()){
|
|
|
+ Admin admin = adminMapper.selectByPrimaryKey(t.getSalesmanId());
|
|
|
+ t.setExamineName(admin.getName());
|
|
|
+ }else if (t.getProcessStatus()==ProcessStatus.YPCWZY.getCode()){
|
|
|
+ if (t.getOrderDep()!=null){
|
|
|
+ OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
|
|
|
+ t.setExamineName(dep.getFinanceName());
|
|
|
+ }
|
|
|
+ }else if (t.getProcessStatus()==ProcessStatus.YPYXGLY.getCode()){
|
|
|
+ if (t.getOrderDep()!=null){
|
|
|
+ OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
|
|
|
+ t.setExamineName(dep.getManagerName());
|
|
|
+ }
|
|
|
+ }else if (t.getProcessStatus()==ProcessStatus.YPTPSH.getCode()){
|
|
|
+ if(t.getApproval()==ApprovalNewState.ZCDSH.getCode()){
|
|
|
+ List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.CED);
|
|
|
+ admins.forEach(e ->{
|
|
|
+ str.append(e.getName()).append(",");
|
|
|
+ });
|
|
|
+ }else if(t.getApproval()==ApprovalNewState.DSZDSH.getCode()) {
|
|
|
+ List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.APPROVAL_DECISION);
|
|
|
+ admins.forEach(e ->{
|
|
|
+ str.append(e.getName()).append(",");
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if (t.getProcessStatus()==ProcessStatus.YPZXSGLY.getCode()){
|
|
|
+ List<Admin> admins = adminMapper.getAdminRoleTypeList(AFTConstants.TECH_ADMIN);
|
|
|
+ admins.forEach(e ->{
|
|
|
+ str.append(e.getName()).append(",");
|
|
|
+ });
|
|
|
+ }else if (t.getProcessStatus()==ProcessStatus.YPZXSGLY.getCode()){
|
|
|
+ List<Admin> admins = adminMapper.getAdminRoleTypeList(AFTConstants.TECH_ADMIN);
|
|
|
+ admins.forEach(e ->{
|
|
|
+ str.append(e.getName()).append(",");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(str))t.setExamineName(str.substring(0,str.length()-1));
|
|
|
|
|
|
+ }
|
|
|
/**
|
|
|
* 订单分配触发
|
|
|
* @param orderNo
|