|
@@ -24,43 +24,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="apNo" column="ap_no" />
|
|
|
<result property="processId" column="process_id" />
|
|
|
<result property="chapName" column="chap_name" />
|
|
|
+ <result property="auditId" column="audit_id" />
|
|
|
+ <result property="auditTime" column="audit_time" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTOpenItemVo">
|
|
|
select o.id, o.type, o.questionnaire_id, o.description, o.level, o.open_time, o.close_time, o.status, o.person_in_charge,
|
|
|
o.reviewer, o.result, o.deadline, o.remarks, o.dept_id,
|
|
|
- o.ap_no, o.process_id,
|
|
|
+ o.ap_no, o.process_id, o.audit_id,
|
|
|
u1.nick_name as person_in_charge_name, u2.nick_name as reviewer_name,
|
|
|
q.directory, q.code, q.name,
|
|
|
- c.name as chap_name
|
|
|
+ c.name as chap_name,
|
|
|
+ a.audit_time
|
|
|
from t_open_item as o
|
|
|
left join sys_user u1 on o.person_in_charge = u1.user_id
|
|
|
left join sys_user u2 on o.reviewer = u2.user_id
|
|
|
left join t_questionnaire q on q.id = o.questionnaire_id
|
|
|
left join t_chapter c on c.id = q.chapter_id
|
|
|
left join sys_dept d on d.dept_id = o.dept_id
|
|
|
+ left join t_audit a on a.id = o.audit_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTOpenItemList" parameterType="TOpenItem" resultMap="TOpenItemResult">
|
|
|
<include refid="selectTOpenItemVo"/>
|
|
|
<where>
|
|
|
- <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
- <if test="questionnaireId != null "> and questionnaire_id = #{questionnaireId}</if>
|
|
|
- <if test="description != null and description != ''"> and description = #{description}</if>
|
|
|
- <if test="level != null and level != ''"> and level = #{level}</if>
|
|
|
- <if test="openTime != null "> and open_time = #{openTime}</if>
|
|
|
- <if test="closeTime != null "> and close_time = #{closeTime}</if>
|
|
|
+ <if test="type != null and type != ''"> and o.type = #{type}</if>
|
|
|
+ <if test="questionnaireId != null "> and o.questionnaire_id = #{questionnaireId}</if>
|
|
|
+ <if test="description != null and description != ''"> and o.description = #{description}</if>
|
|
|
+ <if test="level != null and level != ''"> and o.level = #{level}</if>
|
|
|
+ <if test="openTime != null "> and o.open_time = #{openTime}</if>
|
|
|
+ <if test="closeTime != null "> and o.close_time = #{closeTime}</if>
|
|
|
<if test="status != null and status != ''"> and o.status = #{status}</if>
|
|
|
- <if test="personInCharge != null "> and person_in_charge = #{personInCharge}</if>
|
|
|
- <if test="reviewer != null "> and reviewer = #{reviewer}</if>
|
|
|
- <if test="result != null and result != ''"> and result = #{result}</if>
|
|
|
- <if test="deadline != null "> and deadline = #{deadline}</if>
|
|
|
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
+ <if test="personInCharge != null "> and o.person_in_charge = #{personInCharge}</if>
|
|
|
+ <if test="reviewer != null "> and o.reviewer = #{reviewer}</if>
|
|
|
+ <if test="result != null and result != ''"> and o.result = #{result}</if>
|
|
|
+ <if test="deadline != null "> and o.deadline = #{deadline}</if>
|
|
|
+ <if test="remarks != null and remarks != ''"> and o.remarks = #{remarks}</if>
|
|
|
<if test="deptId != null and deptId != ''"> and o.dept_id = #{deptId}</if>
|
|
|
<if test="apNo != null "> and p.ap_no = #{apNo}</if>
|
|
|
<if test="processId != null "> and p.process_id = #{processId}</if>
|
|
|
<if test="directory != null "> and q.directory = #{directory}</if>
|
|
|
<if test="code != null "> and q.code = #{code}</if>
|
|
|
+ <if test="auditId != null "> and o.audit_id = #{auditId}</if>
|
|
|
${params.dataScope}
|
|
|
</where>
|
|
|
order by o.level desc, o.open_time desc
|
|
@@ -89,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
<if test="apNo != null">ap_no,</if>
|
|
|
<if test="processId != null">process_id,</if>
|
|
|
+ <if test="auditId != null">audit_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="type != null">#{type},</if>
|
|
@@ -106,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
<if test="apNo != null">#{apNo},</if>
|
|
|
<if test="processId != null">#{processId},</if>
|
|
|
+ <if test="auditId != null">#{auditId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -127,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
<if test="apNo != null">ap_no = #{apNo},</if>
|
|
|
<if test="processId != null">process_id = #{processId},</if>
|
|
|
+ <if test="auditId != null">audit_id = #{auditId},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|