外宿申请

This commit is contained in:
2025-12-04 10:36:41 +08:00
parent f8b635f060
commit 2700223a4f
17 changed files with 1054 additions and 11 deletions

View File

@@ -176,4 +176,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept as b on a.old_dept_id = b.dept_id
where b.dept_name = #{deptName}
</select>
<select id="getOwnMajorName" resultType="com.srs.comprehensive.domain.SrsMajors" parameterType="String">
select c.major_name
from srs_student a left join srs_class b on a.class_id=b.class_id
left join srs_majors c on a.major_id=c.major_id
where a.stu_no=#{stuNo}
</select>
</mapper>

View File

@@ -28,6 +28,7 @@
<result property="cphName" column="cphName"/>
<result property="gradeName" column="grade_name"/>
<result property="status2" column="status2"/>
<result property="deptName" column="dept_name" />
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
<association property="srsMajors" column="major_id" javaType="srsMajors" resultMap="SrsMajorsResult"/>
<association property="srsClass" column="class_id" javaType="srsClass" resultMap="SrsClassResult"/>
@@ -200,7 +201,7 @@
<include refid="selectSrsStudentJoin"/>
where stu_id = #{stuId}
</select>
<select id="selectSrsStudentByStuNo" parameterType="string" resultMap="SrsStudentResult">
<select id="selectSrsStudentByStuNo" parameterType="String" resultMap="SrsStudentResult">
<include refid="selectSrsStudentVo"/>
where stu_no = #{stuNo}
</select>
@@ -729,7 +730,7 @@
total_count,
male_count,
female_count
from (select left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4) as id_card, count(1) as total_count, sum(case when gender='男' then 1 else 0 end) as male_count, sum(case when gender='女' then 1 else 0 end) as female_count
from (select left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4) as id_card, count (1) as total_count, sum (case when gender='男' then 1 else 0 end) as male_count, sum (case when gender='女' then 1 else 0 end) as female_count
from srs_student d left join srs_class e
on d.class_id=e.class_id
left join srs_grade f on f.grade_id=e.grade_id
@@ -749,7 +750,7 @@
order by grade_code desc
</select>
<select id="getSchoolTotalCount" resultType="java.util.Map">
SELECT COUNT(1) AS TotalCount,
SELECT COUNT(1) AS TotalCount,
SUM(CASE WHEN gender = '男' THEN 1 ELSE 0 END) AS NaCount,
SUM(CASE WHEN gender = '女' THEN 1 ELSE 0 END) AS NvCount,
CONCAT(ROUND(SUM(CASE WHEN gender = '男' THEN 1 ELSE 0 END) / COUNT(*) * 100, 2), '%') AS NaZB,
@@ -781,7 +782,7 @@
total_count,
male_count,
female_count
from (select left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4) as id_card, count(1) as total_count, sum(case when gender='男' then 1 else 0 end) as male_count, sum(case when gender='女' then 1 else 0 end) as female_count
from (select left (AES_DECRYPT(UNHEX(id_card), 'zhxg'), 4) as id_card, count (1) as total_count, sum (case when gender='男' then 1 else 0 end) as male_count, sum (case when gender='女' then 1 else 0 end) as female_count
from srs_student d left join srs_class e
on d.class_id=e.class_id
left join srs_grade f on f.grade_id=e.grade_id
@@ -790,7 +791,7 @@
where c.city is null
</select>
<select id="getMajorsCount" resultType="java.util.Map">
select d.dept_name as deptName,
select d.dept_name as deptName,
count(case when year (CURDATE())-f.grade_code=1 then '大一' end) as firstCount,
count(case when year (CURDATE())-f.grade_code=2 then '大二' end) as thirdCount,
count(case when year (CURDATE())-f.grade_code=3 then '大三' end) as secondCount
@@ -821,4 +822,37 @@
from sys_dict_data
where dict_type = 'srs_stu_status'
</select>
<select id="selectSrsStudentByStuNoNew" parameterType="String" resultType="com.srs.comprehensive.domain.SrsStudent">
select s.stu_id,
s.stu_no,
s.name,
s.gender,
s.birthday,
AES_DECRYPT(UNHEX(s.id_card), 'zhxg') as id_card,
s.dept_id,
m.major_id,
c.class_id,
s.phone,
s.address,
s.status,
s.create_by,
s.create_time,
s.update_by,
s.update_time,
s.del_flag,
s.xhk,
s.bank_addr,
d.dept_name,
f.grade_name,
h.stu_year_name,
g.need_money
from srs_student s
left join srs_class c on s.class_id = c.class_id
left join srs_majors m on c.major_id = m.major_id
left join sys_dept d on m.college_id = d.dept_id
left join srs_grade as f on f.grade_id = c.grade_id
left join dms_new_record g on s.stu_no=g.stu_no
left join srs_stu_year h on g.stu_year_id=h.id
where s.stu_no = #{stuNo}
</select>
</mapper>