Parcourir la source

去掉之前一键操作物料买卖属性接口,计算更新数量size的代码

dongbw il y a 8 ans
Parent
commit
797cde58d5

+ 3 - 11
src/main/java/com/uas/ps/product/controller/ProductController.java

@@ -333,17 +333,9 @@ public class ProductController {
     public void switchProductByEnUU(@RequestParam("enUU") Long enUU,
                               @RequestParam("switchType") String switchType,
                               @RequestParam("switchStatus") Short switchStatus) {
-        Integer size = 0;
-        if (switchType.equals(PRODUCT_PURCHASE_STATUS)) {
-            size = productService.getCountByEnUUAndNotIsPurchase(enUU, switchStatus);
-        } else if (switchType.equals(PRODUCT_SALE_STATUS)){
-            size = productService.getCountByEnUUAndNotIsSale(enUU, switchStatus);
-        }
-        if (size > 0) {
-            waitSyncHelper.preWait("B2B");
-            productService.switchProductByEnuuAndTypeAndStatus(enUU, switchType, switchStatus);
-            waitSyncHelper.waitResponse();
-        }
+        waitSyncHelper.preWait("B2B");
+        productService.switchProductByEnuuAndTypeAndStatus(enUU, switchType, switchStatus);
+        waitSyncHelper.waitResponse();
     }
 
     /**