|
@@ -27,17 +27,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTOpenItemVo">
|
|
|
- select d.id, d.type, d.questionnaire_id, d.description, d.level, d.open_time, d.close_time, d.status, d.person_in_charge,
|
|
|
- d.reviewer, d.result, d.deadline, d.remarks, d.dept_id,
|
|
|
- d.ap_no, d.process_id,
|
|
|
+ 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,
|
|
|
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
|
|
|
- from t_open_item as d
|
|
|
- left join sys_user u1 on d.person_in_charge = u1.user_id
|
|
|
- left join sys_user u2 on d.reviewer = u2.user_id
|
|
|
- left join t_questionnaire q on q.id = d.questionnaire_id
|
|
|
+ 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
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTOpenItemList" parameterType="TOpenItem" resultMap="TOpenItemResult">
|
|
@@ -49,25 +50,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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="status != null and status != ''"> and d.status = #{status}</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="deptId != null and deptId != ''"> and d.dept_id = #{deptId}</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>
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
- ${params.dataScope}
|
|
|
- order by d.level desc, d.open_time desc
|
|
|
+ order by o.level desc, o.open_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTOpenItemById" parameterType="Long" resultMap="TOpenItemResult">
|
|
|
<include refid="selectTOpenItemVo"/>
|
|
|
- where d.id = #{id}
|
|
|
+ where o.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertTOpenItem" parameterType="TOpenItem" useGeneratedKeys="true" keyProperty="id">
|