3d94fe32
 
  陶汉栋
 
no message
 | 
1
2 
 | 
<?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" >
 
 | 
acd712a6
 
  陶汉栋
 
增加网关负载
 | 
3 
 | 
<mapper namespace="com.example.dahua.dao.UserDao">
 
 | 
a106242e
 
  陶汉栋
 
no message
 | 
4 
 | 
 
 | 
2cbbb164
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
5
6
7
8
9
10
11
12
13
14
15 
 | 
    <!--<select id="getStudentNum" resultType="String" parameterType="String">-->
    <!--select student_num-->
    <!--from SZ_V_School_Student-->
    <!--where school_id = #{school_id}-->
    <!--and studentcode = #{studentcode}-->
    <!--</select>-->
    <select id="getStudentList" resultType="com.example.dahua.bean.StudentBean">
        select * from SZ_V_School_Student where school_id = #{schoolId}
        <if test="studentType != null">
            and student_type = #{studentType}
 
 | 
ad296f75
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
16 
 | 
        </if>
 
 | 
2cbbb164
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
17 
 | 
        <if test="sex != null and sex.size() >0">
 
 | 
acd712a6
 
  陶汉栋
 
增加网关负载
 | 
18 
 | 
            and sex in
 
 | 
2cbbb164
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
19
20
21
22 
 | 
            <foreach item="item" collection="sex" separator="," open="(" close=")" index="">
                #{item}
            </foreach>
        </if>
 
 | 
acd712a6
 
  陶汉栋
 
增加网关负载
 | 
23
24 
 | 
        and (student_num is not null or student_num != '') and (photo is not null or photo !='') order by newid()
    </select>
 
 | 
2cbbb164
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
25
26
27 
 | 
    <select id="getTeacherList" resultType="com.example.dahua.bean.StudentBean">
        select * from SZ_V_School_Teacher where school_id = #{schoolId}
 
 | 
f6c2934e
 
  徐泉
 
大华设备对接艺校考勤
 | 
28 
 | 
        and (teacher_num is not null or teacher_num !='')
 
 | 
2cbbb164
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
29
30 
 | 
        and (face is not null or face !='')
    </select>
 
 | 
191a8018
 
  陶汉栋
 
无感考勤
 | 
31 
 | 
 
 | 
2cbbb164
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
32
33
34
35
36
37 
 | 
    <select id="getAuthRecord" resultType="com.example.dahua.bean.DeviceAuthRecord">
        select * from AC_DeviceAuthRecord where State = 1 and GrantState = 1 and SchoolId = #{schoolId}
        <if test="studentType != null">
            and StudentType = #{studentType}
        </if>
    </select>
 
 | 
191a8018
 
  陶汉栋
 
无感考勤
 | 
38 
 | 
 
 | 
ad296f75
 
  徐泉
 
智能校卫:海康、大华人脸机代码提交
 | 
39
40
41
42
43
44 
 | 
    <select id="queryClintList" resultType="com.example.dahua.bean.AttendanceBean">
        select * from SZ_Attendance where school_id = #{schoolId} and clint_type in(22,29)
        <if test="deviceId != null and deviceId.trim() !=''">
            and clint_id = #{deviceId}
        </if>
    </select>
 
 | 
38841d26
 
  徐泉
 
修改提交
 | 
45
46
47
48
49
50
51
52
53
54 
 | 
    <select id="queryStudentIdList" resultType="java.lang.String">
       select StudentId from SS_RoomNumber where Status=1 and SchoolId=#{schoolId}
       and Pid in (select id from SS_Room where Status=1 and SchoolId=#{schoolId} and Pid=#{roomId})
       and StudentId in (select student_id from SZ_V_School_Student  where  school_id= #{schoolId}) order by newid()
    </select>
    <select id="getStudentByClassId" resultType="com.example.dahua.bean.StudentBean">
        select * from SZ_V_School_Student where school_id = #{schoolId}
        <if test="classIds != null and classIds.size() >0">
 
 | 
0d72f97b
 
  徐泉
 
修改提交
 | 
55 
 | 
            and class_id in
 
 | 
38841d26
 
  徐泉
 
修改提交
 | 
56
57
58
59
60
61
62
63
64
65
66
67 
 | 
            <foreach item="item" collection="classIds" separator="," open="(" close=")" index="">
                #{item}
            </foreach>
        </if>
        and student_num != '' and  photo !=''
    </select>
    <select id="getGroupByClassId" resultType="java.lang.Integer">
        SELECT
            Pid
        FROM
            SZ_OneCardGrouping
 
 | 
6184590c
 
  徐泉
 
海康大华接口提交
 | 
68 
 | 
        WHERE
 
 | 
0d72f97b
 
  徐泉
 
修改提交
 | 
69 
 | 
            ClassId = #{classId}
 
 | 
38841d26
 
  徐泉
 
修改提交
 | 
70
71
72
73
74
75
76
77
78 
 | 
        AND state = 1
    </select>
    <resultMap id="YxStudentMap" type="com.example.dahua.bean.yx.ImportStudent">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="name" property="name"/>
        <result column="user_id" property="userId"/>
        <result column="card_num" property="cardNum"/>
        <result column="photo" property="photo"/>
 
 | 
6184590c
 
  徐泉
 
海康大华接口提交
 | 
79
80
81
82
83
84 
 | 
        <result column="school_Id" property="schoolId"/>
        <result column="student_code" property="studentCode"/>
        <result column="scene_name" property="sceneName"/>
    </resultMap>
    <insert id="insertStudent" parameterType="com.example.dahua.bean.yx.ImportStudent">
 
 | 
38841d26
 
  徐泉
 
修改提交
 | 
85
86 
 | 
        insert into sz_student_yx values (#{name},#{userId},#{cardNum},#{photo},#{studentCode},#{schoolId},#{sceneName})
    </insert>
 
 | 
f6c2934e
 
  徐泉
 
大华设备对接艺校考勤
 | 
87 
 | 
 
 | 
0d72f97b
 
  徐泉
 
修改提交
 | 
88 
 | 
    <select id="selectStudentList" resultMap="YxStudentMap">
 
 | 
f6c2934e
 
  徐泉
 
大华设备对接艺校考勤
 | 
89
90 
 | 
        select * from sz_student_bak
    </select>
 
 | 
4b0a4282
 
  徐泉
 
海康 大华接口提交
 | 
91
92
93
94
95 
 | 
    <select id="selectYxStudentList" resultMap="YxStudentMap">
        select * from sz_student_yx where school_id =#{schoolId} and scene_name = #{sceneName}
    </select>
</mapper>
 
 | 
3d94fe32
 
  陶汉栋
 
no message
 | 
 | 
 
 |