|
|
@@ -269,6 +269,56 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
if(StringUtils.isBlank(in.getRetrialFinanceId()))in.setRetrialFinanceId(null);
|
|
|
departmentMapper.updateNull(in);
|
|
|
}
|
|
|
+ //处理去掉咨询师管理员
|
|
|
+ if (in.getTechAdminId()==null||!in.getTechAdminId().equals(useDep.getTechAdminId())){
|
|
|
+ if(StringUtils.isBlank(in.getTechAdminId())){
|
|
|
+ //先将旧的查出来
|
|
|
+ List<String> list = torderNewMapper.selectByFinanceNotExamine(useDep.getTechAdminId());
|
|
|
+ //再删除旧单需要审核的
|
|
|
+ torderExamineMapper.deleteExamineFinance(useDep.getTechAdminId());
|
|
|
+ if (!list.isEmpty()){
|
|
|
+ //先把药推送到下个流程的查出来
|
|
|
+ for (String s : list) {
|
|
|
+ List<TOrderExamine> tOrderExamines = torderExamineMapper.selectByOrderNo(s, 0);
|
|
|
+ int i = 0;
|
|
|
+ for (TOrderExamine e : tOrderExamines) {
|
|
|
+ if (e.getStatus() == 1) i++;
|
|
|
+ }
|
|
|
+ if (i == tOrderExamines.size()) {
|
|
|
+ //推送订单流程
|
|
|
+ addOrderLog(s,OrderLogProcess.XMZJSH.getCode(),"订单修改技术总监,判定审核通过");
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
+ TOrderNew tOrderNew = torderNewMapper.selectByPrimaryKey(s);
|
|
|
+ TOrderNewBo order = torderNewMapper.getSaleIdByOno(s);
|
|
|
+ TOrderNew newOrder = new TOrderNew();
|
|
|
+ //如果订单是特批
|
|
|
+ if (tOrderNew.getApproval() == ApprovalNewState.TPDSH.getCode() || tOrderNew.getApproval() == ApprovalNewState.TPBH.getCode()) {
|
|
|
+ if (StringUtils.isNotEmpty(in.getOperationGuaranteeId())) {
|
|
|
+ newOrder.setProcessStatus(ProcessStatus.YYBZSH.getCode());
|
|
|
+ str.append(order.getOperationGuaranteeName()).append(",");
|
|
|
+ aids.add(order.getOperationGuaranteeId());
|
|
|
+ } else if (order.getApprovalStatus() == 0) {
|
|
|
+ newOrder.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
|
|
|
+ newOrder.setApproval(ApprovalNewState.TPTG.getCode());
|
|
|
+ addOrderLog(s,OrderLogProcess.TP.getCode(),"部门特批审核人未设置,系统自动通过");
|
|
|
+ } else {
|
|
|
+ newOrder.setProcessStatus(ProcessStatus.YPTPSH.getCode());
|
|
|
+ aids.add(order.getApprovalAid());
|
|
|
+ str.append(order.getApprovalName()).append(",");
|
|
|
+ addOrderLog(s,OrderLogProcess.YYBZSHTG.getCode(),"运营保障审核人未设置,系统自动通过");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ newOrder.setExamineName(str.substring(0,str.length()-1));
|
|
|
+ torderNewMapper.updateByPrimaryKeySelective(newOrder);
|
|
|
+ }
|
|
|
+ torderNewMapper.updateOrderDepFinanceExamineName(list);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (!in.getRetrialFinanceId().equals(useDep.getRetrialFinanceId())){
|
|
|
if(StringUtils.isBlank(in.getRetrialFinanceId())) {
|
|
|
//先将旧的查出来
|
|
|
@@ -285,7 +335,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
}
|
|
|
if (i == tOrderExamines.size()) {
|
|
|
//推送订单流程
|
|
|
- addOrderLog(s,OrderLogProcess.TP.getCode(),"订单修改财务复审,判定审核通过");
|
|
|
+ addOrderLog(s,OrderLogProcess.CWFS.getCode(),"订单修改财务复审,判定审核通过");
|
|
|
StringBuilder str = new StringBuilder();
|
|
|
TOrderNew tOrderNew = torderNewMapper.selectByPrimaryKey(s);
|
|
|
TOrderNewBo order = torderNewMapper.getSaleIdByOno(s);
|
|
|
@@ -304,7 +354,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
|
|
|
newOrder.setProcessStatus(ProcessStatus.YPTPSH.getCode());
|
|
|
aids.add(order.getApprovalAid());
|
|
|
str.append(order.getApprovalName()).append(",");
|
|
|
- addOrderLog(s,OrderLogProcess.TP.getCode(),"运营保障审核人未设置,系统自动通过");
|
|
|
+ addOrderLog(s,OrderLogProcess.YYBZSHTG.getCode(),"运营保障审核人未设置,系统自动通过");
|
|
|
}
|
|
|
}
|
|
|
newOrder.setExamineName(str.substring(0,str.length()-1));
|