You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
272 lines
15 KiB
272 lines
15 KiB
<?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.da.dangan.mapper.DaQyzMapper">
|
|
|
|
<resultMap type="DaQyz" id="DaQyzResult">
|
|
<result property="id" column="id" />
|
|
<result property="taskId" column="task_id" />
|
|
<result property="ywType" column="yw_type" />
|
|
<result property="muId" column="mu_id" />
|
|
<result property="muPath" column="mu_path" />
|
|
<result property="fwUnit" column="fw_unit" />
|
|
<result property="wjXh" column="wj_xh" />
|
|
<result property="name1" column="name1" />
|
|
<result property="sex1" column="sex1" />
|
|
<result property="cardId1" column="card_id1" />
|
|
<result property="name2" column="name2" />
|
|
<result property="sex2" column="sex2" />
|
|
<result property="cardId2" column="card_id2" />
|
|
<result property="name3" column="name3" />
|
|
<result property="sex3" column="sex3" />
|
|
<result property="cardId3" column="card_id3" />
|
|
<result property="name4" column="name4" />
|
|
<result property="sex4" column="sex4" />
|
|
<result property="cardId4" column="card_id4" />
|
|
<result property="qyReason" column="qy_reason" />
|
|
<result property="yAddress" column="y_address" />
|
|
<result property="qwAddress" column="qw_address" />
|
|
<result property="sDate" column="s_date" />
|
|
<result property="eDate" column="e_date" />
|
|
<result property="cbr" column="cbr" />
|
|
<result property="picIds" column="pic_ids" />
|
|
<result property="pictures" column="pictures" />
|
|
<result property="allPicIds" column="all_pic_ids" />
|
|
<result property="allPics" column="all_pics" />
|
|
<result property="errorCorrect" column="error_correct" />
|
|
<result property="auditStatus" column="audit_status" />
|
|
<result property="auditName" column="audit_name" />
|
|
<result property="auditResult" column="audit_result" />
|
|
<result property="auditReason" column="audit_reason" />
|
|
<result property="remark" column="remark" />
|
|
<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="selectDaQyzVo">
|
|
select id, task_id, yw_type, mu_id, mu_path, fw_unit, wj_xh, name1, sex1, card_id1, name2, sex2, card_id2, name3, sex3, card_id3, name4, sex4, card_id4, qy_reason, y_address, qw_address, s_date, e_date, cbr, pic_ids, pictures, all_pic_ids, all_pics, error_correct, audit_status, audit_name, audit_result, audit_reason, remark, create_by, create_time, update_by, update_time from da_qyz
|
|
</sql>
|
|
|
|
<select id="selectDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult">
|
|
select distinct q.* from da_qyz q
|
|
left join da_user_catalog uc on q.mu_id = uc.mu_id
|
|
<where>
|
|
<if test="userId != null"> and uc.user_id = #{userId}</if>
|
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
|
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
|
|
<if test="flag != null and flag=='1'.toString()"> and name1 !='无'</if>
|
|
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
|
|
<if test="muId != null "> and q.mu_id = #{muId}</if>
|
|
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
|
|
<if test="fwUnit != null and fwUnit != ''"> and fw_unit like concat('%', #{fwUnit}, '%') </if>
|
|
<if test="wjXh != null and wjXh != ''"> and wj_xh like concat('%', #{wjXh}, '%') </if>
|
|
<if test="name1 != null and name1 != ''">
|
|
and ( name1 like concat('%', #{name1}, '%')
|
|
or name2 like concat('%', #{name1}, '%')
|
|
or name3 like concat('%', #{name1}, '%')
|
|
or name4 like concat('%', #{name1}, '%')
|
|
)
|
|
</if>
|
|
<if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if>
|
|
<if test="cardId1 != null and cardId1 != ''">
|
|
and (card_id1 like concat('%', #{cardId1}, '%')
|
|
or card_id2 like concat('%', #{cardId1}, '%')
|
|
or card_id3 like concat('%', #{cardId1}, '%')
|
|
or card_id4 like concat('%', #{cardId1}, '%')
|
|
)
|
|
</if>
|
|
<if test="name2 != null and name2 != ''"> and name2 = #{name2}</if>
|
|
<if test="sex2 != null and sex2 != ''"> and sex2 = #{sex2}</if>
|
|
<if test="cardId2 != null and cardId2 != ''"> and card_id2 = #{cardId2}</if>
|
|
<if test="name3 != null and name3 != ''"> and name3 = #{name3}</if>
|
|
<if test="sex3 != null and sex3 != ''"> and sex3 = #{sex3}</if>
|
|
<if test="cardId3 != null and cardId3 != ''"> and card_id3 = #{cardId3}</if>
|
|
<if test="name4 != null and name4 != ''"> and name4 = #{name4}</if>
|
|
<if test="sex4 != null and sex4 != ''"> and sex4 = #{sex4}</if>
|
|
<if test="cardId4 != null and cardId4 != ''"> and card_id4 = #{cardId4}</if>
|
|
<if test="qyReason != null and qyReason != ''"> and qy_reason = #{qyReason}</if>
|
|
<if test="yAddress != null and yAddress != ''"> and y_address = #{yAddress}</if>
|
|
<if test="qwAddress != null and qwAddress != ''"> and qw_address = #{qwAddress}</if>
|
|
<if test="sDate != null and sDate != ''"> and s_date = #{sDate}</if>
|
|
<if test="eDate != null and eDate != ''"> and e_date = #{eDate}</if>
|
|
<if test="cbr != null and cbr != ''"> and cbr = #{cbr}</if>
|
|
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
|
|
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if>
|
|
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if>
|
|
<if test="allPics != null and allPics != ''"> and all_pics = #{allPics}</if>
|
|
<if test="errorCorrect != null and errorCorrect != ''"> and error_correct = #{errorCorrect}</if>
|
|
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
|
|
<if test="auditName != null and auditName != ''"> and audit_name like concat('%', #{auditName}, '%')</if>
|
|
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if>
|
|
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if>
|
|
</where>
|
|
order by id desc
|
|
</select>
|
|
<select id="searchDaQyzList" parameterType="DaQyz" resultMap="DaQyzResult">
|
|
select distinct q.* from da_qyz q
|
|
left join da_user_catalog uc on q.mu_id = uc.mu_id
|
|
<where>
|
|
<if test="userId != null"> and uc.user_id = #{userId}</if>
|
|
<if test="name1 != null and name1 != ''">
|
|
and ( name1 like concat('%', #{name1}, '%')
|
|
or name2 like concat('%', #{name1}, '%')
|
|
or name3 like concat('%', #{name1}, '%')
|
|
or name4 like concat('%', #{name1}, '%')
|
|
or card_id1 like concat('%', #{name1}, '%')
|
|
or card_id2 like concat('%', #{name1}, '%')
|
|
or card_id3 like concat('%', #{name1}, '%')
|
|
or card_id4 like concat('%', #{name1}, '%')
|
|
)
|
|
</if>
|
|
</where>
|
|
order by id desc
|
|
</select>
|
|
|
|
<select id="selectDaQyzById" parameterType="Long" resultMap="DaQyzResult">
|
|
<include refid="selectDaQyzVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDaQyz" parameterType="DaQyz" useGeneratedKeys="true" keyProperty="id">
|
|
insert into da_qyz
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="taskId != null">task_id,</if>
|
|
<if test="ywType != null">yw_type,</if>
|
|
<if test="muId != null">mu_id,</if>
|
|
<if test="muPath != null">mu_path,</if>
|
|
<if test="fwUnit != null">fw_unit,</if>
|
|
<if test="wjXh != null">wj_xh,</if>
|
|
<if test="name1 != null">name1,</if>
|
|
<if test="sex1 != null">sex1,</if>
|
|
<if test="cardId1 != null">card_id1,</if>
|
|
<if test="name2 != null">name2,</if>
|
|
<if test="sex2 != null">sex2,</if>
|
|
<if test="cardId2 != null">card_id2,</if>
|
|
<if test="name3 != null">name3,</if>
|
|
<if test="sex3 != null">sex3,</if>
|
|
<if test="cardId3 != null">card_id3,</if>
|
|
<if test="name4 != null">name4,</if>
|
|
<if test="sex4 != null">sex4,</if>
|
|
<if test="cardId4 != null">card_id4,</if>
|
|
<if test="qyReason != null">qy_reason,</if>
|
|
<if test="yAddress != null">y_address,</if>
|
|
<if test="qwAddress != null">qw_address,</if>
|
|
<if test="sDate != null">s_date,</if>
|
|
<if test="eDate != null">e_date,</if>
|
|
<if test="cbr != null">cbr,</if>
|
|
<if test="picIds != null">pic_ids,</if>
|
|
<if test="pictures != null">pictures,</if>
|
|
<if test="allPicIds != null">all_pic_ids,</if>
|
|
<if test="allPics != null">all_pics,</if>
|
|
<if test="errorCorrect != null">error_correct,</if>
|
|
<if test="auditStatus != null">audit_status,</if>
|
|
<if test="auditName != null">audit_name,</if>
|
|
<if test="auditResult != null">audit_result,</if>
|
|
<if test="auditReason != null">audit_reason,</if>
|
|
<if test="remark != null">remark,</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="taskId != null">#{taskId},</if>
|
|
<if test="ywType != null">#{ywType},</if>
|
|
<if test="muId != null">#{muId},</if>
|
|
<if test="muPath != null">#{muPath},</if>
|
|
<if test="fwUnit != null">#{fwUnit},</if>
|
|
<if test="wjXh != null">#{wjXh},</if>
|
|
<if test="name1 != null">#{name1},</if>
|
|
<if test="sex1 != null">#{sex1},</if>
|
|
<if test="cardId1 != null">#{cardId1},</if>
|
|
<if test="name2 != null">#{name2},</if>
|
|
<if test="sex2 != null">#{sex2},</if>
|
|
<if test="cardId2 != null">#{cardId2},</if>
|
|
<if test="name3 != null">#{name3},</if>
|
|
<if test="sex3 != null">#{sex3},</if>
|
|
<if test="cardId3 != null">#{cardId3},</if>
|
|
<if test="name4 != null">#{name4},</if>
|
|
<if test="sex4 != null">#{sex4},</if>
|
|
<if test="cardId4 != null">#{cardId4},</if>
|
|
<if test="qyReason != null">#{qyReason},</if>
|
|
<if test="yAddress != null">#{yAddress},</if>
|
|
<if test="qwAddress != null">#{qwAddress},</if>
|
|
<if test="sDate != null">#{sDate},</if>
|
|
<if test="eDate != null">#{eDate},</if>
|
|
<if test="cbr != null">#{cbr},</if>
|
|
<if test="picIds != null">#{picIds},</if>
|
|
<if test="pictures != null">#{pictures},</if>
|
|
<if test="allPicIds != null">#{allPicIds},</if>
|
|
<if test="allPics != null">#{allPics},</if>
|
|
<if test="errorCorrect != null">#{errorCorrect},</if>
|
|
<if test="auditStatus != null">#{auditStatus},</if>
|
|
<if test="auditName != null">#{auditName},</if>
|
|
<if test="auditResult != null">#{auditResult},</if>
|
|
<if test="auditReason != null">#{auditReason},</if>
|
|
<if test="remark != null">#{remark},</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="updateDaQyz" parameterType="DaQyz">
|
|
update da_qyz
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="taskId != null">task_id = #{taskId},</if>
|
|
<if test="ywType != null">yw_type = #{ywType},</if>
|
|
<if test="muId != null">mu_id = #{muId},</if>
|
|
<if test="muPath != null">mu_path = #{muPath},</if>
|
|
<if test="fwUnit != null">fw_unit = #{fwUnit},</if>
|
|
<if test="wjXh != null">wj_xh = #{wjXh},</if>
|
|
<if test="name1 != null">name1 = #{name1},</if>
|
|
<if test="sex1 != null">sex1 = #{sex1},</if>
|
|
<if test="cardId1 != null">card_id1 = #{cardId1},</if>
|
|
<if test="name2 != null">name2 = #{name2},</if>
|
|
<if test="sex2 != null">sex2 = #{sex2},</if>
|
|
<if test="cardId2 != null">card_id2 = #{cardId2},</if>
|
|
<if test="name3 != null">name3 = #{name3},</if>
|
|
<if test="sex3 != null">sex3 = #{sex3},</if>
|
|
<if test="cardId3 != null">card_id3 = #{cardId3},</if>
|
|
<if test="name4 != null">name4 = #{name4},</if>
|
|
<if test="sex4 != null">sex4 = #{sex4},</if>
|
|
<if test="cardId4 != null">card_id4 = #{cardId4},</if>
|
|
<if test="qyReason != null">qy_reason = #{qyReason},</if>
|
|
<if test="yAddress != null">y_address = #{yAddress},</if>
|
|
<if test="qwAddress != null">qw_address = #{qwAddress},</if>
|
|
<if test="sDate != null">s_date = #{sDate},</if>
|
|
<if test="eDate != null">e_date = #{eDate},</if>
|
|
<if test="cbr != null">cbr = #{cbr},</if>
|
|
<if test="picIds != null">pic_ids = #{picIds},</if>
|
|
<if test="pictures != null">pictures = #{pictures},</if>
|
|
<if test="allPicIds != null">all_pic_ids = #{allPicIds},</if>
|
|
<if test="allPics != null">all_pics = #{allPics},</if>
|
|
<if test="errorCorrect != null">error_correct = #{errorCorrect},</if>
|
|
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
|
<if test="auditName != null">audit_name = #{auditName},</if>
|
|
<if test="auditResult != null">audit_result = #{auditResult},</if>
|
|
<if test="auditReason != null">audit_reason = #{auditReason},</if>
|
|
<if test="remark != null">remark = #{remark},</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="deleteDaQyzById" parameterType="Long">
|
|
delete from da_qyz where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDaQyzByIds" parameterType="String">
|
|
delete from da_qyz where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |