| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.common.utils.file.DownloadExportUtil; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | |
| | | return toAjax(receivableFeeManagementService.createReceivableBill(billCreateVo)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 作废应收费用管理记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:receivableFeeManagement:void')") |
| | | @Log(title = "应收费用管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/void/{id}") |
| | | public AjaxResult voidReceivableFee(@PathVariable Integer id) |
| | | { |
| | | return toAjax(receivableFeeManagementService.voidReceivableFeeManagement(id)); |
| | | } |
| | | |
| | | /** |
| | | * 导入应收费用管理数据 |
| | | */ |
| | | @Log(title = "应收费用管理", businessType = BusinessType.IMPORT) |
| | | @PreAuthorize("@ss.hasPermi('cwgl:receivableFeeManagement:import')") |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception |
| | | { |
| | | ExcelUtil<ReceivableFeeManagement> util = new ExcelUtil<ReceivableFeeManagement>(ReceivableFeeManagement.class); |
| | | List<ReceivableFeeManagement> receivableFeeList = util.importExcel(file.getInputStream()); |
| | | String message = receivableFeeManagementService.importReceivableFee(receivableFeeList, updateSupport, getUsername()); |
| | | return success(message); |
| | | } |
| | | |
| | | /** |
| | | * 下载导入模板 |
| | | */ |
| | | @GetMapping("/importTemplate") |
| | | public AjaxResult importTemplate(String exportKey) |
| | | { |
| | | receivableFeeManagementService.importTemplate(exportKey); |
| | | return AjaxResult.success("导出请求成功,请稍后点击下载...!"); |
| | | } |
| | | } |