|  | @ -47,8 +47,8 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |     static String psw = "7j7s9e";
 | 
	
		
			
				|  |  |     static String appId = "ws007";
 | 
	
		
			
				|  |  |     static String AesEncodeKey = "98sfkf53sf19609j";
 | 
	
		
			
				|  |  |     //static String urlString = "http://10.120.102.202:18081/micc/wsapi/1.0?wsdl";  // 正式线路径
 | 
	
		
			
				|  |  |     static String urlString = "http://fjhlw.bsoft.com.cn:18081/micc/wsapi/1.0?wsdl";   // 测试线路径
 | 
	
		
			
				|  |  |     static String urlString = "http://10.120.102.202:18081/micc/wsapi/1.0?wsdl";  // 正式线路径
 | 
	
		
			
				|  |  |     //static String urlString = "http://fjhlw.bsoft.com.cn:18081/micc/wsapi/1.0?wsdl";   // 测试线路径
 | 
	
		
			
				|  |  |     static String method = "execute";
 | 
	
		
			
				|  |  |     static String token = "";
 | 
	
		
			
				|  |  |     static String orgCode = "123502004266006872";
 | 
	
	
		
			
				|  | @ -72,6 +72,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |         String deResult = AESUtils.decrypt(result, AesEncodeKey);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         logger.info(JSONUtils.toString(deResult));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return deResult;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -94,7 +95,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |         if("200".equals(resJson.get("msg").toString())) {
 | 
	
		
			
				|  |  |             token = resJson.get("token").toString();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         logger.info("upNsUserToken : "+token);
 | 
	
		
			
				|  |  |         return token;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -268,7 +269,6 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |                 "      ,base_doctor_img i " +
 | 
	
		
			
				|  |  |                 " where a.id = b.doctor_code\n" +
 | 
	
		
			
				|  |  |                 "   and i.doctor = a.id " +
 | 
	
		
			
				|  |  |                 "   and a.name IN('陈兰')"  +
 | 
	
		
			
				|  |  |                 "   and b.dept_code != '' " +
 | 
	
		
			
				|  |  |                 "   and a.job_title_code  not in('4107','054','1313','1413','1415','018','1412','4105','1212','1312','4103','1315','1217','1215','3301','005',\n" +
 | 
	
		
			
				|  |  |                 "'1213','3501','017','020','058','002','1417','1214','1317','4101','4106') \n" ;
 | 
	
	
		
			
				|  | @ -318,8 +318,10 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |                 jb.put("net_service", "1,3,4,5,7,9,10");
 | 
	
		
			
				|  |  |                 jb.put("cert_no",  info.get("cert_no")== null ? "0":info.get("cert_no"));
 | 
	
		
			
				|  |  |                 jb.put("prac_no",  info.get("prac_no")== null ? "0":info.get("prac_no"));
 | 
	
		
			
				|  |  |                 jb.put("doc_cert",ImageConvertUtil.getImageBinary("C://Users//Administrator//Desktop//医生信息//测试小图片.jpg"));
 | 
	
		
			
				|  |  |                 jb.put("cert_doc_prac", ImageConvertUtil.getImageBinary("C://Users//Administrator//Desktop//医生信息//测试小图片.jpg"));
 | 
	
		
			
				|  |  |                 //资质证书
 | 
	
		
			
				|  |  |                 jb.put("doc_cert",info.get("zgz"));
 | 
	
		
			
				|  |  |                 //执业证书
 | 
	
		
			
				|  |  |                 jb.put("cert_doc_prac", info.get("zyz"));
 | 
	
		
			
				|  |  |                 jb.put("txt_introduction", "");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             }catch (Exception e){
 | 
	
	
		
			
				|  | @ -365,7 +367,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |         if("200".equals(msg)){
 | 
	
		
			
				|  |  |             JSONArray reqContent = rs.getJSONArray("reqContent");
 | 
	
		
			
				|  |  |             JSONObject req = (JSONObject)reqContent.get(0);
 | 
	
		
			
				|  |  |             return req.getString("id");
 | 
	
		
			
				|  |  |             return req.getString("miccId");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return "";
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -509,7 +511,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |                     jb.put("app_class_code", ins.get("code"));
 | 
	
		
			
				|  |  |                     jb.put("id_doctor", docInterId);
 | 
	
		
			
				|  |  |                     jb.put("fg_handle", "1");
 | 
	
		
			
				|  |  |                     jb.put("handle_time", DateUtil.dateToStr((Date)ins.get("create_time"),"YYYY-MM-DD HH:mm:SS"));
 | 
	
		
			
				|  |  |                     jb.put("handle_time", DateUtil.dateToStr((Date)ins.get("create_time"),"yyyy-MM-dd HH:mm:ss"));
 | 
	
		
			
				|  |  |                     jb.put("pt_name",ins.get("name").toString());
 | 
	
		
			
				|  |  |                     String sex = IdCardUtil.getSexForIdcard_new(ins.get("idcard").toString());
 | 
	
		
			
				|  |  |                     jb.put("ge_code", sex=="3"?"9":sex);
 | 
	
	
		
			
				|  | @ -598,14 +600,14 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |                     interId = achNsDoctorRecord(idCard);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 String[] dept = depToSubject(info.get("dept_code").toString());
 | 
	
		
			
				|  |  | //                String[] dept = depToSubject(info.get("dept_code").toString());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 jb.put("id",orgCode + (String)info.get("id"));
 | 
	
		
			
				|  |  |                 jb.put("id_doctor",interId == null ? "0":interId);
 | 
	
		
			
				|  |  |                 jb.put("organ_code",orgCode);
 | 
	
		
			
				|  |  |                 jb.put("organ_name", orgName);
 | 
	
		
			
				|  |  |                 jb.put("net_service", dept[0].toString());
 | 
	
		
			
				|  |  |                 jb.put("net_service_name",dept[1].toString());
 | 
	
		
			
				|  |  |                 jb.put("net_service", "4");
 | 
	
		
			
				|  |  |                 jb.put("net_service_name","在线复诊");
 | 
	
		
			
				|  |  |                 jb.put("val_score",info.get("score") == null ? "0": info.get("score"));
 | 
	
		
			
				|  |  |                 jb.put("grader",info.get("patient_name") == null ? "0": info.get("patient_name"));
 | 
	
		
			
				|  |  |                 jb.put("dt_grade",DateUtil.dateToStrLong((Date)info.get("create_time")));
 | 
	
	
		
			
				|  | @ -785,6 +787,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |                 String[] dept = depToSubject(info.get("dept").toString());
 | 
	
		
			
				|  |  |                 // 获取监管平台唯一标识
 | 
	
		
			
				|  |  |                 String visitDocCode = achNsDoctorRecord((String)info.get("docIdCard"));
 | 
	
		
			
				|  |  | //                String visitDocCode = achNsDoctorRecord("350102198005012428");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 jb.put("id_online_med", orgCode + info.get("register_no"));
 | 
	
		
			
				|  |  |                 jb.put("net_service_code", "4");
 | 
	
	
		
			
				|  | @ -842,7 +845,6 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |                 dataError++;
 | 
	
		
			
				|  |  |                 logger.error(e.toString());
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             String jbstr = jb.toJSONString();
 | 
	
		
			
				|  |  |             if(!errorFlag){
 | 
	
		
			
				|  |  |                 JSONArray jsonArray = new JSONArray();
 | 
	
		
			
				|  |  |                 jsonArray.add(jb);
 | 
	
	
		
			
				|  | @ -878,11 +880,12 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String sql = "select a.id,a.real_order,a.patient_code,a.outpatient_id,a.patient_name\n" +
 | 
	
		
			
				|  |  |                 "      ,b.sex,b.birthday,b.idcard,b.mobile,b.city_code,a.hospital\n" +
 | 
	
		
			
				|  |  |                 "      ,a.hospital_name,a.dept,a.dept_name,a.doctor,a.doctor_name,a.his_register_fee,c.idcard as docIdcard\n" +
 | 
	
		
			
				|  |  |                 "      ,a.hospital_name,p.dept,p.dept_name,a.doctor,a.doctor_name,a.his_register_fee,c.idcard as docIdcard\n" +
 | 
	
		
			
				|  |  |                 "  from  wlyy_prescription a\n" +
 | 
	
		
			
				|  |  |                 "         left JOIN base_patient b on a.patient_code = b.id\n" +
 | 
	
		
			
				|  |  |                 "         left JOIN base_doctor c on a.doctor = c.id\n" +
 | 
	
		
			
				|  |  |                 " where  c.idcard is not null  and a.real_order is not null ";
 | 
	
		
			
				|  |  |                 "         JOIN base_patient b on a.patient_code = b.id\n" +
 | 
	
		
			
				|  |  |                 "         JOIN base_doctor c on a.doctor = c.id\n" +
 | 
	
		
			
				|  |  |                 "         JOIN wlyy_outpatient p on p.id = a.outpatient_id\n " +
 | 
	
		
			
				|  |  |                 "  where  c.idcard is not null  and a.real_order is not null ";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(startDate)){
 | 
	
		
			
				|  |  |             sql =  sql + "  and a.create_time >=  '" + startDate + "' ";
 | 
	
	
		
			
				|  | @ -902,9 +905,10 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
 | 
	
		
			
				|  |  |             LinkedCaseInsensitiveMap info = (LinkedCaseInsensitiveMap) list.get(i);
 | 
	
		
			
				|  |  |             JSONObject jb = new JSONObject();
 | 
	
		
			
				|  |  |             Boolean errorFlag = false;
 | 
	
		
			
				|  |  |             //基于科室转换成国家诊疗科目代码
 | 
	
		
			
				|  |  |             String[] dept = depToSubject(info.get("dept_code").toString());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             try {
 | 
	
		
			
				|  |  |                 //基于科室转换成国家诊疗科目代码
 | 
	
		
			
				|  |  |                 String[] dept = depToSubject(info.get("dept").toString());
 | 
	
		
			
				|  |  |                 // 获取监管平台唯一标识
 | 
	
		
			
				|  |  |                 String visitDocCode = achNsDoctorRecord(info.get("docIdcard").toString());
 | 
	
		
			
				|  |  | 
 |