Commit 59cda3e7 authored by 吴卿华's avatar 吴卿华

修改 隐患台账没上报人问题

parent 22bf254d
......@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TStaningBookMapper">
<resultMap type="TStaningBook" id="TStaningBookResult">
<result property="bookId" column="book_id" />
<result property="troubleName" column="trouble_name" />
......@@ -46,12 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectTStaningBookList" parameterType="TStaningBook" resultMap="TStaningBookResult">
SELECT b.*,s1.`staff_name` AS escalationName,
SELECT b.*,s5.user_name AS escalationName,
s2.`staff_name` AS rectificationName,
s3.`staff_name` AS personLiableName ,
d.`dept_name` AS deptName
FROM t_staning_book b
LEFT JOIN t_staff s1 ON b.`escalation` = s1.`staff_id`
LEFT JOIN sys_user s5 ON b.escalation=s5.user_id
LEFT JOIN t_staff s2 ON b.`rectification` = s2.`staff_id`
LEFT JOIN t_staff s3 ON b.`person_liable` = s3.`staff_id`
LEFT JOIN sys_dept d ON d.`dept_id` = b.`dept_id`
......@@ -66,12 +67,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="state != null "> and b.state = #{state}</if>
</where>
</select>
<select id="selectTStaningBookById" parameterType="Long" resultMap="TStaningBookResult">
<include refid="selectTStaningBookVo"/>
where book_id = #{bookId}
</select>
<insert id="insertTStaningBook" parameterType="TStaningBook" useGeneratedKeys="true" keyProperty="bookId">
insert into t_staning_book
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -179,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTStaningBookByIds" parameterType="String">
delete from t_staning_book where book_id in
delete from t_staning_book where book_id in
<foreach item="bookId" collection="array" open="(" separator="," close=")">
#{bookId}
</foreach>
......@@ -196,4 +197,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_SUB(now(), INTERVAL 365 DAY) &lt; date(find_time)
</if>
</select>
</mapper>
\ No newline at end of file
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment