he2802 1 year ago
parent
commit
8d43860679

+ 9 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/DangAnController.java

@@ -81,4 +81,13 @@ public class DangAnController extends BaseController {
         return getDataTable(list);
     }
 
+    @ApiOperation("查询档案报名列表")
+    @PreAuthorize("@ss.hasPermi('grade:user:list')")
+    @GetMapping("/listBKUserPeriod")
+    public TableDataInfo<ClassPeriodStudentVo> listBKUserPeriod(ClassGradeUserQueryBo bo) {
+        startPage();
+        List<ClassPeriodStudentVo> list = iClassGradeUserService.listBKUserPeriod(bo);
+        return getDataTable(list);
+    }
+
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeUserQueryBo.java

@@ -307,4 +307,6 @@ public class ClassGradeUserQueryBo extends BaseEntity {
 	@ApiModelProperty("1单证书 2多证书")
 	private Integer moreCertificateStatus;
 
+
+
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/mapper/ClassGradeUserMapper.java

@@ -102,4 +102,6 @@ public interface ClassGradeUserMapper extends BaseMapper<ClassGradeUser> {
     List<ClassGradeUser> getClassInfoByUser(Long userId);
 
     List<ClassPeriodStudentVo> listVideoUserPeriod(ClassGradeUserQueryBo bo);
+
+    List<ClassPeriodStudentVo> listBKUserPeriod(ClassGradeUserQueryBo bo);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/IClassGradeUserService.java

@@ -144,4 +144,6 @@ public interface IClassGradeUserService extends IService<ClassGradeUser> {
 
 
 	List<ClassPeriodStudentVo> listVideoUserPeriod(ClassGradeUserQueryBo bo);
+
+	List<ClassPeriodStudentVo> listBKUserPeriod(ClassGradeUserQueryBo bo);
 }

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

@@ -3471,6 +3471,11 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         return classPeriodStudentVos;
     }
 
+    @Override
+    public List<ClassPeriodStudentVo> listBKUserPeriod(ClassGradeUserQueryBo bo) {
+        return null;
+    }
+
 
     /**
      * 实体类转化成视图对象

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodStudentVo.java

@@ -255,4 +255,9 @@ public class ClassPeriodStudentVo {
 	@ApiModelProperty("专业名")
 	private String categoryName;
 
+	@ApiModelProperty("创建时间")
+	private Long createTime;
+
+	@ApiModelProperty("商品年份")
+	private String goodsYear;
 }

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

@@ -140,6 +140,8 @@
         <result property="projectName" column="project_name"/>
         <result property="educationName" column="education_name"/>
         <result property="categoryName" column="category_name"/>
+        <result property="goodsYear" column="goods_year"/>
+        <result property="createTime" column="create_time"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">
@@ -1881,6 +1883,111 @@
         <if test="telphone != null and telphone !='' ">
             AND u.telphone = #{telphone,typeHandler=com.zhongzheng.common.type.EncryptHandler}
         </if>
+        <if test="searchStartTime != null and searchStartTime != '' ">
+            and (SELECT count(*) FROM user_study_record r where  r.order_goods_id = cgu.order_goods_id AND r.create_time >= #{searchStartTime} )>0
+        </if>
+        <if test="searchEndTime != null and searchEndTime != '' ">
+            and (SELECT count(*) FROM user_study_record r where  r.order_goods_id = cgu.order_goods_id AND #{searchEndTime} >= r.create_time )>0
+        </if>
+        <if test="periodStartTime != null and periodStartTime !='' ">
+            AND cgu.period_time >=#{periodStartTime}
+        </if>
+        <if test="periodEndTime != null and periodEndTime !='' ">
+            AND #{periodEndTime} >= cgu.period_time
+        </if>
+        order by cgu.create_time desc
+    </select>
+
+    <select id="listBKUserPeriod" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo"
+            resultMap="ClassPeriodStudentVo">
+        SELECT
+        g.goods_name,
+        g.create_time,
+        g.year as goods_year,
+        cet.education_name,
+        cpt.project_name,
+        m.category_name,
+        cb.business_name,
+        up.`status` as profile_status
+        FROM
+        class_grade_user cgu
+        LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
+        LEFT JOIN order_goods og ON cgu.order_goods_id = og.order_goods_id
+        LEFT JOIN `user` u ON u.user_id = cgu.user_id
+        LEFT JOIN goods g on og.goods_id = g.goods_id
+        LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
+        LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
+        LEFT JOIN course_business cb ON g.business_id = cb.id
+        LEFT JOIN major m ON g.major_id = m.id
+        LEFT JOIN user_profile up on  cgu.order_goods_id = up.order_goods_id and up.type_status=1 and up.current_status = 1
+        where 1=1
+        and cgu.`status` =1
+        <if test="profileStatus != null and profileStatus != ''">
+            AND up.`status` = #{profileStatus}
+        </if>
+        <if test="periodPlush != null and periodPlush != ''">
+            AND cgu.period_plush = #{periodPlush}
+        </if>
+        <if test="officialStatus != null and officialStatus != ''">
+            AND cgu.official_status = #{officialStatus}
+        </if>
+        <if test="changeGrade != null and changeGrade != ''">
+            AND cgu.change_grade = #{changeGrade}
+        </if>
+        <if test="profileStatus != null and profileStatus != ''">
+            AND up.status = #{profileStatus}
+        </if>
+        <if test="gradeId != null and gradeId !='' ">
+            and cgu.grade_id = #{gradeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
+        <if test="projectId != null and projectId != ''">
+            AND g.project_id = #{projectId}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="schoolId != null and schoolId != ''">
+            AND g.school_id = #{schoolId}
+        </if>
+        <if test="majorId != null and majorId != ''">
+            AND g.major_id = #{majorId}
+        </if>
+        <if test="periodStatus != null ">
+            and cgu.period_status = #{periodStatus}
+        </if>
+        <if test="classStartTime != null and classStartTime != '' ">
+            AND cg.class_start_time >= #{classStartTime}
+        </if>
+        <if test="classEndTime != null and classEndTime != '' ">
+            AND #{classEndTime} >=  cg.class_end_time
+        </if>
+        <if test="studyStatus != null and studyStatus == 1 ">
+            and cgu.period_status = -1
+        </if>
+        <if test="studyStatus != null and studyStatus == 2 ">
+            and cgu.period_status != -1
+        </if>
+        <if test="className != null and className !='' ">
+            and  cg.class_name like concat('%', #{className}, '%')
+        </if>
+        <if test="searchKey != null and searchKey != '' ">
+            and (u.realname like concat('%', #{searchKey}, '%')
+            or u.id_card like concat('%', #{searchKey,typeHandler=com.zhongzheng.common.type.EncryptHandler}, '%')
+            or g.goods_name like concat('%', #{searchKey}, '%')
+            or cg.class_name like concat('%', #{searchKey}, '%'))
+        </if>
+        <if test="userId != null and userId !='' ">
+            AND u.user_id = #{userId}
+        </if>
+        <if test="idCard != null and idCard !='' ">
+            AND u.id_card = #{idCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
+        </if>
+        <if test="telphone != null and telphone !='' ">
+            AND u.telphone = #{telphone,typeHandler=com.zhongzheng.common.type.EncryptHandler}
+        </if>
         <if test="searchStartTime != null and searchStartTime !='' ">
             AND cgu.create_time >=#{searchStartTime}
         </if>