fix:报告编制,增加委托过滤,按报表类型过滤可选委托
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
-->
|
||||
|
||||
<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,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
|
||||
<select id="queryWaitingDataForReport" resultType="com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO">
|
||||
-- SELECT d.*,
|
||||
select
|
||||
m.ID as id,
|
||||
m.ENTT_ID as entrustId,
|
||||
@@ -65,6 +64,22 @@
|
||||
select 1 from T_RPT_DOC_MAIN dm left join T_RPT_DOC_MAIN_CORR dc on dm.id = dc.MAIN_ID
|
||||
where dc.CORR_ID = m.id and dm.FLW_STS in ('not_start','in_progress','completed','rejected') and dm.deleted = 0
|
||||
)
|
||||
|
||||
<if test="param.configReportTypeId != null">
|
||||
<!-- 通过主样配置id过滤-->
|
||||
and exists (
|
||||
select 1 from T_BSN_SMP_ENTT_DTL d
|
||||
inner join T_BSN_BSE_SMP s on d.BSN_BSE_SMP_ID = s.id
|
||||
where
|
||||
d.BSN_SMP_ENTT_REG_ID = m.id
|
||||
and s.CFG_BSE_SMP_ID in (
|
||||
select csr.CFG_BSE_SMP_ID from T_CFG_SMP_RPT csr where
|
||||
csr.CFG_RPT_TP_ID = ${param.configReportTypeId}
|
||||
and csr.DELETED = 0
|
||||
)
|
||||
and d.DELETED = 0
|
||||
)
|
||||
</if>
|
||||
<if test="param.assayStatus != null and param.assayStatus != ''">
|
||||
and m.ASY_STS = #{param.assayStatus}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user