| | |
| | | wrapper.eq(contract.getType()!=null,Contract::getType,contract.getType()); |
| | | wrapper.like(StringUtils.isNotEmpty(contract.getName()),Contract::getName,contract.getName()); |
| | | wrapper.like(StringUtils.isNotEmpty(contract.getNumber()),Contract::getNumber,contract.getNumber()); |
| | | wrapper.orderByDesc(Contract::getCreateTime); |
| | | return R.ok(contractService.page(page, wrapper)); |
| | | } |
| | | |
| | |
| | | public List<Contract> export(Contract contract,Long[] ids) { |
| | | return contractService.list(Wrappers.lambdaQuery(contract).in(ArrayUtil.isNotEmpty(ids), Contract::getId, ids)); |
| | | } |
| | | |
| | | /** |
| | | * 审批通过合同 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @SysLog("审批通过合同" ) |
| | | @Operation(summary = "审批通过合同" , description = "审批通过合同" ) |
| | | @GetMapping("/approved/{id}" ) |
| | | public R approved(@PathVariable("id" ) Long id) { |
| | | return R.ok(contractService.approved(id)); |
| | | } |
| | | |
| | | /** |
| | | * 获取审批通过合同的下拉列表 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "获取审批通过合同的下拉列表" , description = "获取审批通过合同的下拉列表" ) |
| | | @GetMapping("/getApprovedContractList" ) |
| | | public R getApprovedContractList() { |
| | | return R.ok(contractService.getApprovedContractList()); |
| | | } |
| | | |
| | | /** |
| | | * 合同申请作废 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @SysLog("合同申请作废" ) |
| | | @Operation(summary = "合同申请作废" , description = "合同申请作废" ) |
| | | @GetMapping("/approvelInvalid/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_zfsq')") |
| | | public R approvelInvalid(@PathVariable("id" ) Long id) { |
| | | return contractService.approvelInvalid(id); |
| | | } |
| | | |
| | | /** |
| | | * 合同申请作废 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @SysLog("合同作废" ) |
| | | @Operation(summary = "合同作废" , description = "合同作废" ) |
| | | @GetMapping("/invalidById/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_zf')") |
| | | public R invalidById(@PathVariable("id" ) Long id) { |
| | | return contractService.invalidById(id); |
| | | } |
| | | } |