fix:报告编制,增加委托过滤,按报表类型过滤可选委托
This commit is contained in:
@@ -110,6 +110,9 @@ public class BusinessSampleEntrustRegistrationController implements BusinessCont
|
||||
@GetMapping("/queryWaitingDataForReport")
|
||||
@Operation(summary = "查询待编制数据")
|
||||
public CommonResult<PageResult<BusinessSampleEntrustRegistrationExtendRespVO>> queryWaitingDataForReport(@Valid BusinessSampleEntrustRegistrationPageReqVO pageReqVO) {
|
||||
Long configReportTypeId = pageReqVO.getConfigReportTypeId();
|
||||
if(configReportTypeId == null)
|
||||
return CommonResult.error(0, "缺少configReportTypeId参数,请刷新后重试!");
|
||||
PageResult<BusinessSampleEntrustRegistrationExtendRespVO> result = businessSampleEntrustRegistrationService.queryWaitingDataForReport(pageReqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@@ -156,4 +156,7 @@ public class BusinessSampleEntrustRegistrationPageReqVO extends PageParam {
|
||||
//====================扩展字段======================
|
||||
@Schema(description = "委托来源名称")
|
||||
private String configEntrustSourceName;
|
||||
|
||||
@Schema(description = "报表配置id")
|
||||
private Long configReportTypeId;
|
||||
}
|
||||
@@ -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