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

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

parent 22bf254d
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TStaningBookMapper"> <mapper namespace="com.zehong.system.mapper.TStaningBookMapper">
<resultMap type="TStaningBook" id="TStaningBookResult"> <resultMap type="TStaningBook" id="TStaningBookResult">
<result property="bookId" column="book_id" /> <result property="bookId" column="book_id" />
<result property="troubleName" column="trouble_name" /> <result property="troubleName" column="trouble_name" />
...@@ -46,12 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -46,12 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectTStaningBookList" parameterType="TStaningBook" resultMap="TStaningBookResult"> <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, s2.`staff_name` AS rectificationName,
s3.`staff_name` AS personLiableName , s3.`staff_name` AS personLiableName ,
d.`dept_name` AS deptName d.`dept_name` AS deptName
FROM t_staning_book b FROM t_staning_book b
LEFT JOIN t_staff s1 ON b.`escalation` = s1.`staff_id` 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 s2 ON b.`rectification` = s2.`staff_id`
LEFT JOIN t_staff s3 ON b.`person_liable` = s3.`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` LEFT JOIN sys_dept d ON d.`dept_id` = b.`dept_id`
...@@ -66,12 +67,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -66,12 +67,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="state != null "> and b.state = #{state}</if> <if test="state != null "> and b.state = #{state}</if>
</where> </where>
</select> </select>
<select id="selectTStaningBookById" parameterType="Long" resultMap="TStaningBookResult"> <select id="selectTStaningBookById" parameterType="Long" resultMap="TStaningBookResult">
<include refid="selectTStaningBookVo"/> <include refid="selectTStaningBookVo"/>
where book_id = #{bookId} where book_id = #{bookId}
</select> </select>
<insert id="insertTStaningBook" parameterType="TStaningBook" useGeneratedKeys="true" keyProperty="bookId"> <insert id="insertTStaningBook" parameterType="TStaningBook" useGeneratedKeys="true" keyProperty="bookId">
insert into t_staning_book insert into t_staning_book
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -179,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -179,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteTStaningBookByIds" parameterType="String"> <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=")"> <foreach item="bookId" collection="array" open="(" separator="," close=")">
#{bookId} #{bookId}
</foreach> </foreach>
...@@ -196,4 +197,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -196,4 +197,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_SUB(now(), INTERVAL 365 DAY) &lt; date(find_time) and DATE_SUB(now(), INTERVAL 365 DAY) &lt; date(find_time)
</if> </if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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