3254194295 3 rokov pred
rodič
commit
09195ad88d

+ 19 - 2
platform-service/src/main/java/com/platform/service/store/impl/InStoreFormServiceImpl.java

@@ -158,6 +158,10 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
         BigDecimal bfNum = new BigDecimal(0);
         BigDecimal otherNum2 = new BigDecimal(0);
         BigDecimal pdNum = new BigDecimal(0);
+        BigDecimal o1=new BigDecimal(0);
+        BigDecimal o2=new BigDecimal(0);
+        BigDecimal o3=new BigDecimal(0);
+        BigDecimal o4=new BigDecimal(0);
         for (OutStoreFormVO vo : outStoreFormVOS) {
             if (vo != null) {
                 //领用出库
@@ -173,12 +177,19 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
                     bfNum = new BigDecimal(vo.getOutStoreNum().intValue());
                 }
                 if ((OutStoreTypeEnum.CHUKU_QITA.getValue()).equals(vo.getType()) || (OutStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())) {
-                    otherNum2 = new BigDecimal(vo.getOutStoreNum().intValue());
+                    if ((OutStoreTypeEnum.CHUKU_QITA.getValue()).equals(vo.getType())){
+                        o1=new BigDecimal(vo.getOutStoreNum().intValue());
+                    }
+                    if ((OutStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())){
+                        o2=new BigDecimal(vo.getOutStoreNum().intValue());
+                    }
+
                 }
 
 
             }
         }
+        otherNum2=new BigDecimal(o1.intValue()+o2.intValue());
         num1 = new BigDecimal(lyNum.intValue() + dbNum2.intValue() + bfNum.intValue() + otherNum2.intValue());
         for (InStoreFormVO vo : inStoreFormVOS) {
             if (vo != null) {
@@ -196,11 +207,17 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
                     dbNum = new BigDecimal( vo.getInStoreNum().intValue());
                 }
                 if ((InStoreTypeEnum.FAYUN_RUKU.getValue()).equals(vo.getType()) || (InStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())) {
-                    otherNum = new BigDecimal( vo.getInStoreNum().intValue());
+                    if ((InStoreTypeEnum.FAYUN_RUKU.getValue()).equals(vo.getType())){
+                        o3=new BigDecimal(vo.getInStoreNum().intValue());
+                    }
+                    if ((OutStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())){
+                        o4=new BigDecimal(vo.getInStoreNum().intValue());
+                    }
                 }
             }
 
         }
+        otherNum=new BigDecimal(o3.intValue()+o4.intValue());
         num = new BigDecimal(purchaseNum.intValue() + xzNum.intValue() + dbNum.intValue() + otherNum.intValue());
 
         storeWorkBenchVO.setInTotalNum(num);