Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
shusir
2026-03-11 18:21:03 +08:00
3 changed files with 193 additions and 138 deletions

View File

@@ -58,8 +58,8 @@ public class RecordApplyDetailDO extends BusinessBaseDO {
@TableField("TGT_ID") @TableField("TGT_ID")
private Long targetId; private Long targetId;
@TableField("TGT_NAME") @TableField("FORM_DAT")
private String targetName; private String formData;
/** /**
* 是否需要更改 * 是否需要更改
*/ */
@@ -101,9 +101,6 @@ public class RecordApplyDetailDO extends BusinessBaseDO {
@TableField("RMK") @TableField("RMK")
private String remark; private String remark;
@TableField("FORM_DAT")
private String formData;
// ============临时字段==============> // ============临时字段==============>
@TableField(exist = false) @TableField(exist = false)
private String recordName; private String recordName;

View File

@@ -64,9 +64,6 @@
<if test="reqVO.name != null and reqVO.name != ''"> <if test="reqVO.name != null and reqVO.name != ''">
AND trr.NAME LIKE CONCAT('%', #{reqVO.name}, '%') AND trr.NAME LIKE CONCAT('%', #{reqVO.name}, '%')
</if> </if>
<if test="reqVO.formKey != null and reqVO.formKey != ''">
AND trr.FORM_KY = #{reqVO.formKey}
</if>
<if test="reqVO.version != null and reqVO.version != ''"> <if test="reqVO.version != null and reqVO.version != ''">
AND trr.VER = #{reqVO.version} AND trr.VER = #{reqVO.version}
</if> </if>
@@ -76,45 +73,12 @@
<if test="reqVO.makeDate != null and reqVO.makeDate.length > 0"> <if test="reqVO.makeDate != null and reqVO.makeDate.length > 0">
AND trr.MKE_DT BETWEEN #{reqVO.makeDate[0]} AND #{reqVO.makeDate[1]} AND trr.MKE_DT BETWEEN #{reqVO.makeDate[0]} AND #{reqVO.makeDate[1]}
</if> </if>
<if test="reqVO.confidentialFlag != null">
AND trr.CNF_FLG = #{reqVO.confidentialFlag}
</if>
<if test="reqVO.confidentialLevel != null and reqVO.confidentialLevel != ''">
AND trr.CNF_LVL = #{reqVO.confidentialLevel}
</if>
<if test="reqVO.confidentialWay != null and reqVO.confidentialWay != ''">
AND trr.CNF_WY = #{reqVO.confidentialWay}
</if>
<if test="reqVO.confidentialKey != null and reqVO.confidentialKey != ''">
AND trr.CNF_KY = #{reqVO.confidentialKey}
</if>
<if test="reqVO.permanently != null and reqVO.permanently != ''">
AND trr.PMNT = #{reqVO.permanently}
</if>
<if test="reqVO.expirationDate != null and reqVO.expirationDate.length > 0"> <if test="reqVO.expirationDate != null and reqVO.expirationDate.length > 0">
AND trr.EXPR_DT BETWEEN #{reqVO.expirationDate[0]} AND #{reqVO.expirationDate[1]} AND trr.EXPR_DT BETWEEN #{reqVO.expirationDate[0]} AND #{reqVO.expirationDate[1]}
</if> </if>
<if test="reqVO.expirationStatus != null"> <if test="reqVO.expirationStatus != null">
AND trr.EXPR_STS = #{reqVO.expirationStatus} AND trr.EXPR_STS = #{reqVO.expirationStatus}
</if> </if>
<if test="reqVO.cancelFlag != null">
AND trr.CNL_FLG = #{reqVO.cancelFlag}
</if>
<if test="reqVO.formData != null and reqVO.formData != ''">
AND trr.FORM_DAT = #{reqVO.formData}
</if>
<if test="reqVO.dataCollectionId != null">
AND trr.DAT_COLT_ID = #{reqVO.dataCollectionId}
</if>
<if test="reqVO.sourceUrl != null and reqVO.sourceUrl != ''">
AND trr.SRC_URL = #{reqVO.sourceUrl}
</if>
<if test="reqVO.systemDepartmentCode != null and reqVO.systemDepartmentCode != ''">
AND trr.SYS_DEPT_CD = #{reqVO.systemDepartmentCode}
</if>
<if test="reqVO.remark != null and reqVO.remark != ''">
AND trr.RMK = #{reqVO.remark}
</if>
<if test="reqVO.mainId != null"> <if test="reqVO.mainId != null">
AND trr.MAIN_ID = #{reqVO.mainId} AND trr.MAIN_ID = #{reqVO.mainId}
</if> </if>
@@ -128,7 +92,7 @@
<!-- 记录权限查询 SRC_ID = 记录Id 通过 记录Id 过滤查询重复数据--> <!-- 记录权限查询 SRC_ID = 记录Id 通过 记录Id 过滤查询重复数据-->
<select id="selectRecordPermissionList" resultType="com.zt.plat.module.qms.resource.record.dal.dataobject.recordrecord.RecordRecordDO"> <select id="selectRecordPermissionList" resultType="com.zt.plat.module.qms.resource.record.dal.dataobject.recordrecord.RecordRecordDO">
SELECT DISTINCT trr.ID, trr.CTGR_ID AS categoryId, trr.CD AS code, trr.BSN_TP AS businessType, SELECT DISTINCT trr.ID, trr.CTGR_ID AS categoryId, trr.CD AS code, trr.BSN_TP AS businessType,
trr.FORM_KY AS formKey, trr.NAME, trr.VER AS version,trr.CRNT_FLG AS currentFlag, trr.FORM_KY AS formKey, trr.NAME, trr.VER AS version, trr.CRNT_FLG AS currentFlag,
trr.MKE_DT AS makeDate, trr.MKE_DT AS makeDate,
trr.CNF_FLG AS confidentialFlag, trr.CNF_FLG AS confidentialFlag,
trr.CNF_LVL AS confidentialLevel, trr.CNF_LVL AS confidentialLevel,
@@ -143,23 +107,24 @@
trr.CNL_FLG AS cancelFlag, trr.CNL_FLG AS cancelFlag,
trr.FORM_DAT AS formData, trr.FORM_DAT AS formData,
trr.DAT_COLT_ID AS dataCollectionId, trr.DAT_COLT_ID AS dataCollectionId,
trr.SRC_URL AS sourceUrl, apl.* trr.SRC_URL AS sourceUrl
FROM T_RCD_RCD trr FROM T_RCD_RCD trr
LEFT JOIN T_RCD_PERM trp ON trp.SRC_ID = trr.ID LEFT JOIN T_RCD_PERM trp ON trp.SRC_ID = trr.ID
-- TODO 关联申请表 INNER JOIN
LEFT JOIN
( (
SELECT applyId, documentId, flowInstanceId, businessStatus SELECT applyId, documentId, flowInstanceId, businessStatus, aplBusinessType
FROM (SELECT trad.APL_ID as applyId, FROM (SELECT trad.APL_ID AS applyId,
trad.DOC_ID as documentId, trad.DOC_ID AS documentId,
-- trad.TGT_ID as targetId, tra.FLW_INSC_ID AS flowInstanceId,
tra.FLW_INSC_ID as flowInstanceId, tra.BSN_STS AS businessStatus,
tra.BSN_STS as businessStatus, tra.BSN_TP AS aplBusinessType,
ROW_NUMBER() OVER (PARTITION BY trad.APL_ID ORDER BY trad.APL_ID) AS rn ROW_NUMBER() OVER (PARTITION BY trad.DOC_ID ORDER BY trad.APL_ID) AS rn
FROM T_RCD_APL_DTL trad FROM T_RCD_APL_DTL trad
INNER JOIN T_RCD_APL tra ON tra.ID = trad.APL_ID) t INNER JOIN T_RCD_APL tra ON tra.ID = trad.APL_ID
WHERE tra.BSN_STS = 'completed'
AND (tra.BSN_TP = '文件分发' OR tra.BSN_TP = '文件查看申请')) t
WHERE rn = 1 WHERE rn = 1
) as apl ) apl
ON apl.documentId = trr.ID ON apl.documentId = trr.ID
WHERE trp.SRC_TP = '记录' WHERE trp.SRC_TP = '记录'
AND trp.PERM = '可查看' AND trp.PERM = '可查看'