From 7fde09ac25f86667325e65ddcd0ad9769aa187d1 Mon Sep 17 00:00:00 2001
From: zc <zyzc>
Date: 星期二, 21 十月 2025 16:55:05 +0800
Subject: [PATCH] erp物料对接修改
---
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/SyncOrderController.java | 48 ++++++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/SyncOrderController.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/SyncOrderController.java
index f523790..3061e4b 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/SyncOrderController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/SyncOrderController.java
@@ -2,15 +2,11 @@
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
-import com.vincent.rsf.server.api.controller.erp.params.OrderParams;
-import com.vincent.rsf.server.api.controller.erp.params.SyncLocReviseParams;
-import com.vincent.rsf.server.api.controller.erp.params.SyncOrderParams;
-import com.vincent.rsf.server.api.controller.erp.params.SyncTransferParams;
+import com.vincent.rsf.server.api.controller.erp.params.*;
import com.vincent.rsf.server.api.service.ReceiveMsgService;
import com.vincent.rsf.server.common.annotation.OperationLog;
import com.vincent.rsf.server.common.utils.ExcelUtil;
import com.vincent.rsf.server.manager.entity.excel.AsnOrderTemplate;
-import com.vincent.rsf.server.manager.enums.OrderType;
import com.vincent.rsf.server.system.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -95,14 +91,14 @@
/**
* @author Ryan
* @date 2025/8/19
- * @description: 鍚屾鐩樼偣鍗曟嵁
+ * @description: 鏀惰揣閫氱煡鍗曞悓姝�
* @version 1.0
*/
@ApiOperation("鍚屾鍗曟嵁")
@OperationLog("鍗曟嵁鍚屾")
@PostMapping("/sync/checks")
- public R syncCheckResult(@RequestBody SyncOrderParams syncOrders) {
- if (Objects.isNull(syncOrders)) {
+ public R syncCheckResult(@RequestBody List<SyncOrderParams> syncOrders) {
+ if (Objects.isNull(syncOrders) || syncOrders.isEmpty()) {
throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
return receiveMsgService.syncCheckOrder(syncOrders, getLoginUserId());
@@ -121,7 +117,7 @@
if (Objects.isNull(transferParams)) {
throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
- return receiveMsgService.syncTransfer(transferParams);
+ return receiveMsgService.syncTransfer(transferParams, getLoginUserId());
}
@@ -138,7 +134,7 @@
if (Objects.isNull(reviseParams)) {
return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
- return receiveMsgService.syncLocRevise(reviseParams);
+ return receiveMsgService.syncLocRevise(reviseParams, getLoginUserId());
}
/**
@@ -164,12 +160,12 @@
@ApiOperation("鍗曟嵁淇敼")
@OperationLog("鍗曟嵁淇敼")
@PostMapping("/sync/orders/update")
- public R syncOrderUpdate(@RequestBody SyncOrderParams orders) {
- if (Objects.isNull(orders)) {
+ public R syncOrderUpdate(@RequestBody List<SyncOrderParams> orders) {
+ if (Objects.isNull(orders) || orders.isEmpty()) {
return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
-
- return receiveMsgService.syncOrderUpdate(orders);
+// return receiveMsgService.syncOrderUpdate(orders);
+ return receiveMsgService.syncCheckOrder(orders, getLoginUserId());
}
@@ -182,12 +178,28 @@
@ApiOperation("鍗曟嵁鍒犻櫎")
@OperationLog("鍗曟嵁鍒犻櫎")
@PostMapping("/sync/orders/delete")
- public R syncOrderDel(@RequestBody List<OrderParams> orders) {
-
- return R.ok();
+ public R syncOrderDel(@RequestBody List<SyncOrderParams> orders) {
+ if (Objects.isNull(orders)) {
+ return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+ }
+ return receiveMsgService.syncOrderDelete(orders);
}
-
+ /**
+ * @author Ryan
+ * @date 2025/8/22
+ * @description: 鐩樼偣宸紓鍗曞悓姝�
+ * @version 1.0
+ */
+ @PostMapping("/sync/check/result")
+ @ApiOperation("鐩樼偣宸紓鍗曞悓姝�")
+ @OperationLog("鐩樼偣宸紓鍗�")
+ public R checkResult(@RequestBody SyncCheckDiffParams syncParams) {
+ if (Objects.isNull(syncParams)) {
+ return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+ }
+ return receiveMsgService.syncCheckDiffs(syncParams);
+ }
}
--
Gitblit v1.9.1