Explorar o código

[task-5877] 质量指标统计:样本采集量错误率仅统计样本过少或过多的,无样本的不纳入统计

huangws hai 1 mes
pai
achega
51651602a7

+ 1 - 1
GetDataByView/src/main/java/com/jyxt/getdatabyview/view/repository/LISViewRepository.java

@@ -106,7 +106,7 @@ public class LISViewRepository {
             //标本采集量错误率--已修正
             if (QIIndex == 5) {
                 //System.out.println("dateRange:"+dateRange+",StartDate:"+StartDate+",EndDate:"+EndDate);
-                String sqlQry = "SELECT CASE WHEN AllCount = 0 THEN -1 ELSE CAST((RejectCount * 1.0 / AllCount)*100 AS DECIMAL(20,4)) END AS ResultValue,RejectCount as Numerator,AllCount as Denominator FROM (SELECT (select count(distinct t.SampleBarCode) from V_JT_REJECT_SAMPLE t where t.RejectReasonName like '%标本采集量错误%' and t.RejectTime between to_date('"+StartDate+"','yyyy-mm-dd hh24:mi:ss') and to_date('"+EndDate+"','yyyy-mm-dd hh24:mi:ss')) AS RejectCount,(select count(distinct t.SampleBarCode) from v_jt_lisrequest t where t.sampletime between to_date('"+StartDate+"','yyyy-mm-dd hh24:mi:ss') and to_date('"+EndDate+"','yyyy-mm-dd hh24:mi:ss')) AS AllCount FROM DUAL) Counts";
+                String sqlQry = "SELECT CASE WHEN AllCount = 0 THEN -1 ELSE CAST((RejectCount * 1.0 / AllCount)*100 AS DECIMAL(20,4)) END AS ResultValue,RejectCount as Numerator,AllCount as Denominator FROM (SELECT (select count(distinct t.SampleBarCode) from V_JT_REJECT_SAMPLE t where t.RejectReasonName IN ('标本采集量错误(样本过多)', '标本采集量错误(标本太少)') and t.RejectTime between to_date('"+StartDate+"','yyyy-mm-dd hh24:mi:ss') and to_date('"+EndDate+"','yyyy-mm-dd hh24:mi:ss')) AS RejectCount,(select count(distinct t.SampleBarCode) from v_jt_lisrequest t where t.sampletime between to_date('"+StartDate+"','yyyy-mm-dd hh24:mi:ss') and to_date('"+EndDate+"','yyyy-mm-dd hh24:mi:ss')) AS AllCount FROM DUAL) Counts";
                 log.info("excute sql:"+sqlQry);
                 RowMapper<LISView> infoRowMapper = new BeanPropertyRowMapper<>(LISView.class);
                 List<LISView> lvList = jdbcTemplate.query(sqlQry, infoRowMapper);