zhengwei 6 lat temu
rodzic
commit
84a9a42c18

+ 10 - 6
src/main/java/com/yihu/quota/service/medicalInsurance/MedicalInsuranceService.java

@ -130,8 +130,10 @@ public class MedicalInsuranceService {
                SolrDocumentList list = solrUtil.query(ResourceCore.MasterTable,q1,null,null,0,1,fields);
                doc.putAll(list.get(0));
                doc.put("address", null != list.get(0).get("EHR_001211") ? list.get(0).get("EHR_001211") : "");
                doc.put("event_date_real",  DateUtil.toString(new Date(doc.getFieldValue("event_date")+""),"yyyy-MM-dd'T'HH:mm:ss'Z'"));
                doc.put("event_date", DateUtil.toString(new Date(doc.getFieldValue("event_date")+"")));
                SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", java.util.Locale.US);
                Date date = sdf.parse(doc.getFieldValue("event_date")+"");
                doc.put("event_date_real",  DateUtil.toString(date,"yyyy-MM-dd'T'HH:mm:ss'Z'"));
                doc.put("event_date", DateUtil.toString(date));
            }
        }
        long count = solrUtil.count(ResourceCore.SubTable, q, sb.toString());
@ -382,7 +384,7 @@ public class MedicalInsuranceService {
        String fqAll = new StringBuffer().append("event_date:[").append(start).append(" TO ").append(end).append("]").toString();
        String[] fields = {"rowkey","patient_name","patient_age","patient_sex","demographic_id","EHR_001211","event_date"};
        for(Map<String,Object> mapInfo:res){
            SolrDocumentList query = solrUtil.query(ResourceCore.MasterTable, "demographic_id:" + mapInfo.get("demographic_id"), fqAll, null, 0, 1, fields);
            SolrDocumentList query = solrUtil.query(ResourceCore.MasterTable, "demographic_id:\"" + mapInfo.get("demographic_id") + "\"", fqAll, null, 0, 1, fields);
            if (null != query && query.size() > 0) {
                String rowKey = null != query.get(0).get("rowkey") ? query.get(0).get("rowkey") + "" : "";
                String sex = null != query.get(0).get("patient_sex") ? query.get(0).get("patient_sex") + "" : "";
@ -391,7 +393,7 @@ public class MedicalInsuranceService {
                mapInfo.put("patient_age", null != query.get(0).get("patient_age") ? query.get(0).get("patient_age") : "");
                mapInfo.put("patient_sex", sexExchangeByCode(sex));
                mapInfo.put("address", null != query.get(0).get("EHR_001211") ? query.get(0).get("EHR_001211") : "");
                String fq1 =  new StringBuffer().append("EHR_000017:").append(mapInfo.get("demographic_id")).append(" AND event_date:[").
                String fq1 =  new StringBuffer().append("EHR_000017:").append("\""+mapInfo.get("demographic_id")+"\"").append(" AND event_date:[").
                        append(start).append(" TO ").append(end).append("]").toString();
                int count = (int)solrUtil.count(ResourceCore.SubTable, "EHR_000333:"+mapInfo.get("inspectCode"),fq1);
                mapInfo.put("result",count);
@ -520,8 +522,10 @@ public class MedicalInsuranceService {
                SolrDocumentList list = solrUtil.query(ResourceCore.MasterTable,q1,null,null,0,1,fi1elds);
                doc.putAll(list.get(0));
                doc.put("address", null != list.get(0).get("EHR_001211") ? list.get(0).get("EHR_001211") : "");
                doc.put("event_date_real",  DateUtil.toString(new Date(doc.getFieldValue("event_date")+""),"yyyy-MM-dd'T'HH:mm:ss'Z'"));
                doc.put("event_date", DateUtil.toString(new Date(doc.getFieldValue("event_date")+"")));
                SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", java.util.Locale.US);
                Date date = sdf.parse(doc.getFieldValue("event_date")+"");
                doc.put("event_date_real",  DateUtil.toString(date,"yyyy-MM-dd'T'HH:mm:ss'Z'"));
                doc.put("event_date", DateUtil.toString(date));
            }
        }
        long count = solrUtil.count(ResourceCore.SubTable, q, sb.toString());