ソースを参照

设备列表完成

zhengjie 1 年間 前
コミット
7d5098067e
33 ファイル変更3021 行追加21 行削除
  1. 8 0
      ruoyi-admin/pom.xml
  2. 167 9
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TDeviceListController.java
  3. 12 7
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeviceList.java
  4. 26 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TFacility.java
  5. 294 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TShouhuanAlarmList.java
  6. 569 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TShouhuanInfo.java
  7. 48 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/BloodRateDto.java
  8. 131 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/CallPoliceDto.java
  9. 23 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/HeartRateDto.java
  10. 36 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MessageDto.java
  11. 60 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MessageLogDto.java
  12. 20 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/OxygenRateDto.java
  13. 36 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RateDto.java
  14. 36 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RollRateDto.java
  15. 52 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/SettingDto.java
  16. 36 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/StepRateDto.java
  17. 20 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/TempRateDto.java
  18. 138 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeviceListMapper.java
  19. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TShouhuanAlarmListMapper.java
  20. 68 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TShouhuanInfoMapper.java
  21. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserProfileMapper.java
  22. 85 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITDeviceListService.java
  23. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITShouhuanAlarmListService.java
  24. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITShouhuanInfoService.java
  25. 184 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDeviceListServiceImpl.java
  26. 95 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TShouhuanAlarmListServiceImpl.java
  27. 93 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TShouhuanInfoServiceImpl.java
  28. 78 0
      ruoyi-system/src/main/java/com/ruoyi/system/timing/CallPoliceTiming.java
  29. 115 2
      ruoyi-system/src/main/resources/mapper/system/TDeviceListMapper.xml
  30. 11 1
      ruoyi-system/src/main/resources/mapper/system/TFacilityMapper.xml
  31. 146 0
      ruoyi-system/src/main/resources/mapper/system/TShouhuanAlarmListMapper.xml
  32. 239 0
      ruoyi-system/src/main/resources/mapper/system/TShouhuanInfoMapper.xml
  33. 4 0
      ruoyi-system/src/main/resources/mapper/system/TUserProfileMapper.xml

+ 8 - 0
ruoyi-admin/pom.xml

@@ -61,6 +61,14 @@
             <artifactId>ruoyi-generator</artifactId>
         </dependency>
 
+        <!-- https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2 -->
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+            <version>2.0.39</version>
+        </dependency>
+
+
     </dependencies>
 
     <build>

+ 167 - 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TDeviceListController.java

@@ -1,17 +1,15 @@
 package com.ruoyi.web.controller.system;
 
+import java.util.ArrayList;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.system.domain.TServiceManage;
+import com.ruoyi.system.domain.dto.*;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -20,6 +18,7 @@ import com.ruoyi.system.domain.TDeviceList;
 import com.ruoyi.system.service.ITDeviceListService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 设备列Controller
@@ -101,4 +100,163 @@ public class TDeviceListController extends BaseController
     {
         return toAjax(tDeviceListService.deleteTDeviceListByIds(ids));
     }
-}
+
+    /**
+     * 下载模板
+     */
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response)
+    {
+        ExcelUtil<TDeviceList> util = new ExcelUtil<TDeviceList>(TDeviceList.class);
+        util.importTemplateExcel(response, "设备列表模板");
+    }
+
+    /**
+     * 导入
+     */
+    @Log(title = "设备列表", businessType = BusinessType.IMPORT)
+    @PostMapping("/importData")
+    @ResponseBody
+    public AjaxResult importData(MultipartFile file) throws Exception
+    {
+        ExcelUtil<TDeviceList> util = new ExcelUtil<TDeviceList>(TDeviceList.class);
+        List<TDeviceList> tDeviceLists = util.importExcel(file.getInputStream());
+        String message = tDeviceListService.importTDeviceList(tDeviceLists);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 查询心率列表
+     */
+    @GetMapping("/heartRate")
+    public TableDataInfo heartRate(String device_id_code)
+    {
+        startPage();
+        List<RateDto> list = tDeviceListService.selectTDeviceByDeviceId(device_id_code);
+        for(RateDto dto : list){
+            HeartRateDto heartRateDto = JSONObject.parseObject(dto.getContent(), HeartRateDto.class);
+            dto.setContent(heartRateDto.getHeart_rate());
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询血氧列表
+     */
+    @GetMapping("/oxygenRate")
+    public TableDataInfo oxygenRate(String device_id_code)
+    {
+        startPage();
+        List<RateDto> list = tDeviceListService.selectTDeviceByOxygen(device_id_code);
+        for(RateDto dto : list){
+            OxygenRateDto oxygenRateDto = JSONObject.parseObject(dto.getContent(), OxygenRateDto.class);
+            dto.setContent(oxygenRateDto.getOxygen());
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询体温列表
+     */
+    @GetMapping("/tempRate")
+    public TableDataInfo tempRate(String device_id_code)
+    {
+        startPage();
+        List<RateDto> list = tDeviceListService.selectTDeviceByTemp(device_id_code);
+        for(RateDto dto : list){
+            TempRateDto tempRateDto = JSONObject.parseObject(dto.getContent(), TempRateDto.class);
+            dto.setContent(tempRateDto.getTemp());
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询血压列表
+     */
+    @GetMapping("/bloodRate")
+    public TableDataInfo bloodRate(String device_id_code)
+    {
+        startPage();
+        List<RateDto> list = tDeviceListService.selectTDeviceByBlood(device_id_code);
+        List<BloodRateDto> list1 = new ArrayList<>();
+        for(RateDto dto : list){
+            BloodRateDto bloodRateDto = JSONObject.parseObject(dto.getContent(), BloodRateDto.class);
+            bloodRateDto.setCreatetime(dto.getCreatetime());
+            list1.add(bloodRateDto);
+        }
+        return getDataTable(list1);
+    }
+
+    /**
+     * 查询步数列表
+     */
+    @GetMapping("/stepRate")
+    public TableDataInfo stepRate(String device_id_code)
+    {
+        startPage();
+        List<RateDto> list = tDeviceListService.selectTDeviceByStep(device_id_code);
+        List<StepRateDto> list1 = new ArrayList<>();
+        for(RateDto dto : list){
+            StepRateDto stepRateDto = JSONObject.parseObject(dto.getContent(), StepRateDto.class);
+            stepRateDto.setCreatetime(dto.getCreatetime());
+            list1.add(stepRateDto);
+        }
+        return getDataTable(list1);
+    }
+
+    /**
+     * 查询翻滚列表
+     */
+    @GetMapping("/rollRate")
+    public TableDataInfo rollRate(String device_id_code)
+    {
+        startPage();
+        List<RateDto> list = tDeviceListService.selectTDeviceByStep(device_id_code);
+        List<RollRateDto> list1 = new ArrayList<>();
+        for(RateDto dto : list){
+            RollRateDto rollRateDto = JSONObject.parseObject(dto.getContent(), RollRateDto.class);
+            rollRateDto.setCreatetime(dto.getCreatetime());
+            list1.add(rollRateDto);
+        }
+        return getDataTable(list1);
+    }
+
+    /**
+     * 查询步数列表
+     */
+    @GetMapping("/messageRate")
+    public TableDataInfo messageRate(String device_id_code)
+    {
+        startPage();
+        List<MessageDto> list = tDeviceListService.selectTDeviceByMessage(device_id_code);
+        List<RateDto> list1 = new ArrayList<>();
+        for(MessageDto dto : list){
+            RateDto rateDto = new RateDto();
+            rateDto.setContent(tDeviceListService.checkMessage(dto.getAlarm_type()));
+            rateDto.setCreatetime(dto.getCreatetime());
+            list1.add(rateDto);
+        }
+        return getDataTable(list1);
+    }
+
+    /**
+     * 查询设备消息日志
+     */
+    @GetMapping("/messageLogRate")
+    public TableDataInfo messageLogRate(MessageLogDto messageLogDto)
+    {
+        startPage();
+        List<MessageLogDto> list = tDeviceListService.selectTDeviceByMessageLog(messageLogDto);
+        return getDataTable(list);
+    }
+
+    /**
+     * 修改设备阈值
+     */
+    @Log(title = "设备阈值", businessType = BusinessType.UPDATE)
+    @PostMapping("/deviceValue")
+    public AjaxResult deviceValue(@RequestBody CallPoliceDto callPoliceDto)
+    {
+        return toAjax(tDeviceListService.deviceValue(callPoliceDto));
+    }
+}

+ 12 - 7
ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeviceList.java

@@ -21,12 +21,13 @@ public class TDeviceList extends BaseEntity
     /** id */
     private Integer id;
 
+    /** fid */
+    private Integer fid;
+
     /** 设备属性 */
-    @Excel(name = "设备属性")
     private Integer deviceProper;
 
     /** 用户ID */
-    @Excel(name = "用户ID")
     private Integer userid;
 
     /** 身份证号码 */
@@ -74,7 +75,6 @@ public class TDeviceList extends BaseEntity
     private Integer payment;
 
     /** 是否注册成功 */
-    @Excel(name = "是否注册成功")
     private Integer status;
 
     /** 用户姓名 */
@@ -82,20 +82,16 @@ public class TDeviceList extends BaseEntity
     private String name;
 
     /** 联系方式 */
-    @Excel(name = "联系方式")
     private String tel_one;
 
     /** 在线状态 */
-    @Excel(name = "在线状态")
     private Integer online_statis;
 
     /** 设备电量 */
-    @Excel(name = "设备电量")
     private Integer electric_quantity;
 
     /** 最后在线时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @Excel(name = "最后在线时间")
     private Date offlinetime;
 
     public void setId(Integer id) 
@@ -273,10 +269,19 @@ public class TDeviceList extends BaseEntity
         this.offlinetime = offlinetime;
     }
 
+    public Integer getFid() {
+        return fid;
+    }
+
+    public void setFid(Integer fid) {
+        this.fid = fid;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
+            .append("fid", getFid())
             .append("deviceProper", getDeviceProper())
             .append("userid", getUserid())
             .append("sfzid", getSfzid())

+ 26 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TFacility.java

@@ -38,6 +38,14 @@ public class TFacility extends BaseEntity
     @Excel(name = "状态")
     private Integer status;
 
+    /** iccid */
+    @Excel(name = "iccid")
+    private String iccid;
+
+    /** puk */
+    @Excel(name = "puk")
+    private String puk;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -93,6 +101,22 @@ public class TFacility extends BaseEntity
         return status;
     }
 
+    public String getIccid() {
+        return iccid;
+    }
+
+    public void setIccid(String iccid) {
+        this.iccid = iccid;
+    }
+
+    public String getPuk() {
+        return puk;
+    }
+
+    public void setPuk(String puk) {
+        this.puk = puk;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -103,6 +127,8 @@ public class TFacility extends BaseEntity
             .append("comCode", getComCode())
             .append("createTime", getCreateTime())
             .append("status", getStatus())
+            .append("iccid", getIccid())
+            .append("puk", getPuk())
             .toString();
     }
 }

+ 294 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TShouhuanAlarmList.java

@@ -0,0 +1,294 @@
+package com.ruoyi.system.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 手环报警列信息对象 t_shouhuan_alarm_list
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+public class TShouhuanAlarmList extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Integer id;
+
+    /** 设备id */
+    @Excel(name = "设备id")
+    private Integer facilityId;
+
+    /** 手环信息id */
+    @Excel(name = "手环信息id")
+    private Integer shinfoId;
+
+    /** 设置id编码 */
+    @Excel(name = "设置id编码")
+    private String deviceIdCode;
+
+    /** 经度 */
+    @Excel(name = "经度")
+    private BigDecimal gpsLong;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private BigDecimal gpsLat;
+
+    /** 速度 公里/小时 */
+    @Excel(name = "速度 公里/小时")
+    private BigDecimal speed;
+
+    /** 方向 度 */
+    @Excel(name = "方向 度")
+    private Integer direction;
+
+    /** 海拔 */
+    @Excel(name = "海拔")
+    private Integer poster;
+
+    /** 电量 */
+    @Excel(name = "电量")
+    private Integer electricQuantity;
+
+    /** 计步数 */
+    @Excel(name = "计步数")
+    private Integer stepNumber;
+
+    /** 翻滚数 */
+    @Excel(name = "翻滚数")
+    private Integer rollNumber;
+
+    /** 状态类型 0 无效 1:低电状态;2:出围栏状态;3:进围栏状态;4:手环戴上取下状态;5:手表运行静止状态 */
+    @Excel(name = "状态类型 0 无效 1:低电状态;2:出围栏状态;3:进围栏状态;4:手环戴上取下状态;5:手表运行静止状态")
+    private Integer statusType;
+
+    /** 报警类型 0 无效 16:SOS报警;17:低电报警;20:手环拆除报警;21:跌倒报警;22:心率异常报警 */
+    @Excel(name = "报警类型 0 无效 16:SOS报警;17:低电报警;20:手环拆除报警;21:跌倒报警;22:心率异常报警")
+    private Integer alarmType;
+
+    /** 终端状态 */
+    @Excel(name = "终端状态")
+    private String terminalStatus;
+
+    /** 来源类型 1终端主动发 0平台记录 */
+    @Excel(name = "来源类型 1终端主动发 0平台记录")
+    private Integer alarmFromType;
+
+    /** 报警信息 平台记录使用 */
+    @Excel(name = "报警信息 平台记录使用")
+    private String msg;
+
+    /** 是否发送 1是 0否 */
+    @Excel(name = "是否发送 1是 0否")
+    private Integer isSend;
+
+    /** 发送时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date sendTime;
+
+    public void setId(Integer id) 
+    {
+        this.id = id;
+    }
+
+    public Integer getId() 
+    {
+        return id;
+    }
+    public void setFacilityId(Integer facilityId) 
+    {
+        this.facilityId = facilityId;
+    }
+
+    public Integer getFacilityId() 
+    {
+        return facilityId;
+    }
+    public void setShinfoId(Integer shinfoId) 
+    {
+        this.shinfoId = shinfoId;
+    }
+
+    public Integer getShinfoId() 
+    {
+        return shinfoId;
+    }
+    public void setDeviceIdCode(String deviceIdCode) 
+    {
+        this.deviceIdCode = deviceIdCode;
+    }
+
+    public String getDeviceIdCode() 
+    {
+        return deviceIdCode;
+    }
+    public void setGpsLong(BigDecimal gpsLong) 
+    {
+        this.gpsLong = gpsLong;
+    }
+
+    public BigDecimal getGpsLong() 
+    {
+        return gpsLong;
+    }
+    public void setGpsLat(BigDecimal gpsLat) 
+    {
+        this.gpsLat = gpsLat;
+    }
+
+    public BigDecimal getGpsLat() 
+    {
+        return gpsLat;
+    }
+    public void setSpeed(BigDecimal speed) 
+    {
+        this.speed = speed;
+    }
+
+    public BigDecimal getSpeed() 
+    {
+        return speed;
+    }
+    public void setDirection(Integer direction) 
+    {
+        this.direction = direction;
+    }
+
+    public Integer getDirection() 
+    {
+        return direction;
+    }
+    public void setPoster(Integer poster) 
+    {
+        this.poster = poster;
+    }
+
+    public Integer getPoster() 
+    {
+        return poster;
+    }
+    public void setElectricQuantity(Integer electricQuantity) 
+    {
+        this.electricQuantity = electricQuantity;
+    }
+
+    public Integer getElectricQuantity() 
+    {
+        return electricQuantity;
+    }
+    public void setStepNumber(Integer stepNumber) 
+    {
+        this.stepNumber = stepNumber;
+    }
+
+    public Integer getStepNumber() 
+    {
+        return stepNumber;
+    }
+    public void setRollNumber(Integer rollNumber) 
+    {
+        this.rollNumber = rollNumber;
+    }
+
+    public Integer getRollNumber() 
+    {
+        return rollNumber;
+    }
+    public void setStatusType(Integer statusType) 
+    {
+        this.statusType = statusType;
+    }
+
+    public Integer getStatusType() 
+    {
+        return statusType;
+    }
+    public void setAlarmType(Integer alarmType) 
+    {
+        this.alarmType = alarmType;
+    }
+
+    public Integer getAlarmType() 
+    {
+        return alarmType;
+    }
+    public void setTerminalStatus(String terminalStatus) 
+    {
+        this.terminalStatus = terminalStatus;
+    }
+
+    public String getTerminalStatus() 
+    {
+        return terminalStatus;
+    }
+    public void setAlarmFromType(Integer alarmFromType) 
+    {
+        this.alarmFromType = alarmFromType;
+    }
+
+    public Integer getAlarmFromType() 
+    {
+        return alarmFromType;
+    }
+    public void setMsg(String msg) 
+    {
+        this.msg = msg;
+    }
+
+    public String getMsg() 
+    {
+        return msg;
+    }
+    public void setIsSend(Integer isSend) 
+    {
+        this.isSend = isSend;
+    }
+
+    public Integer getIsSend() 
+    {
+        return isSend;
+    }
+    public void setSendTime(Date sendTime) 
+    {
+        this.sendTime = sendTime;
+    }
+
+    public Date getSendTime() 
+    {
+        return sendTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("facilityId", getFacilityId())
+            .append("shinfoId", getShinfoId())
+            .append("deviceIdCode", getDeviceIdCode())
+            .append("gpsLong", getGpsLong())
+            .append("gpsLat", getGpsLat())
+            .append("speed", getSpeed())
+            .append("direction", getDirection())
+            .append("poster", getPoster())
+            .append("electricQuantity", getElectricQuantity())
+            .append("stepNumber", getStepNumber())
+            .append("rollNumber", getRollNumber())
+            .append("statusType", getStatusType())
+            .append("alarmType", getAlarmType())
+            .append("terminalStatus", getTerminalStatus())
+            .append("createTime", getCreateTime())
+            .append("alarmFromType", getAlarmFromType())
+            .append("msg", getMsg())
+            .append("isSend", getIsSend())
+            .append("sendTime", getSendTime())
+            .toString();
+    }
+}

+ 569 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TShouhuanInfo.java

@@ -0,0 +1,569 @@
+package com.ruoyi.system.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 手环信息 实时数据对象 t_shouhuan_info
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+public class TShouhuanInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Integer id;
+
+    /** 设备id */
+    @Excel(name = "设备id")
+    private Integer facilityId;
+
+    /** 设置id编码 */
+    @Excel(name = "设置id编码")
+    private String deviceIdCode;
+
+    /** 版本 */
+    @Excel(name = "版本")
+    private String version;
+
+    /** 经度 */
+    @Excel(name = "经度")
+    private BigDecimal gpsLong;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private BigDecimal gpsLat;
+
+    /** 使用经度 */
+    @Excel(name = "使用经度")
+    private BigDecimal useGpsLong;
+
+    /** 使用纬度 */
+    @Excel(name = "使用纬度")
+    private BigDecimal useGpsLat;
+
+    /** 使用mac */
+    @Excel(name = "使用mac")
+    private String useMac;
+
+    /** 速度 公里/小时 */
+    @Excel(name = "速度 公里/小时")
+    private BigDecimal speed;
+
+    /** 方向 度 */
+    @Excel(name = "方向 度")
+    private Integer direction;
+
+    /** 海拔 */
+    @Excel(name = "海拔")
+    private Integer poster;
+
+    /** 电量 */
+    @Excel(name = "电量")
+    private Integer electricQuantity;
+
+    /** 计步数 */
+    @Excel(name = "计步数")
+    private Integer stepNumber;
+
+    /** 翻滚数 */
+    @Excel(name = "翻滚数")
+    private Integer rollNumber;
+
+    /** 终端状态 */
+    @Excel(name = "终端状态")
+    private String terminalStatus;
+
+    /** 在线状态 1在线 0离线 */
+    @Excel(name = "在线状态 1在线 0离线")
+    private Integer onlineStatis;
+
+    /** 体温 */
+    @Excel(name = "体温")
+    private Integer temp;
+
+    /** 血压 高压 0无效 */
+    @Excel(name = "血压 高压 0无效")
+    private Integer bloodHeightPressure;
+
+    /** 血压 低压 0无效 */
+    @Excel(name = "血压 低压 0无效")
+    private Integer bloodLowPressure;
+
+    /** 心率 0无效 */
+    @Excel(name = "心率 0无效")
+    private Integer heartRate;
+
+    /** 血养饱和度 */
+    @Excel(name = "血养饱和度")
+    private Integer oxygen;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date updatetime;
+
+    /** 离线时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "离线时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date offlinetime;
+
+    /** 上线时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "上线时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date onlinetime;
+
+    /** gps更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "gps更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date gpsUpdateTime;
+
+    /** 血压更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "血压更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date bloodUpdateTime;
+
+    /** 心率更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "心率更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date heartUpdateTime;
+
+    /** 体温更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "体温更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date tempUpdateTime;
+
+    /** 血氧更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "血氧更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date oxygenUpdateTime;
+
+    /** 电量更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "电量更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date electricQuantityUpdateTime;
+
+    /** 步数更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "步数更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date stepNumberUpdateTime;
+
+    /** 翻滚数更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "翻滚数更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date rollNumberUpdateTime;
+
+    /** 终端状态更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "终端状态更新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date terminalStatusUpdateTime;
+
+    /** 0非接口获取坐标 1移动接入 2wifi接入 -2 查询失败 */
+    @Excel(name = "0非接口获取坐标 1移动接入 2wifi接入 -2 查询失败")
+    private Integer accesstype;
+
+    /** 详细地址 */
+    @Excel(name = "详细地址")
+    private String addressDesc;
+
+    /** 手环是否定位 1 是 0 否 */
+    @Excel(name = "手环是否定位 1 是 0 否")
+    private Integer isGps;
+
+    public void setId(Integer id)
+    {
+        this.id = id;
+    }
+
+    public Integer getId()
+    {
+        return id;
+    }
+    public void setFacilityId(Integer facilityId)
+    {
+        this.facilityId = facilityId;
+    }
+
+    public Integer getFacilityId()
+    {
+        return facilityId;
+    }
+    public void setDeviceIdCode(String deviceIdCode) 
+    {
+        this.deviceIdCode = deviceIdCode;
+    }
+
+    public String getDeviceIdCode() 
+    {
+        return deviceIdCode;
+    }
+    public void setVersion(String version) 
+    {
+        this.version = version;
+    }
+
+    public String getVersion() 
+    {
+        return version;
+    }
+    public void setGpsLong(BigDecimal gpsLong) 
+    {
+        this.gpsLong = gpsLong;
+    }
+
+    public BigDecimal getGpsLong() 
+    {
+        return gpsLong;
+    }
+    public void setGpsLat(BigDecimal gpsLat) 
+    {
+        this.gpsLat = gpsLat;
+    }
+
+    public BigDecimal getGpsLat() 
+    {
+        return gpsLat;
+    }
+    public void setUseGpsLong(BigDecimal useGpsLong) 
+    {
+        this.useGpsLong = useGpsLong;
+    }
+
+    public BigDecimal getUseGpsLong() 
+    {
+        return useGpsLong;
+    }
+    public void setUseGpsLat(BigDecimal useGpsLat) 
+    {
+        this.useGpsLat = useGpsLat;
+    }
+
+    public BigDecimal getUseGpsLat() 
+    {
+        return useGpsLat;
+    }
+    public void setUseMac(String useMac) 
+    {
+        this.useMac = useMac;
+    }
+
+    public String getUseMac() 
+    {
+        return useMac;
+    }
+    public void setSpeed(BigDecimal speed) 
+    {
+        this.speed = speed;
+    }
+
+    public BigDecimal getSpeed() 
+    {
+        return speed;
+    }
+    public void setDirection(Integer direction) 
+    {
+        this.direction = direction;
+    }
+
+    public Integer getDirection() 
+    {
+        return direction;
+    }
+    public void setPoster(Integer poster) 
+    {
+        this.poster = poster;
+    }
+
+    public Integer getPoster() 
+    {
+        return poster;
+    }
+    public void setElectricQuantity(Integer electricQuantity) 
+    {
+        this.electricQuantity = electricQuantity;
+    }
+
+    public Integer getElectricQuantity() 
+    {
+        return electricQuantity;
+    }
+    public void setStepNumber(Integer stepNumber) 
+    {
+        this.stepNumber = stepNumber;
+    }
+
+    public Integer getStepNumber() 
+    {
+        return stepNumber;
+    }
+    public void setRollNumber(Integer rollNumber) 
+    {
+        this.rollNumber = rollNumber;
+    }
+
+    public Integer getRollNumber() 
+    {
+        return rollNumber;
+    }
+    public void setTerminalStatus(String terminalStatus) 
+    {
+        this.terminalStatus = terminalStatus;
+    }
+
+    public String getTerminalStatus() 
+    {
+        return terminalStatus;
+    }
+    public void setOnlineStatis(Integer onlineStatis) 
+    {
+        this.onlineStatis = onlineStatis;
+    }
+
+    public Integer getOnlineStatis() 
+    {
+        return onlineStatis;
+    }
+
+    public Integer getTemp() {
+        return temp;
+    }
+
+    public void setTemp(Integer temp) {
+        this.temp = temp;
+    }
+
+    public void setBloodHeightPressure(Integer bloodHeightPressure)
+    {
+        this.bloodHeightPressure = bloodHeightPressure;
+    }
+
+    public Integer getBloodHeightPressure() 
+    {
+        return bloodHeightPressure;
+    }
+    public void setBloodLowPressure(Integer bloodLowPressure) 
+    {
+        this.bloodLowPressure = bloodLowPressure;
+    }
+
+    public Integer getBloodLowPressure() 
+    {
+        return bloodLowPressure;
+    }
+    public void setHeartRate(Integer heartRate) 
+    {
+        this.heartRate = heartRate;
+    }
+
+    public Integer getHeartRate() 
+    {
+        return heartRate;
+    }
+    public void setOxygen(Integer oxygen) 
+    {
+        this.oxygen = oxygen;
+    }
+
+    public Integer getOxygen() 
+    {
+        return oxygen;
+    }
+    public void setOfflinetime(Date offlinetime) 
+    {
+        this.offlinetime = offlinetime;
+    }
+
+    public Date getOfflinetime() 
+    {
+        return offlinetime;
+    }
+    public void setOnlinetime(Date onlinetime) 
+    {
+        this.onlinetime = onlinetime;
+    }
+
+    public Date getOnlinetime() 
+    {
+        return onlinetime;
+    }
+    public void setGpsUpdateTime(Date gpsUpdateTime) 
+    {
+        this.gpsUpdateTime = gpsUpdateTime;
+    }
+
+    public Date getGpsUpdateTime() 
+    {
+        return gpsUpdateTime;
+    }
+    public void setBloodUpdateTime(Date bloodUpdateTime) 
+    {
+        this.bloodUpdateTime = bloodUpdateTime;
+    }
+
+    public Date getBloodUpdateTime() 
+    {
+        return bloodUpdateTime;
+    }
+    public void setHeartUpdateTime(Date heartUpdateTime) 
+    {
+        this.heartUpdateTime = heartUpdateTime;
+    }
+
+    public Date getHeartUpdateTime() 
+    {
+        return heartUpdateTime;
+    }
+    public void setTempUpdateTime(Date tempUpdateTime) 
+    {
+        this.tempUpdateTime = tempUpdateTime;
+    }
+
+    public Date getTempUpdateTime() 
+    {
+        return tempUpdateTime;
+    }
+    public void setOxygenUpdateTime(Date oxygenUpdateTime) 
+    {
+        this.oxygenUpdateTime = oxygenUpdateTime;
+    }
+
+    public Date getOxygenUpdateTime() 
+    {
+        return oxygenUpdateTime;
+    }
+    public void setElectricQuantityUpdateTime(Date electricQuantityUpdateTime) 
+    {
+        this.electricQuantityUpdateTime = electricQuantityUpdateTime;
+    }
+
+    public Date getElectricQuantityUpdateTime() 
+    {
+        return electricQuantityUpdateTime;
+    }
+    public void setStepNumberUpdateTime(Date stepNumberUpdateTime) 
+    {
+        this.stepNumberUpdateTime = stepNumberUpdateTime;
+    }
+
+    public Date getStepNumberUpdateTime() 
+    {
+        return stepNumberUpdateTime;
+    }
+    public void setRollNumberUpdateTime(Date rollNumberUpdateTime) 
+    {
+        this.rollNumberUpdateTime = rollNumberUpdateTime;
+    }
+
+    public Date getRollNumberUpdateTime() 
+    {
+        return rollNumberUpdateTime;
+    }
+    public void setTerminalStatusUpdateTime(Date terminalStatusUpdateTime) 
+    {
+        this.terminalStatusUpdateTime = terminalStatusUpdateTime;
+    }
+
+    public Date getTerminalStatusUpdateTime() 
+    {
+        return terminalStatusUpdateTime;
+    }
+    public void setAccesstype(Integer accesstype) 
+    {
+        this.accesstype = accesstype;
+    }
+
+    public Integer getAccesstype() 
+    {
+        return accesstype;
+    }
+    public void setAddressDesc(String addressDesc) 
+    {
+        this.addressDesc = addressDesc;
+    }
+
+    public String getAddressDesc() 
+    {
+        return addressDesc;
+    }
+    public void setIsGps(Integer isGps) 
+    {
+        this.isGps = isGps;
+    }
+
+    public Integer getIsGps() 
+    {
+        return isGps;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("facilityId", getFacilityId())
+            .append("deviceIdCode", getDeviceIdCode())
+            .append("version", getVersion())
+            .append("gpsLong", getGpsLong())
+            .append("gpsLat", getGpsLat())
+            .append("useGpsLong", getUseGpsLong())
+            .append("useGpsLat", getUseGpsLat())
+            .append("useMac", getUseMac())
+            .append("speed", getSpeed())
+            .append("direction", getDirection())
+            .append("poster", getPoster())
+            .append("electricQuantity", getElectricQuantity())
+            .append("stepNumber", getStepNumber())
+            .append("rollNumber", getRollNumber())
+            .append("terminalStatus", getTerminalStatus())
+            .append("onlineStatis", getOnlineStatis())
+            .append("temp", getTemp())
+            .append("bloodHeightPressure", getBloodHeightPressure())
+            .append("bloodLowPressure", getBloodLowPressure())
+            .append("heartRate", getHeartRate())
+            .append("oxygen", getOxygen())
+            .append("offlinetime", getOfflinetime())
+            .append("onlinetime", getOnlinetime())
+            .append("gpsUpdateTime", getGpsUpdateTime())
+            .append("bloodUpdateTime", getBloodUpdateTime())
+            .append("heartUpdateTime", getHeartUpdateTime())
+            .append("tempUpdateTime", getTempUpdateTime())
+            .append("oxygenUpdateTime", getOxygenUpdateTime())
+            .append("electricQuantityUpdateTime", getElectricQuantityUpdateTime())
+            .append("stepNumberUpdateTime", getStepNumberUpdateTime())
+            .append("rollNumberUpdateTime", getRollNumberUpdateTime())
+            .append("terminalStatusUpdateTime", getTerminalStatusUpdateTime())
+            .append("createtime", getCreatetime())
+            .append("updatetime", getUpdatetime())
+            .append("accesstype", getAccesstype())
+            .append("addressDesc", getAddressDesc())
+            .append("isGps", getIsGps())
+            .toString();
+    }
+}

+ 48 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/BloodRateDto.java

@@ -0,0 +1,48 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class BloodRateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 低压 */
+    @Excel(name = "低压")
+    private String blood_low_pressure;
+
+    /** 高压 */
+    @Excel(name = "高压")
+    private String blood_height_pressure;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    public String getBlood_low_pressure() {
+        return blood_low_pressure;
+    }
+
+    public void setBlood_low_pressure(String blood_low_pressure) {
+        this.blood_low_pressure = blood_low_pressure;
+    }
+
+    public String getBlood_height_pressure() {
+        return blood_height_pressure;
+    }
+
+    public void setBlood_height_pressure(String blood_height_pressure) {
+        this.blood_height_pressure = blood_height_pressure;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+}

+ 131 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/CallPoliceDto.java

@@ -0,0 +1,131 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class CallPoliceDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 最大心率 */
+    @Excel(name = "最大心率")
+    private String shouhuan_heart_max;
+
+    /** 最小心率 */
+    @Excel(name = "最小心率")
+    private String shouhuan_heart_min;
+
+    /** 高压最大 */
+    @Excel(name = "高压最大")
+    private String shouhuan_blood_high_max;
+
+    /** 高压最小 */
+    @Excel(name = "高压最小")
+    private String shouhuan_blood_high_min;
+
+    /** 低压最大 */
+    @Excel(name = "低压最大")
+    private String shouhuan_blood_low_max;
+
+    /** 低压最小 */
+    @Excel(name = "低压最小")
+    private String shouhuan_blood_low_min;
+
+    /** 血氧最大 */
+    @Excel(name = "血氧最大")
+    private String shouhuan_oxygen_max;
+
+    /** 血氧最小 */
+    @Excel(name = "血氧最小")
+    private String shouhuan_oxygen_min;
+
+    /** 体温最大 */
+    @Excel(name = "体温最大")
+    private String shouhuan_body_max;
+
+    /** 体温最小 */
+    @Excel(name = "体温最小")
+    private String shouhuan_body_min;
+
+    public String getShouhuan_heart_max() {
+        return shouhuan_heart_max;
+    }
+
+    public void setShouhuan_heart_max(String shouhuan_heart_max) {
+        this.shouhuan_heart_max = shouhuan_heart_max;
+    }
+
+    public String getShouhuan_heart_min() {
+        return shouhuan_heart_min;
+    }
+
+    public void setShouhuan_heart_min(String shouhuan_heart_min) {
+        this.shouhuan_heart_min = shouhuan_heart_min;
+    }
+
+    public String getShouhuan_blood_high_max() {
+        return shouhuan_blood_high_max;
+    }
+
+    public void setShouhuan_blood_high_max(String shouhuan_blood_high_max) {
+        this.shouhuan_blood_high_max = shouhuan_blood_high_max;
+    }
+
+    public String getShouhuan_blood_high_min() {
+        return shouhuan_blood_high_min;
+    }
+
+    public void setShouhuan_blood_high_min(String shouhuan_blood_high_min) {
+        this.shouhuan_blood_high_min = shouhuan_blood_high_min;
+    }
+
+    public String getShouhuan_blood_low_max() {
+        return shouhuan_blood_low_max;
+    }
+
+    public void setShouhuan_blood_low_max(String shouhuan_blood_low_max) {
+        this.shouhuan_blood_low_max = shouhuan_blood_low_max;
+    }
+
+    public String getShouhuan_blood_low_min() {
+        return shouhuan_blood_low_min;
+    }
+
+    public void setShouhuan_blood_low_min(String shouhuan_blood_low_min) {
+        this.shouhuan_blood_low_min = shouhuan_blood_low_min;
+    }
+
+    public String getShouhuan_oxygen_max() {
+        return shouhuan_oxygen_max;
+    }
+
+    public void setShouhuan_oxygen_max(String shouhuan_oxygen_max) {
+        this.shouhuan_oxygen_max = shouhuan_oxygen_max;
+    }
+
+    public String getShouhuan_oxygen_min() {
+        return shouhuan_oxygen_min;
+    }
+
+    public void setShouhuan_oxygen_min(String shouhuan_oxygen_min) {
+        this.shouhuan_oxygen_min = shouhuan_oxygen_min;
+    }
+
+    public String getShouhuan_body_max() {
+        return shouhuan_body_max;
+    }
+
+    public void setShouhuan_body_max(String shouhuan_body_max) {
+        this.shouhuan_body_max = shouhuan_body_max;
+    }
+
+    public String getShouhuan_body_min() {
+        return shouhuan_body_min;
+    }
+
+    public void setShouhuan_body_min(String shouhuan_body_min) {
+        this.shouhuan_body_min = shouhuan_body_min;
+    }
+}

+ 23 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/HeartRateDto.java

@@ -0,0 +1,23 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class HeartRateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 心率 */
+    @Excel(name = "心率")
+    private String heart_rate;
+
+    public String getHeart_rate() {
+        return heart_rate;
+    }
+
+    public void setHeart_rate(String heart_rate) {
+        this.heart_rate = heart_rate;
+    }
+}

+ 36 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MessageDto.java

@@ -0,0 +1,36 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class MessageDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 消息 */
+    @Excel(name = "消息")
+    private Integer alarm_type;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    public Integer getAlarm_type() {
+        return alarm_type;
+    }
+
+    public void setAlarm_type(Integer alarm_type) {
+        this.alarm_type = alarm_type;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+}

+ 60 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/MessageLogDto.java

@@ -0,0 +1,60 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class MessageLogDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 设备ID */
+    @Excel(name = "设备ID")
+    private String device_id;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    private String name;
+
+    /** 报警类型 */
+    @Excel(name = "报警类型")
+    private Integer alarm_type;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    public String getDevice_id() {
+        return device_id;
+    }
+
+    public void setDevice_id(String device_id) {
+        this.device_id = device_id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getAlarm_type() {
+        return alarm_type;
+    }
+
+    public void setAlarm_type(Integer alarm_type) {
+        this.alarm_type = alarm_type;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+}

+ 20 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/OxygenRateDto.java

@@ -0,0 +1,20 @@
+package com.ruoyi.system.domain.dto;
+
+import com.ruoyi.common.annotation.Excel;
+
+public class OxygenRateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 血氧 */
+    @Excel(name = "血氧")
+    private String oxygen;
+
+    public String getOxygen() {
+        return oxygen;
+    }
+
+    public void setOxygen(String oxygen) {
+        this.oxygen = oxygen;
+    }
+}

+ 36 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RateDto.java

@@ -0,0 +1,36 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class RateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 心率 */
+    @Excel(name = "心率")
+    private String content;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+}

+ 36 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/RollRateDto.java

@@ -0,0 +1,36 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class RollRateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 翻滚 */
+    @Excel(name = "翻滚")
+    private String roll_number;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    public String getRoll_number() {
+        return roll_number;
+    }
+
+    public void setRoll_number(String roll_number) {
+        this.roll_number = roll_number;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+}

+ 52 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/SettingDto.java

@@ -0,0 +1,52 @@
+package com.ruoyi.system.domain.dto;
+
+import com.ruoyi.common.annotation.Excel;
+
+public class SettingDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+
+    /** use_key */
+    private String use_key;
+
+    /** use_value */
+    private String use_value;
+
+    /** remark */
+    private String remark;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getUse_key() {
+        return use_key;
+    }
+
+    public void setUse_key(String use_key) {
+        this.use_key = use_key;
+    }
+
+    public String getUse_value() {
+        return use_value;
+    }
+
+    public void setUse_value(String use_value) {
+        this.use_value = use_value;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

+ 36 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/StepRateDto.java

@@ -0,0 +1,36 @@
+package com.ruoyi.system.domain.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+public class StepRateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 步数 */
+    @Excel(name = "步数")
+    private String step_number;
+
+    /** 时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间")
+    private Date createtime;
+
+    public String getStep_number() {
+        return step_number;
+    }
+
+    public void setStep_number(String step_number) {
+        this.step_number = step_number;
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+}

+ 20 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/dto/TempRateDto.java

@@ -0,0 +1,20 @@
+package com.ruoyi.system.domain.dto;
+
+import com.ruoyi.common.annotation.Excel;
+
+public class TempRateDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 体温 */
+    @Excel(name = "体温")
+    private String temp;
+
+    public String getTemp() {
+        return temp;
+    }
+
+    public void setTemp(String temp) {
+        this.temp = temp;
+    }
+}

+ 138 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeviceListMapper.java

@@ -2,9 +2,11 @@ package com.ruoyi.system.mapper;
 
 import java.util.List;
 
-import com.ruoyi.common.annotation.DataSource;
-import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.system.domain.TDeviceList;
+import com.ruoyi.system.domain.dto.MessageDto;
+import com.ruoyi.system.domain.dto.MessageLogDto;
+import com.ruoyi.system.domain.dto.RateDto;
+import com.ruoyi.system.domain.dto.SettingDto;
 
 /**
  * 设备列Mapper接口
@@ -30,6 +32,132 @@ public interface TDeviceListMapper
      */
     public List<TDeviceList> selectTDeviceListList(TDeviceList tDeviceList);
 
+    /**
+     * 查询心率列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByDeviceId(String device_id_code);
+
+    /**
+     * 查询血压列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByBlood(String device_id_code);
+
+    /**
+     * 查询血氧列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByOxygen(String device_id_code);
+
+    /**
+     * 查询体温列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByTemp(String device_id_code);
+
+    /**
+     * 查询步数列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByStep(String device_id_code);
+
+    /**
+     * 查询消息列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<MessageDto> selectTDeviceByMessage(String device_id_code);
+
+    /**
+     * 查询消息列表
+     *
+     * @param messageLogDto 设备id
+     * @return 设备列集合
+     */
+    public List<MessageLogDto> selectTDeviceByMessageLog(MessageLogDto messageLogDto);
+
+    /**
+     * 修改最大心率
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_heart_max(String use_key);
+
+    /**
+     * 修改最小心率
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_heart_min(String use_key);
+
+    /**
+     * 修改高压最大
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_blood_high_max(String use_key);
+
+    /**
+     * 修改高压最小
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_blood_high_min(String use_key);
+
+    /**
+     * 修改低压最大
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_blood_low_max(String use_key);
+
+    /**
+     * 修改低压最小
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_blood_low_min(String use_key);
+
+    /**
+     * 修改血氧最大
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_oxygen_max(String use_key);
+
+    /**
+     * 修改血氧最小
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_oxygen_min(String use_key);
+
+    /**
+     * 修改体温最大
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_body_max(String use_key);
+
+    /**
+     * 修改体温最小
+     *
+     * @return 结果
+     */
+    public int updateTSettingshouhuan_body_min(String use_key);
+
     /**
      * 新增设备列
      * 
@@ -61,4 +189,12 @@ public interface TDeviceListMapper
      * @return 结果
      */
     public int deleteTDeviceListByIds(Integer[] ids);
+
+    /**
+     * 最大心率
+     *
+     * @return 结果
+     */
+    public String selectshouhuan(String use_key);
+
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TShouhuanAlarmListMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.TShouhuanAlarmList;
+
+/**
+ * 手环报警列信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+public interface TShouhuanAlarmListMapper 
+{
+    /**
+     * 查询手环报警列信息
+     * 
+     * @param id 手环报警列信息主键
+     * @return 手环报警列信息
+     */
+    public TShouhuanAlarmList selectTShouhuanAlarmListById(Integer id);
+
+    /**
+     * 查询手环报警列信息列表
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 手环报警列信息集合
+     */
+    public List<TShouhuanAlarmList> selectTShouhuanAlarmListList(TShouhuanAlarmList tShouhuanAlarmList);
+
+    /**
+     * 新增手环报警列信息
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 结果
+     */
+    public int insertTShouhuanAlarmList(TShouhuanAlarmList tShouhuanAlarmList);
+
+    /**
+     * 修改手环报警列信息
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 结果
+     */
+    public int updateTShouhuanAlarmList(TShouhuanAlarmList tShouhuanAlarmList);
+
+    /**
+     * 删除手环报警列信息
+     * 
+     * @param id 手环报警列信息主键
+     * @return 结果
+     */
+    public int deleteTShouhuanAlarmListById(Integer id);
+
+    /**
+     * 批量删除手环报警列信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTShouhuanAlarmListByIds(Integer[] ids);
+}

+ 68 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TShouhuanInfoMapper.java

@@ -0,0 +1,68 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.TShouhuanInfo;
+
+/**
+ * 手环信息 实时数据Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+public interface TShouhuanInfoMapper 
+{
+    /**
+     * 查询手环信息 实时数据
+     * 
+     * @param id 手环信息 实时数据主键
+     * @return 手环信息 实时数据
+     */
+    public TShouhuanInfo selectTShouhuanInfoById(Long id);
+
+    /**
+     * 查询手环信息 实时数据列表
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 手环信息 实时数据集合
+     */
+    public List<TShouhuanInfo> selectTShouhuanInfoList(TShouhuanInfo tShouhuanInfo);
+
+    /**
+     * 查询手环信息 实时数据列表
+     *
+     * @return 手环信息 实时数据集合
+     */
+    public List<TShouhuanInfo> selectTShouhuanInfo();
+
+    /**
+     * 新增手环信息 实时数据
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 结果
+     */
+    public int insertTShouhuanInfo(TShouhuanInfo tShouhuanInfo);
+
+    /**
+     * 修改手环信息 实时数据
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 结果
+     */
+    public int updateTShouhuanInfo(TShouhuanInfo tShouhuanInfo);
+
+    /**
+     * 删除手环信息 实时数据
+     * 
+     * @param id 手环信息 实时数据主键
+     * @return 结果
+     */
+    public int deleteTShouhuanInfoById(Long id);
+
+    /**
+     * 批量删除手环信息 实时数据
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTShouhuanInfoByIds(Long[] ids);
+}

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserProfileMapper.java

@@ -25,6 +25,14 @@ public interface TUserProfileMapper
      */
     public TUserProfile selectTUserProfileById(Integer id);
 
+    /**
+     * 查询用户档案
+     *
+     * @param sfzid 身份证
+     * @return 用户档案
+     */
+    public TUserProfile selectTUserProfileBySfzId(String sfzid);
+
     /**
      * 查询用户档案列表
      * 

+ 85 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITDeviceListService.java

@@ -2,6 +2,11 @@ package com.ruoyi.system.service;
 
 import java.util.List;
 import com.ruoyi.system.domain.TDeviceList;
+import com.ruoyi.system.domain.TServiceManage;
+import com.ruoyi.system.domain.dto.CallPoliceDto;
+import com.ruoyi.system.domain.dto.MessageDto;
+import com.ruoyi.system.domain.dto.MessageLogDto;
+import com.ruoyi.system.domain.dto.RateDto;
 
 /**
  * 设备列Service接口
@@ -27,6 +32,70 @@ public interface ITDeviceListService
      */
     public List<TDeviceList> selectTDeviceListList(TDeviceList tDeviceList);
 
+    /**
+     * 查询心率列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByDeviceId(String device_id_code);
+
+    /**
+     * 查询血压列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByBlood(String device_id_code);
+
+    /**
+     * 查询血氧列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByOxygen(String device_id_code);
+
+    /**
+     * 查询体温列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByTemp(String device_id_code);
+
+    /**
+     * 查询步数列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<RateDto> selectTDeviceByStep(String device_id_code);
+
+    /**
+     * 查询消息列表
+     *
+     * @param device_id_code 设备id
+     * @return 设备列集合
+     */
+    public List<MessageDto> selectTDeviceByMessage(String device_id_code);
+
+    /**
+     * 查询消息列表
+     *
+     * @param messageLogDto 设备id
+     * @return 设备列集合
+     */
+    public List<MessageLogDto> selectTDeviceByMessageLog(MessageLogDto messageLogDto);
+
+    /**
+     * 导入设备列表数据
+     *
+     * @param tDeviceLists 设备列表列表
+     * @return 结果
+     */
+    public String importTDeviceList(List<TDeviceList> tDeviceLists);
+
     /**
      * 新增设备列
      * 
@@ -58,4 +127,20 @@ public interface ITDeviceListService
      * @return 结果
      */
     public int deleteTDeviceListById(Integer id);
+
+    /**
+     * 判断报警信息
+     *
+     * @param alarm_type 报警类型
+     * @return 结果
+     */
+    public String checkMessage(Integer alarm_type);
+
+    /**
+     * 修改设备阈值
+     *
+     * @param callPoliceDto 设备列
+     * @return 结果
+     */
+    public int deviceValue(CallPoliceDto callPoliceDto);
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITShouhuanAlarmListService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.TShouhuanAlarmList;
+
+/**
+ * 手环报警列信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+public interface ITShouhuanAlarmListService 
+{
+    /**
+     * 查询手环报警列信息
+     * 
+     * @param id 手环报警列信息主键
+     * @return 手环报警列信息
+     */
+    public TShouhuanAlarmList selectTShouhuanAlarmListById(Integer id);
+
+    /**
+     * 查询手环报警列信息列表
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 手环报警列信息集合
+     */
+    public List<TShouhuanAlarmList> selectTShouhuanAlarmListList(TShouhuanAlarmList tShouhuanAlarmList);
+
+    /**
+     * 新增手环报警列信息
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 结果
+     */
+    public int insertTShouhuanAlarmList(TShouhuanAlarmList tShouhuanAlarmList);
+
+    /**
+     * 修改手环报警列信息
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 结果
+     */
+    public int updateTShouhuanAlarmList(TShouhuanAlarmList tShouhuanAlarmList);
+
+    /**
+     * 批量删除手环报警列信息
+     * 
+     * @param ids 需要删除的手环报警列信息主键集合
+     * @return 结果
+     */
+    public int deleteTShouhuanAlarmListByIds(Integer[] ids);
+
+    /**
+     * 删除手环报警列信息信息
+     * 
+     * @param id 手环报警列信息主键
+     * @return 结果
+     */
+    public int deleteTShouhuanAlarmListById(Integer id);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITShouhuanInfoService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.TShouhuanInfo;
+
+/**
+ * 手环信息 实时数据Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+public interface ITShouhuanInfoService 
+{
+    /**
+     * 查询手环信息 实时数据
+     * 
+     * @param id 手环信息 实时数据主键
+     * @return 手环信息 实时数据
+     */
+    public TShouhuanInfo selectTShouhuanInfoById(Long id);
+
+    /**
+     * 查询手环信息 实时数据列表
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 手环信息 实时数据集合
+     */
+    public List<TShouhuanInfo> selectTShouhuanInfoList(TShouhuanInfo tShouhuanInfo);
+
+    /**
+     * 新增手环信息 实时数据
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 结果
+     */
+    public int insertTShouhuanInfo(TShouhuanInfo tShouhuanInfo);
+
+    /**
+     * 修改手环信息 实时数据
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 结果
+     */
+    public int updateTShouhuanInfo(TShouhuanInfo tShouhuanInfo);
+
+    /**
+     * 批量删除手环信息 实时数据
+     * 
+     * @param ids 需要删除的手环信息 实时数据主键集合
+     * @return 结果
+     */
+    public int deleteTShouhuanInfoByIds(Long[] ids);
+
+    /**
+     * 删除手环信息 实时数据信息
+     * 
+     * @param id 手环信息 实时数据主键
+     * @return 结果
+     */
+    public int deleteTShouhuanInfoById(Long id);
+}

+ 184 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TDeviceListServiceImpl.java

@@ -1,7 +1,20 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.TFacility;
+import com.ruoyi.system.domain.TServiceManage;
+import com.ruoyi.system.domain.TUserProfile;
+import com.ruoyi.system.domain.dto.CallPoliceDto;
+import com.ruoyi.system.domain.dto.MessageDto;
+import com.ruoyi.system.domain.dto.MessageLogDto;
+import com.ruoyi.system.domain.dto.RateDto;
+import com.ruoyi.system.mapper.TFacilityMapper;
+import com.ruoyi.system.mapper.TUserProfileMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TDeviceListMapper;
@@ -19,6 +32,10 @@ public class TDeviceListServiceImpl implements ITDeviceListService
 {
     @Autowired
     private TDeviceListMapper tDeviceListMapper;
+    @Autowired
+    private TUserProfileMapper tUserProfileMapper;
+    @Autowired
+    private TFacilityMapper tFacilityMapper;
 
     /**
      * 查询设备列
@@ -44,6 +61,41 @@ public class TDeviceListServiceImpl implements ITDeviceListService
         return tDeviceListMapper.selectTDeviceListList(tDeviceList);
     }
 
+    @Override
+    public List<RateDto> selectTDeviceByDeviceId(String device_id_code) {
+        return tDeviceListMapper.selectTDeviceByDeviceId(device_id_code);
+    }
+
+    @Override
+    public List<RateDto> selectTDeviceByBlood(String device_id_code) {
+        return tDeviceListMapper.selectTDeviceByBlood(device_id_code);
+    }
+
+    @Override
+    public List<RateDto> selectTDeviceByOxygen(String device_id_code) {
+        return tDeviceListMapper.selectTDeviceByOxygen(device_id_code);
+    }
+
+    @Override
+    public List<RateDto> selectTDeviceByTemp(String device_id_code) {
+        return tDeviceListMapper.selectTDeviceByTemp(device_id_code);
+    }
+
+    @Override
+    public List<RateDto> selectTDeviceByStep(String device_id_code) {
+        return tDeviceListMapper.selectTDeviceByStep(device_id_code);
+    }
+
+    @Override
+    public List<MessageDto> selectTDeviceByMessage(String device_id_code) {
+        return tDeviceListMapper.selectTDeviceByMessage(device_id_code);
+    }
+
+    @Override
+    public List<MessageLogDto> selectTDeviceByMessageLog(MessageLogDto messageLogDto) {
+        return tDeviceListMapper.selectTDeviceByMessageLog(messageLogDto);
+    }
+
     /**
      * 新增设备列
      * 
@@ -53,6 +105,16 @@ public class TDeviceListServiceImpl implements ITDeviceListService
     @Override
     public int insertTDeviceList(TDeviceList tDeviceList)
     {
+        TFacility tFacility = new TFacility();
+        if (StringUtils.isNotNull(tDeviceList.getDeviceId())){
+            tFacility.setCode(tDeviceList.getDeviceId());
+        }else if (StringUtils.isNotNull(tDeviceList.getSimCode())){
+            tFacility.setTelno(tDeviceList.getSimCode());
+        }else if (StringUtils.isNotNull(tDeviceList.getSerialNumber())){
+            tFacility.setIccid(tDeviceList.getSerialNumber());
+        }
+        tFacility.setCreateTime(DateUtils.getNowDate());
+        tFacilityMapper.insertTFacility(tFacility);
         tDeviceList.setCreateTime(DateUtils.getNowDate());
         return tDeviceListMapper.insertTDeviceList(tDeviceList);
     }
@@ -92,4 +154,126 @@ public class TDeviceListServiceImpl implements ITDeviceListService
     {
         return tDeviceListMapper.deleteTDeviceListById(id);
     }
+
+    @Override
+    public String importTDeviceList(List<TDeviceList> tDeviceLists) {
+
+        if (StringUtils.isNull(tDeviceLists) || tDeviceLists.size() == 0)
+        {
+            throw new ServiceException("导入设备列表信息数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (TDeviceList tDeviceList : tDeviceLists)
+        {
+            try
+            {
+
+                if (checkManageData(tDeviceList))
+                {
+                    TUserProfile user = tUserProfileMapper.selectTUserProfileBySfzId(tDeviceList.getSfzid());
+                    tDeviceList.setUserid(user.getId());
+                    tDeviceList.setSfzid(user.getSfzid());
+                    tDeviceList.setTelno(user.getTelOne());
+                    this.insertTDeviceList(tDeviceList);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "设备列表信息" + " 导入成功");
+                }
+                else
+                {
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "设备列表信息" + " 信息不完整");
+                }
+            }
+            catch (Exception e)
+            {
+                failureNum++;
+                String msg = "<br/>" + failureNum + "设备列表信息" + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+            }
+        }
+        if (failureNum > 0)
+        {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }
+        else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+
+    }
+
+    public boolean checkManageData(TDeviceList tDeviceList){
+        return StringUtils.isNotNull(tDeviceList.getName()) && StringUtils.isNotNull(tDeviceList.getSfzid()) &&
+                StringUtils.isNotNull(tDeviceList.getTelno()) && StringUtils.isNotNull(tDeviceList.getDeviceId()) &&
+                StringUtils.isNotNull(tDeviceList.getGrantType());
+    }
+
+
+    /**
+     * 判断报警信息
+     *
+     * @param alarm_type 报警类型
+     * @return 结果
+     */
+    @Override
+    public String checkMessage(Integer alarm_type){
+        switch (alarm_type){
+            case 16:
+                return "SOS报警";
+            case 17:
+                return "低电报警";
+            case 20:
+                return "手环拆除报警";
+            case 21:
+                return "跌倒报警";
+            case 22:
+                return "心率异常报警";
+            default:
+                return "无效";
+        }
+    }
+
+    @Override
+    public int deviceValue(CallPoliceDto callPoliceDto) {
+        if (StringUtils.isNotNull(callPoliceDto)){
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_blood_high_max())){
+                tDeviceListMapper.updateTSettingshouhuan_blood_high_max(callPoliceDto.getShouhuan_blood_high_max());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_blood_high_min())){
+                tDeviceListMapper.updateTSettingshouhuan_blood_high_min(callPoliceDto.getShouhuan_blood_high_min());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_blood_low_max())){
+                tDeviceListMapper.updateTSettingshouhuan_blood_low_max(callPoliceDto.getShouhuan_blood_low_max());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_blood_low_min())){
+                tDeviceListMapper.updateTSettingshouhuan_blood_low_min(callPoliceDto.getShouhuan_blood_low_min());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_body_max())){
+                tDeviceListMapper.updateTSettingshouhuan_body_max(callPoliceDto.getShouhuan_body_max());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_body_min())){
+                tDeviceListMapper.updateTSettingshouhuan_body_min(callPoliceDto.getShouhuan_body_min());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_oxygen_max())){
+                tDeviceListMapper.updateTSettingshouhuan_oxygen_max(callPoliceDto.getShouhuan_oxygen_max());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_oxygen_min())){
+                tDeviceListMapper.updateTSettingshouhuan_oxygen_min(callPoliceDto.getShouhuan_oxygen_min());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_heart_max())){
+                tDeviceListMapper.updateTSettingshouhuan_heart_max(callPoliceDto.getShouhuan_heart_max());
+            }
+            if (StringUtils.isNotNull(callPoliceDto.getShouhuan_heart_min())){
+                tDeviceListMapper.updateTSettingshouhuan_heart_min(callPoliceDto.getShouhuan_heart_min());
+            }
+            return 1;
+        }else{
+            return 0;
+        }
+    }
 }

+ 95 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TShouhuanAlarmListServiceImpl.java

@@ -0,0 +1,95 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.TShouhuanAlarmListMapper;
+import com.ruoyi.system.domain.TShouhuanAlarmList;
+import com.ruoyi.system.service.ITShouhuanAlarmListService;
+
+/**
+ * 手环报警列信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+@Service
+public class TShouhuanAlarmListServiceImpl implements ITShouhuanAlarmListService 
+{
+    @Autowired
+    private TShouhuanAlarmListMapper tShouhuanAlarmListMapper;
+
+    /**
+     * 查询手环报警列信息
+     * 
+     * @param id 手环报警列信息主键
+     * @return 手环报警列信息
+     */
+    @Override
+    public TShouhuanAlarmList selectTShouhuanAlarmListById(Integer id)
+    {
+        return tShouhuanAlarmListMapper.selectTShouhuanAlarmListById(id);
+    }
+
+    /**
+     * 查询手环报警列信息列表
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 手环报警列信息
+     */
+    @Override
+    public List<TShouhuanAlarmList> selectTShouhuanAlarmListList(TShouhuanAlarmList tShouhuanAlarmList)
+    {
+        return tShouhuanAlarmListMapper.selectTShouhuanAlarmListList(tShouhuanAlarmList);
+    }
+
+    /**
+     * 新增手环报警列信息
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 结果
+     */
+    @Override
+    public int insertTShouhuanAlarmList(TShouhuanAlarmList tShouhuanAlarmList)
+    {
+        tShouhuanAlarmList.setCreateTime(DateUtils.getNowDate());
+        return tShouhuanAlarmListMapper.insertTShouhuanAlarmList(tShouhuanAlarmList);
+    }
+
+    /**
+     * 修改手环报警列信息
+     * 
+     * @param tShouhuanAlarmList 手环报警列信息
+     * @return 结果
+     */
+    @Override
+    public int updateTShouhuanAlarmList(TShouhuanAlarmList tShouhuanAlarmList)
+    {
+        return tShouhuanAlarmListMapper.updateTShouhuanAlarmList(tShouhuanAlarmList);
+    }
+
+    /**
+     * 批量删除手环报警列信息
+     * 
+     * @param ids 需要删除的手环报警列信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTShouhuanAlarmListByIds(Integer[] ids)
+    {
+        return tShouhuanAlarmListMapper.deleteTShouhuanAlarmListByIds(ids);
+    }
+
+    /**
+     * 删除手环报警列信息信息
+     * 
+     * @param id 手环报警列信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTShouhuanAlarmListById(Integer id)
+    {
+        return tShouhuanAlarmListMapper.deleteTShouhuanAlarmListById(id);
+    }
+}

+ 93 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TShouhuanInfoServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.TShouhuanInfoMapper;
+import com.ruoyi.system.domain.TShouhuanInfo;
+import com.ruoyi.system.service.ITShouhuanInfoService;
+
+/**
+ * 手环信息 实时数据Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-09-07
+ */
+@Service
+public class TShouhuanInfoServiceImpl implements ITShouhuanInfoService 
+{
+    @Autowired
+    private TShouhuanInfoMapper tShouhuanInfoMapper;
+
+    /**
+     * 查询手环信息 实时数据
+     * 
+     * @param id 手环信息 实时数据主键
+     * @return 手环信息 实时数据
+     */
+    @Override
+    public TShouhuanInfo selectTShouhuanInfoById(Long id)
+    {
+        return tShouhuanInfoMapper.selectTShouhuanInfoById(id);
+    }
+
+    /**
+     * 查询手环信息 实时数据列表
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 手环信息 实时数据
+     */
+    @Override
+    public List<TShouhuanInfo> selectTShouhuanInfoList(TShouhuanInfo tShouhuanInfo)
+    {
+        return tShouhuanInfoMapper.selectTShouhuanInfoList(tShouhuanInfo);
+    }
+
+    /**
+     * 新增手环信息 实时数据
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 结果
+     */
+    @Override
+    public int insertTShouhuanInfo(TShouhuanInfo tShouhuanInfo)
+    {
+        return tShouhuanInfoMapper.insertTShouhuanInfo(tShouhuanInfo);
+    }
+
+    /**
+     * 修改手环信息 实时数据
+     * 
+     * @param tShouhuanInfo 手环信息 实时数据
+     * @return 结果
+     */
+    @Override
+    public int updateTShouhuanInfo(TShouhuanInfo tShouhuanInfo)
+    {
+        return tShouhuanInfoMapper.updateTShouhuanInfo(tShouhuanInfo);
+    }
+
+    /**
+     * 批量删除手环信息 实时数据
+     * 
+     * @param ids 需要删除的手环信息 实时数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTShouhuanInfoByIds(Long[] ids)
+    {
+        return tShouhuanInfoMapper.deleteTShouhuanInfoByIds(ids);
+    }
+
+    /**
+     * 删除手环信息 实时数据信息
+     * 
+     * @param id 手环信息 实时数据主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTShouhuanInfoById(Long id)
+    {
+        return tShouhuanInfoMapper.deleteTShouhuanInfoById(id);
+    }
+}

+ 78 - 0
ruoyi-system/src/main/java/com/ruoyi/system/timing/CallPoliceTiming.java

@@ -0,0 +1,78 @@
+package com.ruoyi.system.timing;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.TShouhuanAlarmList;
+import com.ruoyi.system.domain.TShouhuanInfo;
+import com.ruoyi.system.domain.dto.SettingDto;
+import com.ruoyi.system.mapper.TDeviceListMapper;
+import com.ruoyi.system.mapper.TShouhuanAlarmListMapper;
+import com.ruoyi.system.mapper.TShouhuanInfoMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component("callPoliceTiming")
+public class CallPoliceTiming {
+
+    @Autowired
+    private TDeviceListMapper tDeviceListMapper;
+
+    @Autowired
+    private TShouhuanInfoMapper tShouhuanInfoMapper;
+
+    @Autowired
+    private TShouhuanAlarmListMapper tShouhuanAlarmListMapper;
+
+    //终端主动发
+    Integer alarmFromType = 1;
+    //平台记录
+    Integer alarmFromTypelog = 0;
+    //心率异常报警
+    Integer heartalarmType = 22;
+    //血压异常报警
+    Integer bloodalarmType = 23;
+    //体温异常报警
+    Integer tempalarmType = 24;
+    //血氧异常报警
+    Integer oxygenalarmType = 25;
+
+    public void checkCallPolice(){
+
+        List<TShouhuanInfo> tShouhuanInfos = tShouhuanInfoMapper.selectTShouhuanInfo();
+
+        for (TShouhuanInfo info : tShouhuanInfos){
+            if (info.getTemp()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_body_max"))){
+                tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,tempalarmType,alarmFromType));
+            }else if(info.getBloodHeightPressure()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_blood_high_max"))){
+                tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,bloodalarmType,alarmFromType));
+            }else if(info.getBloodLowPressure()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_blood_high_min"))){
+                tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,bloodalarmType,alarmFromType));
+            }else if(info.getHeartRate()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_heart_max"))){
+                tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,heartalarmType,alarmFromType));
+            }else if(info.getOxygen()>Integer.parseInt(tDeviceListMapper.selectshouhuan("shouhuan_oxygen_max"))){
+                tShouhuanAlarmListMapper.insertTShouhuanAlarmList(saveInfo(info,oxygenalarmType,alarmFromType));
+            }
+        }
+    }
+
+    public TShouhuanAlarmList saveInfo(TShouhuanInfo info, Integer heartalarmType, Integer alarmFromType){
+        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());
+        tShouhuanAlarmList.setCreateTime(DateUtils.getNowDate());
+        tShouhuanAlarmList.setAlarmFromType(alarmFromType);
+        return tShouhuanAlarmList;
+    }
+}

+ 115 - 2
ruoyi-system/src/main/resources/mapper/system/TDeviceListMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="TDeviceList" id="TDeviceListResult">
         <result property="id"    column="id"    />
+        <result property="fid"    column="fid"    />
         <result property="deviceProper"    column="device_proper"    />
         <result property="userid"    column="userid"    />
         <result property="sfzid"    column="sfzid"    />
@@ -32,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectTDeviceListList" parameterType="TDeviceList" resultMap="TDeviceListResult">
-        select a.id, a.device_proper, a.userid, a.factory, a.device_model, a.device_id, a.sim_code, a.serial_number, a.grant_type, a.price, a.cost, a.payment, a.createtime, b.`status`,c.name,c.sfzid,c.tel_one,d.online_statis,d.electric_quantity,d.offlinetime from t_device_list a
+        select a.id, a.device_proper, a.userid, a.factory, a.device_model, a.device_id, a.sim_code, a.serial_number, a.grant_type, a.price, a.cost, a.payment, a.createtime, b.status, b.id as fid, c.name,c.sfzid,c.tel_one,d.online_statis,d.electric_quantity,d.offlinetime from t_device_list a
         left join t_facility b on a.device_id=b.code
         left join t_user_profile c on a.userid=c.id
         left join t_shouhuan_info d on a.device_id=d.device_id_code
@@ -58,7 +59,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTDeviceListVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTDeviceByDeviceId" resultType="com.ruoyi.system.domain.dto.RateDto">
+        select b.content,b.createtime from t_device_list a
+        left join t_shouhuan_receive_redocde b on a.device_id=b.device_id_code
+        where b.command='heart' and device_id_code = #{device_id_code}
+    </select>
+    <select id="selectTDeviceByBlood" resultType="com.ruoyi.system.domain.dto.RateDto">
+        select b.content,b.createtime from t_device_list a
+        left join t_shouhuan_receive_redocde b on a.device_id=b.device_id_code
+        where b.command='blood' and device_id_code = #{device_id_code}
+    </select>
+    <select id="selectTDeviceByOxygen" resultType="com.ruoyi.system.domain.dto.RateDto">
+        select b.content,b.createtime from t_device_list a
+        left join t_shouhuan_receive_redocde b on a.device_id=b.device_id_code
+        where b.command='oxygen' and device_id_code = #{device_id_code}
+    </select>
+    <select id="selectTDeviceByTemp" resultType="com.ruoyi.system.domain.dto.RateDto">
+        select b.content,b.createtime from t_device_list a
+        left join t_shouhuan_receive_redocde b on a.device_id=b.device_id_code
+        where b.command='temp' and device_id_code = #{device_id_code}
+    </select>
+    <select id="selectTDeviceByStep" resultType="com.ruoyi.system.domain.dto.RateDto">
+        select b.content,b.createtime from t_device_list a
+        left join t_shouhuan_receive_redocde b on a.device_id=b.device_id_code
+        where b.command='KA' and device_id_code = #{device_id_code}
+    </select>
+    <select id="selectTDeviceByMessage" resultType="com.ruoyi.system.domain.dto.MessageDto">
+        select alarm_type,createtime from t_shouhuan_alarm_list
+        where device_id_code = #{device_id_code}
+    </select>
+    <select id="selectTDeviceByMessageLog" resultType="com.ruoyi.system.domain.dto.MessageLogDto">
+        SELECT a.device_id,c.name,b.alarm_type,b.createtime FROM t_device_list a
+       left join t_shouhuan_alarm_list b on a.device_id=b.device_id_code
+       left join t_user_profile c on a.userid=c.id
+        <where>
+            <if test="device_id != null "> and a.device_id = #{device_id}</if>
+            <if test="alarm_type != null "> and b.alarm_type = #{alarm_type}</if>
+        </where>
+    </select>
+    <select id="selectshouhuan" resultType="java.lang.String">
+        select use_value from t_setting
+        where use_key = #{use_key}
+    </select>
+
     <insert id="insertTDeviceList" parameterType="TDeviceList" useGeneratedKeys="true" keyProperty="id">
         insert into t_device_list
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -115,6 +158,76 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where id = #{id}
     </update>
+    <update id="updateTSettingshouhuan_heart_max">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_heart_max'
+    </update>
+    <update id="updateTSettingshouhuan_heart_min">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_heart_min'
+    </update>
+    <update id="updateTSettingshouhuan_blood_high_max">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_blood_high_max'
+    </update>
+    <update id="updateTSettingshouhuan_blood_high_min">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_blood_high_min'
+    </update>
+    <update id="updateTSettingshouhuan_blood_low_max">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_blood_low_max'
+    </update>
+    <update id="updateTSettingshouhuan_blood_low_min">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_blood_low_min'
+    </update>
+    <update id="updateTSettingshouhuan_oxygen_max">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_oxygen_max'
+    </update>
+    <update id="updateTSettingshouhuan_oxygen_min">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_oxygen_min'
+    </update>
+    <update id="updateTSettingshouhuan_body_max">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_body_max'
+    </update>
+    <update id="updateTSettingshouhuan_body_min">
+        update t_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="use_value != null">use_value = #{use_value},</if>
+        </trim>
+        where use_key = 'shouhuan_body_min'
+    </update>
 
     <delete id="deleteTDeviceListById" parameterType="Integer">
         delete from t_device_list where id = #{id}

+ 11 - 1
ruoyi-system/src/main/resources/mapper/system/TFacilityMapper.xml

@@ -12,10 +12,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="comCode"    column="com_code"    />
         <result property="createTime"    column="createtime"    />
         <result property="status"    column="status"    />
+        <result property="iccid"    column="iccid"    />
+        <result property="puk"    column="puk"    />
     </resultMap>
 
     <sql id="selectTFacilityVo">
-        select id, kind, code, telno, com_code, createtime, status from t_facility
+        select id, kind, code, telno, com_code, createtime, status, iccid, puk from t_facility
     </sql>
 
     <select id="selectTFacilityList" parameterType="TFacility" resultMap="TFacilityResult">
@@ -27,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="comCode != null  and comCode != ''"> and com_code = #{comCode}</if>
             <if test="createTime != null "> and createtime = #{createTime}</if>
             <if test="status != null "> and status = #{status}</if>
+            <if test="iccid != null "> and iccid = #{iccid}</if>
+            <if test="puk != null "> and puk = #{puk}</if>
         </where>
     </select>
     
@@ -44,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="comCode != null">com_code,</if>
             <if test="createTime != null">createtime,</if>
             <if test="status != null">status,</if>
+            <if test="iccid != null">iccid,</if>
+            <if test="puk != null">puk,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="kind != null">#{kind},</if>
@@ -52,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="comCode != null">#{comCode},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="status != null">#{status},</if>
+            <if test="iccid != null">#{iccid},</if>
+            <if test="puk != null">#{puk},</if>
          </trim>
     </insert>
 
@@ -64,6 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="comCode != null">com_code = #{comCode},</if>
             <if test="createTime != null">createtime = #{createTime},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="iccid != null">iccid = #{iccid},</if>
+            <if test="puk != null">puk = #{puk},</if>
         </trim>
         where id = #{id}
     </update>

+ 146 - 0
ruoyi-system/src/main/resources/mapper/system/TShouhuanAlarmListMapper.xml

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.TShouhuanAlarmListMapper">
+    
+    <resultMap type="TShouhuanAlarmList" id="TShouhuanAlarmListResult">
+        <result property="id"    column="id"    />
+        <result property="facilityId"    column="facility_id"    />
+        <result property="shinfoId"    column="shinfo_id"    />
+        <result property="deviceIdCode"    column="device_id_code"    />
+        <result property="gpsLong"    column="gps_long"    />
+        <result property="gpsLat"    column="gps_lat"    />
+        <result property="speed"    column="speed"    />
+        <result property="direction"    column="direction"    />
+        <result property="poster"    column="poster"    />
+        <result property="electricQuantity"    column="electric_quantity"    />
+        <result property="stepNumber"    column="step_number"    />
+        <result property="rollNumber"    column="roll_number"    />
+        <result property="statusType"    column="status_type"    />
+        <result property="alarmType"    column="alarm_type"    />
+        <result property="terminalStatus"    column="terminal_status"    />
+        <result property="createTime"    column="createtime"    />
+        <result property="alarmFromType"    column="alarm_from_type"    />
+        <result property="msg"    column="msg"    />
+        <result property="isSend"    column="is_send"    />
+        <result property="sendTime"    column="send_time"    />
+    </resultMap>
+
+    <sql id="selectTShouhuanAlarmListVo">
+        select id, facility_id, shinfo_id, device_id_code, gps_long, gps_lat, speed, direction, poster, electric_quantity, step_number, roll_number, status_type, alarm_type, terminal_status, createtime, alarm_from_type, msg, is_send, send_time from t_shouhuan_alarm_list
+    </sql>
+
+    <select id="selectTShouhuanAlarmListList" parameterType="TShouhuanAlarmList" resultMap="TShouhuanAlarmListResult">
+        <include refid="selectTShouhuanAlarmListVo"/>
+        <where>  
+            <if test="facilityId != null "> and facility_id = #{facilityId}</if>
+            <if test="shinfoId != null "> and shinfo_id = #{shinfoId}</if>
+            <if test="deviceIdCode != null  and deviceIdCode != ''"> and device_id_code = #{deviceIdCode}</if>
+            <if test="gpsLong != null "> and gps_long = #{gpsLong}</if>
+            <if test="gpsLat != null "> and gps_lat = #{gpsLat}</if>
+            <if test="speed != null "> and speed = #{speed}</if>
+            <if test="direction != null "> and direction = #{direction}</if>
+            <if test="poster != null "> and poster = #{poster}</if>
+            <if test="electricQuantity != null "> and electric_quantity = #{electricQuantity}</if>
+            <if test="stepNumber != null "> and step_number = #{stepNumber}</if>
+            <if test="rollNumber != null "> and roll_number = #{rollNumber}</if>
+            <if test="statusType != null "> and status_type = #{statusType}</if>
+            <if test="alarmType != null "> and alarm_type = #{alarmType}</if>
+            <if test="terminalStatus != null  and terminalStatus != ''"> and terminal_status = #{terminalStatus}</if>
+            <if test="createTime != null "> and createtime = #{createTime}</if>
+            <if test="alarmFromType != null "> and alarm_from_type = #{alarmFromType}</if>
+            <if test="msg != null  and msg != ''"> and msg = #{msg}</if>
+            <if test="isSend != null "> and is_send = #{isSend}</if>
+            <if test="sendTime != null "> and send_time = #{sendTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectTShouhuanAlarmListById" parameterType="Integer" resultMap="TShouhuanAlarmListResult">
+        <include refid="selectTShouhuanAlarmListVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTShouhuanAlarmList" parameterType="TShouhuanAlarmList" useGeneratedKeys="true" keyProperty="id">
+        insert into t_shouhuan_alarm_list
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="facilityId != null">facility_id,</if>
+            <if test="shinfoId != null">shinfo_id,</if>
+            <if test="deviceIdCode != null">device_id_code,</if>
+            <if test="gpsLong != null">gps_long,</if>
+            <if test="gpsLat != null">gps_lat,</if>
+            <if test="speed != null">speed,</if>
+            <if test="direction != null">direction,</if>
+            <if test="poster != null">poster,</if>
+            <if test="electricQuantity != null">electric_quantity,</if>
+            <if test="stepNumber != null">step_number,</if>
+            <if test="rollNumber != null">roll_number,</if>
+            <if test="statusType != null">status_type,</if>
+            <if test="alarmType != null">alarm_type,</if>
+            <if test="terminalStatus != null">terminal_status,</if>
+            <if test="createTime != null">createtime,</if>
+            <if test="alarmFromType != null">alarm_from_type,</if>
+            <if test="msg != null">msg,</if>
+            <if test="isSend != null">is_send,</if>
+            <if test="sendTime != null">send_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="facilityId != null">#{facilityId},</if>
+            <if test="shinfoId != null">#{shinfoId},</if>
+            <if test="deviceIdCode != null">#{deviceIdCode},</if>
+            <if test="gpsLong != null">#{gpsLong},</if>
+            <if test="gpsLat != null">#{gpsLat},</if>
+            <if test="speed != null">#{speed},</if>
+            <if test="direction != null">#{direction},</if>
+            <if test="poster != null">#{poster},</if>
+            <if test="electricQuantity != null">#{electricQuantity},</if>
+            <if test="stepNumber != null">#{stepNumber},</if>
+            <if test="rollNumber != null">#{rollNumber},</if>
+            <if test="statusType != null">#{statusType},</if>
+            <if test="alarmType != null">#{alarmType},</if>
+            <if test="terminalStatus != null">#{terminalStatus},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="alarmFromType != null">#{alarmFromType},</if>
+            <if test="msg != null">#{msg},</if>
+            <if test="isSend != null">#{isSend},</if>
+            <if test="sendTime != null">#{sendTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTShouhuanAlarmList" parameterType="TShouhuanAlarmList">
+        update t_shouhuan_alarm_list
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="facilityId != null">facility_id = #{facilityId},</if>
+            <if test="shinfoId != null">shinfo_id = #{shinfoId},</if>
+            <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
+            <if test="gpsLong != null">gps_long = #{gpsLong},</if>
+            <if test="gpsLat != null">gps_lat = #{gpsLat},</if>
+            <if test="speed != null">speed = #{speed},</if>
+            <if test="direction != null">direction = #{direction},</if>
+            <if test="poster != null">poster = #{poster},</if>
+            <if test="electricQuantity != null">electric_quantity = #{electricQuantity},</if>
+            <if test="stepNumber != null">step_number = #{stepNumber},</if>
+            <if test="rollNumber != null">roll_number = #{rollNumber},</if>
+            <if test="statusType != null">status_type = #{statusType},</if>
+            <if test="alarmType != null">alarm_type = #{alarmType},</if>
+            <if test="terminalStatus != null">terminal_status = #{terminalStatus},</if>
+            <if test="createTime != null">createtime = #{createTime},</if>
+            <if test="alarmFromType != null">alarm_from_type = #{alarmFromType},</if>
+            <if test="msg != null">msg = #{msg},</if>
+            <if test="isSend != null">is_send = #{isSend},</if>
+            <if test="sendTime != null">send_time = #{sendTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTShouhuanAlarmListById" parameterType="Integer">
+        delete from t_shouhuan_alarm_list where id = #{id}
+    </delete>
+
+    <delete id="deleteTShouhuanAlarmListByIds" parameterType="String">
+        delete from t_shouhuan_alarm_list where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 239 - 0
ruoyi-system/src/main/resources/mapper/system/TShouhuanInfoMapper.xml

@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.TShouhuanInfoMapper">
+    
+    <resultMap type="TShouhuanInfo" id="TShouhuanInfoResult">
+        <result property="id"    column="id"    />
+        <result property="facilityId"    column="facility_id"    />
+        <result property="deviceIdCode"    column="device_id_code"    />
+        <result property="version"    column="version"    />
+        <result property="gpsLong"    column="gps_long"    />
+        <result property="gpsLat"    column="gps_lat"    />
+        <result property="useGpsLong"    column="use_gps_long"    />
+        <result property="useGpsLat"    column="use_gps_lat"    />
+        <result property="useMac"    column="use_mac"    />
+        <result property="speed"    column="speed"    />
+        <result property="direction"    column="direction"    />
+        <result property="poster"    column="poster"    />
+        <result property="electricQuantity"    column="electric_quantity"    />
+        <result property="stepNumber"    column="step_number"    />
+        <result property="rollNumber"    column="roll_number"    />
+        <result property="terminalStatus"    column="terminal_status"    />
+        <result property="onlineStatis"    column="online_statis"    />
+        <result property="temp"    column="temp"    />
+        <result property="bloodHeightPressure"    column="blood_height_pressure"    />
+        <result property="bloodLowPressure"    column="blood_low_pressure"    />
+        <result property="heartRate"    column="heart_rate"    />
+        <result property="oxygen"    column="oxygen"    />
+        <result property="offlinetime"    column="offlinetime"    />
+        <result property="onlinetime"    column="onlinetime"    />
+        <result property="gpsUpdateTime"    column="gps_update_time"    />
+        <result property="bloodUpdateTime"    column="blood_update_time"    />
+        <result property="heartUpdateTime"    column="heart_update_time"    />
+        <result property="tempUpdateTime"    column="temp_update_time"    />
+        <result property="oxygenUpdateTime"    column="oxygen_update_time"    />
+        <result property="electricQuantityUpdateTime"    column="electric_quantity_update_time"    />
+        <result property="stepNumberUpdateTime"    column="step_number_update_time"    />
+        <result property="rollNumberUpdateTime"    column="roll_number_update_time"    />
+        <result property="terminalStatusUpdateTime"    column="terminal_status_update_time"    />
+        <result property="createtime"    column="createtime"    />
+        <result property="updatetime"    column="updatetime"    />
+        <result property="accesstype"    column="accesstype"    />
+        <result property="addressDesc"    column="address_desc"    />
+        <result property="isGps"    column="is_gps"    />
+    </resultMap>
+
+    <sql id="selectTShouhuanInfoVo">
+        select id, facility_id, device_id_code, version, gps_long, gps_lat, use_gps_long, use_gps_lat, use_mac, speed, direction, poster, electric_quantity, step_number, roll_number, terminal_status, online_statis, temp, blood_height_pressure, blood_low_pressure, heart_rate, oxygen, offlinetime, onlinetime, gps_update_time, blood_update_time, heart_update_time, temp_update_time, oxygen_update_time, electric_quantity_update_time, step_number_update_time, roll_number_update_time, terminal_status_update_time, createtime, updatetime, accesstype, address_desc, is_gps from t_shouhuan_info
+    </sql>
+
+    <select id="selectTShouhuanInfoList" parameterType="TShouhuanInfo" resultMap="TShouhuanInfoResult">
+        <include refid="selectTShouhuanInfoVo"/>
+        <where>  
+            <if test="facilityId != null "> and facility_id = #{facilityId}</if>
+            <if test="deviceIdCode != null  and deviceIdCode != ''"> and device_id_code = #{deviceIdCode}</if>
+            <if test="version != null  and version != ''"> and version = #{version}</if>
+            <if test="gpsLong != null "> and gps_long = #{gpsLong}</if>
+            <if test="gpsLat != null "> and gps_lat = #{gpsLat}</if>
+            <if test="useGpsLong != null "> and use_gps_long = #{useGpsLong}</if>
+            <if test="useGpsLat != null "> and use_gps_lat = #{useGpsLat}</if>
+            <if test="useMac != null  and useMac != ''"> and use_mac = #{useMac}</if>
+            <if test="speed != null "> and speed = #{speed}</if>
+            <if test="direction != null "> and direction = #{direction}</if>
+            <if test="poster != null "> and poster = #{poster}</if>
+            <if test="electricQuantity != null "> and electric_quantity = #{electricQuantity}</if>
+            <if test="stepNumber != null "> and step_number = #{stepNumber}</if>
+            <if test="rollNumber != null "> and roll_number = #{rollNumber}</if>
+            <if test="terminalStatus != null  and terminalStatus != ''"> and terminal_status = #{terminalStatus}</if>
+            <if test="onlineStatis != null "> and online_statis = #{onlineStatis}</if>
+            <if test="temp != null "> and temp = #{temp}</if>
+            <if test="bloodHeightPressure != null "> and blood_height_pressure = #{bloodHeightPressure}</if>
+            <if test="bloodLowPressure != null "> and blood_low_pressure = #{bloodLowPressure}</if>
+            <if test="heartRate != null "> and heart_rate = #{heartRate}</if>
+            <if test="oxygen != null "> and oxygen = #{oxygen}</if>
+            <if test="offlinetime != null "> and offlinetime = #{offlinetime}</if>
+            <if test="onlinetime != null "> and onlinetime = #{onlinetime}</if>
+            <if test="gpsUpdateTime != null "> and gps_update_time = #{gpsUpdateTime}</if>
+            <if test="bloodUpdateTime != null "> and blood_update_time = #{bloodUpdateTime}</if>
+            <if test="heartUpdateTime != null "> and heart_update_time = #{heartUpdateTime}</if>
+            <if test="tempUpdateTime != null "> and temp_update_time = #{tempUpdateTime}</if>
+            <if test="oxygenUpdateTime != null "> and oxygen_update_time = #{oxygenUpdateTime}</if>
+            <if test="electricQuantityUpdateTime != null "> and electric_quantity_update_time = #{electricQuantityUpdateTime}</if>
+            <if test="stepNumberUpdateTime != null "> and step_number_update_time = #{stepNumberUpdateTime}</if>
+            <if test="rollNumberUpdateTime != null "> and roll_number_update_time = #{rollNumberUpdateTime}</if>
+            <if test="terminalStatusUpdateTime != null "> and terminal_status_update_time = #{terminalStatusUpdateTime}</if>
+            <if test="createtime != null "> and createtime = #{createtime}</if>
+            <if test="updatetime != null "> and updatetime = #{updatetime}</if>
+            <if test="accesstype != null "> and accesstype = #{accesstype}</if>
+            <if test="addressDesc != null  and addressDesc != ''"> and address_desc = #{addressDesc}</if>
+            <if test="isGps != null "> and is_gps = #{isGps}</if>
+        </where>
+    </select>
+    
+    <select id="selectTShouhuanInfoById" parameterType="Long" resultMap="TShouhuanInfoResult">
+        <include refid="selectTShouhuanInfoVo"/>
+        where id = #{id}
+    </select>
+    <select id="selectTShouhuanInfo" parameterType="TShouhuanInfo" resultMap="TShouhuanInfoResult">
+        <include refid="selectTShouhuanInfoVo"/>
+    </select>
+
+    <insert id="insertTShouhuanInfo" parameterType="TShouhuanInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into t_shouhuan_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="facilityId != null">facility_id,</if>
+            <if test="deviceIdCode != null">device_id_code,</if>
+            <if test="version != null">version,</if>
+            <if test="gpsLong != null">gps_long,</if>
+            <if test="gpsLat != null">gps_lat,</if>
+            <if test="useGpsLong != null">use_gps_long,</if>
+            <if test="useGpsLat != null">use_gps_lat,</if>
+            <if test="useMac != null">use_mac,</if>
+            <if test="speed != null">speed,</if>
+            <if test="direction != null">direction,</if>
+            <if test="poster != null">poster,</if>
+            <if test="electricQuantity != null">electric_quantity,</if>
+            <if test="stepNumber != null">step_number,</if>
+            <if test="rollNumber != null">roll_number,</if>
+            <if test="terminalStatus != null">terminal_status,</if>
+            <if test="onlineStatis != null">online_statis,</if>
+            <if test="temp != null">temp,</if>
+            <if test="bloodHeightPressure != null">blood_height_pressure,</if>
+            <if test="bloodLowPressure != null">blood_low_pressure,</if>
+            <if test="heartRate != null">heart_rate,</if>
+            <if test="oxygen != null">oxygen,</if>
+            <if test="offlinetime != null">offlinetime,</if>
+            <if test="onlinetime != null">onlinetime,</if>
+            <if test="gpsUpdateTime != null">gps_update_time,</if>
+            <if test="bloodUpdateTime != null">blood_update_time,</if>
+            <if test="heartUpdateTime != null">heart_update_time,</if>
+            <if test="tempUpdateTime != null">temp_update_time,</if>
+            <if test="oxygenUpdateTime != null">oxygen_update_time,</if>
+            <if test="electricQuantityUpdateTime != null">electric_quantity_update_time,</if>
+            <if test="stepNumberUpdateTime != null">step_number_update_time,</if>
+            <if test="rollNumberUpdateTime != null">roll_number_update_time,</if>
+            <if test="terminalStatusUpdateTime != null">terminal_status_update_time,</if>
+            <if test="createtime != null">createtime,</if>
+            <if test="updatetime != null">updatetime,</if>
+            <if test="accesstype != null">accesstype,</if>
+            <if test="addressDesc != null">address_desc,</if>
+            <if test="isGps != null">is_gps,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="facilityId != null">#{facilityId},</if>
+            <if test="deviceIdCode != null">#{deviceIdCode},</if>
+            <if test="version != null">#{version},</if>
+            <if test="gpsLong != null">#{gpsLong},</if>
+            <if test="gpsLat != null">#{gpsLat},</if>
+            <if test="useGpsLong != null">#{useGpsLong},</if>
+            <if test="useGpsLat != null">#{useGpsLat},</if>
+            <if test="useMac != null">#{useMac},</if>
+            <if test="speed != null">#{speed},</if>
+            <if test="direction != null">#{direction},</if>
+            <if test="poster != null">#{poster},</if>
+            <if test="electricQuantity != null">#{electricQuantity},</if>
+            <if test="stepNumber != null">#{stepNumber},</if>
+            <if test="rollNumber != null">#{rollNumber},</if>
+            <if test="terminalStatus != null">#{terminalStatus},</if>
+            <if test="onlineStatis != null">#{onlineStatis},</if>
+            <if test="temp != null">#{temp},</if>
+            <if test="bloodHeightPressure != null">#{bloodHeightPressure},</if>
+            <if test="bloodLowPressure != null">#{bloodLowPressure},</if>
+            <if test="heartRate != null">#{heartRate},</if>
+            <if test="oxygen != null">#{oxygen},</if>
+            <if test="offlinetime != null">#{offlinetime},</if>
+            <if test="onlinetime != null">#{onlinetime},</if>
+            <if test="gpsUpdateTime != null">#{gpsUpdateTime},</if>
+            <if test="bloodUpdateTime != null">#{bloodUpdateTime},</if>
+            <if test="heartUpdateTime != null">#{heartUpdateTime},</if>
+            <if test="tempUpdateTime != null">#{tempUpdateTime},</if>
+            <if test="oxygenUpdateTime != null">#{oxygenUpdateTime},</if>
+            <if test="electricQuantityUpdateTime != null">#{electricQuantityUpdateTime},</if>
+            <if test="stepNumberUpdateTime != null">#{stepNumberUpdateTime},</if>
+            <if test="rollNumberUpdateTime != null">#{rollNumberUpdateTime},</if>
+            <if test="terminalStatusUpdateTime != null">#{terminalStatusUpdateTime},</if>
+            <if test="createtime != null">#{createtime},</if>
+            <if test="updatetime != null">#{updatetime},</if>
+            <if test="accesstype != null">#{accesstype},</if>
+            <if test="addressDesc != null">#{addressDesc},</if>
+            <if test="isGps != null">#{isGps},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTShouhuanInfo" parameterType="TShouhuanInfo">
+        update t_shouhuan_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="facilityId != null">facility_id = #{facilityId},</if>
+            <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
+            <if test="version != null">version = #{version},</if>
+            <if test="gpsLong != null">gps_long = #{gpsLong},</if>
+            <if test="gpsLat != null">gps_lat = #{gpsLat},</if>
+            <if test="useGpsLong != null">use_gps_long = #{useGpsLong},</if>
+            <if test="useGpsLat != null">use_gps_lat = #{useGpsLat},</if>
+            <if test="useMac != null">use_mac = #{useMac},</if>
+            <if test="speed != null">speed = #{speed},</if>
+            <if test="direction != null">direction = #{direction},</if>
+            <if test="poster != null">poster = #{poster},</if>
+            <if test="electricQuantity != null">electric_quantity = #{electricQuantity},</if>
+            <if test="stepNumber != null">step_number = #{stepNumber},</if>
+            <if test="rollNumber != null">roll_number = #{rollNumber},</if>
+            <if test="terminalStatus != null">terminal_status = #{terminalStatus},</if>
+            <if test="onlineStatis != null">online_statis = #{onlineStatis},</if>
+            <if test="temp != null">temp = #{temp},</if>
+            <if test="bloodHeightPressure != null">blood_height_pressure = #{bloodHeightPressure},</if>
+            <if test="bloodLowPressure != null">blood_low_pressure = #{bloodLowPressure},</if>
+            <if test="heartRate != null">heart_rate = #{heartRate},</if>
+            <if test="oxygen != null">oxygen = #{oxygen},</if>
+            <if test="offlinetime != null">offlinetime = #{offlinetime},</if>
+            <if test="onlinetime != null">onlinetime = #{onlinetime},</if>
+            <if test="gpsUpdateTime != null">gps_update_time = #{gpsUpdateTime},</if>
+            <if test="bloodUpdateTime != null">blood_update_time = #{bloodUpdateTime},</if>
+            <if test="heartUpdateTime != null">heart_update_time = #{heartUpdateTime},</if>
+            <if test="tempUpdateTime != null">temp_update_time = #{tempUpdateTime},</if>
+            <if test="oxygenUpdateTime != null">oxygen_update_time = #{oxygenUpdateTime},</if>
+            <if test="electricQuantityUpdateTime != null">electric_quantity_update_time = #{electricQuantityUpdateTime},</if>
+            <if test="stepNumberUpdateTime != null">step_number_update_time = #{stepNumberUpdateTime},</if>
+            <if test="rollNumberUpdateTime != null">roll_number_update_time = #{rollNumberUpdateTime},</if>
+            <if test="terminalStatusUpdateTime != null">terminal_status_update_time = #{terminalStatusUpdateTime},</if>
+            <if test="createtime != null">createtime = #{createtime},</if>
+            <if test="updatetime != null">updatetime = #{updatetime},</if>
+            <if test="accesstype != null">accesstype = #{accesstype},</if>
+            <if test="addressDesc != null">address_desc = #{addressDesc},</if>
+            <if test="isGps != null">is_gps = #{isGps},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTShouhuanInfoById" parameterType="Long">
+        delete from t_shouhuan_info where id = #{id}
+    </delete>
+
+    <delete id="deleteTShouhuanInfoByIds" parameterType="String">
+        delete from t_shouhuan_info where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 4 - 0
ruoyi-system/src/main/resources/mapper/system/TUserProfileMapper.xml

@@ -139,6 +139,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="familyAddress != null  and familyAddress != ''"> and family_address = #{familyAddress}</if>
         </where>
     </select>
+    <select id="selectTUserProfileBySfzId" resultType="com.ruoyi.system.domain.TUserProfile">
+        select id, name, gender, sfzid, tel_one, age, family_address from t_user_profile
+        where sfzid = #{sfzid}
+    </select>
 
     <insert id="insertTUserProfile" parameterType="TUserProfile" useGeneratedKeys="true" keyProperty="id">
         insert into t_user_profile