| 
					
				 | 
			
			
				@ -54,22 +54,29 @@ public class SecurityOrderUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DeviceSosLogDao sosLogDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /***创建安防工单***/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject createSecurityOrder(String deviceSN, String sceneUrl, JSONObject result, Integer orderSource, String dictCode, String topicItem, String warnInfo){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject createSecurityOrder(String deviceSN, String sceneUrl, JSONObject result,JSONObject addressInfo, Integer orderSource, String dictCode, String topicItem, String warnInfo){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String lat = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String lon = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String address=" "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<DevicePatientDevice> devicePatientDeviceDos = patientDeviceDao.findByDeviceSn(deviceSN); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (devicePatientDeviceDos.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                DevicePatientDevice deviceDO = devicePatientDeviceDos.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Map<String, String> json = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (org.apache.commons.lang.StringUtils.isNotBlank(deviceDO.getSosAddress())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json = LatitudeUtils.getGeocoderLatitude(deviceDO.getSosAddress().replace("G.", "").replace("(糖友网)", "").replace("(高友网)", "")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (null!=addressInfo){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    lat = addressInfo.getString("lat"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    lon = addressInfo.getString("lon"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    address = addressInfo.getString("address"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Map<String, String> json = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (org.apache.commons.lang.StringUtils.isNotBlank(deviceDO.getSosAddress())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        json = LatitudeUtils.getGeocoderLatitude(deviceDO.getSosAddress().replace("G.", "").replace("(糖友网)", "").replace("(高友网)", "")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (json != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        lat = json.get("lat").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        lon = json.get("lng").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        address = deviceDO.getSosAddress(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (json != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    lat = json.get("lat").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    lon = json.get("lng").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                BasePatientDO patientDO = patientDao.findById(deviceDO.getUser()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String  url = cloudCareUrl+"/cloudCare/noLogin/security/createOrder"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String hospital = ""; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -95,7 +102,7 @@ public class SecurityOrderUtil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("patientPhone",patientDO.getMobile()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("serveDesc",serveDesc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("hospital",sqlResult.get(0).get("org_code")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("serveAddress",deviceDO.getSosAddress()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("serveAddress",address); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("serveLat",lat); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("serveLon",lon); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                jsonObject.put("topicItem",topicItem); 
			 |