Bladeren bron

修复导出问题

shenhao 2 jaren geleden
bovenliggende
commit
9bf57d825a

+ 2 - 2
src/main/java/com/ssj/sys/model/HowDetailExportVO.java

@@ -42,9 +42,9 @@ public class HowDetailExportVO implements Serializable {
     @ExcelProperty(value="添加时间",index = 5)
     private String createTime;
 
-    @ExcelProperty(value="知识点",index = 6)
+    @ExcelProperty(value="知识点ID",index = 6)
     private String detailId;
-    @ExcelProperty(value="知识点ID",index = 7)
+    @ExcelProperty(value="知识点",index = 7)
     private String detailName;
     @ExcelProperty(value="一级模块",index = 8)
     private String detailModule;

+ 9 - 6
src/main/resources/mybatis/mapper/CuratorMapper.xml

@@ -403,8 +403,14 @@
         t11.file_key
         FROM
         tb_lib_vip t12
-        left join
-        (
+        join (
+        SELECT DISTINCT vip_id,lib_id from tb_lib_vip_service
+        where lib_id = #{libId} and species='S003'
+        <if test="queryDate !=null and queryDate!='' and queryEndDate !=null and queryEndDate!=''">
+            AND to_days(end_time) >= TO_DAYS(#{queryDate}) and to_days(  #{queryEndDate} ) >= to_days( start_time )
+        </if>
+        )sv on t12.id =sv.vip_id
+        left join (
             SELECT 	DATE_FORMAT( t11.create_time, '%Y-%m-%d' ) AS create_time,	t11.corrected_picture_url,	t11.file_key,t.id,t11.vip_id,t.`subject`
             from 	 scon_homework_picture t11
             LEFT JOIN scon_homework t ON t.id = t11.homework_id
@@ -418,13 +424,10 @@
         )t11 on t12.id = t11.vip_id
         LEFT JOIN tb_lib_join t13 ON t12.lib_id = t13.id
         WHERE
-        t12.lib_id = #{libId}
+        1=1
         <if test="searchValue != '' ">
             and t12.child_name regexp #{searchValue}
         </if>
-<!--        <if test="searchSubject != '' ">-->
-<!--            and a.SUBJECT  = #{searchSubject}-->
-<!--        </if>-->
         ) a
         GROUP BY
         a.create_time,