2 سال پیش
والد
کامیت
b444495a31

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

@@ -110,6 +110,12 @@
             <if test="userId != null and userId != ''">
                 and store.user_id = #{userId}
             </if>
+            <if test="searchTimeStart!=null ">
+                and outstoreform.created_time <![CDATA[>=]]> #{searchTimeStart}
+            </if>
+            <if test="searchTimeEnd!=null ">
+                and outstoreform.created_time <![CDATA[<=]]> #{searchTimeEnd}
+            </if>
         </where>
     </select>
 

+ 3 - 2
platform-service/src/main/java/com/platform/service/store/impl/OutStoreFormServiceImpl.java

@@ -89,8 +89,9 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
         dto.setSearchTimeEnd(searchEndTime);
         List<OutStoreFormVO> list = mapper.selectList(dto);
         List<OutStoreFormReportVO> result = new ArrayList();
-        int i = 0;
+
         for (Map<String, LocalDateTime> map : monthStartAndEndList) {
+            int i = 0;
             OutStoreFormReportVO vo = new OutStoreFormReportVO();
             List<OutStoreFormVO> detailList = new ArrayList();
             vo.setYear(map.get("searchStartTimeMonth").getYear());
@@ -99,7 +100,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
 
 
                 if (outStoreFormVO.getCreatedTime().isAfter(map.get("searchStartTimeMonth")) && outStoreFormVO.getCreatedTime().isBefore(map.get("searchEndTimeMonth"))) {
-                    i++;
+                    i+=(outStoreFormVO.getOutNum()==null?0:outStoreFormVO.getOutNum());
                     detailList.add(outStoreFormVO);
                 }
             }