From 4d5c3bd8bfea7a5ae0b3cd606156a1e83e633bd9 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期三, 18 三月 2026 12:37:22 +0800
Subject: [PATCH] lsh#

---
 rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java b/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
index 091ef44..9b41edc 100644
--- a/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
+++ b/rsf-open-api/src/main/java/com/vincent/rsf/openApi/controller/phyz/ERPController.java
@@ -18,8 +18,8 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -56,7 +56,11 @@
         JSONArray params = paramsFormat(objParams);
         List<Warehouse> warehouseList = JSON.parseArray(params.toJSONString(), Warehouse.class);
         // 鏁版嵁澶勭悊锛岃浆鍙憇erver
-        return CommonResponse.ok();
+        String resultMsg = erpReportService.syncWareHouse(warehouseList);
+        if ("200".equals(resultMsg)){
+            return  CommonResponse.ok(resultMsg);
+        }
+        return CommonResponse.error(resultMsg);
     }
 
     @ApiOperation("鐗╂枡淇℃伅鍚屾")
@@ -73,7 +77,11 @@
         JSONArray params = paramsFormat(objParams);
         List<Material> materialList = JSON.parseArray(params.toJSONString(), Material.class);
         // 鏁版嵁澶勭悊锛岃浆鍙憇erver
-        return CommonResponse.ok();
+        String resultMsg = erpReportService.syncMaterial(materialList);
+        if ("200".equals(resultMsg)){
+            return  CommonResponse.ok(resultMsg);
+        }
+        return CommonResponse.error(resultMsg);
     }
 
     @ApiOperation("瀹㈡埛淇℃伅鍚屾")
@@ -131,6 +139,9 @@
                 errorMsg.append(order.getOrderNo()+"涓嬪彂鎴愬姛;");
             } else {
                 errorMsg.append(order.getOrderNo()+"涓嬪彂澶辫触,鍘熷洜锛�"+i+";");
+                if (orderList.size()==1){
+                    return CommonResponse.error(errorMsg.toString());
+                }
             }
         }
         return CommonResponse.ok(errorMsg.toString());

--
Gitblit v1.9.1