工具发布流程和使用申请流程

This commit is contained in:
liukang
2024-08-21 18:06:12 +08:00
parent 2a75898712
commit fbc96e81e3
34 changed files with 3408 additions and 176 deletions

View File

@@ -24,6 +24,8 @@
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="procInstId" column="proc_inst_id" />
<result property="recordStatus" column="record_status" />
<association property="dept" javaType="SysDept" resultMap="deptResult" />
</resultMap>
@@ -38,7 +40,7 @@
</resultMap>
<sql id="selectToolVo">
select tool_id, tool_code, tool_name, tool_type, tool_source, tool_use, test_situation, function_desc, apply_condition, operate_explain, tool_principals, tool_principals_name, tool_resp_dept, status, remark, create_by, create_time, update_by, update_time from t_tool
select tool_id, tool_code, tool_name, tool_type, tool_source, tool_use, test_situation, function_desc, apply_condition, operate_explain, tool_principals, tool_principals_name, tool_resp_dept, status, remark, create_by, create_time, update_by, update_time,proc_inst_id,record_status from t_tool
</sql>
<select id="selectToolByToolId" parameterType="String" resultMap="ToolResult">
@@ -46,6 +48,11 @@
where tool_id = #{toolId}
</select>
<select id="getInfoByBpmcId" parameterType="String" resultMap="ToolResult">
<include refid="selectToolVo"/>
where proc_inst_id = #{bpmcId}
</select>
<insert id="insertTool" parameterType="Tool">
insert into t_tool
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -68,6 +75,8 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="procInstId != null">proc_inst_id,</if>
<if test="recordStatus != null">record_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="toolId != null">#{toolId},</if>
@@ -89,12 +98,15 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="procInstId != null">#{procInstId},</if>
<if test="recordStatus != null">#{recordStatus},</if>
</trim>
</insert>
<update id="updateTool" parameterType="Tool">
update t_tool
<trim prefix="SET" suffixOverrides=",">
<if test="toolCode != null">tool_code = #{toolCode},</if>
<if test="toolName != null">tool_name = #{toolName},</if>
<if test="toolType != null">tool_type = #{toolType},</if>
<if test="toolSource != null">tool_source = #{toolSource},</if>
@@ -112,6 +124,7 @@
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="recordStatus != null">record_status = #{recordStatus},</if>
</trim>
where tool_id = #{toolId}
</update>
@@ -154,4 +167,4 @@
#{toolId}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rzdata.web.mapper.UseApplyItemMapper">
<resultMap type="UseApplyItem" id="UseApplyItemResult">
<result property="id" column="id" />
<result property="applyId" column="apply_id" />
<result property="toolId" column="tool_id" />
<result property="toolCode" column="tool_code" />
<result property="toolName" column="tool_name" />
<result property="toolType" column="tool_type" />
<result property="toolPrincipals" column="tool_principals" />
<result property="toolPrincipalsName" column="tool_principals_name" />
<result property="toolRespDept" column="tool_resp_dept" />
</resultMap>
<sql id="selectUseApplyItemVo">
select id, apply_id, tool_id, tool_code, tool_name, tool_type, tool_principals, tool_principals_name, tool_resp_dept from t_use_apply_item
</sql>
<select id="selectUseApplyItemList" parameterType="UseApplyItem" resultMap="UseApplyItemResult">
<include refid="selectUseApplyItemVo"/>
<where>
<if test="applyId != null and applyId != ''"> and apply_id = #{applyId}</if>
<if test="toolId != null and toolId != ''"> and tool_id = #{toolId}</if>
<if test="toolCode != null and toolCode != ''"> and tool_code = #{toolCode}</if>
<if test="toolName != null and toolName != ''"> and tool_name like concat('%', #{toolName}, '%')</if>
<if test="toolType != null and toolType != ''"> and tool_type = #{toolType}</if>
<if test="toolPrincipals != null and toolPrincipals != ''"> and tool_principals = #{toolPrincipals}</if>
<if test="toolPrincipalsName != null and toolPrincipalsName != ''"> and tool_principals_name like concat('%', #{toolPrincipalsName}, '%')</if>
<if test="toolRespDept != null and toolRespDept != ''"> and tool_resp_dept = #{toolRespDept}</if>
</where>
</select>
<select id="selectUseApplyItemById" parameterType="String" resultMap="UseApplyItemResult">
<include refid="selectUseApplyItemVo"/>
where id = #{id}
</select>
<insert id="insertUseApplyItem" parameterType="UseApplyItem">
insert into t_use_apply_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="applyId != null">apply_id,</if>
<if test="toolId != null">tool_id,</if>
<if test="toolCode != null">tool_code,</if>
<if test="toolName != null">tool_name,</if>
<if test="toolType != null">tool_type,</if>
<if test="toolPrincipals != null">tool_principals,</if>
<if test="toolPrincipalsName != null">tool_principals_name,</if>
<if test="toolRespDept != null">tool_resp_dept,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="applyId != null">#{applyId},</if>
<if test="toolId != null">#{toolId},</if>
<if test="toolCode != null">#{toolCode},</if>
<if test="toolName != null">#{toolName},</if>
<if test="toolType != null">#{toolType},</if>
<if test="toolPrincipals != null">#{toolPrincipals},</if>
<if test="toolPrincipalsName != null">#{toolPrincipalsName},</if>
<if test="toolRespDept != null">#{toolRespDept},</if>
</trim>
</insert>
<update id="updateUseApplyItem" parameterType="UseApplyItem">
update t_use_apply_item
<trim prefix="SET" suffixOverrides=",">
<if test="applyId != null">apply_id = #{applyId},</if>
<if test="toolId != null">tool_id = #{toolId},</if>
<if test="toolCode != null">tool_code = #{toolCode},</if>
<if test="toolName != null">tool_name = #{toolName},</if>
<if test="toolType != null">tool_type = #{toolType},</if>
<if test="toolPrincipals != null">tool_principals = #{toolPrincipals},</if>
<if test="toolPrincipalsName != null">tool_principals_name = #{toolPrincipalsName},</if>
<if test="toolRespDept != null">tool_resp_dept = #{toolRespDept},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteUseApplyItemById" parameterType="String">
delete from t_use_apply_item where id = #{id}
</delete>
<delete id="deleteUseApplyItemByIds" parameterType="String">
delete from t_use_apply_item where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteByApplyId" parameterType="String">
delete from t_use_apply_item where apply_id = #{applyId}
</delete>
</mapper>

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rzdata.web.mapper.UseApplyMapper">
<resultMap type="UseApply" id="UseApplyResult">
<result property="id" column="id" />
<result property="userName" column="user_name" />
<result property="deptId" column="dept_id" />
<result property="reason" column="reason" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="procInstId" column="proc_inst_id" />
<result property="recordStatus" column="record_status" />
</resultMap>
<sql id="selectUseApplyVo">
select id, user_name, dept_id, 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="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<if test="reason != null and reason != ''"> and reason = #{reason}</if>
</where>
</select>
<select id="selectUseApplyById" parameterType="String" resultMap="UseApplyResult">
<include refid="selectUseApplyVo"/>
where id = #{id}
</select>
<select id="getInfoByBpmcId" parameterType="String" resultMap="UseApplyResult">
<include refid="selectUseApplyVo"/>
where proc_inst_id = #{bpmcId}
</select>
<insert id="insertUseApply" parameterType="UseApply">
insert into t_use_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="userName != null">user_name,</if>
<if test="deptId != null">dept_id,</if>
<if test="reason != null">reason,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="procInstId != null">proc_inst_id,</if>
<if test="recordStatus != null">record_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="userName != null">#{userName},</if>
<if test="deptId != null">#{deptId},</if>
<if test="reason != null">#{reason},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="procInstId != null">#{procInstId},</if>
<if test="recordStatus != null">#{recordStatus},</if>
</trim>
</insert>
<update id="updateUseApply" parameterType="UseApply">
update t_use_apply
<trim prefix="SET" suffixOverrides=",">
<if test="userName != null">user_name = #{userName},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="reason != null">reason = #{reason},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="recordStatus != null">record_status = #{recordStatus},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteUseApplyById" parameterType="String">
delete from t_use_apply where id = #{id}
</delete>
<delete id="deleteUseApplyByIds" parameterType="String">
delete from t_use_apply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rzdata.web.mapper.WorkflowLogMapper">
<resultMap type="WorkflowLog" id="WorkflowLogResult">
<result property="id" column="id" />
<result property="procInstId" column="proc_inst_id" />
<result property="procDefKey" column="proc_def_key" />
<result property="businessId" column="business_id" />
<result property="actDefId" column="act_def_id" />
<result property="actDefName" column="act_def_name" />
<result property="nextDefId" column="next_def_id" />
<result property="nextDefName" column="next_def_name" />
<result property="actInstId" column="act_inst_id" />
<result property="opinion" column="opinion" />
<result property="sender" column="sender" />
<result property="senderDeptId" column="sender_dept_id" />
<result property="receiver" column="receiver" />
<result property="actStatus" column="act_status" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="pass" column="pass" />
<result property="tenantId" column="tenant_id" />
<result property="review" column="review" />
<result property="batch" column="batch" />
</resultMap>
<sql id="selectWorkflowLogVo">
select id, proc_inst_id, proc_def_key, business_id, act_def_id, act_def_name, next_def_id, next_def_name, act_inst_id, opinion, sender, sender_dept_id, receiver, act_status, create_time, update_time, pass, tenant_id, review, batch from t_workflow_log
</sql>
<select id="selectWorkflowLogList" parameterType="WorkflowLog" resultMap="WorkflowLogResult">
<include refid="selectWorkflowLogVo"/>
<where>
<if test="procInstId != null and procInstId != ''"> and proc_inst_id = #{procInstId}</if>
<if test="procDefKey != null and procDefKey != ''"> and proc_def_key = #{procDefKey}</if>
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
<if test="actDefId != null and actDefId != ''"> and act_def_id = #{actDefId}</if>
<if test="actDefName != null and actDefName != ''"> and act_def_name like concat('%', #{actDefName}, '%')</if>
<if test="nextDefId != null and nextDefId != ''"> and next_def_id = #{nextDefId}</if>
<if test="nextDefName != null and nextDefName != ''"> and next_def_name like concat('%', #{nextDefName}, '%')</if>
<if test="actInstId != null and actInstId != ''"> and act_inst_id = #{actInstId}</if>
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
<if test="sender != null and sender != ''"> and sender = #{sender}</if>
<if test="senderDeptId != null and senderDeptId != ''"> and sender_dept_id = #{senderDeptId}</if>
<if test="receiver != null and receiver != ''"> and receiver = #{receiver}</if>
<if test="actStatus != null and actStatus != ''"> and act_status = #{actStatus}</if>
<if test="pass != null "> and pass = #{pass}</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id = #{tenantId}</if>
<if test="review != null "> and review = #{review}</if>
<if test="batch != null and batch != ''"> and batch = #{batch}</if>
</where>
order by create_time desc
</select>
<select id="selectWorkflowLogById" parameterType="String" resultMap="WorkflowLogResult">
<include refid="selectWorkflowLogVo"/>
where id = #{id}
</select>
<insert id="insertWorkflowLog" parameterType="WorkflowLog">
insert into t_workflow_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="procInstId != null">proc_inst_id,</if>
<if test="procDefKey != null">proc_def_key,</if>
<if test="businessId != null">business_id,</if>
<if test="actDefId != null">act_def_id,</if>
<if test="actDefName != null">act_def_name,</if>
<if test="nextDefId != null">next_def_id,</if>
<if test="nextDefName != null">next_def_name,</if>
<if test="actInstId != null">act_inst_id,</if>
<if test="opinion != null">opinion,</if>
<if test="sender != null">sender,</if>
<if test="senderDeptId != null">sender_dept_id,</if>
<if test="receiver != null">receiver,</if>
<if test="actStatus != null">act_status,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="pass != null">pass,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="review != null">review,</if>
<if test="batch != null">batch,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="procInstId != null">#{procInstId},</if>
<if test="procDefKey != null">#{procDefKey},</if>
<if test="businessId != null">#{businessId},</if>
<if test="actDefId != null">#{actDefId},</if>
<if test="actDefName != null">#{actDefName},</if>
<if test="nextDefId != null">#{nextDefId},</if>
<if test="nextDefName != null">#{nextDefName},</if>
<if test="actInstId != null">#{actInstId},</if>
<if test="opinion != null">#{opinion},</if>
<if test="sender != null">#{sender},</if>
<if test="senderDeptId != null">#{senderDeptId},</if>
<if test="receiver != null">#{receiver},</if>
<if test="actStatus != null">#{actStatus},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="pass != null">#{pass},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="review != null">#{review},</if>
<if test="batch != null">#{batch},</if>
</trim>
</insert>
<update id="updateWorkflowLog" parameterType="WorkflowLog">
update t_workflow_log
<trim prefix="SET" suffixOverrides=",">
<if test="procInstId != null">proc_inst_id = #{procInstId},</if>
<if test="procDefKey != null">proc_def_key = #{procDefKey},</if>
<if test="businessId != null">business_id = #{businessId},</if>
<if test="actDefId != null">act_def_id = #{actDefId},</if>
<if test="actDefName != null">act_def_name = #{actDefName},</if>
<if test="nextDefId != null">next_def_id = #{nextDefId},</if>
<if test="nextDefName != null">next_def_name = #{nextDefName},</if>
<if test="actInstId != null">act_inst_id = #{actInstId},</if>
<if test="opinion != null">opinion = #{opinion},</if>
<if test="sender != null">sender = #{sender},</if>
<if test="senderDeptId != null">sender_dept_id = #{senderDeptId},</if>
<if test="receiver != null">receiver = #{receiver},</if>
<if test="actStatus != null">act_status = #{actStatus},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="pass != null">pass = #{pass},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="review != null">review = #{review},</if>
<if test="batch != null">batch = #{batch},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWorkflowLogById" parameterType="String">
delete from t_workflow_log where id = #{id}
</delete>
<delete id="deleteWorkflowLogByIds" parameterType="String">
delete from t_workflow_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>