|
|
@@ -280,7 +280,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
//审核人切换
|
|
|
departmentMapper.updateOrderDepFinanceNotExamine(in.getFinanceId(), useDep.getFinanceId(), useDep.getId());
|
|
|
//查询切换后的订单刷新审核人
|
|
|
- List<String> list = torderNewMapper.selectByFinanceNotExamine(in.getFinanceId());
|
|
|
+ List<String> list = torderNewMapper.selectByFinanceNotExamine(in.getFinanceId(), useDep.getId());
|
|
|
if (!list.isEmpty()){
|
|
|
torderNewMapper.updateOrderDepFinanceExamineName(list,ProcessStatus.YPCW_JSZJ.getCode());
|
|
|
}
|
|
|
@@ -298,7 +298,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
if (in.getTechAdminId()==null||!in.getTechAdminId().equals(useDep.getTechAdminId())){
|
|
|
if(StringUtils.isBlank(in.getTechAdminId())){
|
|
|
//先将旧的查出来
|
|
|
- List<String> list = torderNewMapper.selectByFinanceNotExamine(useDep.getTechAdminId());
|
|
|
+ List<String> list = torderNewMapper.selectByFinanceNotExamine(useDep.getTechAdminId(),useDep.getId());
|
|
|
//再删除旧单需要审核的
|
|
|
torderExamineMapper.deleteExamineFinance(useDep.getId(), useDep.getTechAdminId());
|
|
|
if (!list.isEmpty()){
|
|
|
@@ -312,7 +312,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
//审核人切换
|
|
|
departmentMapper.updateOrderDepFinanceNotExamine(in.getTechAdminId(), useDep.getTechAdminId(), useDep.getId());
|
|
|
//查询切换后的订单刷新审核人
|
|
|
- List<String> list = torderNewMapper.selectByFinanceNotExamine(in.getTechAdminId());
|
|
|
+ List<String> list = torderNewMapper.selectByFinanceNotExamine(in.getTechAdminId(), useDep.getId());
|
|
|
if (!list.isEmpty()){
|
|
|
torderNewMapper.updateOrderDepFinanceExamineName(list,ProcessStatus.YPCW_JSZJ.getCode());
|
|
|
}
|
|
|
@@ -321,7 +321,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
if (!in.getRetrialFinanceId().equals(useDep.getRetrialFinanceId())){
|
|
|
if(StringUtils.isBlank(in.getRetrialFinanceId())) {
|
|
|
//先将旧的查出来
|
|
|
- List<String> list = torderNewMapper.selectByFinanceNotExamine(useDep.getRetrialFinanceId());
|
|
|
+ List<String> list = torderNewMapper.selectByFinanceNotExamine(useDep.getRetrialFinanceId(), useDep.getId());
|
|
|
//再删除旧单需要审核的
|
|
|
torderExamineMapper.deleteExamineFinance(useDep.getId(), useDep.getRetrialFinanceId());
|
|
|
if (!list.isEmpty()) {
|
|
|
@@ -334,7 +334,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
}else {
|
|
|
dep.setRetrialFinanceId(in.getRetrialFinanceId());
|
|
|
departmentMapper.updateOrderDepFinanceNotExamine(in.getRetrialFinanceId(), useDep.getRetrialFinanceId(), useDep.getId());
|
|
|
- List<String> list = torderNewMapper.selectByFinanceNotExamine(in.getRetrialFinanceId());
|
|
|
+ List<String> list = torderNewMapper.selectByFinanceNotExamine(in.getRetrialFinanceId(), useDep.getId());
|
|
|
if (!list.isEmpty()){
|
|
|
torderNewMapper.updateOrderDepFinanceExamineName(list,ProcessStatus.YPCW_JSZJ.getCode());
|
|
|
}
|
|
|
@@ -401,6 +401,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
TOrderNewBo order = torderNewMapper.getSaleIdByOno(s);
|
|
|
TOrderNew newOrder = new TOrderNew();
|
|
|
newOrder.setOrderNo(s);
|
|
|
+
|
|
|
//如果订单是特批
|
|
|
if (tOrderNew.getApproval() == ApprovalNewState.TPDSH.getCode() || tOrderNew.getApproval() == ApprovalNewState.TPBH.getCode()) {
|
|
|
if (StringUtils.isNotEmpty(in.getOperationGuaranteeId())) {
|
|
|
@@ -412,12 +413,17 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
addOrderLog(s,OrderLogProcess.TP.getCode(),"部门特批审核未设置,系统自动通过");
|
|
|
newOrder.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
|
|
|
newOrder.setApproval(ApprovalNewState.TPTG.getCode());
|
|
|
+ pushJSZJidAndName(aids, str);
|
|
|
} else {
|
|
|
addOrderLog(s,OrderLogProcess.YYBZSHTG.getCode(),"运营保障审核人未设置,系统自动通过");
|
|
|
newOrder.setProcessStatus(ProcessStatus.YPTPSH.getCode());
|
|
|
aids.add(order.getApprovalAid());
|
|
|
str.append(order.getApprovalName()).append(",");
|
|
|
}
|
|
|
+ }else {
|
|
|
+ newOrder.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
|
|
|
+ newOrder.setApproval(ApprovalNewState.TPTG.getCode());
|
|
|
+ pushJSZJidAndName(aids, str);
|
|
|
}
|
|
|
newOrder.setExamineName(str.substring(0,str.length()-1));
|
|
|
torderNewMapper.updateByPrimaryKeySelective(newOrder);
|
|
|
@@ -425,6 +431,14 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private void pushJSZJidAndName(List<String> aids, StringBuilder str) {
|
|
|
+ List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.TECH_ADMIN);
|
|
|
+ for (Admin admin : admins) {
|
|
|
+ aids.add(admin.getId());
|
|
|
+ str.append(admin.getName()).append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 添加审核人 财务专员,财务复审,技术总监审核
|
|
|
* @param useDep 部门
|