loser
1 year ago
20 changed files with 395 additions and 996 deletions
@ -1,67 +0,0 @@ |
|||||||
package com.ruoyi.web.controller; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.stereotype.Controller; |
|
||||||
import org.springframework.ui.ModelMap; |
|
||||||
import org.springframework.validation.annotation.Validated; |
|
||||||
import org.springframework.web.bind.annotation.GetMapping; |
|
||||||
import org.springframework.web.bind.annotation.PathVariable; |
|
||||||
import org.springframework.web.bind.annotation.PostMapping; |
|
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||||
import org.springframework.web.bind.annotation.ResponseBody; |
|
||||||
import com.ruoyi.common.annotation.Log; |
|
||||||
import com.ruoyi.common.enums.BusinessType; |
|
||||||
import com.ruoyi.system.domain.Check; |
|
||||||
import com.ruoyi.system.service.ICheckService; |
|
||||||
import com.ruoyi.common.core.controller.BaseController; |
|
||||||
import com.ruoyi.common.core.domain.AjaxResult; |
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|
||||||
import com.ruoyi.common.core.page.TableDataInfo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 个人打卡Controller |
|
||||||
* |
|
||||||
* @author zlx |
|
||||||
* @date 2023-04-22 |
|
||||||
*/ |
|
||||||
@Controller |
|
||||||
@RequestMapping("/individual/check") |
|
||||||
public class CheckController extends BaseController |
|
||||||
{ |
|
||||||
private String prefix = "individual/check"; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private ICheckService checkService; |
|
||||||
|
|
||||||
@RequiresPermissions("individual:check:view") |
|
||||||
@GetMapping() |
|
||||||
public String check() |
|
||||||
{ |
|
||||||
return prefix + "/check"; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 新增个人打卡 |
|
||||||
*/ |
|
||||||
@GetMapping("/add") |
|
||||||
public String add() |
|
||||||
{ |
|
||||||
return prefix + "/add"; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 新增保存个人打卡 |
|
||||||
*/ |
|
||||||
@RequiresPermissions("individual:check:add") |
|
||||||
@Log(title = "个人打卡", businessType = BusinessType.INSERT) |
|
||||||
@PostMapping("/add") |
|
||||||
@ResponseBody |
|
||||||
public AjaxResult addSave(@Validated Check check) |
|
||||||
{ |
|
||||||
return toAjax(checkService.insertCheck(check)); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,84 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||||
<head> |
|
||||||
<th:block th:include="include :: header('新增个人打卡')" /> |
|
||||||
<th:block th:include="include :: datetimepicker-css" /> |
|
||||||
</head> |
|
||||||
<body class="white-bg"> |
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||||
<form class="form-horizontal m" id="form-check-add"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">打卡人姓名:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="checkName" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">体温:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="temperature" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">健康状况:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="state" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">是否去过高风险地区:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="isHigh" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">是否接触过密接人员:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="isTouch" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">个人状况描述:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="description" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">当前时间:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<div class="input-group date"> |
|
||||||
<input name="checkDatetime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">打卡位置:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="currentPosition" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
<th:block th:include="include :: footer" /> |
|
||||||
<th:block th:include="include :: datetimepicker-js" /> |
|
||||||
<script th:inline="javascript"> |
|
||||||
var prefix = ctx + "system/check" |
|
||||||
$("#form-check-add").validate({ |
|
||||||
focusCleanup: true |
|
||||||
}); |
|
||||||
|
|
||||||
function submitHandler() { |
|
||||||
if ($.validate.form()) { |
|
||||||
$.operate.save(prefix + "/add", $('#form-check-add').serialize()); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$("input[name='checkDatetime']").datetimepicker({ |
|
||||||
format: "yyyy-mm-dd", |
|
||||||
minView: "month", |
|
||||||
autoclose: true |
|
||||||
}); |
|
||||||
</script> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,207 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|
||||||
<head> |
|
||||||
<th:block th:include="include :: header('个人打卡列表')" /> |
|
||||||
</head> |
|
||||||
<body class="gray-bg"> |
|
||||||
<div class="main-content" > |
|
||||||
<form class="form-horizontal" id="form-check"> |
|
||||||
<div class="container-div"> |
|
||||||
<h4 class="form-header h4">打卡信息提交</h4> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-sm-6"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-4 control-label is-required">姓名:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="checkName" placeholder="请输入姓名" class="form-control" type="text" maxlength="30" > |
|
||||||
|
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="col-sm-6"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-4 control-label">目前位置:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<div class="input-group" style="display: flex"> |
|
||||||
<input class="btn bg-olive" type="button" value="点击获取位置" onclick="clickToGetAddress()" ></input> |
|
||||||
<input type="text" class="form-control" name="currentPosition" id="currentPosition" placeholder="目前位置" value=""> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-sm-6"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-4 control-label">健康状况:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<div class="input-group"> |
|
||||||
<input name="state" placeholder="健康状况" class="form-control" type="text"> |
|
||||||
<span class="input-group-addon"><i class="fa fa-user"></i></span> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="col-sm-6"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-4 control-label">打卡时间:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<div class="input-group"> |
|
||||||
<input name="checkDatetime" class="form-control " type="date" placeholder="打卡时间"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-sm-6"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-4 control-label is-required">体温:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="temperature" class="form-control" type="text" placeholder="体温"/> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="col-sm-6" > |
|
||||||
<div class="form-group" style="display: flex"> |
|
||||||
<label class="col-sm-5 control-label">是否接触密接:</label> |
|
||||||
<div class="col-sm-2"> |
|
||||||
<label class="toggle-switch switch-solid"> |
|
||||||
<input type="checkbox" id="isTouch"> |
|
||||||
<span></span> |
|
||||||
</label> |
|
||||||
</div> |
|
||||||
<label class="col-sm-4 control-label">是否去过高风险:</label> |
|
||||||
<div class="col-sm-2"> |
|
||||||
<label class="toggle-switch switch-solid"> |
|
||||||
<input type="checkbox" id="isHigh"> |
|
||||||
<span></span> |
|
||||||
</label> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<h4 class="form-header h4">其他信息</h4> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-sm-12"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-xs-2 control-label">备注:</label> |
|
||||||
<div class="col-xs-10"> |
|
||||||
<textarea name="description" maxlength="500" class="form-control" rows="3" placeholder="个人状况描述"></textarea> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-sm-offset-5 col-sm-10"> |
|
||||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitCheck()"><i class="fa fa-check"></i>保 存</button> |
|
||||||
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
<th:block th:include="include :: footer" /> |
|
||||||
<script src="http://api.map.baidu.com/api?v=1.4" type="text/javascript"></script> |
|
||||||
<script > |
|
||||||
var prefix = ctx + "individual/check"; |
|
||||||
$("#form-check").validate({ |
|
||||||
//首字母默认大写 |
|
||||||
onkeyup: false, |
|
||||||
rules:{ |
|
||||||
checkName:{ |
|
||||||
isUserName:true, |
|
||||||
}, |
|
||||||
currentPosition:{ |
|
||||||
}, |
|
||||||
state:{ |
|
||||||
}, |
|
||||||
checkDatetime:{ |
|
||||||
}, |
|
||||||
temperature:{ |
|
||||||
isTemperature:true |
|
||||||
}, |
|
||||||
}, |
|
||||||
description: { |
|
||||||
}, |
|
||||||
|
|
||||||
}); |
|
||||||
function submitCheck () { |
|
||||||
if ($.validate.form()) { |
|
||||||
var data = $("#form-check").serializeArray(); |
|
||||||
var isTouch = $("input[id='isTouch']").is(':checked') == true ? 0 : 1; |
|
||||||
var isHigh = $("input[id='isHigh']").is(':checked') == true ? 0 : 1; |
|
||||||
data.push({"checkName": "isTouch", "value": isTouch}); |
|
||||||
data.push({"checkName": "isHigh", "value": isHigh}); |
|
||||||
$.operate.saveTab(prefix+"/add", data); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$(document).ready(function() { |
|
||||||
$('#datepicker-a3').datetimepicker({ |
|
||||||
format : "yyyy-mm-dd hh:ii", |
|
||||||
autoclose : true, |
|
||||||
todayBtn : true, |
|
||||||
language : "zh-CN" |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
|
||||||
//获取位置 |
|
||||||
function getLocation() { |
|
||||||
var options = { |
|
||||||
enableHighAccuracy : true, |
|
||||||
maximumAge : 1000 |
|
||||||
} |
|
||||||
if (navigator.geolocation) { |
|
||||||
//浏览器支持geolocation |
|
||||||
navigator.geolocation.getCurrentPosition(onSuccess, onError, options); |
|
||||||
} else { |
|
||||||
//浏览器不支持geolocation |
|
||||||
alert('您的浏览器不支持地理位置定位'); |
|
||||||
} |
|
||||||
} |
|
||||||
//成功时 |
|
||||||
function onSuccess(position) { |
|
||||||
//返回用户位置 |
|
||||||
//经度 |
|
||||||
var longitude = position.coords.longitude; |
|
||||||
//纬度 |
|
||||||
var latitude = position.coords.latitude; |
|
||||||
document.getElementById("currentPosition").value= `当前经纬度:经度 ${longitude},纬度 ${latitude}` |
|
||||||
//根据经纬度获取地理位置,不太准确,获取城市区域还是可以的 |
|
||||||
var map = new BMap.Map("allmap"); |
|
||||||
var point = new BMap.Point(longitude, latitude); |
|
||||||
var gc = new BMap.Geocoder(); |
|
||||||
gc.getLocation(point, function(rs) { |
|
||||||
var addComp = rs.addressComponents; |
|
||||||
document.getElementById("currentPosition").value=`${addComp.province}, ${addComp.city}, ${addComp.district}` |
|
||||||
}); |
|
||||||
// 这里后面可以写你的后续操作了 |
|
||||||
postData(longitude, latitude); |
|
||||||
} |
|
||||||
//失败时 |
|
||||||
function onError(error) { |
|
||||||
switch (error.code) { |
|
||||||
case 1: |
|
||||||
alert("位置服务被拒绝"); |
|
||||||
break; |
|
||||||
case 2: |
|
||||||
alert("暂时获取不到位置信息"); |
|
||||||
break; |
|
||||||
case 3: |
|
||||||
alert("获取信息超时"); |
|
||||||
break; |
|
||||||
case 4: |
|
||||||
alert("未知错误"); |
|
||||||
break; |
|
||||||
} |
|
||||||
// 这里后面可以写你的后续操作了 |
|
||||||
} |
|
||||||
|
|
||||||
//获取地理位置 |
|
||||||
const clickToGetAddress = () => { |
|
||||||
getLocation(); |
|
||||||
} |
|
||||||
</script> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,85 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
||||||
<head> |
|
||||||
<th:block th:include="include :: header('修改个人打卡')" /> |
|
||||||
<th:block th:include="include :: datetimepicker-css" /> |
|
||||||
</head> |
|
||||||
<body class="white-bg"> |
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||||
<form class="form-horizontal m" id="form-check-edit" th:object="${check}"> |
|
||||||
<input name="checkId" th:field="*{checkId}" type="hidden"> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">打卡人姓名:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="checkName" th:field="*{checkName}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">体温:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="temperature" th:field="*{temperature}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">健康状况:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="state" th:field="*{state}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">是否去过高风险地区:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="isHigh" th:field="*{isHigh}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">是否接触过密接人员:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="isTouch" th:field="*{isTouch}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">个人状况描述:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="description" th:field="*{description}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">当前时间:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<div class="input-group date"> |
|
||||||
<input name="checkDatetime" th:value="${#dates.format(check.checkDatetime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="form-group"> |
|
||||||
<label class="col-sm-3 control-label">打卡位置:</label> |
|
||||||
<div class="col-sm-8"> |
|
||||||
<input name="currentPosition" th:field="*{currentPosition}" class="form-control" type="text"> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
<th:block th:include="include :: footer" /> |
|
||||||
<th:block th:include="include :: datetimepicker-js" /> |
|
||||||
<script th:inline="javascript"> |
|
||||||
var prefix = ctx + "system/check"; |
|
||||||
$("#form-check-edit").validate({ |
|
||||||
focusCleanup: true |
|
||||||
}); |
|
||||||
|
|
||||||
function submitHandler() { |
|
||||||
if ($.validate.form()) { |
|
||||||
$.operate.save(prefix + "/edit", $('#form-check-edit').serialize()); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
$("input[name='checkDatetime']").datetimepicker({ |
|
||||||
format: "yyyy-mm-dd", |
|
||||||
minView: "month", |
|
||||||
autoclose: true |
|
||||||
}); |
|
||||||
</script> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,157 +0,0 @@ |
|||||||
package com.ruoyi.system.domain; |
|
||||||
|
|
||||||
import java.util.Date; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.ruoyi.common.xss.Xss; |
|
||||||
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; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
import javax.validation.constraints.Size; |
|
||||||
|
|
||||||
/** |
|
||||||
* 个人打卡对象 check |
|
||||||
* |
|
||||||
* @author zlx |
|
||||||
* @date 2023-04-22 |
|
||||||
*/ |
|
||||||
public class Check extends BaseEntity |
|
||||||
{ |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
/** 打卡id */ |
|
||||||
private Long checkId; |
|
||||||
|
|
||||||
/** 打卡人姓名 */ |
|
||||||
@Excel(name = "打卡人姓名") |
|
||||||
private String checkName; |
|
||||||
|
|
||||||
/** 体温 */ |
|
||||||
@Excel(name = "体温") |
|
||||||
private String temperature; |
|
||||||
|
|
||||||
/** 健康状况 */ |
|
||||||
@Excel(name = "健康状况") |
|
||||||
private String state; |
|
||||||
|
|
||||||
/** 是否去过高风险地区 */ |
|
||||||
@Excel(name = "是否去过高风险地区") |
|
||||||
private Integer isHigh; |
|
||||||
|
|
||||||
/** 是否接触过密接人员 */ |
|
||||||
@Excel(name = "是否接触过密接人员") |
|
||||||
private Integer isTouch; |
|
||||||
|
|
||||||
/** 个人状况描述 */ |
|
||||||
@Excel(name = "个人状况描述") |
|
||||||
private String description; |
|
||||||
|
|
||||||
/** 当前时间 */ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd") |
|
||||||
@Excel(name = "当前时间", width = 30, dateFormat = "yyyy-MM-dd") |
|
||||||
private Date checkDatetime; |
|
||||||
|
|
||||||
/** 打卡位置 */ |
|
||||||
@Excel(name = "打卡位置") |
|
||||||
private String currentPosition; |
|
||||||
|
|
||||||
public void setCheckId(Long checkId) |
|
||||||
{ |
|
||||||
this.checkId = checkId; |
|
||||||
} |
|
||||||
|
|
||||||
public Long getCheckId() |
|
||||||
{ |
|
||||||
return checkId; |
|
||||||
} |
|
||||||
public void setCheckName(String checkName) |
|
||||||
{ |
|
||||||
this.checkName = checkName; |
|
||||||
} |
|
||||||
@Xss(message = "用户昵称不能包含脚本字符") |
|
||||||
@Size(min = 2, max = 30, message = "不能为空,用户昵称长度不能超过30个字符") |
|
||||||
public String getCheckName() |
|
||||||
{ |
|
||||||
return checkName; |
|
||||||
} |
|
||||||
public void setTemperature(String temperature) |
|
||||||
{ |
|
||||||
this.temperature = temperature; |
|
||||||
} |
|
||||||
|
|
||||||
@Size(min = 2, message = "体温只能为数字") |
|
||||||
public String getTemperature() |
|
||||||
{ |
|
||||||
return temperature; |
|
||||||
} |
|
||||||
public void setState(String state) |
|
||||||
{ |
|
||||||
this.state = state; |
|
||||||
} |
|
||||||
|
|
||||||
public String getState() |
|
||||||
{ |
|
||||||
return state; |
|
||||||
} |
|
||||||
public void setIsHigh(Integer isHigh) |
|
||||||
{ |
|
||||||
this.isHigh = isHigh; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getIsHigh() |
|
||||||
{ |
|
||||||
return isHigh; |
|
||||||
} |
|
||||||
public void setIsTouch(Integer isTouch) |
|
||||||
{ |
|
||||||
this.isTouch = isTouch; |
|
||||||
} |
|
||||||
|
|
||||||
public Integer getIsTouch() |
|
||||||
{ |
|
||||||
return isTouch; |
|
||||||
} |
|
||||||
public void setDescription(String description) |
|
||||||
{ |
|
||||||
this.description = description; |
|
||||||
} |
|
||||||
|
|
||||||
public String getDescription() |
|
||||||
{ |
|
||||||
return description; |
|
||||||
} |
|
||||||
public void setCheckDatetime(Date checkDatetime) |
|
||||||
{ |
|
||||||
this.checkDatetime = checkDatetime; |
|
||||||
} |
|
||||||
public Date getCheckDatetime() |
|
||||||
{ |
|
||||||
return checkDatetime; |
|
||||||
} |
|
||||||
public void setCurrentPosition(String currentPosition) |
|
||||||
{ |
|
||||||
this.currentPosition = currentPosition; |
|
||||||
} |
|
||||||
|
|
||||||
public String getCurrentPosition() |
|
||||||
{ |
|
||||||
return currentPosition; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
||||||
.append("checkId", getCheckId()) |
|
||||||
.append("checkName", getCheckName()) |
|
||||||
.append("temperature", getTemperature()) |
|
||||||
.append("state", getState()) |
|
||||||
.append("isHigh", getIsHigh()) |
|
||||||
.append("isTouch", getIsTouch()) |
|
||||||
.append("description", getDescription()) |
|
||||||
.append("checkDatetime", getCheckDatetime()) |
|
||||||
.append("currentPosition", getCurrentPosition()) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
@ -1,24 +0,0 @@ |
|||||||
package com.ruoyi.system.mapper; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
import com.ruoyi.system.domain.Check; |
|
||||||
|
|
||||||
/** |
|
||||||
* 个人打卡Mapper接口 |
|
||||||
* |
|
||||||
* @author zlx |
|
||||||
* @date 2023-04-22 |
|
||||||
*/ |
|
||||||
public interface CheckMapper |
|
||||||
{ |
|
||||||
|
|
||||||
/** |
|
||||||
* 新增个人打卡 |
|
||||||
* |
|
||||||
* @param check 个人打卡 |
|
||||||
* @return 结果 |
|
||||||
*/ |
|
||||||
public int insertCheck(Check check); |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,23 +0,0 @@ |
|||||||
package com.ruoyi.system.service; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
import com.ruoyi.system.domain.Check; |
|
||||||
|
|
||||||
/** |
|
||||||
* 个人打卡Service接口 |
|
||||||
* |
|
||||||
* @author zlx |
|
||||||
* @date 2023-04-22 |
|
||||||
*/ |
|
||||||
public interface ICheckService |
|
||||||
{ |
|
||||||
|
|
||||||
/** |
|
||||||
* 新增个人打卡 |
|
||||||
* |
|
||||||
* @param check 个人打卡 |
|
||||||
* @return 结果 |
|
||||||
*/ |
|
||||||
public int insertCheck(Check check); |
|
||||||
|
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
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.CheckMapper; |
|
||||||
import com.ruoyi.system.domain.Check; |
|
||||||
import com.ruoyi.system.service.ICheckService; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 个人打卡Service业务层处理 |
|
||||||
* |
|
||||||
* @author zlx |
|
||||||
* @date 2023-04-22 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class CheckServiceImpl implements ICheckService { |
|
||||||
@Autowired |
|
||||||
private CheckMapper checkMapper; |
|
||||||
|
|
||||||
/** |
|
||||||
* 新增个人打卡 |
|
||||||
* |
|
||||||
* @param check 个人打卡 |
|
||||||
* @return 结果 |
|
||||||
*/ |
|
||||||
@Override |
|
||||||
public int insertCheck(Check check) { |
|
||||||
return checkMapper.insertCheck(check); |
|
||||||
} |
|
||||||
} |
|
@ -1,44 +0,0 @@ |
|||||||
<?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.CheckMapper"> |
|
||||||
|
|
||||||
<resultMap type="Check" id="CheckResult"> |
|
||||||
<result property="checkId" column="check_id" /> |
|
||||||
<result property="checkName" column="check_name" /> |
|
||||||
<result property="temperature" column="temperature" /> |
|
||||||
<result property="state" column="state" /> |
|
||||||
<result property="isHigh" column="is_high" /> |
|
||||||
<result property="isTouch" column="is_touch" /> |
|
||||||
<result property="description" column="description" /> |
|
||||||
<result property="checkDatetime" column="check_datetime" /> |
|
||||||
<result property="currentPosition" column="current_position" /> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<insert id="insertCheck" parameterType="Check" useGeneratedKeys="true" keyProperty="checkId"> |
|
||||||
insert into individual_check |
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||||
<if test="checkName != null and checkName != ''">check_name,</if> |
|
||||||
<if test="temperature != null and temperature != ''">temperature,</if> |
|
||||||
<if test="state != null and state != ''">state,</if> |
|
||||||
<if test="description != null and description != ''">description,</if> |
|
||||||
<if test="isHigh != null ">is_high,</if> |
|
||||||
<if test="isTouch != null ">is_touch,</if> |
|
||||||
<if test="currentPosition != null and currentPosition != ''">current_position,</if> |
|
||||||
<if test="checkDatetime != null ">check_datetime,</if> |
|
||||||
</trim> |
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||||
<if test="checkName != null and checkName != ''">#{checkName},</if> |
|
||||||
<if test="temperature != null and temperature != ''">#{temperature},</if> |
|
||||||
<if test="state != null and state != ''">#{state},</if> |
|
||||||
<if test="description != null and description != ''">#{description},</if> |
|
||||||
<if test="isHigh != null and isHigh != ''">#{isHigh},</if> |
|
||||||
<if test="isTouch != null and isTouch != ''">#{isTouch},</if> |
|
||||||
<if test="currentPosition != null and currentPosition != ''">#{currentPosition},</if> |
|
||||||
<if test="checkDatetime != null ">#{checkDatetime},</if> |
|
||||||
</trim> |
|
||||||
</insert> |
|
||||||
|
|
||||||
|
|
||||||
</mapper> |
|
Loading…
Reference in new issue