|
@@ -26,12 +26,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTOpenItemVo">
|
|
|
- select id, type, questionnaire_id, description, level, open_time, close_time, o.status, person_in_charge, reviewer, result, deadline, remarks, o.dept_id,
|
|
|
- o.ap_no, o.process_id,
|
|
|
+ select id, type, questionnaire_id, description, level, open_time, close_time, d.status, person_in_charge, reviewer, result, deadline, remarks, d.dept_id,
|
|
|
+ d.ap_no, d.process_id,
|
|
|
u1.nick_name as person_in_charge_name, u2.nick_name as reviewer_name
|
|
|
- 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
|
|
|
+ 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
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTOpenItemList" parameterType="TOpenItem" resultMap="TOpenItemResult">
|
|
@@ -43,21 +43,22 @@ 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 o.status = #{status}</if>
|
|
|
+ <if test="status != null and status != ''"> and d.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 o.dept_id = #{deptId}</if>
|
|
|
+ <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId}</if>
|
|
|
<if test="apNo != null "> and p.ap_no = #{apNo}</if>
|
|
|
<if test="processId != null "> and p.process_id = #{processId}</if>
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTOpenItemById" parameterType="Long" resultMap="TOpenItemResult">
|
|
|
<include refid="selectTOpenItemVo"/>
|
|
|
- where o.id = #{id}
|
|
|
+ where d.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertTOpenItem" parameterType="TOpenItem" useGeneratedKeys="true" keyProperty="id">
|