Merge remote-tracking branch 'origin/test' into test
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,
|
||||
|
||||
@@ -33,8 +33,11 @@
|
||||
<if test="reqVO.sampleFlowNodeKey != null and reqVO.sampleFlowNodeKey != ''">
|
||||
AND tbatd.SMP_FLW_NDE_KY = #{reqVO.sampleFlowNodeKey}
|
||||
</if>
|
||||
<if test="reqVO.sampleFlowNodeTime[0] != null and reqVO.sampleFlowNodeTime[1] != null">
|
||||
AND tbatd.SMP_FLW_NDE_TM #{reqVO.sampleFlowNodeTime[0]} and #{reqVO.sampleFlowNodeTime[1]}
|
||||
<if test="reqVO.sampleFlowNodeTime != null and reqVO.sampleFlowNodeTime.length == 2">
|
||||
AND tbatd.SMP_FLW_NDE_TM BETWEEN #{reqVO.sampleFlowNodeTime[0]} AND #{reqVO.sampleFlowNodeTime[1]}
|
||||
</if>
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.configAssayMethodName} || '%'
|
||||
</if>
|
||||
GROUP BY
|
||||
tbatd.CFG_ASY_MTHD_ID,
|
||||
@@ -76,9 +79,12 @@
|
||||
AND tbatd.TENANT_ID = 1
|
||||
AND tbatd.IS_ASN_TSKD = 1
|
||||
AND tbssag.SMP_STS = '已收样'
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tbssag.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||
</if>
|
||||
GROUP BY
|
||||
tbatd.TENANT_ID ,
|
||||
tbatd.BSN_SB_PRN_SMP_ID ,
|
||||
@@ -93,6 +99,9 @@
|
||||
t.CFG_ASY_MTHD_ID = tcam.ID
|
||||
AND t.TENANT_ID = tcam.TENANT_ID
|
||||
WHERE t.RPOD_STS in ('pending_report', 'pending_assessment', 're_inspected')
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.configAssayMethodName} || '%'
|
||||
</if>
|
||||
GROUP BY
|
||||
t.CFG_ASY_MTHD_ID,
|
||||
t.ASY_TP,
|
||||
@@ -126,8 +135,17 @@
|
||||
<if test="reqVO.sampleFlowNodeKey != null and reqVO.sampleFlowNodeKey != ''">
|
||||
AND tbatd.SMP_FLW_NDE_KY = #{reqVO.sampleFlowNodeKey}
|
||||
</if>
|
||||
<if test="reqVO.sampleFlowNodeTime[0] != null and reqVO.sampleFlowNodeTime[1] != null">
|
||||
AND tbatd.SMP_FLW_NDE_TM #{reqVO.sampleFlowNodeTime[0]} and #{reqVO.sampleFlowNodeTime[1]}
|
||||
<if test="reqVO.sampleFlowNodeTime != null and reqVO.sampleFlowNodeTime.length == 2">
|
||||
AND tbatd.SMP_FLW_NDE_TM BETWEEN #{reqVO.sampleFlowNodeTime[0]} AND #{reqVO.sampleFlowNodeTime[1]}
|
||||
</if>
|
||||
<if test="reqVO.sampleCode != null and reqVO.sampleCode != ''">
|
||||
AND tbss.SMP_CD = #{reqVO.sampleCode}
|
||||
</if>
|
||||
<if test="reqVO.sampleAssayCode != null and reqVO.sampleAssayCode != ''">
|
||||
AND tbss.SMP_ASY_CD = #{reqVO.sampleAssayCode}
|
||||
</if>
|
||||
<if test="reqVO.sampleReturnCode != null and reqVO.sampleReturnCode != ''">
|
||||
AND tbss.SMP_RTN_CD = #{reqVO.sampleReturnCode}
|
||||
</if>
|
||||
GROUP BY tbss.ID ,
|
||||
tbss.SMP_NAME ,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -31,15 +31,21 @@
|
||||
tbssa.BSN_SB_PRN_SMP_ASMT_ID = tbspsa.ID
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||
LEFT JOIN T_BSN_SB_SMP_ANL_GRP tbssag ON
|
||||
tbssa.BSN_SB_SMP_ID = tbssag.BSN_SB_SMP_ID
|
||||
AND tcam.ASY_DEPT_ID = tbssag.ASY_DEPT_ID
|
||||
WHERE
|
||||
tbssa.DELETED = 0
|
||||
AND tbssa.RPOD_STS = 'reported'
|
||||
AND tbspsa.IS_RPOD = 0
|
||||
<if test="reqVO.configAssayMethodName != null and reqVO.configAssayMethodName != ''">
|
||||
AND tcam.NAME like '%' || #{reqVO.assayDepartmentId} || '%'
|
||||
AND tcam.NAME like '%' || #{reqVO.configAssayMethodName} || '%'
|
||||
</if>
|
||||
<if test="reqVO.assayDepartmentId != null and reqVO.assayDepartmentId != ''">
|
||||
AND tcam.ASY_DEPT_ID = #{reqVO.assayDepartmentId}
|
||||
</if>
|
||||
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||
</if>
|
||||
GROUP BY
|
||||
tbspsa.TENANT_ID ,
|
||||
@@ -66,7 +72,8 @@
|
||||
tbssa.ASY_TP AS assayType,
|
||||
tbsps.CFG_SB_SMP_PRN_ID AS configSubSampleParentId,
|
||||
tbsps.SMP_NAME AS sampleName,
|
||||
tbs.NAME AS baseSampleName
|
||||
tbs.NAME AS baseSampleName,
|
||||
tbssag.SMP_RCV_TM AS sampleReceiveTime
|
||||
FROM
|
||||
T_BSN_SB_SMP_ASMT tbssa
|
||||
LEFT JOIN T_BSN_SB_PRN_SMP tbsps ON
|
||||
@@ -75,6 +82,11 @@
|
||||
tbsps.CFG_SB_SMP_PRN_ID = tcssp.ID
|
||||
LEFT JOIN T_BSE_SMP tbs ON
|
||||
tcssp.BSE_SMP_ID = tbs.ID
|
||||
LEFT JOIN T_CFG_ASY_MTHD tcam ON
|
||||
tbssa.CFG_ASY_MTHD_ID = tcam.ID
|
||||
LEFT JOIN T_BSN_SB_SMP_ANL_GRP tbssag ON
|
||||
tbssa.BSN_SB_SMP_ID = tbssag.BSN_SB_SMP_ID
|
||||
AND tcam.ASY_DEPT_ID = tbssag.ASY_DEPT_ID
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
tbspsa.BSN_SB_PRN_SMP_ID ,
|
||||
@@ -84,7 +96,7 @@
|
||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
||||
WHERE
|
||||
tbspsa.IS_RPOD = 0
|
||||
AND tbspsa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
AND tbspsa.CFG_ASY_MTHD_ID = #{reqVO.configAssayMethodId}
|
||||
GROUP BY
|
||||
tbspsa.BSN_SB_PRN_SMP_ID ,
|
||||
tbspsa.CFG_ASY_MTHD_ID ,
|
||||
@@ -94,7 +106,10 @@
|
||||
WHERE
|
||||
tbssa.IS_RPOD = 1
|
||||
AND t.IS_RPOD = 0
|
||||
AND tbssa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
AND tbssa.CFG_ASY_MTHD_ID = #{reqVO.configAssayMethodId}
|
||||
<if test="reqVO.sampleReceiveTime != null and reqVO.sampleReceiveTime.length == 2">
|
||||
AND tbssag.SMP_RCV_TM BETWEEN #{reqVO.sampleReceiveTime[0]} AND #{reqVO.sampleReceiveTime[1]}
|
||||
</if>
|
||||
GROUP BY
|
||||
tcssp.BSE_SMP_ID ,
|
||||
tbsps.BSN_BSE_SMP_ID ,
|
||||
@@ -104,7 +119,8 @@
|
||||
tbssa.ASY_TP ,
|
||||
tbsps.CFG_SB_SMP_PRN_ID,
|
||||
tbsps.SMP_NAME ,
|
||||
tbs.NAME
|
||||
tbs.NAME,
|
||||
tbssag.SMP_RCV_TM
|
||||
</select>
|
||||
|
||||
<select id="getRecheckAssayMethodList" resultType="com.zt.plat.module.qms.business.bus.controller.vo.RecheckSubSampleParentMethodRespVO">
|
||||
@@ -134,12 +150,12 @@
|
||||
AND tmas.BSE_SMP_ID = #{baseSampleId}
|
||||
AND tmasd.DIC_PRJ_ID IN (
|
||||
SELECT
|
||||
tbspsa.DIC_PRJ_ID
|
||||
tbspsap.DIC_PRJ_ID
|
||||
FROM
|
||||
T_BSN_SB_PRN_SMP_ASMT tbspsa
|
||||
T_BSN_SB_PRN_SMP_ASMT_PRJ tbspsap
|
||||
WHERE
|
||||
tbspsa.BSN_SB_PRN_SMP_ID = #{businessSubParentSampleId}
|
||||
AND tbspsa.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
tbspsap.BSN_SB_PRN_SMP_ID = #{businessSubParentSampleId}
|
||||
AND tbspsap.CFG_ASY_MTHD_ID = #{configAssayMethodId}
|
||||
)
|
||||
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierEvaluationAtMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierEvaluationMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zt.plat.module.qms.office.supplier.dal.mapper.SupplierPropertiesMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user