Files
zhxg_java/srs-comprehensive/src/main/resources/mapper/comprehensive/SyncDataMapper.xml

51 lines
2.9 KiB
XML
Raw Normal View History

2025-12-23 11:44:42 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.SyncDataMapper">
2025-12-31 11:18:58 +08:00
<select id="getEmployEEInfoList" resultType="java.util.Map" parameterType="String">
2025-12-23 11:44:42 +08:00
SELECT TBA.GH as zgh,TBA.XM as xm,CASE
2025-12-23 17:00:35 +08:00
WHEN XBDM = 1 THEN '男'
WHEN XBDM = 2 THEN '女'
ELSE '未知' -- 可选添加默认值避免NULL
2025-12-31 11:18:58 +08:00
END as xb,TBA.MZDM,TBA.SZBMBH,TBA.ZGLBDM,TBA.ZGLBMC,TBA.ZGDQZTDM,TBA.ZGDQZTDMMC,TBA.ZGPXH,TBA.UPTIME,TBD.BMMC as ksmc,TBD.BMMC as yxmc,TBD.BMBH as ksh,TBA.ZGDQZTDM as zgzt from from_gxsdxyxxzx_teacher TBA LEFT JOIN from_gxsdxyxxzx_xzbm TBD ON TBA.SZBMBH=TBD.BMBH
<where>
TBA.ZGLBDM LIKE '1%'
<if test="zgh != null and zgh!= '' ">and TBA.GH=#{zgh}</if>
</where>
2025-12-23 11:44:42 +08:00
</select>
2025-12-25 17:35:15 +08:00
<select id="getSpecialtyInfoList" resultType="java.util.Map" parameterType="String">
2026-01-04 10:44:43 +08:00
select b.JXZYBH as zydm,b.JXZYJC as zyjc,b.JXZYMC as zymc,a.BMBH,a.BMMC yxmc from from_gxsdxyxxzx_xzbm a left join from_gxsdxyxxzx_zyxx b on a.BMBH=b.JXZYSSYXBBH
2025-12-25 17:35:15 +08:00
<where>
b.JXZYBH is not null
<if test="zydm != null and zydm!= '' ">and b.JXZYBH=#{zydm}</if>
</where>
</select>
2025-12-26 13:35:35 +08:00
<select id="getSpecialtyALLInfo" resultType="java.util.Map">
select b.JXZYBH as zydm,b.JXZYJC as zyjc,b.JXZYMC as zymc,a.BMMC yxmc from from_gxsdxyxxzx_xzbm a left join from_gxsdxyxxzx_zyxx b on a.BMBH=b.JXZYSSYXBBH
where b.JXZYBH is not null
</select>
2026-01-04 10:44:43 +08:00
<select id="getClassInfoList" resultType="java.util.Map" parameterType="SelectClass">
select BJBH as bjdm,BJSSJXZYBH as zyid,BJMC as bjmc,BJSSNJ as njid,BJJC from from_gxsdxyxxzx_class
2025-12-30 11:41:09 +08:00
<where>
<if test="bjdm != null and bjdm!= '' ">and BJBH=#{bjdm}</if>
2026-01-04 10:44:43 +08:00
<if test="gradeCode != null and gradeCode!= '' ">and BJSSNJ=#{gradeCode}</if>
2025-12-30 11:41:09 +08:00
</where>
2025-12-29 15:18:13 +08:00
</select>
2026-01-05 16:19:19 +08:00
<select id="selectNumber" resultType="java.lang.Integer">
select count(1) as number from from_gxsdxyxxzx_student
</select>
<select id="getStudentInfoList" resultType="java.util.Map">
SELECT ROW_NUMBER() OVER(ORDER BY TBA.XH) as xsid,TBA.XH as xh,TBA.XM as xm,CASE
WHEN TBA.XBDM = 1 THEN '男'
WHEN TBA.XBDM = 2 THEN '女'
ELSE '未知' -- 可选添加默认值避免NULL
END as xb,TBA.XSDQZTDM as sfzx,TBA.XSDQZTDMMC as status,TBA.MZDM as mz,TBB.BJMC as bjmc
FROM `from_gxsdxyxxzx_student` TBA
LEFT JOIN from_gxsdxyxxzx_class TBB ON TBA.SZBJBH=TBB.BJBH
where TBB.BJSSNJ&gt;=2019 and TBA.XH is not null
<if test="stuNo != null and stuNo != ''">and TBA.XH=#{stuNo}</if>
LIMIT #{offset}, #{pageSize}
</select>
2025-12-23 11:44:42 +08:00
</mapper>