Commit fcccea19 authored by lizhichao's avatar lizhichao
parents 669ba58b 32afc535
......@@ -16,6 +16,7 @@ import com.zehong.web.uitls.ArtemisUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -139,6 +140,7 @@ public class SubscriptionEventController {
TEntranceGuardPersonInfo tEntranceGuardPersonInfo = new TEntranceGuardPersonInfo();
tEntranceGuardPersonInfo.setPersonName(personName);
tEntranceGuardPersonInfo.setPersonNum((String)list.get(0).get("certificateNo"));
tEntranceGuardPersonInfo.setCatchPic((String)data.get("ExtEventPictureURL"));
// if("0".equals(extEventInOut) || "1".equals(extEventInOut)){
// tEntranceGuardPersonInfo.setActionType("0".equals(extEventInOut) ? "1" : "0");
// }
......
......@@ -122,3 +122,6 @@ config:
detect-face-max-num: 10
detect-face-scale-val: 32
thread-pool-size: 5
#门禁抓拍图片地址
entrance-guard-catch-pic-url: https://27.128.189.137:6113
\ No newline at end of file
......@@ -123,3 +123,6 @@ config:
detect-face-max-num: 10
detect-face-scale-val: 32
thread-pool-size: 5
#门禁抓拍图片地址
entrance-guard-catch-pic-url: https://27.128.189.137:6113
\ No newline at end of file
......@@ -17,20 +17,21 @@ server:
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://36.138.181.113:3306/danger_manage_area_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root@123
# 从库数据源
slave:
# sqlserver 数据源
sqlserver:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
enabled: true
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://218.207.92.101:1433;DatabaseName=Park_DB
username: sa
password: haosql
# 初始连接数
initialSize: 5
# 最小连接池数量
......@@ -46,7 +47,7 @@ spring:
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
......@@ -110,3 +111,17 @@ zehong:
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
#虹软人脸识别配置(linux配置)
config:
arcface-sdk:
#算法引擎路径 示例(Windows配置\danger-manage-admin\arcsoft_lib\WIN64,Linux配置/arcsoft_lib/LINUX64)
sdk-lib-path: /arcsoft_lib/LINUX64
app-id: 3ZM3ayaRriUPWzzy29QsqeynFcpmu9zMVXGjBrQ4rPkL
sdk-key: J1wqG4VVGJYLe5YYT2hQN3xHSqLEwrZJBBRQmuEXkZqc
detect-face-max-num: 10
detect-face-scale-val: 32
thread-pool-size: 5
#门禁抓拍图片地址
entrance-guard-catch-pic-url: https://27.128.189.137:6113
\ No newline at end of file
......@@ -37,6 +37,10 @@ public class TEntranceGuardPersonInfo extends BaseEntity
@Excel(name = "进出场时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actionTime;
/** 抓拍图片 */
@Excel(name = "抓拍图片")
private String catchPic;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
......@@ -86,6 +90,15 @@ public class TEntranceGuardPersonInfo extends BaseEntity
{
return actionTime;
}
public void setCatchPic(String catchPic)
{
this.catchPic = catchPic;
}
public String getCatchPic()
{
return catchPic;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
......@@ -104,6 +117,7 @@ public class TEntranceGuardPersonInfo extends BaseEntity
.append("personNum", getPersonNum())
.append("actionType", getActionType())
.append("actionTime", getActionTime())
.append("catchPic", getCatchPic())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
......
package com.zehong.system.service.impl;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEntranceGuardPersonInfo;
import com.zehong.system.domain.vo.Bx06Vo;
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 门禁人员信息Service业务层处理
......@@ -30,6 +30,10 @@ public class TEntranceGuardPersonInfoServiceImpl implements ITEntranceGuardPerso
@Autowired
private TEntranceGuardPersonInfoMapper tEntranceGuardPersonInfoMapper;
/**抓拍图片地址*/
@Value("${entrance-guard-catch-pic-url}")
private String entranceGuardCatchPicUrl;
/**
* 查询门禁人员信息
*
......@@ -125,6 +129,9 @@ public class TEntranceGuardPersonInfoServiceImpl implements ITEntranceGuardPerso
//出入场最新数据
List<TEntranceGuardPersonInfo> lastImportAndExportData = tEntranceGuardPersonInfoMapper.lastImportAndExportData();
for(TEntranceGuardPersonInfo tEntranceGuardPersonInfo : lastImportAndExportData){
if(StringUtils.isNotEmpty(tEntranceGuardPersonInfo.getCatchPic())){
tEntranceGuardPersonInfo.setCatchPic(entranceGuardCatchPicUrl + tEntranceGuardPersonInfo.getCatchPic());
}
if("0".equals(tEntranceGuardPersonInfo.getActionType())){
result.put("lastImportData",tEntranceGuardPersonInfo);
}
......
......@@ -12,11 +12,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap id="statisticsImportVehicleResult" type="HashMap">
<result property="plateNumber" column="plateNumber" jdbcType="VARCHAR" />
<result property="inParkTime" column="InParkTime" jdbcType="DATE"/>
<result property="cName" column="cName" jdbcType="VARCHAR"/>
<result property="inParkControlImageName" column="InParkControlImageName" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="statisticsExportVehicleResult" type="HashMap">
<result property="plateNumber" column="plateNumber" jdbcType="VARCHAR" />
<result property="outParkTime" column="OutParkTime" jdbcType="DATE"/>
<result property="cName" column="cName" jdbcType="VARCHAR"/>
<result property="inParkControlImageName" column="InParkControlImageName" jdbcType="VARCHAR"/>
</resultMap>
<select id="statisticsVehicleByActionType" resultMap="statisticsVehicleByActionTypeResult">
......@@ -39,8 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="statisticsStayInVehicles" resultMap="statisticsImportVehicleResult">
SELECT
plateNumber,
InParkTime
stay.plateNumber,
stay.InParkTime,
type.cName
FROM(
SELECT
plateNumber,
......@@ -50,27 +55,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
Sys_Park_OutParkRecords
GROUP BY plateNumber
)stay
LEFT JOIN Sys_Park_OutParkRecords records ON stay.InParkTime = records.InParkTime AND stay.plateNumber = records.plateNumber
LEFT JOIN V_Park_PlateType type ON records.plateType = type.id
WHERE ISNULL(DATEDIFF(S, '1970-01-01 00:00:00', stay.InParkTime),0) - ISNULL(DATEDIFF(S, '1970-01-01 00:00:00', stay.OutParkTime),0) >0
</select>
<select id="lastImportData" resultMap="statisticsImportVehicleResult">
SELECT
TOP 1 plateNumber,InParkTime
TOP 1 records.plateNumber,records.InParkTime,type.cName,records.InParkControlImageName
FROM
Sys_Park_OutParkRecords
Sys_Park_OutParkRecords records
LEFT JOIN V_Park_PlateType type ON records.plateType = type.id
WHERE
InParkTime IS NOT NULL
ORDER BY InParkTime DESC
records.InParkTime IS NOT NULL
ORDER BY records.InParkTime DESC
</select>
<select id="lastExportData" resultMap="statisticsExportVehicleResult">
SELECT
TOP 1 plateNumber,OutParkTime
TOP 1 records.plateNumber,records.OutParkTime,type.cName,records.InParkControlImageName
FROM
Sys_Park_OutParkRecords
Sys_Park_OutParkRecords records
LEFT JOIN V_Park_PlateType type ON records.plateType = type.id
WHERE
OutParkTime IS NOT NULL
ORDER BY OutParkTime DESC
records.OutParkTime IS NOT NULL
ORDER BY records.OutParkTime DESC
</select>
</mapper>
\ No newline at end of file
......@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="personNum" column="person_num" />
<result property="actionType" column="action_type" />
<result property="actionTime" column="action_time" />
<result property="catchPic" column="catch_pic" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
......@@ -24,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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
select entrance_guard_person_id, person_name, person_num, action_type, action_time, catch_pic, 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">
......@@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="catchPic != null and catchPic != ''"> and catch_pic = #{catchPic}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
</select>
......@@ -50,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="personNum != null">person_num,</if>
<if test="actionType != null">action_type,</if>
<if test="actionTime != null">action_time,</if>
<if test="catchPic != null">catch_pic,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
......@@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="personNum != null">#{personNum},</if>
<if test="actionType != null">#{actionType},</if>
<if test="actionTime != null">#{actionTime},</if>
<if test="catchPic != null">#{catchPic},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
......@@ -78,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="catchPic != null">catch_pic = #{catchPic},</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>
......
......@@ -78,7 +78,7 @@
<div class="ent-div"></div>
<div class="ent-b-in">
<div class="a-in1">
<img src="../../assets/img/biguser.png" alt="">
<img style="height: 100%" :src="lastImportData.catchPic ? lastImportData.catchPic : require('@/assets/img/biguser.png')" alt="">
</div>
<div class="a-in2">
<div>人员姓名:<span>{{lastImportData?lastImportData.personName:"-"}}</span> </div>
......@@ -95,7 +95,7 @@
<div class="ent-div"></div>
<div class="ent-b-in">
<div class="a-in1">
<img src="../../assets/img/biguser.png" alt="">
<img style="height: 100%" :src="lastExportData.catchPic ? lastExportData.catchPic : require('@/assets/img/biguser.png')" alt="">
</div>
<div class="a-in2">
<div>人员姓名:<span>{{lastExportData?lastExportData.personName:"-"}}</span> </div>
......@@ -112,7 +112,7 @@
<div class="ent-div"></div>
<div class="ent-b-in">
<img src="../../assets/img/car.png" alt="">
<div>车辆类型:<span></span> </div>
<div>车辆类型:<span></span>{{lastImportCarData ? lastImportCarData.cName : "-"}}</div>
<div>车辆号牌:<span>{{lastImportCarData?lastImportCarData.plateNumber:"-"}}</span> </div>
<div>入场时间:<span>{{lastImportCarData?changeDateFormat(lastImportCarData.inParkTime):"-"}}</span> </div>
</div>
......@@ -125,7 +125,7 @@
<div class="ent-div"></div>
<div class="ent-b-in">
<img src="../../assets/img/car.png" alt="">
<div>车辆类型:<span></span> </div>
<div>车辆类型:<span></span>{{lastExportCarData ? lastExportCarData.cName : "-"}}</div>
<div>车辆号牌:<span>{{lastExportCarData?lastExportCarData.plateNumber:"-"}}</span> </div>
<div>入场时间:<span>{{lastExportCarData?changeDateFormat(lastExportCarData.outParkTime):"-"}}</span> </div>
</div>
......@@ -145,7 +145,7 @@
width="170">
</el-table-column>
<el-table-column
prop="name"
prop="cName"
label="类型">
</el-table-column>
<el-table-column
......@@ -193,7 +193,8 @@
lastImportCarData:{},
//最新出场信息
lastExportCarData:{},
timer:""
timer:"",
aaa:require("@/assets/img/biguser.png")
}
},
created(){
......
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