应付配置文件导入保存该文件

This commit is contained in:
liuminghui
2026-11-05 10:31:02 +08:00
parent 51a89b18e1
commit 116b3b74e4
21 changed files with 557 additions and 31 deletions
@@ -21,6 +21,7 @@ import com.bms.common.core.domain.AjaxResult;
import com.bms.common.core.page.TableDataInfo;
import com.bms.common.enums.BusinessType;
import com.bms.common.exception.ServiceException;
import com.bms.common.utils.file.FileUtils;
import com.bms.common.utils.poi.ExcelUtil;
import com.bms.price.domain.ChannelProductMap;
import com.bms.price.domain.PayProduct;
@@ -86,6 +87,18 @@ public class PayProductController extends BaseController
return success(payOrderCostService.generate(billId));
}
/** 下载某一版导入时上传的源文件 */
@PreAuthorize("@ss.hasPermi('price:pay:query')")
@PostMapping("/{productId}/source")
public void downloadSource(@PathVariable Long productId, HttpServletResponse response) throws Exception
{
String filename = payProductService.sourceFileName(productId);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
FileUtils.setAttachmentResponseHeader(response, filename);
payProductService.writeSource(productId, response.getOutputStream());
}
@PreAuthorize("@ss.hasPermi('price:pay:query')")
@GetMapping("/{productId}")
public AjaxResult getInfo(@PathVariable Long productId)