| 
															
																@ -353,8 +353,14 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        jsonArray.add(jb); 
															 | 
															
															 | 
															
																        jsonArray.add(jb); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String token = upNsUserToken(); 
															 | 
															
															 | 
															
																        String token = upNsUserToken(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String res = postToInter(token, api, jsonArray); 
															 | 
															
															 | 
															
																        String res = postToInter(token, api, jsonArray); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        return res; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        JSONObject rs = (JSONObject) JSONObject.parse(res); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String msg = rs.getString("msg"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        if("200".equals(msg)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            JSONArray reqContent = rs.getJSONArray("reqContent"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            JSONObject req = (JSONObject)reqContent.get(0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            return req.getString("id"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        return ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    } 
															 | 
															
															 | 
															
																    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    // 5 网上预约挂号	micc.upAppointmentOnline  --- 完成 
															 | 
															
															 | 
															
																    // 5 网上预约挂号	micc.upAppointmentOnline  --- 完成 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -372,17 +378,17 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "SELECT p.id,p.register_no, p.status, p.dept, p.dept_name,patient.name as paName,d.name as docName\n" + 
															 | 
															
															 | 
															
																        String sql = "SELECT p.id,p.register_no, p.status, p.dept, p.dept_name,patient.name as paName,d.name as docName\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "     , patient.sex, patient.idcard, patient.mobile, dic.req_fee,reg.date\n" + 
															 | 
															
															 | 
															
																                "     , patient.sex, patient.idcard, patient.mobile, dic.req_fee,reg.date\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "FROM wlyy_outpatient p\n" + 
															 | 
															
															 | 
															
																                "FROM wlyy_outpatient p\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN wlyy_patient_register reg on reg.register_no = p.register_no\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN base_doctor d ON p.doctor = d.id\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN wlyy_charge_dict dic ON d.charge_type = dic.charge_type \n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN base_patient patient on patient.id = p.patient\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN wlyy_patient_register reg on reg.register_no = p.register_no\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN base_doctor d ON p.doctor = d.id\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN wlyy_charge_dict dic ON d.charge_type = dic.charge_type \n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN base_patient patient on patient.id = p.patient\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "WHERE dic.dept_type_code = p.win_no\n" ; 
															 | 
															
															 | 
															
																                "WHERE dic.dept_type_code = p.win_no\n" ; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(startDate)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(startDate)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql + "  and reg.date >=  '" + startDate + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql =  sql + "  and reg.create_time >=  '" + startDate + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(endDate)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(endDate)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql +  "  and reg.date < '" + endDate + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql =  sql +  "  and reg.create_time < '" + endDate + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(keyId)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(keyId)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql +  "  and  p.id = '" + keyId + "' "; 
															 | 
															
															 | 
															
																            sql =  sql +  "  and  p.id = '" + keyId + "' "; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -462,11 +468,13 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " i.create_time, " + 
															 | 
															
															 | 
															
																                " i.create_time, " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " p.`name`, " + 
															 | 
															
															 | 
															
																                " p.`name`, " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " p.idcard, " + 
															 | 
															
															 | 
															
																                " p.idcard, " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " d.idcard AS doctorIdCard," + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " p.mobile " + 
															 | 
															
															 | 
															
																                " p.mobile " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "FROM " + 
															 | 
															
															 | 
															
																                "FROM " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " wlyy_inspection i " + 
															 | 
															
															 | 
															
																                " wlyy_inspection i " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "JOIN wlyy_outpatient o ON o.id = i.outpatient_id  " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "JOIN base_patient p ON p.id = o.patient " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " JOIN wlyy_outpatient o ON o.id = i.outpatient_id  " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " JOIN base_patient p ON p.id = o.patient " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " JOIN base_doctor d ON d.id = o.doctor " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "WHERE " + 
															 | 
															
															 | 
															
																                "WHERE " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " i.create_time >='"+startDate+"' " + 
															 | 
															
															 | 
															
																                " i.create_time >='"+startDate+"' " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " and i.create_time <='"+endDate+"'" + 
															 | 
															
															 | 
															
																                " and i.create_time <='"+endDate+"'" + 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -484,7 +492,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                Boolean errorFlag = false; 
															 | 
															
															 | 
															
																                Boolean errorFlag = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                try { 
															 | 
															
															 | 
															
																                try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    String[] dept = depToSubject(ins.get("dept").toString()); 
															 | 
															
															 | 
															
																                    String[] dept = depToSubject(ins.get("dept").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    String docInterId = achNsDoctorRecord(ins.get("doctor").toString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                    String docInterId = achNsDoctorRecord((String)ins.get("doctorIdCard")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    jb.put("id",orgCode + (String)ins.get("id")); 
															 | 
															
															 | 
															
																                    jb.put("id",orgCode + (String)ins.get("id")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    jb.put("cd_org", orgCode); 
															 | 
															
															 | 
															
																                    jb.put("cd_org", orgCode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    jb.put("cd_area", orgArea); 
															 | 
															
															 | 
															
																                    jb.put("cd_area", orgArea); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -634,7 +642,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "select a.id,a.type,c.name as docName,c.idcard as docIdCard,c.id as docId\n" + 
															 | 
															
															 | 
															
																        String sql = "select a.id,a.type,c.name as docName,c.idcard as docIdCard,c.id as docId\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "      ,b.patient,b.name as patientName,b.birthday,a.czrq,a.end_time\n" + 
															 | 
															
															 | 
															
																                "      ,b.patient,b.name as patientName,b.birthday,a.czrq,a.end_time\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "      ,a.symptoms,d.sex,d.phone,d.idcard as patIdCard,d.city_code, e.dept_code, e.dept_name\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "      ,a.symptoms,d.sex,d.mobile,d.idcard as patIdCard,d.city_code, e.dept_code, e.dept_name\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "  from wlyy_consult a \n" + 
															 | 
															
															 | 
															
																                "  from wlyy_consult a \n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "      ,wlyy_consult_team b\n" + 
															 | 
															
															 | 
															
																                "      ,wlyy_consult_team b\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "        LEFT JOIN base_doctor c on c.id = b.doctor\n" + 
															 | 
															
															 | 
															
																                "        LEFT JOIN base_doctor c on c.id = b.doctor\n" + 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -665,7 +673,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                //基于科室转换成国家诊疗科目代码 
															 | 
															
															 | 
															
																                //基于科室转换成国家诊疗科目代码 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String[] dept = depToSubject(info.get("dept_code").toString()); 
															 | 
															
															 | 
															
																                String[] dept = depToSubject(info.get("dept_code").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                // 获取监管平台唯一标识 
															 | 
															
															 | 
															
																                // 获取监管平台唯一标识 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String visitDocCode = achNsDoctorRecord(info.get("docId").toString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String visitDocCode = achNsDoctorRecord((String)info.get("docIdCard")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("id_online_ask", (String)info.get("id")); 
															 | 
															
															 | 
															
																                jb.put("id_online_ask", (String)info.get("id")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("net_service_code", "1"); 
															 | 
															
															 | 
															
																                jb.put("net_service_code", "1"); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -685,7 +693,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("cost_type", ""); 
															 | 
															
															 | 
															
																                jb.put("cost_type", ""); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("pt_birthdate", info.get("birthday") == null? "":info.get("birthday").toString()); 
															 | 
															
															 | 
															
																                jb.put("pt_birthdate", info.get("birthday") == null? "":info.get("birthday").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("ge_code", info.get("sex")== null? "0":info.get("sex")); 
															 | 
															
															 | 
															
																                jb.put("ge_code", info.get("sex")== null? "0":info.get("sex")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("pt_tel",info.get("phone") == null ? "0":info.get("phone")); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                jb.put("pt_tel",info.get("mobile") == null ? "0":info.get("mobile")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("card_type", "1"); 
															 | 
															
															 | 
															
																                jb.put("card_type", "1"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("id_no", info.get("patIdCard")== null? "0":info.get("patIdCard")); 
															 | 
															
															 | 
															
																                jb.put("id_no", info.get("patIdCard")== null? "0":info.get("patIdCard")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("pt_district",info.get("city_code") == null?"":info.get("city_code")); 
															 | 
															
															 | 
															
																                jb.put("pt_district",info.get("city_code") == null?"":info.get("city_code")); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -707,6 +715,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            if(!errorFlag){ 
															 | 
															
															 | 
															
																            if(!errorFlag){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                JSONArray jsonArray = new JSONArray(); 
															 | 
															
															 | 
															
																                JSONArray jsonArray = new JSONArray(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jsonArray.add(jb); 
															 | 
															
															 | 
															
																                jsonArray.add(jb); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String str = jb.toJSONString(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                res = postToInter(token,api, jsonArray); 
															 | 
															
															 | 
															
																                res = postToInter(token,api, jsonArray); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                JSONObject resJson = (JSONObject) JSONObject.parse(res); 
															 | 
															
															 | 
															
																                JSONObject resJson = (JSONObject) JSONObject.parse(res); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -740,9 +749,9 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "     , a.dept, a.dept_name, c.name as paName, c.idcard as paId, c.sex,c.mobile,a.create_time,b.charge_type\n" + 
															 | 
															
															 | 
															
																                "     , a.dept, a.dept_name, c.name as paName, c.idcard as paId, c.sex,c.mobile,a.create_time,b.charge_type\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "     ,a.register_date, a.end_time,a.icd10,a.icd10_name,a.origin_adm_no, a.description ,d.req_fee\n" + 
															 | 
															
															 | 
															
																                "     ,a.register_date, a.end_time,a.icd10,a.icd10_name,a.origin_adm_no, a.description ,d.req_fee\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "  from wlyy_outpatient a \n" + 
															 | 
															
															 | 
															
																                "  from wlyy_outpatient a \n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "         left join base_doctor b on b.id = a.doctor\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "         left join wlyy_charge_dict d on d.charge_type = b.charge_type\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "         left join base_patient c on c.id = a.patient\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "         join base_doctor b on b.id = a.doctor\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "         join wlyy_charge_dict d on d.charge_type = b.charge_type\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "         join base_patient c on c.id = a.patient\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " where a.register_no != '' and a.dept is not null and a.dept != '' " + 
															 | 
															
															 | 
															
																                " where a.register_no != '' and a.dept is not null and a.dept != '' " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " and a.register_date is not null " ; 
															 | 
															
															 | 
															
																                " and a.register_date is not null " ; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -768,7 +777,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                //基于科室转换成国家诊疗科目代码 
															 | 
															
															 | 
															
																                //基于科室转换成国家诊疗科目代码 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String[] dept = depToSubject(info.get("dept").toString()); 
															 | 
															
															 | 
															
																                String[] dept = depToSubject(info.get("dept").toString()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                // 获取监管平台唯一标识 
															 | 
															
															 | 
															
																                // 获取监管平台唯一标识 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                String visitDocCode = achNsDoctorRecord(info.get("docId").toString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                String visitDocCode = achNsDoctorRecord((String)info.get("docIdCard")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("id_online_med", orgCode + info.get("register_no")); 
															 | 
															
															 | 
															
																                jb.put("id_online_med", orgCode + info.get("register_no")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                jb.put("net_service_code", "4"); 
															 | 
															
															 | 
															
																                jb.put("net_service_code", "4"); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -968,19 +977,19 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "select a.id, a.prescription_id, a.drug_no,a.drug_name, a.dosage\n" + 
															 | 
															
															 | 
															
																        String sql = "select a.id, a.prescription_id, a.drug_no,a.drug_name, a.dosage\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "      ,a.unit,a.quantity,a.pack_unit,a.usage_code,a.supply_code\n" + 
															 | 
															
															 | 
															
																                "      ,a.unit,a.quantity,a.pack_unit,a.usage_code,a.supply_code\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "      ,a.specification,a.pack_retprice,a.quantity*a.pack_retprice as drug_total_price\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "      ,a.specification,a.pack_retprice,a.quantity,a.pack_retprice as drug_total_price\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "  from wlyy_prescription_info a \n" + 
															 | 
															
															 | 
															
																                "  from wlyy_prescription_info a \n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "     LEFT JOIN wlyy_prescription b \n" + 
															 | 
															
															 | 
															
																                "     LEFT JOIN wlyy_prescription b \n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "             on b.id = a.prescription_id\n" + 
															 | 
															
															 | 
															
																                "             on b.id = a.prescription_id\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " where  a.dosage is not null"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " where  a.dosage is not null and a.dosage <> '' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(startDate)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(startDate)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql + "   b.create_time >=  '" + startDate + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql =  sql + "  and b.create_time >=  '" + startDate + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(endDate)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(endDate)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql +  "  and b.create_time < '" + endDate + "' "; 
															 | 
															
															 | 
															
																            sql =  sql +  "  and b.create_time < '" + endDate + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(keyId)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(keyId)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql +  "  and a.id < '" + keyId + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql =  sql +  "  and a.id = '" + keyId + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        List list = jdbcTemplate.queryForList(sql); 
															 | 
															
															 | 
															
																        List list = jdbcTemplate.queryForList(sql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 |