From 165f8c5113c4f748d608aa1c215054ae54c8ba8b Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期一, 05 一月 2026 14:31:03 +0800
Subject: [PATCH] yys 批量报工
---
src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java | 11 ++++++++---
src/main/resources/application-dev.yml | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java b/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
index 4051ecf..89a170e 100644
--- a/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
+++ b/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
@@ -14,10 +14,12 @@
import com.ruoyi.production.pojo.SalesLedgerWork;
import com.ruoyi.production.service.SalesLedgerWorkService;
import com.ruoyi.production.service.impl.SalesLedgerWorkServiceImpl;
+import io.jsonwebtoken.lang.Collections;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -74,9 +76,12 @@
@Log(title = "鐢熶骇绠$悊-鐢熶骇鎶ュ伐", businessType = BusinessType.INSERT)
@ApiOperation("鐢熶骇绠$悊-鐢熶骇鎶ュ伐")
@Transactional(rollbackFor = Exception.class)
- public AjaxResult productionReport(@RequestBody ProductionReportDto productionReportDto) {
- int result = salesLedgerWorkService.productionReport(productionReportDto);
- return AjaxResult.success(result);
+ public AjaxResult productionReport(@RequestBody List<ProductionReportDto> productionReportDto) {
+ if(CollectionUtils.isEmpty(productionReportDto)) return AjaxResult.error("璇烽�夋嫨瑕佹姤宸ョ殑璁板綍");
+ productionReportDto.forEach(item -> {
+ salesLedgerWorkService.productionReport(item);
+ });
+ return AjaxResult.success("鎶ュ伐鎴愬姛");
}
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 7f951bf..d9795ec 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -17,7 +17,7 @@
# 寮�鍙戠幆澧冮厤缃�
server:
# 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080
- port: 7003
+ port: 7008
servlet:
# 搴旂敤鐨勮闂矾寰�
context-path: /
--
Gitblit v1.9.3