Commit 5e144b74 authored by 耿迪迪's avatar 耿迪迪

二道门 gengdidi

parent 2e45f0d5
package com.zehong.web.controller.entranceguard;
import java.util.List;
import java.util.Map;
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 com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEntranceGuardPersonInfo;
import com.zehong.system.service.ITEntranceGuardPersonInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 门禁人员信息Controller
*
* @author zehong
* @date 2022-11-02
*/
@RestController
@RequestMapping("/entranceGuardPerson/info")
public class TEntranceGuardPersonInfoController extends BaseController
{
@Autowired
private ITEntranceGuardPersonInfoService tEntranceGuardPersonInfoService;
/**
* 查询门禁人员信息列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
startPage();
List<TEntranceGuardPersonInfo> list = tEntranceGuardPersonInfoService.selectTEntranceGuardPersonInfoList(tEntranceGuardPersonInfo);
return getDataTable(list);
}
/**
* 导出门禁人员信息列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "门禁人员信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
List<TEntranceGuardPersonInfo> list = tEntranceGuardPersonInfoService.selectTEntranceGuardPersonInfoList(tEntranceGuardPersonInfo);
ExcelUtil<TEntranceGuardPersonInfo> util = new ExcelUtil<TEntranceGuardPersonInfo>(TEntranceGuardPersonInfo.class);
return util.exportExcel(list, "门禁人员信息数据");
}
/**
* 获取门禁人员信息详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{entranceGuardPersonId}")
public AjaxResult getInfo(@PathVariable("entranceGuardPersonId") Long entranceGuardPersonId)
{
return AjaxResult.success(tEntranceGuardPersonInfoService.selectTEntranceGuardPersonInfoById(entranceGuardPersonId));
}
/**
* 新增门禁人员信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "门禁人员信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
return toAjax(tEntranceGuardPersonInfoService.insertTEntranceGuardPersonInfo(tEntranceGuardPersonInfo));
}
/**
* 修改门禁人员信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "门禁人员信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
return toAjax(tEntranceGuardPersonInfoService.updateTEntranceGuardPersonInfo(tEntranceGuardPersonInfo));
}
/**
* 删除门禁人员信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "门禁人员信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{entranceGuardPersonIds}")
public AjaxResult remove(@PathVariable Long[] entranceGuardPersonIds)
{
return toAjax(tEntranceGuardPersonInfoService.deleteTEntranceGuardPersonInfoByIds(entranceGuardPersonIds));
}
/**
* 二道门人员信息初始化
*/
@GetMapping("/getEntranceGuardPersonInfo")
public AjaxResult getEntranceGuardPersonInfo(){
return AjaxResult.success(tEntranceGuardPersonInfoService.getEntranceGuardPersonInfo());
}
}
......@@ -56,6 +56,18 @@ public class SubscriptionEventController {
return AjaxResult.success();
}
@PostMapping("/faceVerification")
public AjaxResult faceVerification(@RequestBody Map<String,Object> faceVeriy){
logger.info("人脸验证信息:"+ JSON.toJSONString(faceVeriy));
return AjaxResult.success();
}
@PostMapping("/patrolCardCheck")
public AjaxResult patrolCardCheck(@RequestBody Map<String,Object> patrolCard){
logger.info("巡查卡比对信息信息:"+ JSON.toJSONString(patrolCard));
return AjaxResult.success();
}
/**
* 设置订阅事件缓存
* @param deviceCode 设备编号
......
......@@ -105,6 +105,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
"/**/*.css",
"/**/*.js"
).permitAll()
.antMatchers(
HttpMethod.POST,
"/subscription/**"
).permitAll()
.antMatchers("/profile/**").anonymous()
.antMatchers("/common/download**").anonymous()
.antMatchers("/common/download/resource**").anonymous()
......
package com.zehong.system.domain;
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.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 门禁人员信息对象 t_entrance_guard_person_info
*
* @author zehong
* @date 2022-11-02
*/
public class TEntranceGuardPersonInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 门禁人员id */
private Long entranceGuardPersonId;
/** 姓名 */
@Excel(name = "姓名")
private String personName;
/** 人员编号 */
@Excel(name = "人员编号")
private String personNum;
/** 行为类型:0.进场 1.出场 */
@Excel(name = "行为类型:0.进场 1.出场")
private String actionType;
/** 进出场时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "进出场时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actionTime;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
public void setEntranceGuardPersonId(Long entranceGuardPersonId)
{
this.entranceGuardPersonId = entranceGuardPersonId;
}
public Long getEntranceGuardPersonId()
{
return entranceGuardPersonId;
}
public void setPersonName(String personName)
{
this.personName = personName;
}
public String getPersonName()
{
return personName;
}
public void setPersonNum(String personNum)
{
this.personNum = personNum;
}
public String getPersonNum()
{
return personNum;
}
public void setActionType(String actionType)
{
this.actionType = actionType;
}
public String getActionType()
{
return actionType;
}
public void setActionTime(Date actionTime)
{
this.actionTime = actionTime;
}
public Date getActionTime()
{
return actionTime;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("entranceGuardPersonId", getEntranceGuardPersonId())
.append("personName", getPersonName())
.append("personNum", getPersonNum())
.append("actionType", getActionType())
.append("actionTime", getActionTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TEntranceGuardPersonInfo;
/**
* 门禁人员信息Mapper接口
*
* @author zehong
* @date 2022-11-02
*/
public interface TEntranceGuardPersonInfoMapper
{
/**
* 查询门禁人员信息
*
* @param entranceGuardPersonId 门禁人员信息ID
* @return 门禁人员信息
*/
public TEntranceGuardPersonInfo selectTEntranceGuardPersonInfoById(Long entranceGuardPersonId);
/**
* 查询门禁人员信息列表
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 门禁人员信息集合
*/
public List<TEntranceGuardPersonInfo> selectTEntranceGuardPersonInfoList(TEntranceGuardPersonInfo tEntranceGuardPersonInfo);
/**
* 新增门禁人员信息
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 结果
*/
public int insertTEntranceGuardPersonInfo(TEntranceGuardPersonInfo tEntranceGuardPersonInfo);
/**
* 修改门禁人员信息
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 结果
*/
public int updateTEntranceGuardPersonInfo(TEntranceGuardPersonInfo tEntranceGuardPersonInfo);
/**
* 删除门禁人员信息
*
* @param entranceGuardPersonId 门禁人员信息ID
* @return 结果
*/
public int deleteTEntranceGuardPersonInfoById(Long entranceGuardPersonId);
/**
* 批量删除门禁人员信息
*
* @param entranceGuardPersonIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEntranceGuardPersonInfoByIds(Long[] entranceGuardPersonIds);
/**
* 统计进出人员数量
* @return
*/
List<Map<String,String>> statisticsPersonByActionType();
/**
* 统计在场人员
* @return
*/
String statisticsStayInPersons();
/**
* 获取最新进出数据
* @return
*/
List<TEntranceGuardPersonInfo> lastImportAndExportData();
}
package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TEntranceGuardPersonInfo;
/**
* 门禁人员信息Service接口
*
* @author zehong
* @date 2022-11-02
*/
public interface ITEntranceGuardPersonInfoService
{
/**
* 查询门禁人员信息
*
* @param entranceGuardPersonId 门禁人员信息ID
* @return 门禁人员信息
*/
public TEntranceGuardPersonInfo selectTEntranceGuardPersonInfoById(Long entranceGuardPersonId);
/**
* 查询门禁人员信息列表
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 门禁人员信息集合
*/
public List<TEntranceGuardPersonInfo> selectTEntranceGuardPersonInfoList(TEntranceGuardPersonInfo tEntranceGuardPersonInfo);
/**
* 新增门禁人员信息
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 结果
*/
public int insertTEntranceGuardPersonInfo(TEntranceGuardPersonInfo tEntranceGuardPersonInfo);
/**
* 修改门禁人员信息
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 结果
*/
public int updateTEntranceGuardPersonInfo(TEntranceGuardPersonInfo tEntranceGuardPersonInfo);
/**
* 批量删除门禁人员信息
*
* @param entranceGuardPersonIds 需要删除的门禁人员信息ID
* @return 结果
*/
public int deleteTEntranceGuardPersonInfoByIds(Long[] entranceGuardPersonIds);
/**
* 删除门禁人员信息信息
*
* @param entranceGuardPersonId 门禁人员信息ID
* @return 结果
*/
public int deleteTEntranceGuardPersonInfoById(Long entranceGuardPersonId);
/**
* 二道门人员信息初始化
*/
Map<String,Object> getEntranceGuardPersonInfo();
}
package com.zehong.system.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEntranceGuardPersonInfoMapper;
import com.zehong.system.domain.TEntranceGuardPersonInfo;
import com.zehong.system.service.ITEntranceGuardPersonInfoService;
/**
* 门禁人员信息Service业务层处理
*
* @author zehong
* @date 2022-11-02
*/
@Service
public class TEntranceGuardPersonInfoServiceImpl implements ITEntranceGuardPersonInfoService
{
@Autowired
private TEntranceGuardPersonInfoMapper tEntranceGuardPersonInfoMapper;
/**
* 查询门禁人员信息
*
* @param entranceGuardPersonId 门禁人员信息ID
* @return 门禁人员信息
*/
@Override
public TEntranceGuardPersonInfo selectTEntranceGuardPersonInfoById(Long entranceGuardPersonId)
{
return tEntranceGuardPersonInfoMapper.selectTEntranceGuardPersonInfoById(entranceGuardPersonId);
}
/**
* 查询门禁人员信息列表
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 门禁人员信息
*/
@Override
public List<TEntranceGuardPersonInfo> selectTEntranceGuardPersonInfoList(TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
return tEntranceGuardPersonInfoMapper.selectTEntranceGuardPersonInfoList(tEntranceGuardPersonInfo);
}
/**
* 新增门禁人员信息
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 结果
*/
@Override
public int insertTEntranceGuardPersonInfo(TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
tEntranceGuardPersonInfo.setCreateTime(DateUtils.getNowDate());
return tEntranceGuardPersonInfoMapper.insertTEntranceGuardPersonInfo(tEntranceGuardPersonInfo);
}
/**
* 修改门禁人员信息
*
* @param tEntranceGuardPersonInfo 门禁人员信息
* @return 结果
*/
@Override
public int updateTEntranceGuardPersonInfo(TEntranceGuardPersonInfo tEntranceGuardPersonInfo)
{
tEntranceGuardPersonInfo.setUpdateTime(DateUtils.getNowDate());
return tEntranceGuardPersonInfoMapper.updateTEntranceGuardPersonInfo(tEntranceGuardPersonInfo);
}
/**
* 批量删除门禁人员信息
*
* @param entranceGuardPersonIds 需要删除的门禁人员信息ID
* @return 结果
*/
@Override
public int deleteTEntranceGuardPersonInfoByIds(Long[] entranceGuardPersonIds)
{
return tEntranceGuardPersonInfoMapper.deleteTEntranceGuardPersonInfoByIds(entranceGuardPersonIds);
}
/**
* 删除门禁人员信息信息
*
* @param entranceGuardPersonId 门禁人员信息ID
* @return 结果
*/
@Override
public int deleteTEntranceGuardPersonInfoById(Long entranceGuardPersonId)
{
return tEntranceGuardPersonInfoMapper.deleteTEntranceGuardPersonInfoById(entranceGuardPersonId);
}
/**
* 二道门人员信息初始化
*/
@Override
public Map<String,Object> getEntranceGuardPersonInfo(){
Map<String,Object> result = new HashMap<>(16);
//出入人数统计
List<Map<String,String>> actionCount = tEntranceGuardPersonInfoMapper.statisticsPersonByActionType();
for(Map map : actionCount){
if("0".equals(map.get("actionType"))){
result.put("importCount",map.get("counts"));
}
if("1".equals(map.get("actionType"))){
result.put("exportCount",map.get("counts"));
}
}
//在场人数统计
result.put("stayInCount",tEntranceGuardPersonInfoMapper.statisticsStayInPersons());
//出入场最新数据
List<TEntranceGuardPersonInfo> lastImportAndExportData = tEntranceGuardPersonInfoMapper.lastImportAndExportData();
for(TEntranceGuardPersonInfo tEntranceGuardPersonInfo : lastImportAndExportData){
if("0".equals(tEntranceGuardPersonInfo.getActionType())){
result.put("lastImportData",tEntranceGuardPersonInfo);
}
if("1".equals(tEntranceGuardPersonInfo.getActionType())){
result.put("lastExportData",tEntranceGuardPersonInfo);
}
}
return result;
}
}
<?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.zehong.system.mapper.TEntranceGuardPersonInfoMapper">
<resultMap type="TEntranceGuardPersonInfo" id="TEntranceGuardPersonInfoResult">
<result property="entranceGuardPersonId" column="entrance_guard_person_id" />
<result property="personName" column="person_name" />
<result property="personNum" column="person_num" />
<result property="actionType" column="action_type" />
<result property="actionTime" column="action_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
</resultMap>
<resultMap id="statisticsPersonByActionTypeResult" type="HashMap">
<result property="actionType" column="action_type" jdbcType="VARCHAR" />
<result property="counts" column="counts" jdbcType="DATE"/>
</resultMap>
<sql id="selectTEntranceGuardPersonInfoVo">
select entrance_guard_person_id, person_name, person_num, action_type, action_time, create_by, create_time, update_by, update_time, is_del, remark from t_entrance_guard_person_info
</sql>
<select id="selectTEntranceGuardPersonInfoList" parameterType="TEntranceGuardPersonInfo" resultMap="TEntranceGuardPersonInfoResult">
<include refid="selectTEntranceGuardPersonInfoVo"/>
<where>
<if test="personName != null and personName != ''"> and person_name like concat('%', #{personName}, '%')</if>
<if test="personNum != null and personNum != ''"> and person_num = #{personNum}</if>
<if test="actionType != null and actionType != ''"> and action_type = #{actionType}</if>
<if test="actionTime != null "> and action_time = #{actionTime}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectTEntranceGuardPersonInfoById" parameterType="Long" resultMap="TEntranceGuardPersonInfoResult">
<include refid="selectTEntranceGuardPersonInfoVo"/>
where entrance_guard_person_id = #{entranceGuardPersonId}
</select>
<insert id="insertTEntranceGuardPersonInfo" parameterType="TEntranceGuardPersonInfo" useGeneratedKeys="true" keyProperty="entranceGuardPersonId">
insert into t_entrance_guard_person_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="personName != null">person_name,</if>
<if test="personNum != null">person_num,</if>
<if test="actionType != null">action_type,</if>
<if test="actionTime != null">action_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="personName != null">#{personName},</if>
<if test="personNum != null">#{personNum},</if>
<if test="actionType != null">#{actionType},</if>
<if test="actionTime != null">#{actionTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTEntranceGuardPersonInfo" parameterType="TEntranceGuardPersonInfo">
update t_entrance_guard_person_info
<trim prefix="SET" suffixOverrides=",">
<if test="personName != null">person_name = #{personName},</if>
<if test="personNum != null">person_num = #{personNum},</if>
<if test="actionType != null">action_type = #{actionType},</if>
<if test="actionTime != null">action_time = #{actionTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where entrance_guard_person_id = #{entranceGuardPersonId}
</update>
<delete id="deleteTEntranceGuardPersonInfoById" parameterType="Long">
delete from t_entrance_guard_person_info where entrance_guard_person_id = #{entranceGuardPersonId}
</delete>
<delete id="deleteTEntranceGuardPersonInfoByIds" parameterType="String">
delete from t_entrance_guard_person_info where entrance_guard_person_id in
<foreach item="entranceGuardPersonId" collection="array" open="(" separator="," close=")">
#{entranceGuardPersonId}
</foreach>
</delete>
<select id="statisticsPersonByActionType" resultMap="statisticsPersonByActionTypeResult">
SELECT
action_type,
COUNT(*)AS counts
FROM
t_entrance_guard_person_info
GROUP BY
action_type
</select>
<select id="statisticsStayInPersons" resultType="java.lang.String">
SELECT
COUNT(*)
FROM
(
(
SELECT
*
FROM
(
SELECT
action_time AS importTime,
person_num
FROM
t_entrance_guard_person_info
WHERE
action_type = '0'
ORDER BY action_time DESC
)a
GROUP BY a.person_num
)import,
(
SELECT
*
FROM
(
SELECT
action_time AS exportTime,
person_num
FROM
t_entrance_guard_person_info
WHERE
action_type = '1'
ORDER BY action_time DESC
)b
GROUP BY b.person_num
)export
)
WHERE import.person_num = export.person_num AND (export.exportTime - import.importTime) > 0
</select>
<select id="lastImportAndExportData" resultMap="TEntranceGuardPersonInfoResult">
SELECT
present.*
FROM(
SELECT
*
FROM
t_entrance_guard_person_info
ORDER BY action_time DESC
)present
GROUP BY
present.action_type
</select>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询门禁人员信息列表
export function listInfo(query) {
return request({
url: '/entranceGuardPerson/info/list',
method: 'get',
params: query
})
}
//二道门数据初始化
export function getEntranceGuardPersonInfo() {
return request({
url: '/entranceGuardPerson/info/getEntranceGuardPersonInfo',
method: 'get'
})
}
// 查询门禁人员信息详细
export function getInfo(entranceGuardPersonId) {
return request({
url: '/entranceGuardPerson/info/' + entranceGuardPersonId,
method: 'get'
})
}
// 新增门禁人员信息
export function addInfo(data) {
return request({
url: '/entranceGuardPerson/info',
method: 'post',
data: data
})
}
// 修改门禁人员信息
export function updateInfo(data) {
return request({
url: '/entranceGuardPerson/info',
method: 'put',
data: data
})
}
// 删除门禁人员信息
export function delInfo(entranceGuardPersonId) {
return request({
url: '/entranceGuardPerson/info/' + entranceGuardPersonId,
method: 'delete'
})
}
// 导出门禁人员信息
export function exportInfo(query) {
return request({
url: '/entranceGuardPerson/info/export',
method: 'get',
params: query
})
}
......@@ -13,7 +13,7 @@
</div>
<div class="ru-in-r">
<span>入场</span>
<div style="color: #0fb980;">0</div>
<div style="color: #0fb980;">{{importCount?importCount:0}}</div>
</div>
</div>
<div class="ent-ru-in">
......@@ -22,7 +22,7 @@
</div>
<div class="ru-in-r">
<span>出场</span>
<div style="color: #f95f5f;">0</div>
<div style="color: #f95f5f;">{{exportCount?exportCount:0}}</div>
</div>
</div>
<div class="ent-ru-in">
......@@ -31,7 +31,7 @@
</div>
<div class="ru-in-r">
<span>在场</span>
<div style="color: #3a65ed">0</div>
<div style="color: #3a65ed">{{stayInCount?stayInCount:0}}</div>
</div>
</div>
</div>
......@@ -70,7 +70,7 @@
</div>
</div>
</div>
<!-- <div class="ent-r ent">
<span>车辆出入</span>
<div class="ent-div"></div>
......@@ -103,9 +103,9 @@
<img src="../../assets/img/biguser.png" alt="">
</div>
<div class="a-in2">
<div>人员姓名:<span></span> </div>
<div>员工ID:<span></span> </div>
<div>入场时间:<span></span> </div>
<div>人员姓名:<span>{{lastImportData?lastImportData.personName:"-"}}</span> </div>
<div>员工ID:<span>{{lastImportData?lastImportData.personNum:"-"}}</span> </div>
<div>入场时间:<span>{{lastImportData?lastImportData.actionTime:"-"}}</span> </div>
</div>
</div>
</div>
......@@ -120,9 +120,9 @@
<img src="../../assets/img/biguser.png" alt="">
</div>
<div class="a-in2">
<div>人员姓名:<span></span> </div>
<div>员工ID:<span></span> </div>
<div>出场时间:<span></span> </div>
<div>人员姓名:<span>{{lastExportData?lastExportData.personName:"-"}}</span> </div>
<div>员工ID:<span>{{lastExportData?lastExportData.personNum:"-"}}</span> </div>
<div>出场时间:<span>{{lastExportData?lastExportData.actionTime:"-"}}</span> </div>
</div>
</div>
</div>
......@@ -182,13 +182,14 @@
</el-pagination> -->
</div>
</div>
</div>
</div>
</template>
<script>
import { getEntranceGuardPersonInfo } from "@/api/entranceguard/entranceguardPerson"
export default {
name: "",
data() {
......@@ -210,9 +211,38 @@
// { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
// { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
// { date: '冀A66666',name: '小轿车',address: '2022-10-15 12:00:00'},
]
],
//入场人数
exportCount:"",
//出场人数
importCount:"",
//在场人数
stayInCount:"",
//最新入场信息
lastImportData:{},
//最新出场信息
lastExportData:{}
}
},
created(){
this.initPersonData();
},
methods:{
initPersonData(){
getEntranceGuardPersonInfo().then(res =>{
//入场人数
this.importCount = res.data.importCount;
//出场人数
this.exportCount = res.data.exportCount;
//在场人数
this.stayInCount = res.data.stayInCount;
//最新入场信息
this.lastImportData = res.data.lastImportData;
//最新出场信息
this.lastExportData = res.data.lastExportData;
})
}
}
};
</script>
<style lang="scss" scoped>
......@@ -245,7 +275,7 @@
padding-top: 10px;
display: flex;
justify-content: space-between;
.ent-ru-in{
width: 100%;
height: 30%;
......@@ -350,7 +380,7 @@
}
}
}
}
}
......@@ -400,12 +430,12 @@
}
}
}
.ent-div{
width: 100%;
height: 1px;
background-color: rgb(205, 207, 209);
margin-top: 7px;
background-color: rgb(205, 207, 209);
margin-top: 7px;
}
::v-deep .el-table th > .cell {
text-align: center;
......@@ -413,4 +443,4 @@
::v-deep .el-table tr td .cell {
text-align: center;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment