HuKang 1 rok pred
rodič
commit
1ec130be27

+ 13 - 3
src/main/java/com/warewms/controller/ErpWriteBackController.java

@@ -7,18 +7,28 @@ import com.warewms.service.impl.ErpSyncServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 import java.util.List;
 
 @Controller
-@RequestMapping("/sys/erpWriteData")
+@RequestMapping("/erp/erpWriteData")
 @Slf4j
 public class ErpWriteBackController {
 
     @Autowired
     private ErpSyncServiceImpl erpSyncService;
 
+    @ResponseBody
+    @PostMapping("erpSync")
+    public R erpSync(){
+        erpSyncService.erpSync();
+        return R.ok();
+    }
+
     /**
      * 中间表写入数据(叉车扫描条码记录表)
      */
@@ -38,4 +48,4 @@ public class ErpWriteBackController {
         erpSyncService.updaErpStatus(erpOrderList);
         return R.ok();
     }
-}
+}