|
|
@@ -6,7 +6,7 @@
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
submit_id
|
|
|
- , apv_id, doc_code, data_id, data_no, submit_user, apv_result, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_id, op_api_id, op_timestamp, op_db_user
|
|
|
+ , apv_id, doc_code, data_id, data_no, submit_user, apv_result, remarks, flg_valid, fty_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_timestamp, op_db_user
|
|
|
</sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -20,17 +20,13 @@
|
|
|
<result column="apv_result" property="apvResult"/>
|
|
|
<result column="remarks" property="remarks"/>
|
|
|
<result column="flg_valid" property="flgValid"/>
|
|
|
- <result column="cp_id" property="FtyId"/>
|
|
|
+ <result column="fty_id" property="ftyId"/>
|
|
|
<result column="op_create_time" property="opCreateTime"
|
|
|
typeHandler="TimestampTypeHandler"/>
|
|
|
<result column="op_create_user_id" property="opCreateUserId"/>
|
|
|
<result column="op_update_time" property="opUpdateTime"
|
|
|
typeHandler="TimestampTypeHandler"/>
|
|
|
<result column="op_update_user_id" property="opUpdateUserId"/>
|
|
|
- <result column="op_app_id" property="opAppId"
|
|
|
- typeHandler="UuidTypeHandler"/>
|
|
|
- <result column="op_api_id" property="opApiId"
|
|
|
- typeHandler="UuidTypeHandler"/>
|
|
|
<result column="op_timestamp" property="opTimestamp"
|
|
|
typeHandler="TimestampTypeHandler"/>
|
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
|
@@ -41,7 +37,7 @@
|
|
|
sub
|
|
|
.
|
|
|
submit_id
|
|
|
- , sub.apv_id,apv.apv_name, sub.doc_code, sub.data_id, sub.data_no, sub.apv_result, sub.remarks, sub.flg_valid,sub.cp_id,
|
|
|
+ , sub.apv_id,apv.apv_name, sub.doc_code, sub.data_id, sub.data_no, sub.apv_result, sub.remarks, sub.flg_valid,sub.fty_id,
|
|
|
sub.submit_user,u.user_code as submit_user_code,u.user_name as submit_user_name,
|
|
|
step.submit_step_id, step.submit_id as step_submit_id, step.apv_id as step_apv_id,
|
|
|
step.step_type, case step.step_type WHEN 1 THEN '审批' when 2 THEN '抄送' else ''
|
|
|
@@ -54,7 +50,7 @@
|
|
|
case aps_user_type WHEN 1 THEN
|
|
|
array_to_string(
|
|
|
array(
|
|
|
- select u.user_name from core.t_m_user u
|
|
|
+ select u.user_name from core.t_user u
|
|
|
where u.user_id = any(step.object_id)
|
|
|
order by u.user_id
|
|
|
),','
|
|
|
@@ -62,9 +58,9 @@
|
|
|
WHEN 2 THEN
|
|
|
array_to_string(
|
|
|
array(
|
|
|
- select p.post_name from core.t_m_post p
|
|
|
+ select p.post_name from core.t_post p
|
|
|
where p.post_id = any(step.object_id)
|
|
|
- order by u.post_id
|
|
|
+ order by p.post_id
|
|
|
),','
|
|
|
)
|
|
|
end
|
|
|
@@ -73,15 +69,15 @@
|
|
|
case when aps_user_id is null then
|
|
|
array_to_string(
|
|
|
array(
|
|
|
- select u.user_name from core.t_m_user u
|
|
|
+ select u.user_name from core.t_user u
|
|
|
where u.user_id = any(step.aps_user_ids)
|
|
|
order by u.user_id
|
|
|
),','
|
|
|
) else
|
|
|
- (select u.user_name from core.t_m_user u where u.user_id = aps_user_id)
|
|
|
+ (select u.user_name from core.t_user u where u.user_id = aps_user_id)
|
|
|
end
|
|
|
as aps_user_names,
|
|
|
- step.flg_current, step.aps_result, step.display_no, step.remarks as step_remarks, step.flg_valid as step_flg_valid ,step.cp_id as step_cp_id
|
|
|
+ step.flg_current, step.aps_result, step.display_no, step.remarks as step_remarks, step.flg_valid as step_flg_valid ,step.fty_id as step_cp_id
|
|
|
</sql>
|
|
|
|
|
|
<!-- 关联查询映射结果 todo还差对应-->
|
|
|
@@ -90,7 +86,7 @@
|
|
|
<result column="apv_id" property="apvId"/>
|
|
|
<result column="apv_name" property="apvName"/>
|
|
|
<result column="apv_result" property="apvResult"/>
|
|
|
- <result column="cp_id" property="FtyId"/>
|
|
|
+ <result column="fty_id" property="ftyId"/>
|
|
|
<result column="data_id" property="dataId"/>
|
|
|
<result column="data_no" property="dataNo"/>
|
|
|
<result column="doc_code" property="docCode"/>
|
|
|
@@ -111,7 +107,7 @@
|
|
|
<result column="aps_user_type_name" property="apsUserTypeName"/>
|
|
|
<result column="object_id" property="objectId" typeHandler="BigIntListTypeHandler"/>
|
|
|
<result column="object_name" property="objectName"/>
|
|
|
- <result column="aps_user_ids" property="apsUserIds" typeHandler="BigIntListTypeHandler"/>
|
|
|
+ <result column="aps_user_ids" property="apsUserIds" typeHandler="IntListTypeHandler"/>
|
|
|
<result column="aps_user_names" property="apsUserNames"/>
|
|
|
<result column="flg_current" property="flgCurrent"/>
|
|
|
<result column="step_submit_id" property="submitId"/>
|
|
|
@@ -119,7 +115,7 @@
|
|
|
<result column="display_no" property="displayNo"/>
|
|
|
<result column="step_remarks" property="remarks"/>
|
|
|
<result column="step_flg_valid" property="flgValid"/>
|
|
|
- <result column="step_cp_id" property="FtyId"/>
|
|
|
+ <result column="step_cp_id" property="ftyId"/>
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
|
|
|
@@ -151,8 +147,8 @@
|
|
|
AND sub.flg_valid = #{flgValid}
|
|
|
</if>
|
|
|
AND sub.flg_valid
|
|
|
- <if test="FtyId != null">
|
|
|
- AND sub.cp_id = #{FtyId}
|
|
|
+ <if test="ftyId != null">
|
|
|
+ AND sub.fty_id = #{ftyId}
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
@@ -169,10 +165,10 @@
|
|
|
<select id="selectByCond" resultMap="JoinResultMap">
|
|
|
SELECT
|
|
|
<include refid="Join_Column_List"/>
|
|
|
- FROM mst.t_approval_submit sub
|
|
|
- LEFT JOIN mst.t_approval_submit_step step ON sub.submit_id = step.submit_id
|
|
|
- LEFT JOIN mst.t_approval_process apv on apv.apv_id=sub.apv_id
|
|
|
- LEFT JOIN core.t_m_user u on u.user_id=sub.submit_user
|
|
|
+ FROM bpm.t_approval_submit sub
|
|
|
+ LEFT JOIN bpm.t_approval_submit_step step ON sub.submit_id = step.submit_id
|
|
|
+ LEFT JOIN bpm.t_approval_process apv on apv.apv_id=sub.apv_id
|
|
|
+ LEFT JOIN core.t_user u on u.user_id=sub.submit_user
|
|
|
<include refid="Condition"/>
|
|
|
order by sub.submit_id,step.display_no
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
@@ -184,7 +180,7 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
- FROM mst.t_approval_submit sub
|
|
|
+ FROM bpm.t_approval_submit sub
|
|
|
<include refid="Condition"/>
|
|
|
</select>
|
|
|
|
|
|
@@ -193,7 +189,7 @@
|
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM mst.t_approval_submit
|
|
|
+ FROM bpm.t_approval_submit
|
|
|
WHERE submit_id = #{id}
|
|
|
for update
|
|
|
</select>
|
|
|
@@ -202,7 +198,7 @@
|
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM mst.t_approval_submit
|
|
|
+ FROM bpm.t_approval_submit
|
|
|
<include refid="idsForeach"/>
|
|
|
for update
|
|
|
</select>
|
|
|
@@ -218,7 +214,7 @@
|
|
|
submit_user,
|
|
|
apv_result,
|
|
|
remarks,
|
|
|
- cp_id,
|
|
|
+ fty_id,
|
|
|
</trim>
|
|
|
)
|
|
|
values
|
|
|
@@ -232,7 +228,7 @@
|
|
|
#{item.submitUser},
|
|
|
#{item.apvResult},
|
|
|
#{item.remarks},
|
|
|
- #{item.FtyId},
|
|
|
+ #{item.ftyId},
|
|
|
</trim>
|
|
|
)
|
|
|
</foreach>
|
|
|
@@ -241,10 +237,10 @@
|
|
|
<select id="selectById" resultMap="JoinResultMap">
|
|
|
SELECT
|
|
|
<include refid="Join_Column_List"/>
|
|
|
- FROM mst.t_approval_submit sub
|
|
|
- LEFT JOIN mst.t_approval_submit_step step ON sub.submit_id = step.submit_id
|
|
|
- LEFT JOIN mst.t_approval_process apv on apv.apv_id=sub.apv_id
|
|
|
- LEFT JOIN core.t_m_user u on u.user_id=sub.submit_user
|
|
|
+ FROM bpm.t_approval_submit sub
|
|
|
+ LEFT JOIN bpm.t_approval_submit_step step ON sub.submit_id = step.submit_id
|
|
|
+ LEFT JOIN bpm.t_approval_process apv on apv.apv_id=sub.apv_id
|
|
|
+ LEFT JOIN core.t_user u on u.user_id=sub.submit_user
|
|
|
WHERE sub.submit_id = #{submitId}
|
|
|
order by step.display_no
|
|
|
</select>
|