|
@@ -1,6 +1,7 @@
|
|
|
package com.ruoyi.system.timing;
|
|
package com.ruoyi.system.timing;
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.system.domain.TShouhuanAlarmList;
|
|
import com.ruoyi.system.domain.TShouhuanAlarmList;
|
|
|
import com.ruoyi.system.domain.TShouhuanInfo;
|
|
import com.ruoyi.system.domain.TShouhuanInfo;
|
|
|
import com.ruoyi.system.domain.dto.SettingDto;
|
|
import com.ruoyi.system.domain.dto.SettingDto;
|
|
@@ -40,17 +41,26 @@ public class CallPoliceTiming {
|
|
|
public void checkCallPolice(){
|
|
public void checkCallPolice(){
|
|
|
|
|
|
|
|
List<TShouhuanInfo> tShouhuanInfos = tShouhuanInfoMapper.selectTShouhuanInfo();
|
|
List<TShouhuanInfo> tShouhuanInfos = tShouhuanInfoMapper.selectTShouhuanInfo();
|
|
|
|
|
+ String shouhuan_body_max = tDeviceListMapper.selectshouhuan("shouhuan_body_max");
|
|
|
|
|
+ String shouhuan_blood_high_max = tDeviceListMapper.selectshouhuan("shouhuan_blood_high_max");
|
|
|
|
|
+ String shouhuan_blood_high_min = tDeviceListMapper.selectshouhuan("shouhuan_blood_high_min");
|
|
|
|
|
+ String shouhuan_heart_max = tDeviceListMapper.selectshouhuan("shouhuan_heart_max");
|
|
|
|
|
+ String shouhuan_oxygen_max = tDeviceListMapper.selectshouhuan("shouhuan_oxygen_max");
|
|
|
|
|
|
|
|
for (TShouhuanInfo info : tShouhuanInfos){
|
|
for (TShouhuanInfo info : tShouhuanInfos){
|
|
|
- if (info.getTemp()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_body_max"))){
|
|
|
|
|
|
|
+ if (info.getTemp()>Integer.parseInt(shouhuan_body_max)){
|
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,tempalarmType,alarmFromType));
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,tempalarmType,alarmFromType));
|
|
|
- }else if(info.getBloodHeightPressure()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_blood_high_max"))){
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(info.getBloodHeightPressure()<Integer.parseInt(shouhuan_blood_high_max)){
|
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,bloodalarmType,alarmFromType));
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,bloodalarmType,alarmFromType));
|
|
|
- }else if(info.getBloodLowPressure()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_blood_high_min"))){
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(info.getBloodLowPressure()>Integer.parseInt(shouhuan_blood_high_min)){
|
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,bloodalarmType,alarmFromType));
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,bloodalarmType,alarmFromType));
|
|
|
- }else if(info.getHeartRate()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_heart_max"))){
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(info.getHeartRate()>Integer.parseInt(shouhuan_heart_max)){
|
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,heartalarmType,alarmFromType));
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,heartalarmType,alarmFromType));
|
|
|
- }else if(info.getOxygen()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_oxygen_max"))){
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(info.getOxygen()>Integer.parseInt(shouhuan_oxygen_max)){
|
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,oxygenalarmType,alarmFromType));
|
|
tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,oxygenalarmType,alarmFromType));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -58,21 +68,49 @@ public class CallPoliceTiming {
|
|
|
|
|
|
|
|
public TShouhuanAlarmList saveInfo(TShouhuanInfo info, Integer heartalarmType, Integer alarmFromType){
|
|
public TShouhuanAlarmList saveInfo(TShouhuanInfo info, Integer heartalarmType, Integer alarmFromType){
|
|
|
TShouhuanAlarmList tShouhuanAlarmList = new TShouhuanAlarmList();
|
|
TShouhuanAlarmList tShouhuanAlarmList = new TShouhuanAlarmList();
|
|
|
- tShouhuanAlarmList.setFacilityId(info.getFacilityId());
|
|
|
|
|
- tShouhuanAlarmList.setShinfoId(info.getId());
|
|
|
|
|
- tShouhuanAlarmList.setDeviceIdCode(info.getDeviceIdCode());
|
|
|
|
|
- tShouhuanAlarmList.setGpsLong(info.getGpsLong());
|
|
|
|
|
- tShouhuanAlarmList.setGpsLat(info.getGpsLat());
|
|
|
|
|
- tShouhuanAlarmList.setSpeed(info.getSpeed());
|
|
|
|
|
- tShouhuanAlarmList.setDirection(info.getDirection());
|
|
|
|
|
- tShouhuanAlarmList.setPoster(info.getPoster());
|
|
|
|
|
- tShouhuanAlarmList.setElectricQuantity(info.getElectricQuantity());
|
|
|
|
|
- tShouhuanAlarmList.setStepNumber(info.getStepNumber());
|
|
|
|
|
- tShouhuanAlarmList.setRollNumber(info.getRollNumber());
|
|
|
|
|
- tShouhuanAlarmList.setAlarmType(heartalarmType);
|
|
|
|
|
- tShouhuanAlarmList.setTerminalStatus(info.getTerminalStatus());
|
|
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getFacilityId())){
|
|
|
|
|
+ tShouhuanAlarmList.setFacilityId(info.getFacilityId());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getId())){
|
|
|
|
|
+ tShouhuanAlarmList.setShinfoId(info.getId());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getDeviceIdCode())){
|
|
|
|
|
+ tShouhuanAlarmList.setDeviceIdCode(info.getDeviceIdCode());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getGpsLong())){
|
|
|
|
|
+ tShouhuanAlarmList.setGpsLong(info.getGpsLong());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getGpsLat())){
|
|
|
|
|
+ tShouhuanAlarmList.setGpsLat(info.getGpsLat());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getSpeed())){
|
|
|
|
|
+ tShouhuanAlarmList.setSpeed(info.getSpeed());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getDirection())){
|
|
|
|
|
+ tShouhuanAlarmList.setDirection(info.getDirection());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getPoster())){
|
|
|
|
|
+ tShouhuanAlarmList.setPoster(info.getPoster());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getElectricQuantity())){
|
|
|
|
|
+ tShouhuanAlarmList.setElectricQuantity(info.getElectricQuantity());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getStepNumber())){
|
|
|
|
|
+ tShouhuanAlarmList.setStepNumber(info.getStepNumber());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getRollNumber())){
|
|
|
|
|
+ tShouhuanAlarmList.setRollNumber(info.getRollNumber());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(heartalarmType)){
|
|
|
|
|
+ tShouhuanAlarmList.setAlarmType(heartalarmType);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotNull(info.getTerminalStatus())){
|
|
|
|
|
+ tShouhuanAlarmList.setTerminalStatus(info.getTerminalStatus());
|
|
|
|
|
+ }
|
|
|
tShouhuanAlarmList.setCreateTime(DateUtils.getNowDate());
|
|
tShouhuanAlarmList.setCreateTime(DateUtils.getNowDate());
|
|
|
- tShouhuanAlarmList.setAlarmFromType(alarmFromType);
|
|
|
|
|
|
|
+ if(StringUtils.isNotNull(alarmFromType)){
|
|
|
|
|
+ tShouhuanAlarmList.setAlarmFromType(alarmFromType);
|
|
|
|
|
+ }
|
|
|
return tShouhuanAlarmList;
|
|
return tShouhuanAlarmList;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|