|
@@ -106,7 +106,7 @@ public class LISViewRepository {
|
|
|
//标本采集量错误率--已修正
|
|
//标本采集量错误率--已修正
|
|
|
if (QIIndex == 5) {
|
|
if (QIIndex == 5) {
|
|
|
//System.out.println("dateRange:"+dateRange+",StartDate:"+StartDate+",EndDate:"+EndDate);
|
|
//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);
|
|
log.info("excute sql:"+sqlQry);
|
|
|
RowMapper<LISView> infoRowMapper = new BeanPropertyRowMapper<>(LISView.class);
|
|
RowMapper<LISView> infoRowMapper = new BeanPropertyRowMapper<>(LISView.class);
|
|
|
List<LISView> lvList = jdbcTemplate.query(sqlQry, infoRowMapper);
|
|
List<LISView> lvList = jdbcTemplate.query(sqlQry, infoRowMapper);
|