wujianwei
2025-12-24 d537057a0bac012bb6909b89586089a01b8d8a9e
service/src/main/java/com/ruoyi/cwgl/controller/ReceivableFeeManagementController.java
@@ -11,6 +11,7 @@
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;
@@ -140,4 +141,28 @@
    {
        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, getUsername());
        return success(message);
    }
    /**
     * 下载导入模板
     */
    @GetMapping("/importTemplate")
    public AjaxResult importTemplate(String exportKey)
    {
        receivableFeeManagementService.importTemplate(exportKey);
        return AjaxResult.success("导出请求成功,请稍后点击下载...!");
    }
}