diff --git a/pom.xml b/pom.xml index 4a70dc5..da3686a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ yq http://www.ruoyi.vip - 勇强AI智能检测系统 + 人体适岗性一体化检测系统 3.8.6 diff --git a/yq-admin/src/main/java/yq/web/controller/common/CommonController.java b/yq-admin/src/main/java/yq/web/controller/common/CommonController.java index bf179c8..8d9966a 100644 --- a/yq-admin/src/main/java/yq/web/controller/common/CommonController.java +++ b/yq-admin/src/main/java/yq/web/controller/common/CommonController.java @@ -19,6 +19,7 @@ import yq.common.core.domain.AjaxResult; import yq.common.utils.StringUtils; import yq.common.utils.file.FileUploadUtils; import yq.common.utils.file.FileUtils; +import yq.common.utils.file.MimeTypeUtils; import yq.framework.config.ServerConfig; /** @@ -69,6 +70,32 @@ public class CommonController } } + + /** + * 通用上传请求(单个) + */ + @PostMapping("/upload/img") + public AjaxResult uploadImgFile(MultipartFile file) throws Exception + { + try + { + // 上传文件路径 + String filePath = RuoYiConfig.getUploadPath(); + // 上传并返回新文件名称 + String fileName = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION); + String url = serverConfig.getUrl() + fileName; + AjaxResult ajax = AjaxResult.success(); + ajax.put("url", url); + ajax.put("fileName", fileName); + ajax.put("newFileName", FileUtils.getName(fileName)); + ajax.put("originalFilename", file.getOriginalFilename()); + return ajax; + } + catch (Exception e) + { + return AjaxResult.error(e.getMessage()); + } + } /** * 通用上传请求(单个) */ diff --git a/yq-admin/src/main/java/yq/web/controller/mine/MineFaceController.java b/yq-admin/src/main/java/yq/web/controller/mine/MineFaceController.java new file mode 100644 index 0000000..7d752c3 --- /dev/null +++ b/yq-admin/src/main/java/yq/web/controller/mine/MineFaceController.java @@ -0,0 +1,117 @@ +package yq.web.controller.mine; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +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 yq.common.annotation.Log; +import yq.common.core.controller.BaseController; +import yq.common.core.domain.AjaxResult; +import yq.common.enums.BusinessType; +import yq.common.exception.ServiceException; +import yq.system.domain.MineFace; +import yq.system.service.IMineFaceService; +import yq.common.utils.poi.ExcelUtil; +import yq.common.core.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author yq + * @date 2025-01-07 + */ +@RestController +@RequestMapping("/system/face") +public class MineFaceController extends BaseController +{ + @Autowired + private IMineFaceService mineFaceService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:face:list')") + @GetMapping("/list") + public TableDataInfo list(MineFace mineFace) + { + startPage(); + List list = mineFaceService.selectMineFaceList(mineFace); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:face:export')") + @Log(title = "【人脸列表导出】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MineFace mineFace) + { + List list = mineFaceService.selectMineFaceList(mineFace); + ExcelUtil util = new ExcelUtil(MineFace.class); + util.exportExcel(response, list, "【人脸列表】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:face:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(mineFaceService.selectMineFaceById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:face:add')") + @Log(title = "【人脸录入】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MineFace mineFace) + { + if(ObjectUtil.isNotNull(mineFace.getGroupId())){ + throw new ServiceException("请选择分组!"); + } + if(StrUtil.isEmpty(mineFace.getFaceUrl())){ + throw new ServiceException("请上传人脸照片"); + } + if(StrUtil.isEmpty(mineFace.getFaceName())){ + throw new ServiceException("请填写名称"); + } + return toAjax(mineFaceService.insertMineFace(mineFace)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:face:edit')") + @Log(title = "【人脸修改】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MineFace mineFace) + { + return toAjax(mineFaceService.updateMineFace(mineFace)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:face:remove')") + @Log(title = "【人脸删除】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(mineFaceService.deleteMineFaceByIds(ids)); + } +} diff --git a/yq-admin/src/main/java/yq/web/controller/mine/MineGroupController.java b/yq-admin/src/main/java/yq/web/controller/mine/MineGroupController.java new file mode 100644 index 0000000..2aef76f --- /dev/null +++ b/yq-admin/src/main/java/yq/web/controller/mine/MineGroupController.java @@ -0,0 +1,114 @@ +package yq.web.controller.mine; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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 yq.common.annotation.Log; +import yq.common.core.controller.BaseController; +import yq.common.core.domain.AjaxResult; +import yq.common.enums.BusinessType; +import yq.system.domain.MineGroup; +import yq.system.service.IMineGroupService; +import yq.common.utils.poi.ExcelUtil; +import yq.common.core.page.TableDataInfo; + +/** + * + * + * @author yq + * @date 2025-01-07 + */ +@RestController +@RequestMapping("/system/group") +public class MineGroupController extends BaseController +{ + @Autowired + private IMineGroupService mineGroupService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:group:list')") + @GetMapping("/list") + public TableDataInfo list(MineGroup mineGroup) + { + startPage(); + List list = mineGroupService.selectMineGroupList(mineGroup); + return getDataTable(list); + } + + @PreAuthorize("@ss.hasPermi('system:group:list')") + @GetMapping("/byList") + public AjaxResult byList(MineGroup mineGroup) + { + List list = mineGroupService.selectMineGroupList(mineGroup); + return success(list); + } + + + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:group:export')") + @Log(title = "【分组导出】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MineGroup mineGroup) + { + List list = mineGroupService.selectMineGroupList(mineGroup); + ExcelUtil util = new ExcelUtil(MineGroup.class); + util.exportExcel(response, list, "【分组列表】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:group:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(mineGroupService.selectMineGroupById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:group:add')") + @Log(title = "【分组新增】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MineGroup mineGroup) + { + return toAjax(mineGroupService.insertMineGroup(mineGroup)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:group:edit')") + @Log(title = "【分组修改】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MineGroup mineGroup) + { + return toAjax(mineGroupService.updateMineGroup(mineGroup)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:group:remove')") + @Log(title = "【分组删除】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(mineGroupService.deleteMineGroupByIds(ids)); + } +} diff --git a/yq-admin/src/main/java/yq/web/controller/mine/MineHealthController.java b/yq-admin/src/main/java/yq/web/controller/mine/MineHealthController.java new file mode 100644 index 0000000..39a10b1 --- /dev/null +++ b/yq-admin/src/main/java/yq/web/controller/mine/MineHealthController.java @@ -0,0 +1,124 @@ +package yq.web.controller.mine; + +import cn.hutool.core.util.ObjectUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import yq.common.annotation.Log; +import yq.common.core.controller.BaseController; +import yq.common.core.domain.AjaxResult; +import yq.common.core.page.TableDataInfo; +import yq.common.enums.BusinessType; +import yq.common.exception.ServiceException; +import yq.common.utils.DateUtils; +import yq.common.utils.poi.ExcelUtil; +import yq.system.domain.MineFace; +import yq.system.domain.MineHealth; +import yq.system.domain.MineWarning; +import yq.system.service.IMineFaceService; +import yq.system.service.IMineHealthService; +import yq.system.service.IMineWarningService; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * + * + * @author yq + * @date 2025-01-07 + */ +@RestController +@RequestMapping("/system/health") +public class MineHealthController extends BaseController +{ + @Autowired + private IMineHealthService mineHealthService; + + @Autowired + private IMineFaceService mineFaceService; + + /** + */ + @PreAuthorize("@ss.hasPermi('system:health:list')") + @GetMapping("/list") + public TableDataInfo list(MineHealth mineHealth) + { + startPage(); + List list = mineHealthService.selectMineHealthList(mineHealth); + return getDataTable(list); + } + + + + + /** + + */ + @PreAuthorize("@ss.hasPermi('system:health:export')") + @Log(title = "【健康报告导出】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MineHealth mineHealth) + { + List list = mineHealthService.selectMineHealthList(mineHealth); + ExcelUtil util = new ExcelUtil(MineHealth.class); + util.exportExcel(response, list, "【健康报告】数据"); + } + + + + + + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:health:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(mineHealthService.selectMineHealthById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:health:add')") + @Log(title = "【健康报告新增】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MineHealth mineHealth) + { + + if(ObjectUtil.isNotNull(mineHealth.getIsWork())&&mineHealth.getIsWork()==1){ + + MineFace mineFace=new MineFace(); + mineFace.setId(mineHealth.getFaceId()); + mineFace.setIsWork(1); + mineFace.setUseTime(DateUtils.getNowDate()); + mineFaceService.updateMineFace(mineFace); + } + return toAjax(mineHealthService.insertMineHealth(mineHealth)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:health:edit')") + @Log(title = "【健康报告修改】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MineHealth mineHealth) + { + return toAjax(mineHealthService.updateMineHealth(mineHealth)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:health:remove')") + @Log(title = "【健康报告删除】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(mineHealthService.deleteMineHealthByIds(ids)); + } +} diff --git a/yq-admin/src/main/java/yq/web/controller/mine/MineWarningController.java b/yq-admin/src/main/java/yq/web/controller/mine/MineWarningController.java new file mode 100644 index 0000000..783048a --- /dev/null +++ b/yq-admin/src/main/java/yq/web/controller/mine/MineWarningController.java @@ -0,0 +1,120 @@ +package yq.web.controller.mine; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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 yq.common.annotation.Log; +import yq.common.core.controller.BaseController; +import yq.common.core.domain.AjaxResult; +import yq.common.enums.BusinessType; +import yq.system.domain.MineHealth; +import yq.system.domain.MineWarning; +import yq.system.service.IMineWarningService; +import yq.common.utils.poi.ExcelUtil; +import yq.common.core.page.TableDataInfo; + +/** + * + * + * @author yq + * @date 2025-01-07 + */ +@RestController +@RequestMapping("/system/warning") +public class MineWarningController extends BaseController +{ + @Autowired + private IMineWarningService mineWarningService; + + /** + */ + @PreAuthorize("@ss.hasPermi('system:warning:list')") + @GetMapping("/list") + public TableDataInfo list(MineWarning mineWarning) + { + startPage(); + List list = mineWarningService.selectMineWarningList(mineWarning); + return getDataTable(list); + } + + /** + */ + @PreAuthorize("@ss.hasPermi('system:health:list')") + @GetMapping("/medical/list") + public TableDataInfo medicalList(MineWarning mineWarning) + { + startPage(); + List list = mineWarningService.selectMineWarningmedicalList(mineWarning); + return getDataTable(list); + } + + + /** + + */ + @PreAuthorize("@ss.hasPermi('system:warning:export')") + @Log(title = "【预警导出】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MineWarning mineWarning){ + List list = mineWarningService.selectMineWarningmedicalList(mineWarning); + ExcelUtil util = new ExcelUtil(MineWarning.class); + util.exportExcel(response, list, "预警列表数据"); + } + + + + + + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:warning:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(mineWarningService.selectMineWarningById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:warning:add')") + @Log(title = "【预警新增】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MineWarning mineWarning) + { + return toAjax(mineWarningService.insertMineWarning(mineWarning)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:warning:edit')") + @Log(title = "【预警修改】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MineWarning mineWarning) + { + return toAjax(mineWarningService.updateMineWarning(mineWarning)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:warning:remove')") + @Log(title = "【预警删除】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(mineWarningService.deleteMineWarningByIds(ids)); + } +} diff --git a/yq-admin/src/main/resources/application.yml b/yq-admin/src/main/resources/application.yml index 5fc15c7..7a0b01c 100644 --- a/yq-admin/src/main/resources/application.yml +++ b/yq-admin/src/main/resources/application.yml @@ -18,7 +18,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8080 + port: 7777 servlet: # 应用的访问路径 context-path: / diff --git a/yq-system/src/main/java/yq/system/domain/MineFace.java b/yq-system/src/main/java/yq/system/domain/MineFace.java new file mode 100644 index 0000000..d4bda98 --- /dev/null +++ b/yq-system/src/main/java/yq/system/domain/MineFace.java @@ -0,0 +1,64 @@ +package yq.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.springframework.format.annotation.DateTimeFormat; +import yq.common.annotation.Excel; +import yq.common.core.domain.BaseEntity; + +import java.util.Date; + +/** + * 【请填写功能名称】对象 mine_face + * + * @author yq + * @date 2025-01-07 + */ +@Data +public class MineFace +{ + + /** $column.columnComment */ + private Long id; + + /** 姓名 */ + @Excel(name = "姓名") + private String faceName; + + @Excel(name = "组名") + private String mineGroupName; + /** 年龄 */ + @Excel(name = "年龄") + private Long age; + + /** 手机号 */ + @Excel(name = "手机号") + private String facePhone; + + + @Excel(name = "图片", readConverterExp = "$column.readConverterExp()") + private String faceUrl; + + @Excel(name = "备注") + private String remark; + + + @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 useTime; + + @Excel(name = "分组id") + private Long groupId; + @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; + + +} diff --git a/yq-system/src/main/java/yq/system/domain/MineGroup.java b/yq-system/src/main/java/yq/system/domain/MineGroup.java new file mode 100644 index 0000000..13b79eb --- /dev/null +++ b/yq-system/src/main/java/yq/system/domain/MineGroup.java @@ -0,0 +1,35 @@ +package yq.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.springframework.format.annotation.DateTimeFormat; +import yq.common.annotation.Excel; +import yq.common.core.domain.BaseEntity; + +import java.util.Date; + +/** + * 【请填写功能名称】对象 mine_group + * + * @author yq + * @date 2025-01-07 + */ +@Data +public class MineGroup { + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 组名 */ + @Excel(name = "组名") + private String mineGroupName; + @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; + + +} diff --git a/yq-system/src/main/java/yq/system/domain/MineHealth.java b/yq-system/src/main/java/yq/system/domain/MineHealth.java new file mode 100644 index 0000000..a5af135 --- /dev/null +++ b/yq-system/src/main/java/yq/system/domain/MineHealth.java @@ -0,0 +1,52 @@ +package yq.system.domain; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; +import yq.common.annotation.Excel; + +import java.util.Date; + +/** + * @auther yq + * @data 2025/1/7 + */ +@Data +public class MineHealth { + private Long id; + + + private Long faceId; + + @Excel(name = "体检人") + private String faceName; + + + + @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; + + + + +} diff --git a/yq-system/src/main/java/yq/system/domain/MineWarning.java b/yq-system/src/main/java/yq/system/domain/MineWarning.java new file mode 100644 index 0000000..a26b350 --- /dev/null +++ b/yq-system/src/main/java/yq/system/domain/MineWarning.java @@ -0,0 +1,58 @@ +package yq.system.domain; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import org.springframework.format.annotation.DateTimeFormat; +import yq.common.annotation.Excel; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * @auther yq + * @data 2025/1/7 + */ +@Data +public class MineWarning { + private Long id; + + + private Long faceId; + + @Excel(name = "姓名") + private String faceName; + + private Long groupId; + + @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; + + /** 请求参数 */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Map params = new HashMap<>(); + + +} diff --git a/yq-system/src/main/java/yq/system/mapper/MineFaceMapper.java b/yq-system/src/main/java/yq/system/mapper/MineFaceMapper.java new file mode 100644 index 0000000..cb5853c --- /dev/null +++ b/yq-system/src/main/java/yq/system/mapper/MineFaceMapper.java @@ -0,0 +1,61 @@ +package yq.system.mapper; + +import java.util.List; +import yq.system.domain.MineFace; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface MineFaceMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineFace selectMineFaceById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineFace 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineFaceList(MineFace mineFace); + + /** + * 新增【请填写功能名称】 + * + * @param mineFace 【请填写功能名称】 + * @return 结果 + */ + public int insertMineFace(MineFace mineFace); + + /** + * 修改【请填写功能名称】 + * + * @param mineFace 【请填写功能名称】 + * @return 结果 + */ + public int updateMineFace(MineFace mineFace); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineFaceById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMineFaceByIds(Long[] ids); +} diff --git a/yq-system/src/main/java/yq/system/mapper/MineGroupMapper.java b/yq-system/src/main/java/yq/system/mapper/MineGroupMapper.java new file mode 100644 index 0000000..be8ed89 --- /dev/null +++ b/yq-system/src/main/java/yq/system/mapper/MineGroupMapper.java @@ -0,0 +1,61 @@ +package yq.system.mapper; + +import java.util.List; +import yq.system.domain.MineGroup; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface MineGroupMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineGroup selectMineGroupById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineGroup 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineGroupList(MineGroup mineGroup); + + /** + * 新增【请填写功能名称】 + * + * @param mineGroup 【请填写功能名称】 + * @return 结果 + */ + public int insertMineGroup(MineGroup mineGroup); + + /** + * 修改【请填写功能名称】 + * + * @param mineGroup 【请填写功能名称】 + * @return 结果 + */ + public int updateMineGroup(MineGroup mineGroup); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineGroupById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMineGroupByIds(Long[] ids); +} diff --git a/yq-system/src/main/java/yq/system/mapper/MineHealthMapper.java b/yq-system/src/main/java/yq/system/mapper/MineHealthMapper.java new file mode 100644 index 0000000..294616e --- /dev/null +++ b/yq-system/src/main/java/yq/system/mapper/MineHealthMapper.java @@ -0,0 +1,64 @@ +package yq.system.mapper; + +import yq.system.domain.MineHealth; +import yq.system.domain.MineWarning; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface MineHealthMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineHealth selectMineHealthById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineHealth 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineHealthList(MineHealth mineHealth); + + + /** + * 新增【请填写功能名称】 + * + * @param mineHealth 【请填写功能名称】 + * @return 结果 + */ + public int insertMineHealth(MineHealth mineHealth); + + /** + * 修改【请填写功能名称】 + * + * @param mineHealth 【请填写功能名称】 + * @return 结果 + */ + public int updateMineHealth(MineHealth mineHealth); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineHealthById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMineHealthByIds(Long[] ids); +} diff --git a/yq-system/src/main/java/yq/system/mapper/MineWarningMapper.java b/yq-system/src/main/java/yq/system/mapper/MineWarningMapper.java new file mode 100644 index 0000000..ddc6afc --- /dev/null +++ b/yq-system/src/main/java/yq/system/mapper/MineWarningMapper.java @@ -0,0 +1,65 @@ +package yq.system.mapper; + +import java.util.List; +import yq.system.domain.MineWarning; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface MineWarningMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineWarning selectMineWarningById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineWarning 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineWarningList(MineWarning mineWarning); + + public List selectMineWarningMedicalList(MineWarning mineWarning); + + public List selectMineWarningListOne(MineWarning mineWarning); + + /** + * 新增【请填写功能名称】 + * + * @param mineWarning 【请填写功能名称】 + * @return 结果 + */ + public int insertMineWarning(MineWarning mineWarning); + + /** + * 修改【请填写功能名称】 + * + * @param mineWarning 【请填写功能名称】 + * @return 结果 + */ + public int updateMineWarning(MineWarning mineWarning); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineWarningById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMineWarningByIds(Long[] ids); +} diff --git a/yq-system/src/main/java/yq/system/service/IMineFaceService.java b/yq-system/src/main/java/yq/system/service/IMineFaceService.java new file mode 100644 index 0000000..0946841 --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/IMineFaceService.java @@ -0,0 +1,61 @@ +package yq.system.service; + +import java.util.List; +import yq.system.domain.MineFace; + +/** + * 【请填写功能名称】Service接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface IMineFaceService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineFace selectMineFaceById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineFace 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineFaceList(MineFace mineFace); + + /** + * 新增【请填写功能名称】 + * + * @param mineFace 【请填写功能名称】 + * @return 结果 + */ + public int insertMineFace(MineFace mineFace); + + /** + * 修改【请填写功能名称】 + * + * @param mineFace 【请填写功能名称】 + * @return 结果 + */ + public int updateMineFace(MineFace mineFace); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteMineFaceByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineFaceById(Long id); +} diff --git a/yq-system/src/main/java/yq/system/service/IMineGroupService.java b/yq-system/src/main/java/yq/system/service/IMineGroupService.java new file mode 100644 index 0000000..01d6f30 --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/IMineGroupService.java @@ -0,0 +1,61 @@ +package yq.system.service; + +import java.util.List; +import yq.system.domain.MineGroup; + +/** + * 【请填写功能名称】Service接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface IMineGroupService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineGroup selectMineGroupById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineGroup 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineGroupList(MineGroup mineGroup); + + /** + * 新增【请填写功能名称】 + * + * @param mineGroup 【请填写功能名称】 + * @return 结果 + */ + public int insertMineGroup(MineGroup mineGroup); + + /** + * 修改【请填写功能名称】 + * + * @param mineGroup 【请填写功能名称】 + * @return 结果 + */ + public int updateMineGroup(MineGroup mineGroup); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteMineGroupByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineGroupById(Long id); +} diff --git a/yq-system/src/main/java/yq/system/service/IMineHealthService.java b/yq-system/src/main/java/yq/system/service/IMineHealthService.java new file mode 100644 index 0000000..8cbe61d --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/IMineHealthService.java @@ -0,0 +1,65 @@ +package yq.system.service; + +import yq.system.domain.MineHealth; + + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface IMineHealthService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineHealth selectMineHealthById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineHealth 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineHealthList(MineHealth mineHealth); + + + + /** + * 新增【请填写功能名称】 + * + * @param mineHealth 【请填写功能名称】 + * @return 结果 + */ + public int insertMineHealth(MineHealth mineHealth); + + /** + * 修改【请填写功能名称】 + * + * @param mineHealth 【请填写功能名称】 + * @return 结果 + */ + public int updateMineHealth(MineHealth mineHealth); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteMineHealthByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineHealthById(Long id); +} diff --git a/yq-system/src/main/java/yq/system/service/IMineWarningService.java b/yq-system/src/main/java/yq/system/service/IMineWarningService.java new file mode 100644 index 0000000..4f9b7fc --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/IMineWarningService.java @@ -0,0 +1,69 @@ +package yq.system.service; + +import java.util.List; +import yq.system.domain.MineWarning; + +/** + * 【请填写功能名称】Service接口 + * + * @author yq + * @date 2025-01-07 + */ +public interface IMineWarningService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public MineWarning selectMineWarningById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param mineWarning 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineWarningList(MineWarning mineWarning); + /** + * 查询【请填写功能名称】列表 + * + * @param mineWarning 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectMineWarningmedicalList(MineWarning mineWarning); + + + /** + * 新增【请填写功能名称】 + * + * @param mineWarning 【请填写功能名称】 + * @return 结果 + */ + public int insertMineWarning(MineWarning mineWarning); + + /** + * 修改【请填写功能名称】 + * + * @param mineWarning 【请填写功能名称】 + * @return 结果 + */ + public int updateMineWarning(MineWarning mineWarning); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteMineWarningByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteMineWarningById(Long id); +} diff --git a/yq-system/src/main/java/yq/system/service/impl/MineFaceServiceImpl.java b/yq-system/src/main/java/yq/system/service/impl/MineFaceServiceImpl.java new file mode 100644 index 0000000..a759aad --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/impl/MineFaceServiceImpl.java @@ -0,0 +1,101 @@ +package yq.system.service.impl; + +import java.util.List; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import yq.common.exception.ServiceException; +import yq.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import yq.system.mapper.MineFaceMapper; +import yq.system.domain.MineFace; +import yq.system.service.IMineFaceService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author yq + * @date 2025-01-07 + */ +@Service +public class MineFaceServiceImpl implements IMineFaceService +{ + @Autowired + private MineFaceMapper mineFaceMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public MineFace selectMineFaceById(Long id) + { + return mineFaceMapper.selectMineFaceById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param mineFace 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectMineFaceList(MineFace mineFace) + { + return mineFaceMapper.selectMineFaceList(mineFace); + } + + /** + * 新增【请填写功能名称】 + * + * @param mineFace 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertMineFace(MineFace mineFace) + { + + mineFace.setCreateTime(DateUtils.getNowDate()); + mineFace.setUseTime(DateUtils.getNowDate()); + return mineFaceMapper.insertMineFace(mineFace); + } + + /** + * 修改【请填写功能名称】 + * + * @param mineFace 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateMineFace(MineFace mineFace) + { + return mineFaceMapper.updateMineFace(mineFace); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineFaceByIds(Long[] ids) + { + return mineFaceMapper.deleteMineFaceByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineFaceById(Long id) + { + return mineFaceMapper.deleteMineFaceById(id); + } +} diff --git a/yq-system/src/main/java/yq/system/service/impl/MineGroupServiceImpl.java b/yq-system/src/main/java/yq/system/service/impl/MineGroupServiceImpl.java new file mode 100644 index 0000000..165d597 --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/impl/MineGroupServiceImpl.java @@ -0,0 +1,95 @@ +package yq.system.service.impl; + +import java.util.List; +import yq.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import yq.system.mapper.MineGroupMapper; +import yq.system.domain.MineGroup; +import yq.system.service.IMineGroupService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author yq + * @date 2025-01-07 + */ +@Service +public class MineGroupServiceImpl implements IMineGroupService +{ + @Autowired + private MineGroupMapper mineGroupMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public MineGroup selectMineGroupById(Long id) + { + return mineGroupMapper.selectMineGroupById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param mineGroup 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectMineGroupList(MineGroup mineGroup) + { + return mineGroupMapper.selectMineGroupList(mineGroup); + } + + /** + * 新增【请填写功能名称】 + * + * @param mineGroup 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertMineGroup(MineGroup mineGroup) + { + mineGroup.setCreateTime(DateUtils.getNowDate()); + return mineGroupMapper.insertMineGroup(mineGroup); + } + + /** + * 修改【请填写功能名称】 + * + * @param mineGroup 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateMineGroup(MineGroup mineGroup) + { + return mineGroupMapper.updateMineGroup(mineGroup); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineGroupByIds(Long[] ids) + { + return mineGroupMapper.deleteMineGroupByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineGroupById(Long id) + { + return mineGroupMapper.deleteMineGroupById(id); + } +} diff --git a/yq-system/src/main/java/yq/system/service/impl/MineHealthServiceImpl.java b/yq-system/src/main/java/yq/system/service/impl/MineHealthServiceImpl.java new file mode 100644 index 0000000..0d32266 --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/impl/MineHealthServiceImpl.java @@ -0,0 +1,95 @@ +package yq.system.service.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import yq.common.utils.DateUtils; +import yq.system.domain.MineHealth; +import yq.system.domain.MineWarning; +import yq.system.mapper.MineHealthMapper; +import yq.system.mapper.MineWarningMapper; +import yq.system.service.IMineHealthService; +import yq.system.service.IMineWarningService; + +import java.util.List; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author yq + * @date 2025-01-07 + */ +@Service +public class MineHealthServiceImpl implements IMineHealthService +{ + @Autowired + private MineHealthMapper mineHealthMapper; + + + @Override + public MineHealth selectMineHealthById(Long id) { + return mineHealthMapper.selectMineHealthById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param mineHealth 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectMineHealthList(MineHealth mineHealth) + { + return mineHealthMapper.selectMineHealthList(mineHealth); + } + + + + /** + * 新增【请填写功能名称】 + * + * @param mineHealth 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertMineHealth(MineHealth mineHealth) + { + mineHealth.setCreateTime(DateUtils.getNowDate()); + return mineHealthMapper.insertMineHealth(mineHealth); + } + + /** + * 修改【请填写功能名称】 + * + * @param mineHealth 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateMineHealth(MineHealth mineHealth) + { + return mineHealthMapper.updateMineHealth(mineHealth); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineHealthByIds(Long[] ids) + { + return mineHealthMapper.deleteMineHealthByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineHealthById(Long id) + { + return mineHealthMapper.deleteMineHealthById(id); + } +} diff --git a/yq-system/src/main/java/yq/system/service/impl/MineWarningServiceImpl.java b/yq-system/src/main/java/yq/system/service/impl/MineWarningServiceImpl.java new file mode 100644 index 0000000..734e677 --- /dev/null +++ b/yq-system/src/main/java/yq/system/service/impl/MineWarningServiceImpl.java @@ -0,0 +1,121 @@ +package yq.system.service.impl; + +import java.util.List; + +import cn.hutool.core.util.ObjectUtil; +import org.springframework.util.CollectionUtils; +import yq.common.exception.ServiceException; +import yq.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import yq.system.domain.MineFace; +import yq.system.domain.MineWarning; +import yq.system.mapper.MineFaceMapper; +import yq.system.mapper.MineWarningMapper; +import yq.system.service.IMineFaceService; +import yq.system.service.IMineWarningService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author yq + * @date 2025-01-07 + */ +@Service +public class MineWarningServiceImpl implements IMineWarningService +{ + @Autowired + private MineWarningMapper mineWarningMapper; + + @Autowired + private IMineFaceService mineFaceService; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public MineWarning selectMineWarningById(Long id) + { + return mineWarningMapper.selectMineWarningById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param mineWarning 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectMineWarningList(MineWarning mineWarning) + { + return mineWarningMapper.selectMineWarningList(mineWarning); + } + + @Override + public List selectMineWarningmedicalList(MineWarning mineWarning) { + return mineWarningMapper.selectMineWarningMedicalList(mineWarning); + } + + /** + * 新增【请填写功能名称】 + * + * @param mineWarning 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertMineWarning(MineWarning mineWarning) + { + + mineWarning.setCreateTime(DateUtils.getNowDate()); + mineWarningMapper.insertMineWarning(mineWarning); + List mineWarnings = mineWarningMapper.selectMineWarningListOne(mineWarning); + if(mineWarnings.size() >=2){ + MineFace mineFace=new MineFace(); + mineFace.setId(mineWarning.getFaceId()); + mineFace.setIsWork(0); + mineFace.setUseTime(DateUtils.getNowDate()); + mineFaceService.updateMineFace(mineFace); + throw new ServiceException("检测异常,禁止上岗"); + } + return 1; + } + + /** + * 修改【请填写功能名称】 + * + * @param mineWarning 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateMineWarning(MineWarning mineWarning) + { + return mineWarningMapper.updateMineWarning(mineWarning); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineWarningByIds(Long[] ids) + { + return mineWarningMapper.deleteMineWarningByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteMineWarningById(Long id) + { + return mineWarningMapper.deleteMineWarningById(id); + } +} diff --git a/yq-system/src/main/resources/mapper/system/MineFaceMapper.xml b/yq-system/src/main/resources/mapper/system/MineFaceMapper.xml new file mode 100644 index 0000000..3d5ceb8 --- /dev/null +++ b/yq-system/src/main/resources/mapper/system/MineFaceMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + select mf.id, mf.face_name, mf.age, mf.face_phone, mf.face_url, mf.is_work, mf.remark, mf.create_time,mf.use_time, mf.group_id ,mg.mine_group_name from mine_face mf left join mine_group mg on mg.id =mf.group_id + + + + + + + + insert into mine_face + + id, + face_name, + age, + face_phone, + face_url, + is_work, + remark, + create_time, + group_id, + + + #{id}, + #{faceName}, + #{age}, + #{facePhone}, + #{faceUrl}, + #{isWork}, + #{remark}, + #{createTime}, + #{groupId}, + + + + + update mine_face + + face_name = #{faceName}, + age = #{age}, + face_phone = #{facePhone}, + face_url = #{faceUrl}, + is_work = #{isWork}, + remark = #{remark}, + create_time = #{createTime}, + group_id = #{groupId}, + + + where id = #{id} + + + + delete from mine_face where id = #{id} + + + + delete from mine_face where id in + + #{id} + + + \ No newline at end of file diff --git a/yq-system/src/main/resources/mapper/system/MineGroupMapper.xml b/yq-system/src/main/resources/mapper/system/MineGroupMapper.xml new file mode 100644 index 0000000..26e6cc8 --- /dev/null +++ b/yq-system/src/main/resources/mapper/system/MineGroupMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + select id, mine_group_name, create_time from mine_group + + + + + + + + insert into mine_group + + id, + mine_group_name, + create_time, + + + #{id}, + #{mineGroupName}, + #{createTime}, + + + + + update mine_group + + mine_group_name = #{mineGroupName}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from mine_group where id = #{id} + + + + delete from mine_group where id in + + #{id} + + + \ No newline at end of file diff --git a/yq-system/src/main/resources/mapper/system/MineHealthMapper.xml b/yq-system/src/main/resources/mapper/system/MineHealthMapper.xml new file mode 100644 index 0000000..bb0288d --- /dev/null +++ b/yq-system/src/main/resources/mapper/system/MineHealthMapper.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + SELECT + mh.id, + mh.bp_high, + mh.bp_low, + mh.br, + mh.hr, + mh.hrv, + mh.temperature, + mh.is_work, + mh.create_time, + mf.face_name, + mg.mine_group_name + FROM + mine_health mh + INNER JOIN mine_face mf + on mf.id =mh.face_id + INNER JOIN mine_group mg + on mg.id =mf.group_id + + + + + + + + insert into mine_health + + bp_high, + bp_low, + br, + hr, + face_id, + hrv, + temperature, + is_work, + create_time, + + + #{bpHigh}, + face_id, + #{bpLow}, + #{br}, + #{hr}, + #{hrv}, + #{temperature}, + #{isWork}, + #{createTime}, + + + + + update mine_health + + face_id=#{faceId} + bp_high = #{bpHigh}, + bp_low = #{bpLow}, + br = #{br}, + hr = #{hr}, + hrv = #{hrv}, + temperature = #{temperature}, + is_work = #{isWork}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from mine_health where id = #{id} + + + + delete from mine_health where id in + + #{id} + + + \ No newline at end of file diff --git a/yq-system/src/main/resources/mapper/system/MineWarningMapper.xml b/yq-system/src/main/resources/mapper/system/MineWarningMapper.xml new file mode 100644 index 0000000..3d10696 --- /dev/null +++ b/yq-system/src/main/resources/mapper/system/MineWarningMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + SELECT + mw.id, + mw.face_id, + mw.bp_high, + mw.bp_low, + mw.br, + mw.hr, + mw.hrv, + mw.temperature, + mw.is_work, + mw.create_time, + mf.face_name, + mg.mine_group_name + FROM + mine_warning mw + INNER JOIN mine_face mf + on mf.id =mw.face_id + INNER JOIN mine_group mg + on mg.id =mf.group_id + + + SELECT + mw.id, + mw.face_id, + mw.bp_high, + mw.bp_low, + mw.br, + mw.hr, + mw.hrv, + mw.temperature, + mf.is_work, + mw.create_time, + mf.face_name, + mg.mine_group_name + FROM + mine_warning mw + INNER JOIN mine_face mf + on mf.id =mw.face_id + INNER JOIN mine_group mg + on mg.id =mf.group_id + + + SELECT + mw.id, + mw.bp_high, + mw.bp_low, + mw.br, + mw.face_id, + mw.hr, + mw.hrv, + mw.temperature, + mw.is_work, + mw.create_time, + mw.face_id + FROM + mine_warning mw + + + + + + + + + + + + + insert into mine_warning + + bp_high, + bp_low, + br, + hr, + hrv, + temperature, + is_work, + create_time, + + + #{bpHigh}, + #{bpLow}, + #{br}, + #{hr}, + #{hrv}, + #{temperature}, + #{isWork}, + #{createTime}, + + + + + update mine_warning + + bp_high = #{bpHigh}, + bp_low = #{bpLow}, + br = #{br}, + hr = #{hr}, + hrv = #{hrv}, + temperature = #{temperature}, + is_work = #{isWork}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from mine_warning where id = #{id} + + + + delete from mine_warning where id in + + #{id} + + + \ No newline at end of file