| | |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private TCheckAcceptRecordService checkAcceptRecordService; |
| | | @ApiOperation(value = "获取合同分页列表") |
| | | @PostMapping(value = "/contractList") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:list')") |
| | | |
| | | public R<PageInfo<TContract>> contractList(@RequestBody TContractQuery query) { |
| | | return R.ok(contractService.contractList(query)); |
| | | } |
| | | @Log(title = "合同管理-新增合同", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增合同") |
| | | @PostMapping(value = "/addContract") |
| | | @PreAuthorize("@ss.hasPermi('system:contract:add')") |
| | | public R<Boolean> addContract(@Validated @RequestBody TContractDTO dto) { |
| | | contractService.save(dto); |
| | | if (dto.getIsIncreasing()){ |
| | |
| | | tContractRentType.setIncreasingDecreasingType(dto.getIncreasingDecreasingType()); |
| | | tContractRentType.setNumericalValue(dto.getNumericalValue()); |
| | | tContractRentType.setChangeTime(dto.getChangeTime()); |
| | | tContractRentType.setCycleTime(dto.getCycleTime()); |
| | | contractRentTypeService.save(tContractRentType); |
| | | } |
| | | return R.ok(); |
| | |
| | | tContractRentType.setIncreasingDecreasingType(dto.getIncreasingDecreasingType()); |
| | | tContractRentType.setNumericalValue(dto.getNumericalValue()); |
| | | tContractRentType.setChangeTime(dto.getChangeTime()); |
| | | tContractRentType.setCycleTime(dto.getCycleTime()); |
| | | contractRentTypeService.save(tContractRentType); |
| | | } |
| | | return R.ok(); |