机构管理.公章管理优化

This commit is contained in:
hejinbo
2023-11-15 18:27:09 +08:00
parent 044cffeb7f
commit 8b0eae8dca
13 changed files with 495 additions and 554 deletions
@@ -5,48 +5,46 @@
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper">
<resultMap type="DeptIdentify" id="DeptIdentifyResult">
<id property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
<result property="identifyStatus" column="identify_status" />
<result property="identifyDate" column="identify_date" />
<result property="isUse" column="is_use" />
<result property="nickName" column="nick_name" />
<result property="phonenumber" column="phonenumber" />
<result property="deptName" column="dept_name" />
<result property="sealName" column="seal_name" />
<result property="orgId" column="org_id" />
<result property="authFlowId" column="auth_flow_id" />
<result property="sealId" column="seal_id" />
<result property="sealStatus" column="seal_status" />
<result property="identifyName" column="identify_name" />
<result property="operName" column="oper_name" />
<result property="operPhone" column="oper_phone" />
</resultMap>
<select id="selectDeptIdentify" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
SELECT ud.user_id , ud.nick_name ,ud.phonenumber ,ud.dept_id ,d.dept_name
FROM (SELECT u.user_id , u.nick_name ,u.phonenumber ,u.dept_id
FROM sys_user_post up left join sys_user u on u.user_id = up.user_id
left join sys_post sp on up.post_id = sp.post_id
where sp.post_code = 'jbr') ud left join sys_dept d on ud.dept_id = d.dept_id
WHERE d.dept_type = 1
</select>
<select id="selectDeptIdentifyBydeptid" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
SELECT d.*
from dept_identify d
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
oper_name,oper_phone,identify_type
FROM dept_identify
<where>
<if test="deptId != null">
AND d.dept_id = #{deptId}
</if>
<if test="userId != null">
AND d.user_id = #{userId}
</if>
<if test="id != null">
AND d.id = #{id}
AND id = #{id}
</if>
<if test="identifyStatus != null">
AND identify_status = #{identifyStatus}
</if>
<if test="isUse != null">
AND is_use = #{isUse}
</if>
<if test="identifyName != null and identifyName != ''">
AND identify_name = #{identifyName}
</if>
<if test="operName != null and operName != ''">
AND oper_name = #{operName}
</if>
<if test="operPhone != null and operPhone != ''">
AND oper_phone = #{operPhone}
</if>
AND identify_type = 1
</where>
</select>
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
insert into dept_identify(
<if test="deptId != null">dept_id,</if>
@@ -54,59 +52,22 @@
<if test="identifyStatus != null">identify_status,</if>
<if test="identifyDate != null">identify_date,</if>
<if test="isUse != null">is_use,</if>
<if test="sealName != null and sealName != ''">seal_name,</if>
<if test="orgId != null and orgId != ''">org_id,</if>
<if test="authFlowId != null and authFlowId != ''">auth_flow_id,</if>
<if test="sealId != null and sealId != ''">seal_id</if>
<if test="authFlowId != null and authFlowId != ''">auth_flow_id</if>
)values(
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
<if test="identifyStatus != null">#{identifyStatus},</if>
<if test="identifyDate != null">#{identifyDate},</if>
<if test="isUse != null">#{isUse},</if>
<if test="sealName != null and sealName != ''">#{sealName},</if>
<if test="orgId != null and orgId != ''">#{orgId},</if>
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId},</if>
<if test="sealId != null and sealId != ''">#{sealId}</if>
<if test="authFlowId != null and authFlowId != '' ">#{authFlowId}</if>
)
</insert>
<select id="selectDeptIdentifylist" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
SELECT d.id ,d.dept_id ,d.user_id, d.identify_status ,d.identify_date ,d.is_use , d.seal_name,
d.org_id , d.seal_id ,sd.dept_name , u.nick_name ,u.phonenumber
from dept_identify d left join sys_dept sd on d.dept_id = sd.dept_id
left join sys_user u on u.user_id = d.user_id
<where>
<if test="identifyStatus != null">
AND d.identify_status = #{identifyStatus}
</if>
<if test="isUse != null">
AND d.is_use = #{isUse}
</if>
<if test="id != null">
AND d.id = #{id}
</if>
</where>
</select>
<select id="selectDeptIdentifylistother" parameterType="DeptIdentify" resultMap="DeptIdentifyResult">
SELECT d.id ,d.dept_id ,d.user_id,d.identify_status ,d.is_use ,d.seal_name ,d.seal_id ,d.annex_id
from dept_identify d
<where>
<if test="identifyStatus != null">
AND d.identify_status = #{identifyStatus}
</if>
<if test="id != null">
AND d.id = #{id}
</if>
<if test="sealStatus != null">
AND d.seal_status = #{sealStatus}
</if>
<if test="deptId != null">
AND d.dept_id = #{deptId}
</if>
</where>
</select>
<update id="updateDeptIdentify" parameterType="DeptIdentify">
@@ -115,11 +76,8 @@
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
<if test="isUse != null">is_use = #{isUse},</if>
<if test="identifyStatus != null ">identify_status = #{identifyStatus},</if>
<if test="sealName != null and sealName != ''">seal_name = #{sealName},</if>
<if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
<if test="sealId != null and sealId != ''">seal_id = #{sealId},</if>
<if test="sealStatus != null ">seal_status = #{sealStatus},</if>
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId},</if>
<if test="authFlowId != null and authFlowId != '' ">auth_flow_id = #{authFlowId}</if>
</set>
<where>
<if test="id != null">