|
@ -79,7 +79,7 @@ public class MonitorPlatformService {
|
|
* @param diseaseCondition
|
|
* @param diseaseCondition
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type,String deviceType) throws IOException {
|
|
|
|
|
|
public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type,String deviceType,String deviceName) throws IOException {
|
|
MixEnvelop<LocationDataVO, LocationDataVO> envelop = new MixEnvelop<>();
|
|
MixEnvelop<LocationDataVO, LocationDataVO> envelop = new MixEnvelop<>();
|
|
MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
|
|
MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
@ -890,7 +890,7 @@ public class MonitorPlatformService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public JSONArray warningInformationAlarm_new(Integer page,Integer pageSize,String startTime,String endTime,
|
|
public JSONArray warningInformationAlarm_new(Integer page,Integer pageSize,String startTime,String endTime,
|
|
String deviceType,String area,String hospital){
|
|
|
|
|
|
String deviceType,String area,String hospital,String deviceName){
|
|
String url = "/wlyygc/iot_monitoring/warningInformationAlarm_new";
|
|
String url = "/wlyygc/iot_monitoring/warningInformationAlarm_new";
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
params.put("page",page);
|
|
params.put("page",page);
|
|
@ -900,6 +900,7 @@ public class MonitorPlatformService {
|
|
params.put("deviceType",deviceType);
|
|
params.put("deviceType",deviceType);
|
|
params.put("area",area);
|
|
params.put("area",area);
|
|
params.put("hospital",hospital);
|
|
params.put("hospital",hospital);
|
|
|
|
params.put("deviceName",deviceName);
|
|
String response = sendGet(url,params);
|
|
String response = sendGet(url,params);
|
|
JSONObject json = JSONObject.parseObject(response);
|
|
JSONObject json = JSONObject.parseObject(response);
|
|
if(json.getInteger("status")==200){
|
|
if(json.getInteger("status")==200){
|
|
@ -951,7 +952,6 @@ public class MonitorPlatformService {
|
|
for(int i=0;i<jsonArray.size();i++){
|
|
for(int i=0;i<jsonArray.size();i++){
|
|
JSONObject data = jsonArray.getJSONObject(i);
|
|
JSONObject data = jsonArray.getJSONObject(i);
|
|
String deviceSn = data.getString("deviceSn");
|
|
String deviceSn = data.getString("deviceSn");
|
|
|
|
|
|
JSONArray jsonArray1 = new JSONArray();
|
|
JSONArray jsonArray1 = new JSONArray();
|
|
JSONObject json1 = new JSONObject();
|
|
JSONObject json1 = new JSONObject();
|
|
json1.put("andOr","and");
|
|
json1.put("andOr","and");
|
|
@ -1118,7 +1118,7 @@ public class MonitorPlatformService {
|
|
StringBuffer sql = new StringBuffer("SELECT a.category_code type,a.device_name,a.c as 'using',b.c-a.c as 'stock',b.c as 'total' from ( ");
|
|
StringBuffer sql = new StringBuffer("SELECT a.category_code type,a.device_name,a.c as 'using',b.c-a.c as 'stock',b.c as 'total' from ( ");
|
|
StringBuffer sqlCondition = new StringBuffer();
|
|
StringBuffer sqlCondition = new StringBuffer();
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(deviceName)){
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(deviceName)){
|
|
sqlCondition.append("and d.device_name='"+deviceName+"' ");
|
|
|
|
|
|
sqlCondition.append("and d.device_name in ('").append(deviceName.replace(",","','")).append("') ");
|
|
}
|
|
}
|
|
sql.append("SELECT d.category_code,d.device_name, COUNT(*) c from wlyy.wlyy_patient_device d,wlyy.wlyy_sign_family f WHERE f.`status`>0 and f.patient = d.`user` "+sqlCondition+" ");
|
|
sql.append("SELECT d.category_code,d.device_name, COUNT(*) c from wlyy.wlyy_patient_device d,wlyy.wlyy_sign_family f WHERE f.`status`>0 and f.patient = d.`user` "+sqlCondition+" ");
|
|
if ("0".equals(showLevel)){//组合一体机(5健康小屋,取自物联网),单体征测量仪(2血压计、1血糖仪)
|
|
if ("0".equals(showLevel)){//组合一体机(5健康小屋,取自物联网),单体征测量仪(2血压计、1血糖仪)
|
|
@ -1206,7 +1206,7 @@ public class MonitorPlatformService {
|
|
result.put("lostContact",lostContact);
|
|
result.put("lostContact",lostContact);
|
|
}
|
|
}
|
|
//deviceType包含小屋且设备名称为空||deviceType包含小屋且设备名称为健康小屋。
|
|
//deviceType包含小屋且设备名称为空||deviceType包含小屋且设备名称为健康小屋。
|
|
if ((deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isNoneBlank(deviceType))||(deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isNoneBlank(deviceName)&&"健康小屋".equals(deviceName))){
|
|
|
|
|
|
if ((deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isBlank(deviceName))||(deviceType.contains("5")&&org.apache.commons.lang3.StringUtils.isNoneBlank(deviceName)&&deviceName.contains("健康小屋"))){
|
|
String sql = "select COUNT(*) from xmiot.iot_equipmet_detail";
|
|
String sql = "select COUNT(*) from xmiot.iot_equipmet_detail";
|
|
Integer count = jdbcTemplate.queryForObject(sql,Integer.class);
|
|
Integer count = jdbcTemplate.queryForObject(sql,Integer.class);
|
|
JSONObject tmp = new JSONObject();
|
|
JSONObject tmp = new JSONObject();
|
|
@ -1413,4 +1413,31 @@ public class MonitorPlatformService {
|
|
object.put("medicalAbnormalSignData",gg);
|
|
object.put("medicalAbnormalSignData",gg);
|
|
return object;
|
|
return object;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public JSONArray getSearchTags(){
|
|
|
|
String sql = "select id,`value` from xmiot.iot_system_dict where dict_name='DEVICE' and del=1;";
|
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
JSONArray result = new JSONArray();
|
|
|
|
for (Map<String,Object> map :list){
|
|
|
|
sql="select `code`,`value` from xmiot.iot_system_dict where dict_name='DEVICE_TYPE' and del=1 and parent_code='"+map.get("id").toString()+"'";
|
|
|
|
StringBuffer buffer = new StringBuffer();
|
|
|
|
List<Map<String,Object>> reList = jdbcTemplate.queryForList(sql);
|
|
|
|
for (Map<String,Object> reMap:reList){
|
|
|
|
JSONObject tmp = new JSONObject();
|
|
|
|
tmp.put("name",reMap.get("value").toString());
|
|
|
|
tmp.put("code",reMap.get("code").toString());
|
|
|
|
buffer.append(","+reMap.get("code").toString());
|
|
|
|
result.add(tmp);
|
|
|
|
}
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNoneBlank(buffer.toString())){
|
|
|
|
buffer.deleteCharAt(0);
|
|
|
|
JSONObject tmp = new JSONObject();
|
|
|
|
tmp.put("name",map.get("value").toString());
|
|
|
|
tmp.put("code",buffer.toString());
|
|
|
|
result.add(tmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|