change 3 жил өмнө
parent
commit
cddacf2b94

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ApplyAreasServiceImpl.java

@@ -14,6 +14,7 @@ import com.zhongzheng.modules.base.mapper.ApplyAreasMapper;
 import com.zhongzheng.modules.base.service.IApplyAreasService;
 import com.zhongzheng.modules.base.vo.ApplyAreasVo;
 import com.zhongzheng.modules.course.domain.MajorCategory;
+import com.zhongzheng.modules.pay.domain.PayAisle;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -54,6 +55,7 @@ public class ApplyAreasServiceImpl extends ServiceImpl<ApplyAreasMapper, ApplyAr
         lqw.eq(bo.getParentId() != null, ApplyAreas::getParentId, bo.getParentId());
         lqw.eq(bo.getAreaType() != null, ApplyAreas::getAreaType, bo.getAreaType());
         lqw.in(bo.getStatus() != null, ApplyAreas::getStatus, bo.getStatus());
+        lqw.orderByDesc(ApplyAreas::getUpdateTime);
         return entity2Vo(this.list(lqw));
     }
 

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateServiceImpl.java

@@ -46,6 +46,7 @@ public class CertificateServiceImpl extends ServiceImpl<CertificateMapper, Certi
         lqw.like(StrUtil.isNotBlank(bo.getCertificateName()), Certificate::getCertificateName, bo.getCertificateName());
         lqw.in(bo.getStatus() != null, Certificate::getStatus, bo.getStatus());
         lqw.eq(StrUtil.isNotBlank(bo.getCode()), Certificate::getCode, bo.getCode());
+        lqw.orderByDesc(Certificate::getUpdateTime);
         return entity2Vo(this.list(lqw));
     }
 

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -169,6 +169,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 }
                 classPeriodVo.setClassPeriods(classPeriodChapterVos);
             }
+            if (classPeriodVo.getType() == 2){
+                classPeriodVo.setClassPeriodSectionList(baseMapper.listPeriodSection(classPeriodVo.getId(),bo.getGoodsId(),classPeriodVo.getCourseId(),bo.getUserId()));
+            }
         }
         return classPeriodVos;
     }

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodVo.java

@@ -81,4 +81,10 @@ public class ClassPeriodVo {
 	private List<ClassPeriodChapterVo> classPeriods;
 
 
+	/** 章下面得节 */
+	@Excel(name = "章下面得节")
+	@ApiModelProperty("章下面得节")
+	private List<ClassPeriodSectionVo> classPeriodSectionList;
+
+
 }

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/MajorMapper.xml

@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND b.id = #{businessId}
         </if>
         group by m.id
-        order by m.update_time
+        order by m.update_time desc
     </select>
 
 </mapper>

+ 121 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -106,6 +106,20 @@
         <result property="performance" column="performance"/>
     </resultMap>
 
+    <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodSectionVo" id="ClassPeriodSectionVo">
+        <result property="userId" column="user_id"/>
+        <result property="id" column="id"/>
+        <result property="typeName" column="type_name"/>
+        <result property="realName" column="realname"/>
+        <result property="classHours" column="class_hours"/>
+        <result property="studyStartTime" column="study_start_time"/>
+        <result property="status" column="status"/>
+        <result property="auditTime" column="audit_time"/>
+        <result property="type" column="type"/>
+        <result property="studyEndTime" column="study_end_time"/>
+        <result property="auditNum" column="audit_num"/>
+    </resultMap>
+
     <select id="select" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo"
             resultMap="ClassGradeUserVoResult">
         SELECT
@@ -393,4 +407,111 @@
         </if>
     </select>
 
+
+
+    <select id="listPeriodSection"  parameterType="map" resultMap="ClassPeriodSectionVo">
+        SELECT
+            cs.section_id AS id,
+            #{courseId} AS course_id,
+            ( SELECT u.realname FROM `user` u WHERE 1 = 1 <if test="userId != null and userId !='' ">
+        and u.user_id =  #{userId}
+    </if>  ) AS realname,
+            ( SELECT u.user_id FROM `user` u WHERE 1 = 1 <if test="userId != null and userId !='' ">
+        and u.user_id =  #{userId}
+    </if>  ) AS user_id,
+            cs.NAME AS type_name,
+            NULL AS class_hours,
+            3 AS type,
+            (
+                SELECT
+                    ups.record_start_time
+                FROM
+                    user_period_status ups
+                        LEFT JOIN user_period up ON up.id = ups.period_id
+                WHERE
+                    period_status = 1
+        <if test="courseId != null and courseId !='' ">
+                  AND up.course_id = #{courseId}
+        </if>
+        <if test="goodsId != null and goodsId !='' ">
+                  AND up.goods_id = #{goodsId}
+        </if>
+
+                  AND up.section_id = cs.section_id
+
+            ) AS study_start_time,
+            (
+                SELECT
+                    ups.record_end_time
+                FROM
+                    user_period_status ups
+                        LEFT JOIN user_period up ON up.id = ups.period_id
+                WHERE
+                    period_status = 1
+        <if test="courseId != null and courseId !='' ">
+            AND up.course_id = #{courseId}
+        </if>
+        <if test="goodsId != null and goodsId !='' ">
+            AND up.goods_id = #{goodsId}
+        </if>
+                  AND up.section_id = cs.section_id
+            ) AS study_end_time,
+            (
+                SELECT
+                    ups.`status`
+                FROM
+                    user_period_status ups
+                        LEFT JOIN user_period up ON up.id = ups.period_id
+                WHERE
+                    period_status = 1
+        <if test="courseId != null and courseId !='' ">
+            AND up.course_id = #{courseId}
+        </if>
+        <if test="goodsId != null and goodsId !='' ">
+            AND up.goods_id = #{goodsId}
+        </if>
+                  AND up.section_id = cs.section_id
+            ) AS STATUS,
+            (
+                SELECT
+                    ups.create_time
+                FROM
+                    user_period_status ups
+                        LEFT JOIN user_period up ON up.id = ups.period_id
+                WHERE
+                    period_status = 1
+        <if test="courseId != null and courseId !='' ">
+            AND up.course_id = #{courseId}
+        </if>
+        <if test="goodsId != null and goodsId !='' ">
+            AND up.goods_id = #{goodsId}
+        </if>
+                  AND up.section_id = cs.section_id
+            ) AS audit_time,
+            (
+                SELECT
+                    COUNT( ups.id )
+                FROM
+                    user_period_status ups
+                        LEFT JOIN user_period up ON up.id = ups.period_id
+                WHERE
+                    period_status = 1
+        <if test="courseId != null and courseId !='' ">
+            AND up.course_id = #{courseId}
+        </if>
+        <if test="goodsId != null and goodsId !='' ">
+            AND up.goods_id = #{goodsId}
+        </if>
+                  AND up.section_id = cs.section_id
+            ) AS audit_num
+        FROM
+            course_chapter_section ccs
+                LEFT JOIN course_section cs ON ccs.section_id = cs.section_id
+        WHERE
+            1 = 1
+        <if test="chapterId != null and chapterId !='' ">
+          AND ccs.chapter_id = #{chapterId}
+        </if>
+    </select>
+
 </mapper>

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/SchoolMapper.xml

@@ -111,6 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND b.id = #{businessId}
         </if>
         GROUP BY s.id
-        order by s.update_time
+        order by s.update_time desc
     </select>
 </mapper>