修改来函不显示专项任务,新增时显示无效任务,修改时不显示当前任务bug

This commit is contained in:
zhanghongqing
2018-03-16 12:17:09 +08:00
parent 1d6595cdbc
commit 0ff05e00ff
2 changed files with 38 additions and 12 deletions

View File

@@ -79,10 +79,31 @@
</select>
<!-- 根据来id查询 -->
<select id="getRequestInfoById" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from request_info
where id = #{id,jdbcType=BIGINT}
select
r.id AS id,
r.task_id AS taskId,
r.request_number AS requestNumber,
r.request_org AS requestOrg,
r.request_time AS requestTime,
r.request_title AS requestTitle,
r.request_content AS requestContent,
r.is_valid AS isValid,
r.is_audit AS isAudit,
s.name AS creatorName,
r.create_time AS createTime,
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
e.name AS auditorName,
r.audit_time AS auditTime,
t.task_name AS taskName
from request_info r
left join sys_user s on r.creator_id=s.id
left join sys_user u on r.editor_id=u.id
left join sys_user e on r.auditor_id=e.id
left join task_info t on r.task_id=t.id
where r.is_valid=1 and r.is_audit !=3
and r.id = #{id,jdbcType=BIGINT}
</select>
<!-- 新增 -->
<insert id="insert" parameterType="com.nis.domain.configuration.RequestInfo">
@@ -99,31 +120,32 @@
editor_id,
edit_time,
auditor_id,
audit_time
audit_time,
task_id
)
values (#{requestNumber,jdbcType=VARCHAR}, #{requestOrg,jdbcType=VARCHAR},
#{requestTime,jdbcType=DATE}, #{requestTitle,jdbcType=VARCHAR}, #{requestContent,jdbcType=VARCHAR},
#{isValid,jdbcType=INTEGER}, #{isAudit,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=DATE}, #{editorId,jdbcType=INTEGER}, #{editTime,jdbcType=DATE},
#{auditorId,jdbcType=INTEGER}, #{auditTime,jdbcType=DATE})
#{auditorId,jdbcType=INTEGER}, #{auditTime,jdbcType=DATE}, #{taskId,jdbcType=BIGINT})
</insert>
<!--修改 -->
<update id="update" parameterType="com.nis.domain.configuration.RequestInfo">
update request_info
<set>
<if test="requestNumber != null">
<if test="requestNumber != null and requestNumber!=''" >
request_number = #{requestNumber,jdbcType=VARCHAR},
</if>
<if test="requestOrg != null">
<if test="requestOrg != null and requestOrg!=''">
request_org = #{requestOrg,jdbcType=VARCHAR},
</if>
<if test="requestTime != null">
request_time = #{requestTime,jdbcType=DATE},
</if>
<if test="requestTitle != null">
<if test="requestTitle != null and requestTitle!=''">
request_title = #{requestTitle,jdbcType=VARCHAR},
</if>
<if test="requestContent != null">
<if test="requestContent != null and requestContent!=''">
request_content = #{requestContent,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
@@ -150,6 +172,9 @@
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=DATE},
</if>
<if test="taskId != null">
task_id = #{taskId},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>

View File

@@ -24,9 +24,10 @@
<select id="findList" parameterType="com.nis.domain.configuration.TaskInfo" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from task_info
from task_info t
where is_valid=1 and is_audit !=3
<if test="id!=null">
where id = #{id,jdbcType=BIGINT}
AND id = #{id,jdbcType=BIGINT}
</if>
</select>