| 
					
				 | 
			
			
				@ -48,7 +48,7 @@ import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Service 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpErrorLogDao> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private org.slf4j.Logger logger = LoggerFactory.getLogger(InternetService.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private org.slf4j.Logger logger = LoggerFactory.getLogger(InternetCommonService.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private InternetUpErrorLogService internetUpErrorLogService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -92,7 +92,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String orgSub ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String imgUrl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    static String imgPath =File.separator+"data1"+File.separator+"ehr"+File.separator+"svr-internet-hospital-job"+File.separator+"img"+File.separator; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    static String imgPath =File.separator+"usr"+File.separator+"local"+File.separator+"hospital"+File.separator+"svr-internet-hospital-job"+File.separator+"img"+File.separator; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjectMapper objectMapper; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -677,49 +677,47 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Boolean errorFlag = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject jb = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String interId = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String idCard = info.get("docIdCard") == null ? "0":info.get("docIdCard").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if( info.get("docIdCard") == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    interId = "0"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    interId = achNsDoctorRecord(idCard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String idCard = info.get("docIdCard") == null ? "0":info.get("docIdCard").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if( info.get("docIdCard") == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                interId = "0"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                interId = achNsDoctorRecord(idCard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                try{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                String[] dept = depToSubject(info.get("dept_code").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jb.put("id",interId +"_"+ (String)info.get("relationCode")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jb.put("id_doctor",interId == null ? "0":interId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jb.put("organ_code",orgCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jb.put("organ_name", orgName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                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"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jb.put("grade_content", info.get("content") == null ? "0": info.get("content")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jb.put("crt_date", DateUtil.dateToStrLong(DateUtil.getNow())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                errorFlag = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                saveErrorLog(upid,"7",(String)info.get("id"),"医生评价信息格式错误",2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                dataError++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.error(e.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(!errorFlag){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (!interId.equalsIgnoreCase("0")&&!interId.equalsIgnoreCase("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONArray jsonArray = new JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jsonArray.add(jb); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    res = postToInter(token,api, jsonArray,url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONObject resJson = (JSONObject) JSONObject.parse(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if("200".equals(resJson.get("msg").toString())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        success++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        saveErrorLog(upid,"7",info.get("id").toString(),res,2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        error++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jb.put("id",interId +"_"+ (String)info.get("relationCode")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jb.put("id_doctor",interId == null ? "0":interId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jb.put("organ_code",orgCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jb.put("organ_name", orgName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    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"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jb.put("grade_content", info.get("content") == null ? "0": info.get("content")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    jb.put("crt_date", DateUtil.dateToStrLong(DateUtil.getNow())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    errorFlag = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    saveErrorLog(upid,"7",(String)info.get("id"),"医生评价信息格式错误",2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dataError++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.error(e.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!errorFlag){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (!interId.equalsIgnoreCase("0")&&!interId.equalsIgnoreCase("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        JSONArray jsonArray = new JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        jsonArray.add(jb); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        res = postToInter(token,api, jsonArray,url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        JSONObject resJson = (JSONObject) JSONObject.parse(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if("200".equals(resJson.get("msg").toString())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            success++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            saveErrorLog(upid,"7",info.get("id").toString(),res,2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            error++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String resInfo = "此次共上传:" + total + "条数据,其中成功 :" + success + "条,上传失败 : " + error + "条。格式错误:"+dataError+"条。"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        saveUpLog(upid,"7",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"),DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"),success,error,dataError,resInfo); 
			 |