| | |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | return R.ok(contractService.detail(id)); |
| | | } |
| | | |
| | | /** |
| | | /** |
| | | * 通过id手动推送合同中心 |
| | | * @param id id |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "通过id手动推送合同中心" , description = "通过id手动推送合同中心" ) |
| | | @GetMapping("/pushCenter/{id}" ) |
| | | public R pushCenter(@PathVariable("id" ) Long id) { |
| | | return contractService.pushCenter(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增合同管理 |
| | | * @param addDTO 合同管理 |
| | | * @return R |
| | |
| | | public R save(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.add(addDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增简易合同 |
| | | * @param addDTO 合同管理 |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "新增简易合同" , description = "新增简易合同" ) |
| | | @SysLog("新增简易合同" ) |
| | | @PostMapping("/addSimple") |
| | | public R addSimple(@RequestBody ContractAddDTO addDTO) { |
| | | return contractService.addSimple(addDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改合同管理 |
| | |
| | | public R fourAssociation(@ParameterObject Page page,@ParameterObject ContractQueryDTO queryDTO) { |
| | | return R.ok(contractService.fourAssociation(page,queryDTO)); |
| | | } |
| | | |
| | | @PostMapping("/importContractMultiSheet") |
| | | public R importContractMultiSheet(@RequestParam("file") MultipartFile file) { |
| | | if (file.isEmpty()) { |
| | | return R.failed("文件不能为空"); |
| | | } |
| | | return contractService.importContractMultiSheet(file); |
| | | } |
| | | } |