增加初始化时学生住宿费用时发送系统消息和企业微信消息功能,学工处增加一键确认待确认的学生住宿费用功能

This commit is contained in:
MDSMO
2025-08-26 10:04:27 +08:00
parent d4a1a82388
commit 9498ec9308
6 changed files with 295 additions and 21 deletions

View File

@@ -50,7 +50,7 @@
<if test="applyStatus != null and applyStatus != ''">and t1.apply_status = #{applyStatus}</if>
<if test="tNo != null">and t1.employee_id = #{tNo}</if>
</where>
order by t1.apply_status asc,t1.id asc
order by t1.id desc
</if>
<if test="searchRole == 'jwc'">
select t1.* from
@@ -77,6 +77,7 @@
<if test="applyStatus != null and applyStatus != ''">and t1.apply_status = #{applyStatus}</if>
<if test="tNo != null">and t1.employee_id = #{tNo}</if>
</where>
order by t1.id desc
</if>
<if test="searchRole == null">
select t1.*
@@ -95,7 +96,7 @@
<if test="applyStatus != null and applyStatus != ''">and t1.apply_status = #{applyStatus}</if>
<if test="tNo != null">and t1.employee_id = #{tNo}</if>
</where>
order by t1.id
order by t1.id desc
</if>
</select>
@@ -172,13 +173,38 @@
<select id="listView" resultType="DomInfo">
select a.*,b.`name` as stu_name,c.class_name,d.`name` as teacher_name ,d.phone_number as teacher_phone
from view_dms_stu_total_record as a
left join srs_student as b on a.stu_no = b.stu_no
left join srs_class as c on b.class_id = c.class_id
left join cph_teacher as d on c.teacher_id = d.teacher_id
left join srs_student as b on a.stu_no = b.stu_no
left join srs_class as c on b.class_id = c.class_id
left join cph_teacher as d on c.teacher_id = d.teacher_id
<where>
<if test="stuYearId != null and stuYearId != ''"> and a.stu_year_id = #{stuYearId}</if>
</where>
order by b.class_id asc
order by b.class_id desc
</select>
<!-- 根据年级ID列表查询学生用户ID -->
<select id="selectStudentIdsByGrades" resultType="Long">
SELECT DISTINCT u.user_id
FROM srs_student ss
left JOIN srs_class sc ON ss.class_id = sc.class_id
left JOIN sys_user u ON ss.stu_no = u.user_name
WHERE u.user_id IS NOT NULL
AND sc.grade_id IN
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</select>
<!-- 根据年级ID列表查询学生学号列表 -->
<select id="selectStudentNosByGrades" resultType="String">
SELECT DISTINCT ss.stu_no
FROM srs_student ss
left JOIN srs_class sc ON ss.class_id = sc.class_id
WHERE ss.stu_no IS NOT NULL
AND sc.grade_id IN
<foreach item="gradeId" collection="gradeIds" open="(" separator="," close=")">
#{gradeId}
</foreach>
</select>
<select id="findByParam" resultType="DmsNewRecord" parameterType="DmsSearch">
@@ -194,8 +220,56 @@
</select>
<update id="fastConfirm" >
update dms_new_record as a set a.apply_status = '3' where a.apply_status = '2'
UPDATE dms_new_record
SET apply_status = (
SELECT dict_value
FROM sys_dict_data
WHERE dict_type = 'dms_record_status'
AND dict_label = '学工已确认'
LIMIT 1
)
WHERE apply_status = (
SELECT dict_value
FROM sys_dict_data
WHERE dict_type = 'dms_record_status'
AND dict_label = '辅导员已确认'
LIMIT 1
)
</update>
<update id="confirmUnconfirmedStudents" >
UPDATE dms_new_record
SET apply_status = (
SELECT dict_value
FROM sys_dict_data
WHERE dict_type = 'dms_record_status'
AND dict_label = '学工已确认'
LIMIT 1
)
WHERE apply_status = (
SELECT dict_value
FROM sys_dict_data
WHERE dict_type = 'dms_record_status'
AND dict_label = '待确认'
LIMIT 1
)
</update>
</mapper>
<!-- 批量插入消息 -->
<insert id="batchInsertCphMsg" parameterType="java.util.List">
insert into cph_msg (sender, receiver, content, create_by, create_time, update_by, update_time)
values
<foreach collection="list" item="item" separator=",">
(
#{item.sender},
#{item.receiver},
#{item.content},
#{item.createBy},
#{item.createTime},
#{item.updateBy},
#{item.updateTime}
)
</foreach>
</insert>
</mapper>