Selaa lähdekoodia

샵링커 재고비율- 추가

jmh 4 vuotta sitten
vanhempi
commit
102e48a0bf

+ 16 - 0
src/main/java/com/style24/batch/biz/job/shoplinker/TsbShoplinkerStockJob.java

@@ -292,6 +292,22 @@ public class TsbShoplinkerStockJob extends TsbAbstractJob<Collection<ShoplinkerG
             {
                 resultQty = (int)Math.floor(qty * 0.4);
             }
+        } 
+        
+        else 
+        {
+        	if (qty >= 0 && qty <= 2)
+            {
+                resultQty = isFirst ? 1 : 0;
+            }
+            else if (qty >= 3 && qty <= 29)
+            {
+                resultQty = (int)Math.ceil(qty * 0.25);
+            }
+            else if (qty >= 30)
+            {
+                resultQty = (int)Math.floor(qty * 0.4);
+            }
         }
 
         return resultQty;