|
|
@ -14,6 +14,7 @@ import com.qs.serve.modules.tbs.entity.vo.CtpAffairVo; |
|
|
|
import com.qs.serve.modules.tbs.service.TbsBudgetChangeService; |
|
|
|
import com.qs.serve.modules.tbs.service.TbsBudgetService; |
|
|
|
import com.qs.serve.modules.tbs.service.impl.TbsBudgetApplyOperationServiceImpl; |
|
|
|
import com.qs.serve.modules.tbs.service.impl.TbsBudgetBatchOperationServiceImpl; |
|
|
|
import com.qs.serve.modules.tbs.service.impl.TbsBudgetChangeOperationServiceImpl; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -38,27 +39,49 @@ public class TbsBudgetCheckController { |
|
|
|
private final TbsBudgetChangeService tbsBudgetChangeService; |
|
|
|
private final TbsBudgetApplyOperationServiceImpl tbsBudgetApplyOperationService; |
|
|
|
private final TbsBudgetChangeOperationServiceImpl tbsBudgetChangeOperationService; |
|
|
|
private final TbsBudgetBatchOperationServiceImpl tbsBudgetBatchOperationService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 提交申请 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("commitApply/{id}") |
|
|
|
public R<?> commitApply(@PathVariable("id") Long id){ |
|
|
|
@PostMapping("commitApply/{budgetId}") |
|
|
|
public R<?> commitApply(@PathVariable("budgetId") Long id){ |
|
|
|
tbsBudgetService.commitApply(id); |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("runApplyCompensate/{id}") |
|
|
|
public R<?> runCompensate(@PathVariable("id") Long id){ |
|
|
|
tbsBudgetApplyOperationService.runCompensate(id+""); |
|
|
|
/** |
|
|
|
* 补偿申请单子 |
|
|
|
* @param budgetId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("runApplyCompensate/{budgetId}") |
|
|
|
public R<?> runCompensate(@PathVariable("budgetId") Long budgetId){ |
|
|
|
TbsBudget budget = tbsBudgetService.getById(budgetId); |
|
|
|
if(budget.getBatchApplyId()!=null){ |
|
|
|
tbsBudgetBatchOperationService.runCompensate(budget.getBatchApplyId()+""); |
|
|
|
}else { |
|
|
|
tbsBudgetApplyOperationService.runCompensate(budgetId+""); |
|
|
|
} |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("runChangeCompensate/{id}") |
|
|
|
public R<?> runChangeCompensate(@PathVariable("id") Long id){ |
|
|
|
tbsBudgetChangeOperationService.runCompensate(id+""); |
|
|
|
/** |
|
|
|
* 补偿修改单子 |
|
|
|
* @param changeId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("runChangeCompensate/{changeId}") |
|
|
|
public R<?> runChangeCompensate(@PathVariable("changeId") Long changeId){ |
|
|
|
TbsBudgetChange change = tbsBudgetChangeService.getById(changeId); |
|
|
|
//如果时批量的申请,调用批量补偿
|
|
|
|
if(change.getBatchApplyId()!=null){ |
|
|
|
tbsBudgetBatchOperationService.runCompensate(change.getBatchApplyId()+""); |
|
|
|
}else { |
|
|
|
tbsBudgetChangeOperationService.runCompensate(changeId+""); |
|
|
|
} |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
|
|
|
|