| | |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | LambdaQueryWrapper<Contract> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.like(StringUtils.isNotBlank(contract.getContractName()),Contract::getContractName,contract.getContractName()); |
| | | wrapper.like(StringUtils.isNotBlank(contract.getPartyA()),Contract::getPartyA,contract.getPartyA()); |
| | | wrapper.eq(ObjUtil.isNotNull(contract.getContractStatus()),Contract::getContractStatus,contract.getContractStatus()); |
| | | wrapper.orderByDesc(BaseModel::getCreateTime); |
| | | return R.ok(contractService.pageByScope(page, wrapper)); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过id合同生效 |
| | | * 启动审核流程 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id合同生效" , description = "通过id合同生效" ) |
| | | @GetMapping("/takeEffect/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('business_contract_effect')" ) |
| | | public R takeEffect(@PathVariable("id" ) Long id) { |
| | | return R.ok(contractService.takeEffect(id)); |
| | | @Operation(summary = "通过id启动审核流程" , description = "通过id合同生效" ) |
| | | @GetMapping("/startApproval/{id}" ) |
| | | public R startApproval(@PathVariable("id" ) Long id) { |
| | | return contractService.startApproval(id); |
| | | } |
| | | |
| | | |
| | |
| | | public R genCurrentOverdue() { |
| | | return contractService.genCurrentOverdue(); |
| | | } |
| | | |
| | | |
| | | } |