文件记录-审批-查询记录列表
This commit is contained in:
@@ -9,4 +9,26 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectDetailAndRecordList" resultType="com.zt.plat.module.qms.resource.record.dal.dataobject.recordapplydetail.RecordApplyDetailDO">
|
||||
SELECT trad.ID as id,trad.APL_ID as applyId, trad.DOC_ID as documentId, trad.TGT_TP as targetType,
|
||||
trad.TGT_ID as targetId, trad.IS_MDF as isModify, trad.MDF_CAUS as modifyCause,
|
||||
trad.APL_STRT_DT as applyStartDate, trad.APL_END_DT as applyEndDate,trr.NAME AS recordName,
|
||||
trr.CD AS recordCode, trr.VER AS version, trr.PMNT as recordPermanently, trr.EXPR_DT as expirationDate
|
||||
FROM T_RCD_APL_DTL trad LEFT JOIN T_RCD_RCD trr ON trad.DOC_ID = trr.ID WHERE trad.DELETED = 0 and trad.APL_ID = #{applyId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDistributionDetailAndRecordList" resultType="com.zt.plat.module.qms.resource.record.dal.dataobject.recordapplydetail.RecordApplyDetailDO">
|
||||
SELECT * FROM (
|
||||
SELECT trad.ID as id,trad.APL_ID as applyId, trad.DOC_ID as documentId, trad.TGT_TP as targetType,
|
||||
trad.TGT_ID as targetId, trad.IS_MDF as isModify, trad.MDF_CAUS as modifyCause,
|
||||
trad.APL_STRT_DT as applyStartDate, trad.APL_END_DT as applyEndDate,trr.NAME AS recordName,
|
||||
trr.CD AS recordCode, trr.VER AS version, trr.PMNT as recordPermanently, trr.EXPR_DT as expirationDate,
|
||||
ROW_NUMBER() OVER(PARTITION BY trad.APL_ID ORDER BY trad.ID DESC) as rn
|
||||
FROM T_RCD_APL_DTL trad LEFT JOIN T_RCD_RCD trr ON trad.DOC_ID = trr.ID
|
||||
WHERE trad.DELETED = 0 and trad.APL_ID = #{applyId}
|
||||
) t WHERE t.rn = 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -145,4 +145,47 @@
|
||||
)
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 文件查看申请 获取文件记录数据 -->
|
||||
<select id="selectViewApplyRecordList" 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,
|
||||
trr.FORM_KY AS formKey, trr.NAME, trr.VER AS version, trr.CRNT_FLG AS currentFlag,
|
||||
trr.MKE_DT AS makeDate,
|
||||
trr.CNF_FLG AS confidentialFlag,
|
||||
trr.CNF_LVL AS confidentialLevel,
|
||||
trr.CNF_WY AS confidentialWay,
|
||||
trr.CNF_KY AS confidentialKey,
|
||||
trr.PMNT AS permanently,
|
||||
trr.SBM_FLG AS submitFlag,
|
||||
trr.RCD_STS AS recordStatus,
|
||||
trr.EXPR_DT AS expirationDate,
|
||||
trr.EFCT_DT AS effectiveDate,
|
||||
trr.EXPR_STS AS expirationStatus,
|
||||
trr.CNL_FLG AS cancelFlag,
|
||||
trr.FORM_DAT AS formData,
|
||||
apl.applyId,
|
||||
apl.flowInstanceId,
|
||||
apl.applyBusinessStatus
|
||||
FROM T_RCD_RCD trr
|
||||
INNER JOIN
|
||||
(
|
||||
SELECT
|
||||
trad.APL_ID as applyId,
|
||||
-- trad.DOC_ID,
|
||||
-- trad.TGT_ID,
|
||||
tra.FLW_INSC_ID as flowInstanceId,
|
||||
tra.BSN_STS as applyBusinessStatus
|
||||
FROM T_RCD_APL_DTL trad
|
||||
LEFT JOIN T_RCD_APL tra ON tra.ID = trad.APL_ID
|
||||
WHERE tra.DELETED = 0 AND trad.DELETED = 0 AND tra.BSN_TP = '文件评审' AND tra.BSN_STS = 'completed'
|
||||
) as apl
|
||||
ON trr.ID = apl.DOC_ID
|
||||
WHERE trr.CTGR_ID = #{pageReqVO.categoryId}
|
||||
<if test="pageReqVO.code != null and pageReqVO.code != ''">
|
||||
AND trr.CD = #{pageReqVO.code}
|
||||
</if>
|
||||
<if test="pageReqVO.name != null and pageReqVO.name != ''">
|
||||
AND trr.NAME LIKE CONCAT('%', #{pageReqVO.name}, '%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user