|
@ -1,6 +1,7 @@ |
|
|
package com.qs.serve.modules.tbs.controller; |
|
|
package com.qs.serve.modules.tbs.controller; |
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
import com.qs.serve.common.model.annotation.LimitSubmit; |
|
|
import com.qs.serve.common.model.annotation.SysLog; |
|
|
import com.qs.serve.common.model.annotation.SysLog; |
|
|
import com.qs.serve.common.model.dto.PageVo; |
|
|
import com.qs.serve.common.model.dto.PageVo; |
|
|
import com.qs.serve.common.model.dto.R; |
|
|
import com.qs.serve.common.model.dto.R; |
|
@ -9,6 +10,11 @@ import com.qs.serve.common.model.enums.SystemModule; |
|
|
import com.qs.serve.common.util.PageUtil; |
|
|
import com.qs.serve.common.util.PageUtil; |
|
|
import com.qs.serve.common.util.CopierUtil; |
|
|
import com.qs.serve.common.util.CopierUtil; |
|
|
import com.qs.serve.common.util.StringUtils; |
|
|
import com.qs.serve.common.util.StringUtils; |
|
|
|
|
|
import com.qs.serve.modules.seeyon.entity.bo.CtpAddNodeParam; |
|
|
|
|
|
import com.qs.serve.modules.tbs.entity.bo.TbsAffairCommitBo; |
|
|
|
|
|
import com.qs.serve.modules.tbs.entity.bo.TbsBudgetBatchBo; |
|
|
|
|
|
import com.qs.serve.modules.tbs.entity.vo.CtpAffairVo; |
|
|
|
|
|
import com.qs.serve.modules.tbs.service.impl.TbsBudgetBatchOperationServiceImpl; |
|
|
import lombok.AllArgsConstructor; |
|
|
import lombok.AllArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
@ -32,18 +38,19 @@ import java.util.List; |
|
|
public class TbsBudgetBatchController { |
|
|
public class TbsBudgetBatchController { |
|
|
|
|
|
|
|
|
private TbsBudgetBatchService tbsBudgetBatchService; |
|
|
private TbsBudgetBatchService tbsBudgetBatchService; |
|
|
|
|
|
private TbsBudgetBatchOperationServiceImpl budgetBatchOperationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 列表 |
|
|
* 提交审批-预算批量申请 |
|
|
* @param param |
|
|
* @param param |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
//@GetMapping("/list")
|
|
|
@PostMapping("/commit") |
|
|
//@PreAuthorize("hasRole('tbs:budgetBatch:query')")
|
|
|
@SysLog(module = SystemModule.Budget, title = "批量申请", biz = BizType.INSERT) |
|
|
public R<List<TbsBudgetBatch>> getList(TbsBudgetBatch param){ |
|
|
public R<?> commit(@RequestBody @Valid TbsBudgetBatchBo param){ |
|
|
LambdaQueryWrapper<TbsBudgetBatch> lqw = new LambdaQueryWrapper<>(param); |
|
|
Object result = tbsBudgetBatchService.commit(param); |
|
|
List<TbsBudgetBatch> list = tbsBudgetBatchService.list(lqw); |
|
|
return R.ok(result); |
|
|
return R.ok(list); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -51,8 +58,7 @@ public class TbsBudgetBatchController { |
|
|
* @param param |
|
|
* @param param |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
//@GetMapping("/page")
|
|
|
@GetMapping("/page") |
|
|
//@PreAuthorize("hasRole('tbs:budgetBatch:query')")
|
|
|
|
|
|
public R<PageVo<TbsBudgetBatch>> getPage(TbsBudgetBatch param){ |
|
|
public R<PageVo<TbsBudgetBatch>> getPage(TbsBudgetBatch param){ |
|
|
LambdaQueryWrapper<TbsBudgetBatch> lqw = new LambdaQueryWrapper<>(param); |
|
|
LambdaQueryWrapper<TbsBudgetBatch> lqw = new LambdaQueryWrapper<>(param); |
|
|
PageUtil.startPage(); |
|
|
PageUtil.startPage(); |
|
@ -75,16 +81,46 @@ public class TbsBudgetBatchController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 新增 |
|
|
* 审批结果-预算批量申请 |
|
|
* @param param |
|
|
* @param batchId |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("/commit") |
|
|
@GetMapping("/ListAffairs") |
|
|
@SysLog(module = SystemModule.Budget, title = "批量申请", biz = BizType.INSERT) |
|
|
public R<List<CtpAffairVo>> ListBudgetAffairs(String batchId){ |
|
|
public R<?> commit(@RequestBody @Valid TbsBudgetBatch param){ |
|
|
return budgetBatchOperationService.pageAffair(batchId); |
|
|
TbsBudgetBatch entity = CopierUtil.copy(param,new TbsBudgetBatch()); |
|
|
} |
|
|
boolean result = tbsBudgetBatchService.save(entity); |
|
|
|
|
|
return R.isTrue(result); |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 提交审批节点-预算批量申请 |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@LimitSubmit |
|
|
|
|
|
@PostMapping("/commitAffair") |
|
|
|
|
|
@SysLog(module = SystemModule.Budget, title = "预算申请", biz = BizType.OTHER) |
|
|
|
|
|
public R<?> commitAffair(@RequestBody @Valid TbsAffairCommitBo affairCommit){ |
|
|
|
|
|
return budgetBatchOperationService.commitAffair(affairCommit); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 加签-预算批量申请 |
|
|
|
|
|
* @param param |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@LimitSubmit |
|
|
|
|
|
@PostMapping("/addNode") |
|
|
|
|
|
@SysLog(module = SystemModule.Budget, title = "费用申请", biz = BizType.OTHER) |
|
|
|
|
|
public R<String> addNode(@RequestBody CtpAddNodeParam param){ |
|
|
|
|
|
return budgetBatchOperationService.addNode(param); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 个人未完成审批统计-预算批量申请 |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("/getUnfinished") |
|
|
|
|
|
public R<Long> getUnfinished(){ |
|
|
|
|
|
return budgetBatchOperationService.getUnfinished(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|