Commit a2065d21 authored by gaoyingwei's avatar gaoyingwei

修改访客通行发送内容

parent 9aa0ab67
......@@ -1199,10 +1199,10 @@ public class JieLinkServiceImpl implements IJieLinkService {
String mes = "";
if (deviceInfo.getDeviceName().contains("公司")){
messageInstance.setTitle("访客到达通知");
mes = "已到达";
mes = deviceInfo.getRemark();
} else {
messageInstance.setTitle("访客进入通知");
mes = "已进入行政办公楼";
mes = deviceInfo.getRemark();
}
if ("1".equals(deviceInfo.getDeviceType())) {
for (Integer id : visitId) {
......
......@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -374,11 +375,12 @@ public class ZKTecoServiceImpl implements IZKTecoService {
ResponseEntity<JSONObject> responseEntity = restTemplate.getForEntity(uriAddr.toString(), JSONObject.class);
try {
if (HttpStatus.OK.value() == responseEntity.getStatusCode().value()) {
log.debug("门禁事件记录接口返回信息:" + responseEntity.getBody().toJSONString());
ZKTResultDto<ZKTDoorRecordDto> resultData = JSONObject.toJavaObject(responseEntity.getBody(), ZKTResultDto.class);
log.error("门禁事件记录接口返回信息:" + responseEntity.getBody().toJSONString());
ZKTResultDto<String> resultData = JSONObject.toJavaObject(responseEntity.getBody(), ZKTResultDto.class);
if (StringUtils.equals(resultData.getCode(), "0")) {
data = resultData.getData();
list.addAll(resultData.getData());
String s = JSON.toJSONString(resultData.getData());
data = JSON.parseArray(s, ZKTDoorRecordDto.class);// 指定转换的类型
list.addAll(data);
pageNo += 1;
} else {
log.error("门禁事件记录接口返回错误信息:" + resultData.getMessage());
......
......@@ -30,45 +30,45 @@
<result column="dept_name" jdbcType="VARCHAR" property="deptName"/>
</resultMap>
<insert id="saveRecordData" parameterType="org.rcisoft.sys.sysuser.entity.DoorRecord" useGeneratedKeys="false">
insert into door_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id ,</if>
<if test="userId != null">user_id ,</if>
<if test="personId != null">person_id ,</if>
<if test="mobile != null">mobile ,</if>
<if test="tenementType != null">tenement_type ,</if>
<if test="remark != null">remark ,</if>
<if test="deviceId != null">device_id ,</if>
<if test="deviceName != null">device_name ,</if>
<if test="deviceType != null">device_type ,</if>
<if test="cardType != null">card_type ,</if>
<if test="cardNo != null">card_no ,</if>
<if test="crossTime != null">cross_time ,</if>
<if test="recordType != null">record_type ,</if>
<if test="eventType != null">event_type ,</if>
<if test="flag != null">flag ,</if>
<if test="delFlag != null">del_flag ,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId} ,</if>
<if test="userId != null">#{userId} ,</if>
<if test="personId != null">#{personId} ,</if>
<if test="mobile != null">#{mobile} ,</if>
<if test="tenementType != null">#{tenementType} ,</if>
<if test="remark != null">#{remark} ,</if>
<if test="deviceId != null">#{deviceId} ,</if>
<if test="deviceName != null">#{deviceName} ,</if>
<if test="deviceType != null">#{deviceType} ,</if>
<if test="cardType != null">#{cardType} ,</if>
<if test="cardNo != null">#{cardNo} ,</if>
<if test="crossTime != null">#{crossTime} ,</if>
<if test="recordType != null">#{recordType} ,</if>
<if test="eventType != null">#{eventType} ,</if>
<if test="flag != null">#{flag} ,</if>
<if test="delFlag != null">#{delFlag} ,</if>
</trim>
</insert>
<!-- <insert id="saveRecordData" parameterType="org.rcisoft.sys.sysuser.entity.DoorRecord" useGeneratedKeys="false">-->
<!-- insert into door_record-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="recordId != null">record_id ,</if>-->
<!-- <if test="userId != null">user_id ,</if>-->
<!-- <if test="personId != null">person_id ,</if>-->
<!-- <if test="mobile != null">mobile ,</if>-->
<!-- <if test="tenementType != null">tenement_type ,</if>-->
<!-- <if test="remark != null">remark ,</if>-->
<!-- <if test="deviceId != null">device_id ,</if>-->
<!-- <if test="deviceName != null">device_name ,</if>-->
<!-- <if test="deviceType != null">device_type ,</if>-->
<!-- <if test="cardType != null">card_type ,</if>-->
<!-- <if test="cardNo != null">card_no ,</if>-->
<!-- <if test="crossTime != null">cross_time ,</if>-->
<!-- <if test="recordType != null">record_type ,</if>-->
<!-- <if test="eventType != null">event_type ,</if>-->
<!-- <if test="flag != null">flag ,</if>-->
<!-- <if test="delFlag != null">del_flag ,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="recordId != null">#{recordId} ,</if>-->
<!-- <if test="userId != null">#{userId} ,</if>-->
<!-- <if test="personId != null">#{personId} ,</if>-->
<!-- <if test="mobile != null">#{mobile} ,</if>-->
<!-- <if test="tenementType != null">#{tenementType} ,</if>-->
<!-- <if test="remark != null">#{remark} ,</if>-->
<!-- <if test="deviceId != null">#{deviceId} ,</if>-->
<!-- <if test="deviceName != null">#{deviceName} ,</if>-->
<!-- <if test="deviceType != null">#{deviceType} ,</if>-->
<!-- <if test="cardType != null">#{cardType} ,</if>-->
<!-- <if test="cardNo != null">#{cardNo} ,</if>-->
<!-- <if test="crossTime != null">#{crossTime} ,</if>-->
<!-- <if test="recordType != null">#{recordType} ,</if>-->
<!-- <if test="eventType != null">#{eventType} ,</if>-->
<!-- <if test="flag != null">#{flag} ,</if>-->
<!-- <if test="delFlag != null">#{delFlag} ,</if>-->
<!-- </trim>-->
<!-- </insert>-->
<insert id="saveRecordData" parameterType="org.rcisoft.sys.sysuser.entity.DoorRecord" useGeneratedKeys="false">
insert into door_record
......@@ -76,6 +76,8 @@
<if test="recordId != null">record_id ,</if>
<if test="userId != null">user_id ,</if>
<if test="personId != null">person_id ,</if>
<if test="source != null">`source` ,</if>
<if test="pin != null">pin ,</if>
<if test="mobile != null">mobile ,</if>
<if test="tenementType != null">tenement_type ,</if>
<if test="remark != null">remark ,</if>
......@@ -96,6 +98,8 @@
<if test="recordId != null">#{recordId} ,</if>
<if test="userId != null">#{userId} ,</if>
<if test="personId != null">#{personId} ,</if>
<if test="source != null">#{source} ,</if>
<if test="pin != null">#{pin},</if>
<if test="mobile != null">#{mobile} ,</if>
<if test="tenementType != null">#{tenementType} ,</if>
<if test="remark != null">#{remark} ,</if>
......
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