| 
															
																@ -157,6 +157,8 @@ public class YkyyEntranceService { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    private YkyySMSService ykyySMSService; 
															 | 
															
															 | 
															
																    private YkyySMSService ykyySMSService; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Autowired 
															 | 
															
															 | 
															
																    @Autowired 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao; 
															 | 
															
															 | 
															
																    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @Autowired 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    private DictHospitalDeptDao dictHospitalDeptDao; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public List<Map<String, Object>> createSQLQuery(String sql, Map<String, Object> params, Integer page, Integer size){ 
															 | 
															
															 | 
															
																    public List<Map<String, Object>> createSQLQuery(String sql, Map<String, Object> params, Integer page, Integer size){ 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -406,6 +408,7 @@ public class YkyyEntranceService { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @throws Exception 
															 | 
															
															 | 
															
																     * @throws Exception 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     */ 
															 | 
															
															 | 
															
																     */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public List<WlyyOutpatientVO> BS30025(String PAT_NO, String conNo, String startTime, String endTime, boolean demoFlag,String ksdm) throws Exception { 
															 | 
															
															 | 
															
																    public List<WlyyOutpatientVO> BS30025(String PAT_NO, String conNo, String startTime, String endTime, boolean demoFlag,String ksdm) throws Exception { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String fid = "BS30025"; 
															 | 
															
															 | 
															
																        String fid = "BS30025"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        logger.info("EntranceService " + fid + " PAT_NO :" + PAT_NO + " conNo:" + conNo + " startTime:" + startTime + " endTime:" + endTime); 
															 | 
															
															 | 
															
																        logger.info("EntranceService " + fid + " PAT_NO :" + PAT_NO + " conNo:" + conNo + " startTime:" + startTime + " endTime:" + endTime); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -574,8 +577,30 @@ public class YkyyEntranceService { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @throws Exception 
															 | 
															
															 | 
															
																     * @throws Exception 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     */ 
															 | 
															
															 | 
															
																     */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    public JSONArray findV_ZKSG_HZCX_HIS(String brid,String conNo,String startTime,String endTime,String ksdm) throws Exception{ 
															 | 
															
															 | 
															
																    public JSONArray findV_ZKSG_HZCX_HIS(String brid,String conNo,String startTime,String endTime,String ksdm) throws Exception{ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "SELECT to_char(h.KSSJ ,'yyyy/MM/dd hh24:mi:ss' ) as KSSJ,h.BRID,h.BRXM,h.SJHM,h.JZKH,h.SFZH,h.BRXZ,h.YSDM,h.KDYS" + 
															 | 
															
															 | 
															
																        String sql = "SELECT to_char(h.KSSJ ,'yyyy/MM/dd hh24:mi:ss' ) as KSSJ,h.BRID,h.BRXM,h.SJHM,h.JZKH,h.SFZH,h.BRXZ,h.YSDM,h.KDYS" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                ",h.KSDM,h.KSMC,h.ZDMC,h.JZXH from V_ZKSG_HZCX_HIS h WHERE h.BRID = "+brid+" "; 
															 | 
															
															 | 
															
																                ",h.KSDM,h.KSMC,h.ZDMC,h.JZXH from V_ZKSG_HZCX_HIS h WHERE h.BRID = "+brid+" "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String depts =""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String deptUsuaName =""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if (StringUtils.isNoneBlank(ksdm)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            DictHospitalDeptDO dictHospitalDeptDO = dictHospitalDeptDao.findByCode(ksdm); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            if (dictHospitalDeptDO!=null){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                deptUsuaName = dictHospitalDeptDO.getUsualName(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            List<DictHospitalDeptDO> deptList =dictHospitalDeptDao.findByUsuallyName(deptUsuaName); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            if (deptList!=null&&deptList.size()>0){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                for (int i =0 ;i<deptList.size();i++){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                    if (i==deptList.size()-1){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        depts +=deptList.get(i).getCode(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                    }else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        depts+=deptList.get(i).getCode()+","; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            }else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                depts = dictHospitalDeptDO.getCode(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(!StringUtil.isBlank(conNo)){ 
															 | 
															
															 | 
															
																        if(!StringUtil.isBlank(conNo)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql += " and h.JZXH = " + conNo; 
															 | 
															
															 | 
															
																            sql += " and h.JZXH = " + conNo; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -584,14 +609,15 @@ public class YkyyEntranceService { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(!StringUtil.isBlank(endTime)){ 
															 | 
															
															 | 
															
																        if(!StringUtil.isBlank(endTime)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql += " and h.KSSJ <= to_date('"+endTime+"', 'YYYY-MM-DD HH24:MI:SS')"; 
															 | 
															
															 | 
															
																            sql += " and h.KSSJ <= to_date('"+endTime+"', 'YYYY-MM-DD HH24:MI:SS')"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        }if(!StringUtil.isBlank(ksdm)){ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql += " and h.KSDM = " + ksdm; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        }if(!StringUtil.isBlank(depts)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql += " and h.KSDM in ("+ depts+")"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        sql += " order by h.KSSJ desc"; 
															 | 
															
															 | 
															
																        sql += " order by h.KSSJ desc"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        Map<String,Object> params = new HashedMap(); 
															 | 
															
															 | 
															
																        Map<String,Object> params = new HashedMap(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        params.put("sql",sql); 
															 | 
															
															 | 
															
																        params.put("sql",sql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        logger.info("sqlOutpatientList"+sql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        HttpResponse response = HttpUtils.doGet(url,params); 
															 | 
															
															 | 
															
																        HttpResponse response = HttpUtils.doGet(url,params); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String content = response.getContent(); 
															 | 
															
															 | 
															
																        String content = response.getContent(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        logger.info("response:"+content); 
															 | 
															
															 | 
															
																        logger.info("response:"+content); 
															 |