应付配置文件导入保存该文件
This commit is contained in:
+13
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user