Browse Source

费用申请添加回退功能

mssql
Yen 3 years ago
parent
commit
e0dc1e0f7d
  1. 9
      src/main/java/com/qs/serve/modules/tbs/controller/TbsCostApplyController.java
  2. 5
      src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java

9
src/main/java/com/qs/serve/modules/tbs/controller/TbsCostApplyController.java

@ -372,6 +372,7 @@ public class TbsCostApplyController {
return R.error("费用申请处于未非审批状态!"); return R.error("费用申请处于未非审批状态!");
} }
R<String> result = seeYonService.commonCommit(affairCommit,TbsSeeYonConst.COST_APPLY_FORM); R<String> result = seeYonService.commonCommit(affairCommit,TbsSeeYonConst.COST_APPLY_FORM);
boolean isBackCommit = affairCommit.getState()==2;
if(result.getStatus()==200){ if(result.getStatus()==200){
// 判断是否含有下个节点 // 判断是否含有下个节点
String flag = result.getData(); String flag = result.getData();
@ -383,12 +384,20 @@ public class TbsCostApplyController {
tbsCostApplyService.updateById(apply); tbsCostApplyService.updateById(apply);
return R.ok(); return R.ok();
}else if ("stop".equals(flag)){ }else if ("stop".equals(flag)){
if(isBackCommit){
TbsCostApply apply = new TbsCostApply();
apply.setId(costApply.getId());
apply.setChargeState(TbsCostApplyState.State_4_refused.getCode());
tbsCostApplyService.updateById(apply);
return R.ok();
}else {
TbsCostApply apply = new TbsCostApply(); TbsCostApply apply = new TbsCostApply();
apply.setId(costApply.getId()); apply.setId(costApply.getId());
apply.setChargeState(TbsCostApplyState.State_5_stop.getCode()); apply.setChargeState(TbsCostApplyState.State_5_stop.getCode());
tbsCostApplyService.updateById(apply); tbsCostApplyService.updateById(apply);
tbsCostApplyService.releaseCost(costApply.getId(), 1); tbsCostApplyService.releaseCost(costApply.getId(), 1);
return R.ok(); return R.ok();
}
}else if ("next".equals(flag)){ }else if ("next".equals(flag)){
return R.ok(); return R.ok();
} }

5
src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostApplyServiceImpl.java

@ -60,7 +60,6 @@ public class TbsCostApplyServiceImpl extends ServiceImpl<TbsCostApplyMapper,TbsC
sysUser.checkSyAccount(); sysUser.checkSyAccount();
//恢复绑定 //恢复绑定
this.releaseCost(tbsCostApply.getId(),0); this.releaseCost(tbsCostApply.getId(),0);
if(tbsCostApply.getChargeState().equals(TbsCostApplyState.State_0_unPublish.getCode())){
Map<String, Object> data = new HashMap<>(10); Map<String, Object> data = new HashMap<>(10);
data.put("empId",sysUser.getCode()); data.put("empId",sysUser.getCode());
data.put("applyTime", DateUtils.format(LocalDateTime.now(), DateFormatString.DATE_TIME)); data.put("applyTime", DateUtils.format(LocalDateTime.now(), DateFormatString.DATE_TIME));
@ -95,10 +94,6 @@ public class TbsCostApplyServiceImpl extends ServiceImpl<TbsCostApplyMapper,TbsC
allBudgetItem.addAll(result.getBudgetMatchList()); allBudgetItem.addAll(result.getBudgetMatchList());
allBudgetItem.addAll(result.getBudgetUnMatchList()); allBudgetItem.addAll(result.getBudgetUnMatchList());
budgetCostItemService.saveBatch(allBudgetItem); budgetCostItemService.saveBatch(allBudgetItem);
}else if (tbsCostApply.getChargeState().equals(TbsCostApplyState.State_4_refused.getCode())){
//todo 驳回重新申请
}
} }
@Override @Override

Loading…
Cancel
Save