%!s(int64=2) %!d(string=hai) anos
pai
achega
09df94a416

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

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

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

@@ -266,8 +266,9 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
         dto.setSearchTimeEnd(searchEndTime);
         List<InStoreFormVO> list = mapper.selectList(dto);
         List<InStoreFormReportVO> result = new ArrayList();
-        int i = 0;
+
         for (Map<String, LocalDateTime> map : monthStartAndEndList) {
+            int i = 0;
             InStoreFormReportVO vo = new InStoreFormReportVO();
             List<InStoreFormVO> detailList = new ArrayList();
             vo.setYear(map.get("searchStartTimeMonth").getYear());
@@ -276,7 +277,7 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
 
 
                 if (inStoreFormVO.getCreatedTime().isAfter(map.get("searchStartTimeMonth")) && inStoreFormVO.getCreatedTime().isBefore(map.get("searchEndTimeMonth"))) {
-                    i++;
+                    i+=(inStoreFormVO.getInNum()==null?0:inStoreFormVO.getInNum());
                     detailList.add(inStoreFormVO);
                 }
             }