feat:报告接口开发

This commit is contained in:
FCL
2025-10-20 18:23:54 +08:00
parent a7c079436b
commit bf8aba849f
19 changed files with 228 additions and 8 deletions

View File

@@ -9,4 +9,52 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
<select id="queryWaitingDataForReport" resultType="com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayReportDataDO">
-- SELECT d.*,
select
d.ID as id,
d.CFG_RPT_TP_ID as configReportTypeId,
d.CFG_SMP_RPT_ID as configSampleReportId,
d.BSN_BSE_SMP_ID as businessBaseSampleId,
d.SMP_CD as sampleCode,
d.ASY_DAT as assayData,
d.RPT_FLW_CD as reportFlowCode,
d.DOC_DAT_ID as documentDataId,
d.SYS_DEPT_CD as systemDepartmentCode,
d.UPD_CNT as updateCount,
d.RMK as remark,
d.CREATE_TIME as createTime,
d.CREATOR as creator,
d.UPDATER as updater,
d.UPDATE_TIME as updateTime,
d.CREATOR_NAME as creatorName,
d.DELETED as deleted,
s.CREATE_TIME as baseSampleCreateTime,
s.SMP_NAME as sampleName
FROM T_BSN_ASY_RPT_DAT d
inner join T_BSN_BSE_SMP s on d.BSN_BSE_SMP_ID = s.id
<where>
and d.CFG_RPT_TP_ID = #{param.configReportTypeId}
and NOT EXISTS (
SELECT 1
FROM T_RPT_DOC_DAT rd
LEFT JOIN T_RPT_DOC_MAIN m on rd.MAIN_ID = m.ID
WHERE rd.SRC_ID = d.id
and m.RPT_DOC_TP = #{param.configReportTypeId}
);
<if test="param.sampleCode != null and param.sampleCode != ''">
and d.SMP_CD like '%' || #{param.sampleCode} || '%'
</if>
<if test="param.sampleName != null and param.sampleName != ''">
and s.SMP_NAME like '%' || #{param.sampleName} || '%'
</if>
<if test="param.baseSampleCreateTime != null and param.baseSampleCreateTime.size > 0">
and s.CREATE_TIME between #{param.baseSampleCreateTime[0]} and #{param.baseSampleCreateTime[1]}
</if>
and d.deleted = 0
</where>
</select>
</mapper>