Merge remote-tracking branch 'origin/v1.0_lukg' into v1.0

This commit is contained in:
pan
2024-08-28 17:41:26 +08:00
40 changed files with 3683 additions and 304 deletions

View File

@@ -18,13 +18,15 @@
<result property="toolPrincipals" column="tool_principals" />
<result property="toolPrincipalsName" column="tool_principals_name" />
<result property="toolRespDept" column="tool_resp_dept" />
<result property="toolRespDeptName" column="tool_resp_dept_name" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<association property="dept" javaType="SysDept" resultMap="deptResult" />
<result property="procInstId" column="proc_inst_id" />
<result property="recordStatus" column="record_status" />
</resultMap>
<resultMap id="deptResult" type="SysDept">
@@ -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,association 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,9 @@
<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>
<if test="association != null">association,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="toolId != null">#{toolId},</if>
@@ -89,12 +99,16 @@
<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>
<if test="association != null">#{association},</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,15 +126,29 @@
<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>
<if test="association != null">association = #{association},</if>
</trim>
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,
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
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 as tool_resp_dept_name,u.association 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>
@@ -142,6 +170,13 @@
<if test="toolRespDept != null and toolRespDept != ''">
AND u.tool_resp_dept = #{toolRespDept}
</if>
<if test="createBy != null and createBy != '' and permission != true">
AND (u.create_by = #{createBy} or u.record_status = 'done')
</if>
<if test="recordStatus != null and recordStatus != ''">
AND u.record_status = #{recordStatus}
</if>
order by create_time desc
</select>
<delete id="deleteToolByToolId" parameterType="String">
@@ -154,4 +189,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,112 @@
<?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="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" />
<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_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="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>
</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="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>
<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="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>
<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="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>
<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>
<select id="checkUseApply" resultType="int">
SELECT count(*) FROM `t_use_apply_item` uai
left join `t_use_apply` ua on uai.apply_id = ua.id
WHERE ua.record_status = 'done'
and uai.tool_id = #{toolId}
and ua.user_id = #{userId}
</select>
</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>