From 6305d0c86c23e9a583e8ca798645885d167f4dc5 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 10 六月 2026 17:20:58 +0800
Subject: [PATCH] feat:1.销售台账导出按照查询条件 2.导出订单和产品明细
---
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java | 94 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java b/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
index 807aeaf..f74c85c 100644
--- a/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
+++ b/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -161,6 +161,16 @@
}
/**
+ * 瀵煎嚭閿�鍞彴璐﹀垪琛紙鍖呭惈浜у搧鏄庣粏锛屼袱涓猻heet椤碉級
+ */
+ @Log(title = "閿�鍞彴璐�", businessType = BusinessType.EXPORT)
+ @PostMapping("/exportWithProducts")
+ @ApiOperation("瀵煎嚭閿�鍞彴璐﹀強浜у搧鏄庣粏锛堜袱涓猻heet椤碉級")
+ public void exportWithProducts(HttpServletResponse response, SalesLedgerDto salesLedgerDto) {
+ salesLedgerService.exportWithProducts(response, salesLedgerDto);
+ }
+
+ /**
* 瀵煎嚭寮�绁ㄧ櫥璁板垪琛�
*/
@Log(title = "瀵煎嚭寮�绁ㄧ櫥璁板垪琛�", businessType = BusinessType.EXPORT)
@@ -190,6 +200,55 @@
@ApiOperation("閿�鍞鍗曠粦瀹氬伐鑹鸿矾绾�")
public AjaxResult saleProcessBind(@RequestBody SalesLedgerProcessRoute salesLedgerProcessRoute) {
salesLedgerService.saleProcessBind(salesLedgerProcessRoute);
+ return AjaxResult.success();
+ }
+
+ /**
+ * 鍙嶅鏍告搷浣�
+ */
+ @Log(title = "閿�鍞彴璐﹀弽瀹℃牳", businessType = BusinessType.UPDATE)
+ @PostMapping("/counterReview")
+ @ApiOperation("鍙嶅鏍告搷浣滐細浣滃簾鎴栭噸鏂扮敓鎴�")
+ public AjaxResult counterReview(@RequestBody CounterReviewDto dto) {
+ List<Long> newLedgerIds = salesLedgerService.counterReview(dto);
+ AjaxResult result = AjaxResult.success("鍙嶅鏍告垚鍔�");
+ if (newLedgerIds != null && !newLedgerIds.isEmpty()) {
+ result.put("newLedgerIds", newLedgerIds);
+ }
+ return result;
+ }
+
+ /**
+ * 鏍囪璁㈠崟瀹屾垚
+ */
+ @Log(title = "閿�鍞彴璐︽爣璁板畬鎴�", businessType = BusinessType.UPDATE)
+ @PostMapping("/markOrderCompleted")
+ @ApiOperation("鏍囪璁㈠崟瀹屾垚锛堜笉鍙挙閿�锛�")
+ public AjaxResult markOrderCompleted(@RequestBody Map<String, Object> params) {
+ @SuppressWarnings("unchecked")
+ List<Long> ids = (List<Long>) params.get("ids");
+ if (ids == null || ids.isEmpty()) {
+ return AjaxResult.error("璇烽�夋嫨瑕佹爣璁板畬鎴愮殑璁㈠崟");
+ }
+ salesLedgerService.markOrderCompleted(ids);
+ return AjaxResult.success("鏍囪瀹屾垚鎴愬姛");
+ }
+
+ /**
+ * 閫掑鎵撳嵃娆℃暟
+ */
+ @PostMapping("/incrementPrintCount")
+ @ApiOperation("閫掑鎵撳嵃娆℃暟")
+ public AjaxResult incrementPrintCount(@RequestBody Map<String, Object> params) {
+ Long id = params.get("id") != null ? Long.valueOf(params.get("id").toString()) : null;
+ String printType = (String) params.get("printType");
+ if (id == null) {
+ return AjaxResult.error("閿�鍞彴璐D涓嶈兘涓虹┖");
+ }
+ if (printType == null || (!"label".equals(printType) && !"document".equals(printType))) {
+ return AjaxResult.error("鎵撳嵃绫诲瀷蹇呴』涓� label 鎴� document");
+ }
+ salesLedgerService.incrementPrintCount(id, printType);
return AjaxResult.success();
}
@@ -342,6 +401,13 @@
return AjaxResult.success();
}
+ @PostMapping("/scanShipApply")
+ @ApiOperation("閿�鍞鍗曟壂鐮�-鍙戣捣鍙戣揣瀹℃壒锛堝~鍐欒溅鐗�/蹇�掋�佸鎵逛汉銆侀檮浠讹紱閫氳繃鍚庤嚜鍔ㄦ墸搴撳瓨骞舵爣璁板凡鍙戣揣锛�")
+ public AjaxResult scanShipApply(@RequestBody SalesScanShipDto dto) {
+ salesLedgerService.scanShipApply(dto);
+ return AjaxResult.success("鍙戣揣瀹℃壒宸插彂璧�");
+ }
+
@PostMapping("/scanOutboundUnqualified")
@ApiOperation("閿�鍞鍗曟壂鐮�-涓嶅悎鏍煎嚭搴�")
public AjaxResult scanOutboundUnqualified(@RequestBody SalesScanInboundDto dto) {
@@ -349,4 +415,32 @@
return AjaxResult.success();
}
+ @PostMapping("/salesHistory/shippingImport")
+ @ApiOperation("閿�鍞彂璐у巻鍙叉暟鎹鍏�-宸插彂璐�")
+ public AjaxResult shippingImport(MultipartFile file) {
+ salesLedgerService.shippingImport(file);
+ return AjaxResult.success();
+ }
+
+ @PostMapping("/salesHistory/notShippingImport")
+ @ApiOperation("閿�鍞彂璐у巻鍙叉暟鎹鍏�-鏈彂璐�")
+ public AjaxResult notShippingImport(MultipartFile file) {
+ salesLedgerService.notShippingImport(file);
+ return AjaxResult.success();
+ }
+
+ @PostMapping("/salesHistory/shippingImportTemplate")
+ @ApiOperation("閿�鍞彂璐у巻鍙叉暟鎹鍏�-宸插彂璐у鍏ユā鏉夸笅杞�")
+ public void shippingImportTemplate(HttpServletResponse response) {
+ ExcelUtil<SalesShippingImportDto> excelUtil = new ExcelUtil<>(SalesShippingImportDto.class);
+ excelUtil.importTemplateExcel(response, "宸插嚭搴撳鍏ユā鏉夸笅杞�");
+ }
+
+ @PostMapping("/salesHistory/notShippingImportTemplate")
+ @ApiOperation("閿�鍞彂璐у巻鍙叉暟鎹鍏�-鏈彂璐у鍏ユā鏉夸笅杞�")
+ public void notShippingImportTemplate(HttpServletResponse response) {
+ ExcelUtil<SalesNotShippingImportDto> excelUtil = new ExcelUtil<>(SalesNotShippingImportDto.class);
+ excelUtil.importTemplateExcel(response, "鏈嚭搴撳鍏ユā鏉夸笅杞�");
+ }
+
}
--
Gitblit v1.9.3