Pārlūkot izejas kodu

信息牌xml添加

xuxiaofei 2 gadi atpakaļ
vecāks
revīzija
5adca4aec5

+ 148 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpCardInfoMapper.xml

@@ -0,0 +1,148 @@
+<?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.zd.laboratory.mapper.XxpCardInfoMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpCardInfo" id="XxpCardInfoResult">
+        <result property="id" column="id"/>
+        <result property="cardName" column="card_name"/>
+        <result property="cardNum" column="card_num"/>
+        <result property="college" column="college"/>
+        <result property="location" column="location"/>
+        <result property="operate" column="operate"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="subjectName" column="subject_name"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="isStart" column="is_start"/>
+
+        <result property="userId" column="user_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectXxpCardInfo">
+        select id,
+               card_name,
+               card_num,
+               college,
+               location,
+               operate,
+               subject_id,
+               subject_name,
+               dept_id,
+               dept_name,
+               is_start,
+               user_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from xxp_card_info t
+    </sql>
+
+    <select id="selectXxpCardInfoList" parameterType="com.zd.laboratory.domain.XxpCardInfo"
+            resultMap="XxpCardInfoResult">
+        <include refid="selectXxpCardInfo"/>
+        <where>
+            <if test="cardName != null and cardName != null">and t.card_name = #{cardName}</if>
+            <if test="cardNum != null and cardNum != ''">and t.card_num = #{cardNum}</if>
+            <if test="college != null and college != null">and t.college = #{college}</if>
+            <if test="location != null and location != '' ">and t.location = #{location}</if>
+            <if test="operate != null ">and t.operate = #{operate}</if>
+            <if test="subject_id != null ">and t.subject_id = #{subjectId}</if>
+            <if test="subjectName != null ">and t.subject_name = #{subjectName}</if>
+            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptName != null ">and t.dept_name = #{deptName}</if>
+            <if test="isStart != null ">and t.is_start = #{isStart}</if>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="createBy != null ">and t.create_by = #{createBy}</if>
+            <if test="createTime != null ">and t.create_time = #{createTime}</if>
+            <if test="updateBy != null ">and t.update_by = #{updateBy}</if>
+            <if test="updateTime != null">and t.update_time =#{updateTime}</if>
+        </where>
+    </select>
+
+    <select id="selectXxpCardInfoById" resultMap="XxpCardInfoResult">
+        <include refid="selectXxpCardInfo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpCardInfo" parameterType="com.zd.laboratory.domain.XxpCardInfo">
+        insert into xxp_card_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="cardName != null">card_name,</if>
+            <if test="cardNum != null">card_num,</if>
+            <if test="college != null">college,</if>
+            <if test="location != null">location,</if>
+            <if test="operate != null">operate,</if>
+            <if test="subjectId != null">subject_id,</if>
+            <if test="subjectName != null">subject_name,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="isStart != null">is_start,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="cardName != null">#{cardName},</if>
+            <if test="cardNum != null">#{cardNum},</if>
+            <if test="college != null">#{college},</if>
+            <if test="location != null">#{location},</if>
+            <if test="operate != null">#{operate},</if>
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="isStart != null">#{isStart},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpCardInfo" parameterType="com.zd.laboratory.domain.XxpCardInfo">
+        update xxp_card_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="cardNum != null">card_name = #{cardNum},</if>
+            <if test="cardNum != null">card_num = #{cardNum},</if>
+
+            <if test="college != null">college = #{college},</if>
+            <if test="location != null">location = #{location},</if>
+            <if test="operate != null">operate = #{operate},</if>
+            <if test="subjectId != null">subject_id = #{subjectId},</if>
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="isStart != null">is_start = #{isStart},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpCardInfoById">
+        delete
+        from xxp_card_info
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpCardInfoByIds">
+        delete from xxp_card_info where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 132 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyDetailMapper.xml

@@ -0,0 +1,132 @@
+<?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.zd.laboratory.mapper.XxpClassifyDetailedMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpClassifyDetail" id="XxpClassifyDetailedResult">
+        <result property="id" column="id"/>
+        <result property="infoClassifyId" column="info_classify_id"/>
+        <result property="infoName" column="info_name"/>
+        <result property="infoType" column="info_type"/>
+        <result property="infoContent" column="info_content"/>
+        <result property="sort" column="sort"/>
+        <result property="userId" column="user_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectXxpClassifyDetailed">
+        select id,
+               info_classify_id,
+               info_name,
+               info_type,
+               info_content,
+               sort,
+               user_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from xxp_classify_detail t
+    </sql>
+
+    <select id="selectXxpClassifyDetailedList" parameterType="com.zd.laboratory.domain.XxpClassifyDetail"
+            resultMap="XxpClassifyDetailedResult">
+        <include refid="selectXxpClassifyDetailed"/>
+        <where>
+            <if test="infoClassifyId != null ">and t.info_classify_id = #{infoClassifyId}</if>
+            <if test="infoName != null  and infoName != ''">and t.info_name = #{infoName}</if>
+            <if test="infoType != null ">and t.info_type = #{infoType}</if>
+            <if test="infoContent != null ">and t.info_content = #{infoContent}</if>
+            <if test="sort != null ">and t.sort = #{sort}</if>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="createBy != null ">and t.create_by = #{createBy}</if>
+            <if test="searchValue != null and searchValue != ''">
+                and
+                (t.classify_name like concat('%', #{classifyName}, '%') )
+            </if>
+            <if test="beginTime != null ">
+                and t.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpClassifyDetailedById" resultMap="XxpClassifyDetailedResult">
+        <include refid="selectXxpClassifyDetailed"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpClassifyDetailed" parameterType="com.zd.laboratory.domain.XxpClassifyDetail">
+        insert into xxp_classify_detail
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <if test="infoClassifyId != null">info_classify_id,</if>
+
+            <if test="infoName != null">info_name,</if>
+
+            <if test="infoType != null">info_type,</if>
+
+            <if test="infoContent != null">info_content,</if>
+
+            <if test="sort != null">sort,</if>
+
+            <if test="userId != null">user_id,</if>
+
+            <if test="createBy != null">create_by,</if>
+
+            <if test="createTime != null">create_time,</if>
+
+            <if test="updateBy != null">update_by,</if>
+
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="infoClassifyId != null">#{infoClassifyId},</if>
+            <if test="infoName != null">#{infoName},</if>
+            <if test="infoType != null">#{infoType},</if>
+            <if test="infoContent != null">#{infoContent},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpClassifyDetailed" parameterType="com.zd.laboratory.domain.XxpClassifyDetail">
+        update xxp_classify_detail
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="infoClassifyId != null">info_classify_id = #{infoClassifyId},</if>
+            <if test="infoName != null">info_name = #{infoName},</if>
+            <if test="infoType != null">info_type = #{infoType},</if>
+            <if test="infoContent != null">info_content = #{infoContent},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpClassifyDetailedById">
+        delete
+        from xxp_classify_detail
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpClassifyDetailedByIds">
+        delete from xxp_classify_detail where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 138 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyMapper.xml

@@ -0,0 +1,138 @@
+<?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.zd.laboratory.mapper.XxpClassifyMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpClassify" id="XxpClassifyResult">
+        <result property="id" column="id"/>
+        <result property="classifyName" column="classify_name"/>
+        <result property="classifyType" column="classify_type"/>
+        <result property="sort" column="sort"/>
+        <result property="isSpecial" column="is_special"/>
+        <result property="isShow" column="is_show"/>
+        <result property="showColour" column="show_colour"/>
+        <result property="userId" column="user_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectXxpClassify">
+        select id,
+               classify_name,
+               classify_type,
+               sort,
+               is_special,
+               is_show,
+               show_colour,
+               user_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from xxp_classify t
+    </sql>
+
+    <select id="selectXxpClassifyList" parameterType="com.zd.laboratory.domain.XxpClassify"
+            resultMap="XxpClassifyResult">
+        <include refid="selectXxpClassify"/>
+        <where>
+            <if test="classifyName != null and classifyName != ''">and t.classify_name = #{classifyName}</if>
+            <if test="classifyType != null  ">and t.classify_type = #{classifyType}</if>
+            <if test="isSpecial != null ">and t.is_special = #{isSpecial}</if>
+            <if test="isShow != null ">and t.is_show = #{isShow}</if>
+            <if test="showColour != null  and showColour != ''">and t.show_colour =#{showColour}</if>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="createBy != null ">and t.create_by = #{createBy}</if>
+            <if test="searchValue != null and searchValue != ''">
+                and
+                (t.classify_name like concat('%', #{classifyName}, '%') )
+            </if>
+            <if test="beginTime != null ">
+                and t.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpClassifyById" resultMap="XxpClassifyResult">
+        <include refid="selectXxpClassify"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpClassify" parameterType="com.zd.laboratory.domain.XxpClassify">
+        insert into xxp_classify
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <if test="classifyName != null">classify_name,</if>
+
+            <if test="classifyType != null">classify_type,</if>
+
+            <if test="sort != null">sort,</if>
+
+            <if test="isSpecial != null">is_special,</if>
+
+            <if test="isShow != null">is_show,</if>
+
+            <if test="showColour != null">show_colour,</if>
+
+            <if test="userId != null">user_id,</if>
+
+            <if test="createBy != null">create_by,</if>
+
+            <if test="createTime != null">create_time,</if>
+
+            <if test="updateBy != null">update_by,</if>
+
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="classifyName != null">#{classifyName},</if>
+            <if test="classifyType != null">#{classifyType},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="isSpecial != null">#{isSpecial},</if>
+            <if test="isShow != null">#{isShow},</if>
+            <if test="showColour != null">#{showColour},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpClassify" parameterType="com.zd.laboratory.domain.XxpClassify">
+        update xxp_classify
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="classifyName != null">classify_name = #{classifyName},</if>
+            <if test="classifyType != null">classify_type = #{classifyType},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="isSpecial != null">is_special = #{isSpecial},</if>
+            <if test="isShow != null">is_show = #{isShow},</if>
+            <if test="showColour != null">show_colour = #{showColour},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpClassifyById">
+        delete
+        from xxp_classify
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpClassifyByIds">
+        delete from xxp_classify where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 144 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpDutyMapper.xml

@@ -0,0 +1,144 @@
+<?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.zd.laboratory.mapper.XxpDutyMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpDuty" id="XxpDutyResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="userImg" column="user_img"/>
+        <result property="userType" column="user_type"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="subjectName" column="subject_name"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="college" column="college"/>
+        <result property="dutyTime" column="duty_time"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+
+    <sql id="selectXxpDuty">
+        select id,
+               user_id,
+               user_name,
+               user_phone,
+               user_img,
+               user_type,
+               subject_id,
+               subject_name,
+               dept_id,
+               dept_name,
+               college,
+               duty_time,
+               create_by_id,
+               create_by,
+               create_time
+        from xxp_duty t
+    </sql>
+
+    <select id="selectXxpDutyList" parameterType="com.zd.laboratory.domain.XxpDuty"
+            resultMap="XxpDutyResult">
+        <include refid="selectXxpDuty"/>
+        <where>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="userName != null and userName != ''">and t.user_name = #{userName}</if>
+            <if test="userPhone != null ">and t.user_phone = #{userPhone}</if>
+            <if test="userImg != null ">and t.user_img = #{userImg}</if>
+            <if test="userType != null ">and t.user_type = #{userType}</if>
+            <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
+            <if test="subjectName != null and subjectName != '' ">and t.subject_name = #{subjectName}</if>
+            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptName != null ">and t.dept_name = #{deptName}</if>
+            <if test="college != null ">and t.college = #{college}</if>
+            <if test="dutyTime != null  ">and t.duty_time =#{dutyTime}</if>
+            <if test="createById != null  ">and t.create_by_id =#{createById}</if>
+            <if test="createBy != null  ">and t.create_by =#{createBy}</if>
+            <if test="beginTime != null ">
+                and t.duty_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.duty_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpDutyById" resultMap="XxpDutyResult">
+        <include refid="selectXxpDuty"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpDuty" parameterType="com.zd.laboratory.domain.XxpDuty">
+        insert into xxp_duty
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="userPhone != null">user_phone,</if>
+            <if test="userImg != null">user_img,</if>
+            <if test="userType != null">user_type,</if>
+            <if test="subjectId != null">subject_id,</if>
+            <if test="subjectName != null">subject_name,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="college != null">college,</if>
+            <if test="dutyTime != null">duty_time,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="userPhone != null">#{userPhone},</if>
+            <if test="userImg != null">#{userImg},</if>
+            <if test="userType != null">#{userType},</if>
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="college != null">#{college},</if>
+            <if test="dutyTime != null">#{duty_time},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpDuty" parameterType="com.zd.laboratory.domain.XxpDuty">
+        update xxp_duty
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="userPhone != null">user_phone = #{userPhone},</if>
+            <if test="userImg != null">user_img = #{userImg},</if>
+            <if test="userType != null">user_type = #{userType},</if>
+            <if test="subjectId != null">subject_id = #{subjectId},</if>
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="college != null">college = #{college},</if>
+            <if test="dutyTime != null">duty_time = #{dutyTime},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpDutyById">
+        delete
+        from xxp_duty
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpDutyByIds">
+        delete from xxp_duty where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 132 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpInspectionMapper.xml

@@ -0,0 +1,132 @@
+<?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.zd.laboratory.mapper.XxpInspectionMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpInspection" id="XxpInspectionResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="subjectName" column="subject_name"/>
+        <result property="signIn" column="sign_in"/>
+        <result property="signOut" column="sign_out"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="residenceTime" column="residence_time"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+
+    <sql id="selectXxpInspection">
+        select id,
+               user_id,
+               user_name,
+               subject_id,
+               subject_name,
+               sign_in,
+               sign_out,
+               dept_id,
+               dept_name,
+               residence_time,
+               create_time
+        from xxp_inspection t
+    </sql>
+
+    <select id="selectXxpInspectionList" parameterType="com.zd.laboratory.domain.XxpInspection"
+            resultMap="XxpInspectionResult">
+        <include refid="selectXxpInspection"/>
+        <where>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="userName != null and userName != ''">and t.user_name = #{userName}</if>
+            <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
+            <if test="subjectName != null and subjectName != '' ">and t.subject_name = #{subjectName}</if>
+            <if test="signIn != null ">and t.sign_in = #{signIn}</if>
+            <if test="signOut != null ">and t.sign_out = #{signOut}</if>
+            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptName != null ">and t.dept_name = #{deptName}</if>
+            <if test="residenceTime != null  and residenceTime != ''">and t.residence_time =#{residenceTime}</if>
+
+            <if test="beginTime != null ">
+                and t.residence_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.residence_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpInspectionById" resultMap="XxpInspectionResult">
+        <include refid="selectXxpInspection"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpInspection" parameterType="com.zd.laboratory.domain.XxpInspection">
+        insert into xxp_inspection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <if test="userId != null">user_id,</if>
+
+            <if test="userName != null">user_name,</if>
+
+            <if test="subjectId != null">subject_id,</if>
+
+            <if test="subjectName != null">subject_name,</if>
+
+            <if test="signIn != null">sign_in,</if>
+
+            <if test="signOut != null">sign_out,</if>
+
+            <if test="deptId != null">dept_id,</if>
+
+            <if test="deptName != null">dept_name,</if>
+
+            <if test="residenceTime != null">residence_time,</if>
+
+            <if test="createTime != null">create_time,</if>
+
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="signIn != null">#{signIn},</if>
+            <if test="signOut != null">#{signOut},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="residenceTime != null">#{residenceTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpInspection" parameterType="com.zd.laboratory.domain.XxpInspection">
+        update xxp_inspection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="subjectId != null">subject_id = #{subjectId},</if>
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="signIn != null">sign_in = #{signIn},</if>
+            <if test="signOut != null">sign_out = #{signOut},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="residenceTime != null">residence_time = #{residenceTime},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpInspectionById">
+        delete
+        from xxp_inspection
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpInspectionByIds">
+        delete from xxp_inspection where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>