工具发布流程和使用申请流程细节优化
This commit is contained in:
@@ -129,11 +129,23 @@
|
||||
where tool_id = #{toolId}
|
||||
</update>
|
||||
|
||||
<select id="checkToolExist" parameterType="Tool" resultType="int">
|
||||
select count(*) from t_tool t
|
||||
<where>
|
||||
t.tool_code = #{toolCode} and t.tool_resp_dept = #{toolRespDept}
|
||||
and (t.record_status = 'doing' or t.record_status = 'done')
|
||||
<if test="toolId!=null and toolId!=''">
|
||||
and t.tool_id != #{toolId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectToolList" parameterType="Tool" resultMap="ToolResult">
|
||||
select u.tool_id, u.tool_code, u.tool_name, u.tool_type, u.tool_source, u.tool_use, u.test_situation, u.function_desc, u.apply_condition, u.operate_explain,
|
||||
select u.tool_id, u.tool_code, u.tool_name, u.tool_type, u.tool_source, u.tool_use, u.test_situation, u.function_desc, u.apply_condition, u.operate_explain,u.record_status,u.proc_inst_id,
|
||||
u.tool_principals, u.tool_principals_name, u.tool_resp_dept, u.status, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from t_tool u
|
||||
left join sys_dept d on u.tool_resp_dept = d.dept_id
|
||||
where 1=1
|
||||
and u.record_status != 'cancel'
|
||||
<if test="toolId != null and toolId != ''">
|
||||
AND u.tool_id = #{toolId}
|
||||
</if>
|
||||
@@ -155,6 +167,10 @@
|
||||
<if test="toolRespDept != null and toolRespDept != ''">
|
||||
AND u.tool_resp_dept = #{toolRespDept}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND (u.create_by = #{createBy} or u.record_status = 'done')
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteToolByToolId" parameterType="String">
|
||||
|
||||
@@ -6,8 +6,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<resultMap type="UseApply" id="UseApplyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@@ -18,13 +20,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUseApplyVo">
|
||||
select id, user_name, dept_id, reason, create_by, create_time, update_by, update_time from t_use_apply
|
||||
select id, user_id, nick_name, dept_id, dept_name, reason, create_by, create_time, update_by, update_time from t_use_apply
|
||||
</sql>
|
||||
|
||||
<select id="selectUseApplyList" parameterType="UseApply" resultMap="UseApplyResult">
|
||||
<include refid="selectUseApplyVo"/>
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="userId != null and userId != ''"> and user_id like concat('%', #{userId}, '%')</if>
|
||||
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
|
||||
<if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
||||
</where>
|
||||
@@ -44,8 +46,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
insert into t_use_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="deptName != null">dept_name,</if>
|
||||
<if test="reason != null">reason,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
@@ -56,8 +60,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="deptName != null">#{deptName},</if>
|
||||
<if test="reason != null">#{reason},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
@@ -71,8 +77,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="updateUseApply" parameterType="UseApply">
|
||||
update t_use_apply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="deptName != null">dept_name = #{deptName},</if>
|
||||
<if test="reason != null">reason = #{reason},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
|
||||
Reference in New Issue
Block a user