Browse Source

优化出库和退库

hfxc226 2 years ago
parent
commit
30b94f86ab

+ 6 - 6
platform-dao/src/main/resources/mapper/store/InStoreDetailMapper.xml

@@ -121,19 +121,19 @@
 
     <select id="selectReportList" parameterType="com.platform.dao.dto.store.InStoreDetailDTO"
             resultType="com.platform.dao.vo.query.store.InStoreDetailVO">
-        select
+        select instoredetail.*,
         sum(instoredetail.num) as totalNum,
-        sum(instoredetail.total_price) as totalPrice,
+        /*sum(instoredetail.total_price) as totalPrice,
         spareinfo.name spareName,
         store.name storeName,
         store.id storeId,
         spareinfo.id spareId,
-        sparetype.name typeName
-        from t_in_store_detail instoredetail,t_spare_part_info spareinfo ,t_spare_type sparetype,t_store store
+        sparetype.name typeName*/
+        from t_in_store_detail instoredetail/* t_spare_part_info spareinfo ,t_spare_type sparetype,t_store store*/
         <where>
-            spareinfo.id = instoredetail.spare_id
+          /*  spareinfo.id = instoredetail.spare_id
             and  spareinfo.type_id = sparetype.id
-            and store.id = instoredetail.store_id
+            and store.id = instoredetail.store_id*/
             <include refid="List_Condition"/>
         </where>
         GROUP BY

+ 9 - 9
platform-dao/src/main/resources/mapper/store/OutStoreDetailMapper.xml

@@ -140,21 +140,21 @@ outstoredetail.c_batch,
 
     <select id="selectReportList" parameterType="com.platform.dao.dto.store.OutStoreDetailDTO"
             resultType="com.platform.dao.vo.query.store.OutStoreDetailVO">
-        select
-        sum(outstoredetail.num) as totalNum,
-        spareinfo.name spareName,
+        select outstoredetail.*
+        sum(outstoredetail.num) as totalNum
+        /*spareinfo.name spareName,
         spareinfo.id spareId,
         spareinfo.no spareNo,
         store.name storeName,
         store.id storeId,
-        sparetype.name typeName
-        from t_out_store_detail as outstoredetail,t_spare_part_info spareinfo ,t_spare_type sparetype,t_store store
+        sparetype.name typeName*/
+        from t_out_store_detail as outstoredetail
         <where>
-            spareinfo.id = outstoredetail.spare_id
+            /*spareinfo.id = outstoredetail.spare_id
             and spareinfo.type_id = sparetype.id
-            and store.id = outstoredetail.store_id
+            and store.id = outstoredetail.store_id*/
             <include refid="List_Condition"/>
-            <if test="useCompany != null and useCompany != ''">
+            <!--<if test="useCompany != null and useCompany != ''">
                 and store.use_company = #{useCompany}
             </if>
             <if test="useProject != null and useProject != ''">
@@ -165,7 +165,7 @@ outstoredetail.c_batch,
             </if>
             <if test="spareNo != null and spareNo != ''">
                 and spareinfo.no = #{spareNo}
-            </if>
+            </if>-->
         </where>
     </select>
 

+ 4 - 3
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -1277,8 +1277,9 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         repairApplicationFormDTO.setSearchEndTime(searchEndTime);
         List<RepairApplicationFormVO> list = mapper.selectPageList(repairApplicationFormDTO);
         List<RepairReport24VO> result = new ArrayList<RepairReport24VO>();
-        int i = 0;
+
         for (Map<String, LocalDateTime> map : monthStartAndEndList) {
+            int i = 0;
             RepairReport24VO vo = new RepairReport24VO();
             List<RepairApplicationFormVO> detailList = new ArrayList<RepairApplicationFormVO>();
             vo.setYear(map.get("searchStartTimeMonth").getYear());
@@ -1301,9 +1302,9 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             vo.setNum(i);
             vo.setDetailList(detailList);
             result.add(vo);
-            if (type == 2) {
+            /*if (type == 2) {
                 i = 0;
-            }
+            }*/
         }
         return result;
     }