学生奖惩内容

This commit is contained in:
2025-09-29 15:06:02 +08:00
parent 79ba38fc3f
commit 6f69057678
44 changed files with 512 additions and 430 deletions

View File

@@ -1,6 +1,7 @@
package com.srs.comprehensive.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.*;
import com.srs.common.annotation.Excel;
@@ -23,10 +24,10 @@ import lombok.Builder;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(value = "CphGoodAudit对象" , description = "评优审核")
@ApiModel(value = "CphGoodAudit对象", description = "评优审核")
@TableName("cph_good_audit")
public class CphGoodAudit extends BaseEntity {
private static final long serialVersionUID=1L;
private static final long serialVersionUID = 1L;
/**
* 评优审核表id
@@ -73,7 +74,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("辅导员审核时间")
@TableField("fdy_time")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "辅导员审核时间" , width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "辅导员审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fdyTime;
/**
@@ -106,7 +107,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("学院审核时间")
@TableField("dept_time")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "学院审核时间" , width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "学院审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deptTime;
/**
@@ -139,7 +140,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("学工审核时间")
@TableField("final_time")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "学工审核时间" , width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "学工审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date finalTime;
/**
@@ -158,4 +159,4 @@ private static final long serialVersionUID=1L;
private String delFlag;
}
}

View File

@@ -89,6 +89,12 @@ public class SrsClass extends BaseEntity {
})
private CphTeacher teacher;
/**
* 辅导员名称
*/
@TableField(exist = false)
private String teacherName;
// /**
// * 辅导员
// */

View File

@@ -1,13 +1,14 @@
package com.srs.comprehensive.domain.Vo;
import com.srs.common.annotation.Excel;
import com.srs.common.core.domain.BaseEntity;
/**
* @author zhy
* @date 2024-05-21 15:05
* @description
*/
public class ExcelGoodClass {
public class ExcelGoodClass extends BaseEntity {
@Excel(name = "学院")
public String deptName;

View File

@@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="deptId != null "> and d.dept_id = #{deptId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="teacherName != null and teacherName != ''"> and t.name like concat('%', #{teacherName}, '%')</if>
</where>
order by class_code desc

View File

@@ -33,35 +33,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSrsKnrdApprovalRecordVo"/>
where id = #{id}
</select>
<select id="listView" parameterType="CphSearch" resultType="SrsKnrdApply">
select a.*,d.major_type_name
from srs_knrd_apply as a
left join srs_student as b on a.xh = b.stu_no
left join srs_class as c on b.class_id = c.class_id
left join srs_majors as d on c.major_id = d.major_id
left join cph_teacher as e on c.teacher_id = e.teacher_id
-- left join srs_knrd_approval_record r on r.apply_id=a.id
left join sys_dept_map as f on d.college_id = f.old_dept_id
<select id="listView" parameterType="CphSearch" resultType="SrsKnrdApply">
select a.*, d.major_type_name, g.step as latest_step, g.status as latest_status
from srs_knrd_apply as a
left join srs_student as b on a.xh = b.stu_no
left join srs_class as c on b.class_id = c.class_id
left join srs_majors as d on c.major_id = d.major_id
left join cph_teacher as e on c.teacher_id = e.teacher_id
left join sys_dept_map as f on d.college_id = f.old_dept_id
left join (
SELECT r1.*
FROM srs_knrd_approval_record r1
INNER JOIN (
SELECT apply_id, MAX(id) as max_id
FROM srs_knrd_approval_record
GROUP BY apply_id
) r2 ON r1.apply_id = r2.apply_id AND r1.id = r2.max_id
) as g on g.apply_id = a.id
where a.step != 0 and a.step != 1
<if test="collegeId != null"> and d.college_id = #{collegeId}</if>
<if test="tNo != null"> and e.employee_id = #{tNo}</if>
<if test="deptId != null"> and f.new_dept_id = #{deptId}</if>
<if test="stuNo != null"> and a.xh = #{stuNo}</if>
<if test="sfzhm != null"> and a.sfzhm = #{sfzhm}</if>
<if test="xm != null"> and a.xm like concat('%',#{xm},'%')</if>
<if test="xh != null"> and a.xh like concat('%',#{xh},'%')</if>
<if test="yj != null"> and (a.bjpyyj = #{yj} or a.ejxyldqmyj = #{yj} or a.xsqmyj = #{yj})</if>
<if test="applyYear != null"> and a.apply_year like CONCAT('%',#{applyYear},'%')</if>
order by a.id desc
</select>
left join (
SELECT * FROM srs_knrd_approval_record as record where id in(
select MAX(id) FROM srs_knrd_approval_record GROUP BY apply_id
)
) as g on g.apply_id = a.id
where a.step !=0 and a.step !=1
<if test="collegeId !=null"> and d.college_id = #{collegeId}</if>
<!-- <if test="step != null "> and r.step = #{step}</if>-->
<if test="tNo != null "> and e.employee_id = #{tNo}</if>
<if test="deptId != null "> and f.new_dept_id = #{deptId}</if>
<if test="stuNo != null "> and a.xh = #{stuNo}</if>
<if test="sfzhm != null "> and a.sfzhm = #{sfzhm}</if>
<if test="xm != null "> and a.xm like concat('%',#{xm},'%')</if>
<if test="xh != null "> and a.xh like concat('%',#{xh},'%')</if>
<if test="yj != null "> and (a.bjpyyj = #{yj} or a.ejxyldqmyj = #{yj} or xsqmyj = #{yj})</if>
<if test="applyYear != null "> and a.apply_year like CONCAT('%',#{applyYear},'%')</if>
order by a.id desc
</select>
<select id="selectSrsKnrdApprovalRecordByIds" resultType="SrsKnrdApprovalRecord">
select * from srs_knrd_approval_record where apply_id=#{id}
</select>

View File

@@ -229,87 +229,97 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="listRecordView" parameterType="CphSearch" resultType="SrsZxjApply">
select a.id as id,
a.step as step,
a.apply_year as apply_year,
a.xm as xm,
a.xb as xb,
a.mz as mz,
a.zzmm as zzmm,
a.xh as xh,
a.rxsj as rxsj,
a.csny as csny,
a.dh as dh,
a.nj as nj,
a.xy as xy,
a.zy as zy,
a.bj as bj,
a.kndj as kndj,
a.knlx as knlx,
a.knlx2 as knlx2,
a.rkzs as rkzs,
a.yzsr as yzsr,
a.rjyr as rjyr,
a.srly as srly,
a.jtcy as jtcy,
a.sqly as sqly,
a.fdyqm as fdyqm,
a.fdyqmrq as fdyqmrq,
a.ejxyldqm as ejxyldqm,
a.ejxyldqmrq as ejxyldqmrq,
a.xsqm as xsqm,
a.xsqmrq as xsqmrq,
a.csdj as csdj,
a.zzdj as zzdj,
a.zzls as zzls,
a.zp as zp,
a.create_id as create_id,
a.affix_id as affix_id,
a.status1 as status1,
a.status2 as status2,
a.status3 as status3,
a.dz as dz,
a.yb as yb,
a.bjyj as bjyj,
a.bjyjdj as bjyjdj,
a.ejxyyj as ejxyyj,
a.ejxyyjdj as ejxyyjdj,
a.xxyj as xxyj,
a.xxyjrq as xxyjrq,
a.gyhd as gyhd,
a.rjnsr as rjnsr,
a.bankCard as bankCard,
a.bankAddr as bankAddr,
a.xxqm as xxqm,
-- f.step as step,
-- f.status as status,
EXISTS(SELECT application_id FROM rt_stu_disciplinary_application rsda WHERE rsda.stu_no = a.xh and (penalty_status = 0 or penalty_status = 2)) as penalty_status0,
EXISTS(SELECT application_id FROM rt_stu_disciplinary_application rsda WHERE rsda.stu_no = a.xh and (penalty_status = 1 )) as penalty_status1,
EXISTS(SELECT application_id FROM rt_stu_disciplinary_application rsda WHERE rsda.stu_no = a.xh and (penalty_status = 3 )) as penalty_status3,
a.sfzhm as sfzhm,d.major_type_name
a.step as step,
a.apply_year as apply_year,
a.xm as xm,
a.xb as xb,
a.mz as mz,
a.zzmm as zzmm,
a.xh as xh,
a.rxsj as rxsj,
a.csny as csny,
a.dh as dh,
a.nj as nj,
a.xy as xy,
a.zy as zy,
a.bj as bj,
a.kndj as kndj,
a.knlx as knlx,
a.knlx2 as knlx2,
a.rkzs as rkzs,
a.yzsr as yzsr,
a.rjyr as rjyr,
a.srly as srly,
a.jtcy as jtcy,
a.sqly as sqly,
a.fdyqm as fdyqm,
a.fdyqmrq as fdyqmrq,
a.ejxyldqm as ejxyldqm,
a.ejxyldqmrq as ejxyldqmrq,
a.xsqm as xsqm,
a.xsqmrq as xsqmrq,
a.csdj as csdj,
a.zzdj as zzdj,
a.zzls as zzls,
a.zp as zp,
a.create_id as create_id,
a.affix_id as affix_id,
a.status1 as status1,
a.status2 as status2,
a.status3 as status3,
a.dz as dz,
a.yb as yb,
a.bjyj as bjyj,
a.bjyjdj as bjyjdj,
a.ejxyyj as ejxyyj,
a.ejxyyjdj as ejxyyjdj,
a.xxyj as xxyj,
a.xxyjrq as xxyjrq,
a.gyhd as gyhd,
a.rjnsr as rjnsr,
a.bankCard as bankCard,
a.bankAddr as bankAddr,
a.xxqm as xxqm,
COALESCE(penalty.penalty_status0, 0) as penalty_status0,
COALESCE(penalty.penalty_status1, 0) as penalty_status1,
COALESCE(penalty.penalty_status3, 0) as penalty_status3,
a.sfzhm as sfzhm,
d.major_type_name
from srs_zxj_apply as a
left join srs_student as b on a.xh = b.stu_no
left join srs_class as c on b.class_id = c.class_id
left join srs_majors as d on c.major_id = d.major_id
left join cph_teacher as e on c.teacher_id = e.teacher_id
left join (
SELECT * FROM srs_zxj_approval_record as record where id in(
select MAX(id) FROM srs_zxj_approval_record GROUP BY apply_id
)
SELECT * FROM (
SELECT *,
ROW_NUMBER() OVER (PARTITION BY apply_id ORDER BY id DESC) as rn
FROM srs_zxj_approval_record
) record where rn = 1
) as f on f.apply_id = a.id
left join sys_dept_map as g on d.college_id = g.old_dept_id
left join (
SELECT stu_no,
MAX(CASE WHEN penalty_status IN (0, 2) THEN 1 ELSE 0 END) as penalty_status0,
MAX(CASE WHEN penalty_status = 1 THEN 1 ELSE 0 END) as penalty_status1,
MAX(CASE WHEN penalty_status = 3 THEN 1 ELSE 0 END) as penalty_status3
FROM rt_stu_disciplinary_application
GROUP BY stu_no
) penalty on penalty.stu_no = a.xh
<where>
<!-- <if test="step != null "> and exists (select apply_id from srs_zxj_approval_record r where r.step = ${step} and r.apply_id = a.id )</if>-->
<if test="tNo != null "> and e.employee_id = #{tNo}</if>
<if test="deptId != null "> and g.new_dept_id = #{deptId}</if>
<if test="stuNo != null "> and a.xh = #{stuNo}</if>
<if test="xm != null "> and a.xm like concat('%',#{xm},'%')</if>
<if test="xh != null "> and a.xh like concat('%',#{xh},'%')</if>
<if test="status != null "> and (a.status1 = #{status} or a.status2 = #{status} or a.status3 = #{status})</if>
<if test="applyYear != null"> and a.apply_year like CONCAT('%',#{applyYear},'%')</if>
<if test="tNo != null ">and e.employee_id = #{tNo}</if>
<if test="deptId != null ">and g.new_dept_id = #{deptId}</if>
<if test="stuNo != null ">and a.xh = #{stuNo}</if>
<if test="xm != null ">and a.xm like concat('%',#{xm},'%')</if>
<if test="xh != null ">and a.xh like concat('%',#{xh},'%')</if>
<if test="status != null ">and (a.status1 = #{status} or a.status2 = #{status} or a.status3 = #{status})
</if>
<if test="applyYear != null">and a.apply_year like CONCAT('%',#{applyYear},'%')</if>
</where>
order by a.id desc
</select>
<insert id="insertSrsZxjApply" parameterType="SrsZxjApply" useGeneratedKeys="true" keyProperty="id">
insert into srs_zxj_apply
<trim prefix="(" suffix=")" suffixOverrides=",">