Browse Source

提交

mine
袁强 6 months ago
parent
commit
8f98241c8b
  1. 2
      yq-admin/src/main/java/yq/web/controller/mine/MineFaceController.java
  2. 14
      yq-admin/src/main/java/yq/web/controller/mine/MineWarningController.java
  3. 4
      yq-system/src/main/java/yq/system/domain/MineWarning.java
  4. 54
      yq-system/src/main/java/yq/system/domain/vo/MineHealthVo.java
  5. 13
      yq-system/src/main/resources/mapper/system/MineFaceMapper.xml
  6. 8
      yq-system/src/main/resources/mapper/system/MineHealthMapper.xml
  7. 1
      yq-system/src/main/resources/mapper/system/MineWarningMapper.xml

2
yq-admin/src/main/java/yq/web/controller/mine/MineFaceController.java

@ -81,7 +81,7 @@ public class MineFaceController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody MineFace mineFace)
{
if(ObjectUtil.isNotNull(mineFace.getGroupId())){
if(ObjectUtil.isNull(mineFace.getGroupId())){
throw new ServiceException("请选择分组!");
}
if(StrUtil.isEmpty(mineFace.getFaceUrl())){

14
yq-admin/src/main/java/yq/web/controller/mine/MineWarningController.java

@ -65,13 +65,23 @@ public class MineWarningController extends BaseController
@Log(title = "【预警导出】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MineWarning mineWarning){
List<MineWarning> list = mineWarningService.selectMineWarningmedicalList(mineWarning);
List<MineWarning> list = mineWarningService.selectMineWarningList(mineWarning);
ExcelUtil<MineWarning> util = new ExcelUtil<MineWarning>(MineWarning.class);
util.exportExcel(response, list, "预警列表数据");
util.exportExcel(response, list, "健康数据");
}
/**
*/
@PreAuthorize("@ss.hasPermi('system:warning:export')")
@Log(title = "【预警导出】", businessType = BusinessType.EXPORT)
@PostMapping("/medicalExport")
public void medicalExport(HttpServletResponse response, MineWarning mineWarning){
List<MineWarning> list = mineWarningService.selectMineWarningmedicalList(mineWarning);
ExcelUtil<MineWarning> util = new ExcelUtil<MineWarning>(MineWarning.class);
util.exportExcel(response, list, "预警处理列表数据");
}

4
yq-system/src/main/java/yq/system/domain/MineWarning.java

@ -35,9 +35,9 @@ public class MineWarning {
private Integer bpHigh;
@Excel(name = "低压")
private Integer bpLow;
@Excel(name = "心跳")
private Integer br;
@Excel(name = "呼吸频率")
private Integer br;
@Excel(name = "心跳")
private Integer hr;
@Excel(name = "心跳变异率")
private Integer hrv;

54
yq-system/src/main/java/yq/system/domain/vo/MineHealthVo.java

@ -0,0 +1,54 @@
package yq.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import yq.common.annotation.Excel;
import java.util.Date;
/**
* @auther yq
* @data 2025/1/8
*/
public class MineHealthVo {
private Long id;
private Long faceId;
@Excel(name = "姓名")
private String faceName;
@Excel(name = "年龄")
private Long age;
/** 手机号 */
@Excel(name = "手机号")
private String facePhone;
@Excel(name = "组名")
private String mineGroupName;
@Excel(name = "高压")
private Integer bpHigh;
@Excel(name = "低压")
private Integer bpLow;
@Excel(name = "心跳")
private Integer br;
@Excel(name = "呼吸频率")
private Integer hr;
@Excel(name = "心跳变异率")
private Integer hrv;
@Excel(name = "温度")
private Integer temperature;
@Excel(name = "是否允许上岗 0:否 1:是")
private Integer isWork;
@Excel(name = "创建时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
}

13
yq-system/src/main/resources/mapper/system/MineFaceMapper.xml

@ -25,13 +25,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectMineFaceList" parameterType="MineFace" resultMap="MineFaceResult">
<include refid="selectMineFaceVo"/>
<where>
<if test="faceName != null and faceName != ''"> and face_name like concat('%', #{faceName}, '%')</if>
<if test="age != null "> and age = #{age}</if>
<if test="facePhone != null and facePhone != ''"> and face_phone = #{facePhone}</if>
<if test="faceUrl != null and faceUrl != ''"> and face_url = #{faceUrl}</if>
<if test="isWork != null "> and is_work = #{isWork}</if>
<if test="groupId != null "> and group_id = #{groupId}</if>
<if test="faceName != null and faceName != ''"> and mf.face_name like concat('%', #{faceName}, '%')</if>
<if test="age != null "> and mf.age = #{age}</if>
<if test="facePhone != null and facePhone != ''"> and mf.face_phone = #{facePhone}</if>
<if test="faceUrl != null and faceUrl != ''"> and mf.face_url = #{faceUrl}</if>
<if test="isWork != null "> and mf.is_work = #{isWork}</if>
<if test="groupId != null "> and mf.group_id = #{groupId}</if>
</where>
order by mf.face_name
</select>
<select id="selectMineFaceById" parameterType="Long" resultMap="MineFaceResult">

8
yq-system/src/main/resources/mapper/system/MineHealthMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yq.system.mapper.MineHealthMapper">
<resultMap type="MineHealth" id="MineHealthResult">
<resultMap type="mineHealthVo" id="MineHealthResult">
<result property="id" column="id" />
<result property="bpHigh" column="bp_high" />
<result property="bpLow" column="bp_low" />
@ -16,6 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="mineGroupName" column="mine_group_name" />
<result property="faceName" column="face_name" />
<result property="facePhone" column="face_phone" />
<result property="age" column="age" />
</resultMap>
<sql id="selectMineHealthVo">
@ -30,6 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mh.is_work,
mh.create_time,
mf.face_name,
mf.face_phone ,
mf.age ,
mg.mine_group_name
FROM
mine_health mh
@ -38,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INNER JOIN mine_group mg
on mg.id =mf.group_id
</sql>
<select id="selectMineHealthList" parameterType="MineHealth" resultMap="MineHealthResult">
<select id="selectMineHealthList" parameterType="mineHealthVo" resultMap="MineHealthResult">
<include refid="selectMineHealthVo"/>
<where>
<if test="mineGroupName != null and mineGroupName != ''"> and mg.mine_group_name like concat('%', #{mineGroupName}, '%')</if>

1
yq-system/src/main/resources/mapper/system/MineWarningMapper.xml

@ -98,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND date_format(mw.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
</where>
order by mw.create_time desc
</select>
<select id="selectMineWarningListOne" parameterType="MineWarning" resultMap="MineWarningResult">

Loading…
Cancel
Save