开门接口
This commit is contained in:
parent
ca1ca75079
commit
2f2203d7ee
|
@ -159,6 +159,11 @@ public class HttpApiController {
|
|||
}
|
||||
}
|
||||
|
||||
// 处理 open 标志位
|
||||
String openKey = "DeviceOpen-" + sn;
|
||||
Object openValue = redisUtils.get(openKey);
|
||||
Integer open = (openValue != null) ? Integer.valueOf(openValue.toString()) : 0;
|
||||
|
||||
//保存人脸个数
|
||||
// deviceEntity.setFaceCount(faceCount);
|
||||
// deviceEntity.setLastUpdateTime(new Date());
|
||||
|
@ -253,6 +258,8 @@ public class HttpApiController {
|
|||
}else{
|
||||
configMap.put("displayFaceFlag",1);
|
||||
}
|
||||
// 返回 open 标志位
|
||||
configMap.put("open", open);
|
||||
return R.ok().put("data",configMap);
|
||||
}
|
||||
|
||||
|
@ -460,6 +467,7 @@ public class HttpApiController {
|
|||
puser.setLabelName(p.getLabelName());
|
||||
puser.setIsProtectDevice(p.getIsProtectDevice());
|
||||
puser.setIsEnterSulfurArea(p.getIsEnterSulfurArea());
|
||||
puser.setIsCheckCert(p.getIsCheckCert());
|
||||
puser.setIsWatchSafeVideo(p.getIsWatchSafeVideo());
|
||||
|
||||
List<TenPersonCert> tenPersonCertList = certService.list(new LambdaQueryWrapper<TenPersonCert>()
|
||||
|
@ -1885,8 +1893,6 @@ public class HttpApiController {
|
|||
return R.error("陌生人,禁止通行");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/updatePersonByIdCard")
|
||||
@ApiOperation("设备修改人员")
|
||||
@ApiImplicitParams({
|
||||
|
|
|
@ -169,7 +169,7 @@ public class TenDeviceController extends AbstractController {
|
|||
@ApiImplicitParam(name="deviceSn",value = "设备Sn",paramType = "query",dataType = "String",required = true),
|
||||
})
|
||||
public R cleanPerson(@RequestBody Map<String, Object> deviceSn){
|
||||
String sn = (String)deviceSn.get("deviceSn");
|
||||
/* String sn = (String)deviceSn.get("deviceSn");
|
||||
// CmdProcess.publishCleanPerson(sn);
|
||||
//清除数据
|
||||
int r = serverApiService.cleanData(sn);
|
||||
|
@ -183,20 +183,16 @@ public class TenDeviceController extends AbstractController {
|
|||
//升级app
|
||||
// TenAppVerison v = new TenAppVerison();
|
||||
// int a = serverApiService.appUpdate(sn,v);
|
||||
|
||||
|
||||
if(r == -1){
|
||||
return R.error("设备离线");
|
||||
}
|
||||
|
||||
//重新配置同步表
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return R.ok();
|
||||
//重新配置同步表*/
|
||||
String sn = (String) deviceSn.get("deviceSn");
|
||||
// 设置 open 标志位的值为 1
|
||||
String openKey = "DeviceOpen-" + sn;
|
||||
redisUtils.set(openKey, "1", 30L);
|
||||
return R.ok("开门成功");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,6 +57,7 @@ public class TenUserVo {
|
|||
private Integer isProtectDevice;
|
||||
private Integer isWatchSafeVideo;
|
||||
private Integer isBlacklistPersonnel;
|
||||
private Integer IsCheckCert;
|
||||
private List<TenPersonCert> tenPersonCertList;
|
||||
private List<TenPersonTrain> tenPersonTrainList;
|
||||
|
||||
|
|
Loading…
Reference in New Issue