| | |
| | | @GetMapping("/{id}" ) |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_view')" ) |
| | | public R getById(@PathVariable("id" ) Long id) { |
| | | return R.ok(contractService.getById(id)); |
| | | return R.ok(contractService.getDetailById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_add')" ) |
| | | public R save(@RequestBody Contract contract) { |
| | | contract.setNumber(maxSizeService.nextNo(MaxSizeContant.CONTRACT_NUM)); |
| | | return R.ok(contractService.save(contract)); |
| | | return R.ok(contractService.saveDeep(contract)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PutMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_edit')" ) |
| | | public R updateById(@RequestBody Contract contract) { |
| | | return R.ok(contractService.updateById(contract)); |
| | | return R.ok(contractService.updateDeep(contract)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @DeleteMapping |
| | | @PreAuthorize("@pms.hasPermission('platformx_contract_del')" ) |
| | | public R removeById(@RequestBody Long[] ids) { |
| | | return R.ok(contractService.removeBatchByIds(CollUtil.toList(ids))); |
| | | return R.ok(contractService.removeDeep(ids)); |
| | | } |
| | | |
| | | |