From 7be9b534dcd5cbdb8c24c908d1a738aeec6f52a9 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 04 十月 2024 16:18:35 +0800
Subject: [PATCH] 添加工程打印明细
---
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
index b8a688e..1aee90c 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
@@ -4,6 +4,9 @@
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
+import com.example.erp.dto.mm.FinishedOperateLogDTO;
+import com.example.erp.dto.sd.DeliveryDetailDTO;
+import com.example.erp.dto.sd.DeliveryDetailProductDTO;
import com.example.erp.entity.mm.FinishedGoodsInventory;
import com.example.erp.entity.sd.Delivery;
import com.example.erp.entity.sd.DeliveryDetail;
@@ -11,17 +14,21 @@
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.sd.DeliveryService;
+import com.example.erp.tools.DownExcel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.time.LocalDate;
import java.util.List;
import java.util.Map;
@RestController
@Api(value="鍙戣揣controller",tags={"鍙戣揣鎿嶄綔鎺ュ彛"})
-@RequestMapping("/Delivery")
+@RequestMapping("/delivery")
public class DeliveryController {
@Autowired
DeliveryService deliveryService;
@@ -97,10 +104,38 @@
@ApiOperation("鍙戣揣璁㈠崟鏌ヨ鎺ュ彛")
@SaCheckPermission("selectDelivery.search")
@PostMapping("/getSelectDeliveryPrinting")
- public Result getSelectDeliveryPrinting( @RequestBody DeliveryDetail deliveryDetail){
+ public Result getSelectDeliveryPrinting( @RequestBody DeliveryDetail deliveryDetail) throws IllegalAccessException {
return Result.seccess(deliveryService.getSelectDeliveryPrinting(deliveryDetail));
}
+ @ApiOperation("璁㈠崟鍙戣揣璁㈠崟鏌ヨ鎺ュ彛")
+ @SaCheckPermission("selectDelivery.search")
+ @PostMapping("/getSelectOrderPrinting/{selectedValues}")
+ public Result getSelectOrderPrinting(@PathVariable List<String> selectedValues, @RequestBody OrderDetail orderDetail){
+ return Result.seccess(deliveryService.getSelectOrderPrinting(orderDetail,selectedValues));
+ }
+
+ @ApiOperation("鍙戣揣鏄庣粏鎶ヨ〃")
+ @PostMapping("/exportDeliveryDetailReport")
+ public void exportDeliveryDetailReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, DeliveryDetailDTO.class, deliveryService.exportDeliveryDetailReport(dates),"orderReport");
+ }
+
+ @ApiOperation("鍙戣揣鏄庣粏浜у搧鍒嗙被鎶ヨ〃")
+ @PostMapping("/exportDeliveryDetailProductReport")
+ public void exportDeliveryDetailProductReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, DeliveryDetailProductDTO.class, deliveryService.exportDeliveryDetailProductReport(dates),"orderReport");
+ }
+
+ @ApiOperation("鍙戣揣鍗曟墦鍗拌鏁�")
+ @PostMapping ("/updateDeliveryPrintNumber/{deliveryId}")
+ public Result updateDeliveryPrintNumber(@PathVariable String deliveryId) {
+
+ return Result.seccess(deliveryService.updateDeliveryPrintNumber(deliveryId));
+ }
+
--
Gitblit v1.8.0