Procházet zdrojové kódy

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/label/PatientLableService.java
yeshijie před 3 roky
rodič
revize
b7e7980c6d

+ 8 - 4
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/YsDeviceService.java

@ -168,11 +168,15 @@ public class YsDeviceService {
                String  url = cloudCareUrl+"/cloudCare/noLogin/security/createOrder";
                Map map = new HashMap<String, String>();
                map = new HashMap();
                String sql ="select DISTINCT item.org_code,item.org_name\n" +
                        " from base_service_package_sign_record sr,base_service_package_record pr,base_service_package_item item ,base_service_package pack\n" +
                        "where pr.patient = '"+patientDO.getId()+"' and sr.id = pr.sign_id and pr.service_package_id = item.service_package_id \tand  item.`code`='preventFall'  and item.service_package_id = pack.id \n" +
                String hospital = "";
                String sql ="select DISTINCT pack.org_code,pack.org_name " +
                        " from base_service_package_sign_record sr,base_service_package_record pr,base_service_package_item item ,base_service_package pack " +
                        "where pr.patient = '"+patientDO.getId()+"' and sr.id = pr.sign_id and pr.service_package_id = item.service_package_id and  item.`code`='"+topicItem+"'  and item.service_package_id = pack.id " +
                        "  and pack.del=1";
                List<Map<String,Object>> sqlResult = jdbcTemplate.queryForList(sql);
                if(sqlResult.size()>0){
                    hospital = sqlResult.get(0).get("org_code")+"";
                }
                String serveDesc = "";
                String sqlDesc = "SELECT dict_value from wlyy_hospital_sys_dict WHERE dict_code = '"+dictCode+"' and dict_name = 'security_server_dict'";
@ -186,7 +190,7 @@ public class YsDeviceService {
                jsonObject.put("patientName",patientDO.getName());
                jsonObject.put("patientPhone",patientDO.getMobile());
                jsonObject.put("serveDesc",serveDesc);
                jsonObject.put("hospital",sqlResult.get(0).get("org_code"));
                jsonObject.put("hospital",hospital);
                jsonObject.put("serveAddress",deviceDO.getSosAddress());
                jsonObject.put("serveLat",lat);
                jsonObject.put("serveLon",lon);

+ 26 - 1
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/util/ArtemisPostTest.java

@ -213,6 +213,20 @@ public class ArtemisPostTest {
		System.out.println("StringeResult结果示例: "+StringeResult);
	}
	/**
	 * type 1烟感 2气感
	 * @param deviceName
	 * @param deviceSerial
	 * @param type
     */
	public static void addDevice(String deviceName,String deviceSerial,int type){
		if(type ==1){
			addDevice(deviceName,deviceSerial,"800022","600002");
		}else{
			addDevice(deviceName,deviceSerial,"800056","600006");
		}
	}
	/**
	 * 查询订阅
	 */
@ -237,7 +251,7 @@ public class ArtemisPostTest {
//		callPostImgStringApi();
//		getDevice();
		getMonitor();
//		getMonitor();
//		subscription_info("980001");
//		subscription_info("980002");
//		subscription_info("980003");
@ -246,5 +260,16 @@ public class ArtemisPostTest {
//		subscription_info("980006");
//		subscription_info("980007");
//		subscription_info("980008");
		addDevice("可燃气体探测器","867070036127251",2);
		addDevice("可燃气体探测器","867070036223175",2);
		addDevice("可燃气体探测器","867070036131121",2);
		addDevice("可燃气体探测器","867070036312564",2);
		addDevice("火灾探测报警器","863409057775073",1);
		addDevice("火灾探测报警器","863409057781162",1);
		addDevice("火灾探测报警器","863409057781261",1);
		addDevice("火灾探测报警器","863409057781113",1);
	}
}