3254194295 3 rokov pred
rodič
commit
4d4289cbad

+ 5 - 5
platform-dao/src/main/resources/mapper/store/InStoreFormMapper.xml

@@ -165,19 +165,19 @@
 
     <select id="getInStoreDetailVOs" parameterType="com.platform.dao.dto.store.InStoreFormDTO"
             resultType="com.platform.dao.vo.query.store.InStoreFormVO">
-        SELECT detail.type, COUNT(*) instorenum FROM `t_in_store_form` form JOIN `t_in_store_detail` detail
+        SELECT form.type, COUNT(*) instorenum FROM `t_in_store_form` form JOIN `t_in_store_detail` detail
 ON form.id=detail.`in_id`
         join t_store store on store.id=form.store_id
         <where>
-            <if test="status!=null">
-                and status=1
-            </if>
+
+                 status=1
+
             <if test="userId!=null">
                 and user_id=#{userId}
             </if>
         </where>
 GROUP BY
-detail.type
+        form.type
 
     </select>
 

+ 4 - 4
platform-dao/src/main/resources/mapper/store/OutStoreFormMapper.xml

@@ -57,7 +57,7 @@
             and outstoreform.type = #{type}
         </if>
         <if test="type==6">
-            and (outstoreform.type=4 or instoreform.type=5)
+            and (outstoreform.type=4 or outstoreform.type=5)
         </if>
         <if test="remark != null and remark != ''">
             and outstoreform.remark = #{remark}
@@ -148,9 +148,9 @@
     ON form.id=detail.`out_id`
     join t_store store on store.id=form.store_id
     <where>
-        <if test="status!=null">
-            and status=1
-        </if>
+
+             status=1
+
         <if test="userId!=null">
             and user_id=#{userId}
         </if>

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

@@ -162,18 +162,18 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
             if (vo != null) {
                 //领用出库
                 if ((OutStoreTypeEnum.CHUKU_LINGYONG.getValue()).equals(vo.getType())) {
-                    lyNum = new BigDecimal(lyNum.intValue() + vo.getOutStoreNum().intValue());
+                    lyNum = new BigDecimal( vo.getOutStoreNum().intValue());
                 }
                 //调拨出库
                 if ((OutStoreTypeEnum.CHUKU_DIAOBO.getValue()).equals(vo.getType())) {
-                    dbNum2 = new BigDecimal(dbNum2.intValue() + vo.getOutStoreNum().intValue());
+                    dbNum2 = new BigDecimal(vo.getOutStoreNum().intValue());
                 }
                 //报废出库
                 if ((OutStoreTypeEnum.CHUKU_BAOFEI.getValue()).equals(vo.getType())) {
-                    bfNum = new BigDecimal(bfNum.intValue() + vo.getOutStoreNum().intValue());
+                    bfNum = new BigDecimal(vo.getOutStoreNum().intValue());
                 }
                 if ((OutStoreTypeEnum.CHUKU_QITA.getValue()).equals(vo.getType()) || (OutStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())) {
-                    otherNum2 = new BigDecimal(otherNum2.intValue() + vo.getOutStoreNum().intValue());
+                    otherNum2 = new BigDecimal(vo.getOutStoreNum().intValue());
                 }
 
 
@@ -185,18 +185,18 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
                 System.out.println(vo.getType());
                 //采购入库
                 if (InStoreTypeEnum.CAIGOU_RUKU.getValue().equals(vo.getType())) {
-                    purchaseNum = new BigDecimal(lyNum.intValue() + vo.getInStoreNum().intValue());
+                    purchaseNum = new BigDecimal(vo.getInStoreNum().intValue());
                 }
                 //闲置入库
                 if ((InStoreTypeEnum.XIANZHI_RUKU.getValue().equals(vo.getType()))) {
-                    xzNum = new BigDecimal(xzNum.intValue() + vo.getInStoreNum().intValue());
+                    xzNum = new BigDecimal( vo.getInStoreNum().intValue());
                 }
                 //调拨入库
                 if ((InStoreTypeEnum.DIAOBO_RUKU.getValue()).equals(vo.getType())) {
-                    dbNum = new BigDecimal(bfNum.intValue() + vo.getInStoreNum().intValue());
+                    dbNum = new BigDecimal( vo.getInStoreNum().intValue());
                 }
                 if ((InStoreTypeEnum.FAYUN_RUKU.getValue()).equals(vo.getType()) || (InStoreTypeEnum.STORE_CHECK.getValue()).equals(vo.getType())) {
-                    otherNum = new BigDecimal(otherNum.intValue() + vo.getInStoreNum().intValue());
+                    otherNum = new BigDecimal( vo.getInStoreNum().intValue());
                 }
             }