| | |
| | | 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()){ |
| | |
| | | String url = wordUtil.generatePdf("/templates", "1_yzj_租赁合同.xml", templateParam, "租赁合同", "E:\\"); |
| | | return R.ok(url); |
| | | } |
| | | @ApiOperation(value = "导出") |
| | | @PostMapping("/export") |
| | | public void export(@RequestBody TContractQuery query){ |
| | | contractService.export(query); |
| | | } |
| | | |
| | | /** |
| | | * 光缆巡检列表导出 |
| | | */ |
| | | @ApiOperation(value = "光缆巡检列表导出") |
| | | @Log(title = "现场作业-光缆巡检列表导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportOpticalInspection") |
| | | @ApiOperation(value = "导出") |
| | | @Log(title = "导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void exportOpticalInspection(@RequestBody TContractQuery query) |
| | | { |
| | | List<ContractExport> contractExports = new ArrayList<>(); |