获取海康的人脸设备
This commit is contained in:
parent
1edb9bd8bb
commit
d5ace7fec6
@ -1,9 +1,13 @@
|
|||||||
package com.zhgd.xmgl.modules.worker.controller;
|
package com.zhgd.xmgl.modules.worker.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
|
import com.zhgd.xmgl.modules.project.entity.vo.ProjectInfoExtVo;
|
||||||
|
import com.zhgd.xmgl.modules.project.service.impl.ProjectServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.UfaceDev;
|
import com.zhgd.xmgl.modules.worker.entity.UfaceDev;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IUfaceDevService;
|
import com.zhgd.xmgl.modules.worker.service.IUfaceDevService;
|
||||||
|
import com.zhgd.xmgl.util.HikvisionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@ -11,6 +15,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -23,26 +28,30 @@ import java.util.Map;
|
|||||||
* @Description: 人脸设备
|
* @Description: 人脸设备
|
||||||
* @author: pds
|
* @author: pds
|
||||||
* @date: 2020-09-23
|
* @date: 2020-09-23
|
||||||
* @version: V1.0
|
* @version: V1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/xmgl/ufaceDev")
|
@RequestMapping("/xmgl/ufaceDev")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "人脸设备")
|
@Api(tags = "人脸设备")
|
||||||
public class UfaceDevController {
|
public class UfaceDevController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IUfaceDevService ufaceDevService;
|
private IUfaceDevService ufaceDevService;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
ProjectServiceImpl projectService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
* @return
|
*
|
||||||
*/
|
* @return
|
||||||
@ApiOperation(value = "列表查询人脸设备信息", notes = "列表查询人脸设备信息", httpMethod = "POST")
|
*/
|
||||||
@ApiImplicitParams({
|
@ApiOperation(value = "列表查询人脸设备信息", notes = "列表查询人脸设备信息", httpMethod = "POST")
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "ufaceDevGroupId", value = "门禁设备-分组id", paramType = "body", required = false, dataType = "String"),
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||||
})
|
@ApiImplicitParam(name = "ufaceDevGroupId", value = "门禁设备-分组id", paramType = "body", required = false, dataType = "String"),
|
||||||
|
})
|
||||||
@PostMapping(value = "/list")
|
@PostMapping(value = "/list")
|
||||||
public Result<List<UfaceDev>> getUfaceDevList(@RequestBody Map<String, Object> map) {
|
public Result<List<UfaceDev>> getUfaceDevList(@RequestBody Map<String, Object> map) {
|
||||||
return Result.success(ufaceDevService.getUfaceDevList(map));
|
return Result.success(ufaceDevService.getUfaceDevList(map));
|
||||||
@ -51,119 +60,23 @@ public class UfaceDevController {
|
|||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
* @param ufaceDev
|
* @param ufaceDev
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "劳务管理", operType = "添加人脸设备", operDesc = "添加人脸设备")
|
@OperLog(operModul = "劳务管理", operType = "添加人脸设备", operDesc = "添加人脸设备")
|
||||||
@ApiOperation(value = "添加人脸设备信息", notes = "添加人脸设备信息", httpMethod = "POST")
|
@ApiOperation(value = "添加人脸设备信息", notes = "添加人脸设备信息", httpMethod = "POST")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<UfaceDev> add(@RequestBody UfaceDev ufaceDev) {
|
public Result<UfaceDev> add(@RequestBody UfaceDev ufaceDev) {
|
||||||
ufaceDevService.saveUfaceDev(ufaceDev);
|
ufaceDevService.saveUfaceDev(ufaceDev);
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑
|
|
||||||
* @param ufaceDev
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@OperLog(operModul = "劳务管理",operType = "编辑人脸设备",operDesc = "编辑人脸设备")
|
|
||||||
@ApiOperation(value = "编辑人脸设备信息", notes = "编辑人脸设备信息" , httpMethod="POST")
|
|
||||||
@PostMapping(value = "/edit")
|
|
||||||
public Result<UfaceDev> edit(@RequestBody UfaceDev ufaceDev) {
|
|
||||||
ufaceDevService.editUfaceDev(ufaceDev);
|
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@ApiOperation(value = "获取海康的人脸设备列表", notes = "获取海康的人脸设备列表", httpMethod = "POST")
|
||||||
* 通过id删除
|
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@OperLog(operModul = "劳务管理",operType = "删除人脸设备",operDesc = "删除人脸设备")
|
|
||||||
@ApiOperation(value = "删除人脸设备信息", notes = "删除人脸设备信息", httpMethod = "POST")
|
|
||||||
@ApiImplicitParam(name = "id", value = "人脸设备ID", paramType = "body", required = true, dataType = "Integer")
|
|
||||||
@PostMapping(value = "/delete")
|
|
||||||
public Result<UfaceDev> delete(@RequestBody Map<String,Object> map) {
|
|
||||||
ufaceDevService.deleteUfaceDev(MapUtils.getString(map,"id"));
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "设备心跳", notes = "设备心跳", httpMethod = "POST")
|
|
||||||
@ApiImplicitParam(name = "deviceSerial", value = "人脸设备ID", paramType = "body", required = true, dataType = "Integer")
|
|
||||||
@PostMapping(value = "/devHeartBeat")
|
|
||||||
public String devHeartBeat(@RequestBody Map<String,Object> map) {
|
|
||||||
ufaceDevService.devHeartBeat(map);
|
|
||||||
String result = "{\"result\":1,\"success\":true}";
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "人脸设备进出场信息统计", notes = "人脸设备进出场信息统计", httpMethod="POST")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
|
||||||
})
|
|
||||||
@PostMapping(value = "/selectUfaceDevStatisticsList")
|
|
||||||
public Result< Map<String, Object>> selectUfaceDevStatisticsList(@RequestBody Map<String, Object> map) {
|
|
||||||
return Result.success(ufaceDevService.selectUfaceDevStatisticsList(map));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "批量向人脸设备下发人员", notes = "批量向人脸设备下发人员", httpMethod="POST")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "enterpriseId", value = "所属企业", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "personType", value = "人员类型 1、劳务人员 2、管理人员", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "userId", value = "通知的人员ID", paramType = "body", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "workerIds", value = "下发的劳务人员IDs(多个逗号分割)", paramType = "body", required = false, dataType = "String"),
|
|
||||||
})
|
|
||||||
@PostMapping(value = "/sendBatchWokerDev")
|
|
||||||
public Result< Map<String, Object>> sendBatchWokerDev(@RequestBody Map<String, Object> map) {
|
|
||||||
ufaceDevService.sendBatchWokerDev(map);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* YF识别记录重传
|
|
||||||
* @param
|
|
||||||
* @return @
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "宇泛识别记录重传", notes = "宇泛识别记录重传", httpMethod="GET")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "startTime", value = "开始时间 格式2022-01-15", paramType = "query", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "endTime", value = "结束时间 格式2022-01-15", paramType = "query", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "personGuid", value = "宇泛人员ID", paramType = "query", required = true, dataType = "String"),
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/retryYFAttendance")
|
|
||||||
public Result retryAttendance(String projectSn,String startTime,String endTime,String personGuid) {
|
|
||||||
ufaceDevService.retryAttendance(projectSn,startTime,endTime,personGuid);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* YF识别记录重传
|
|
||||||
* @param
|
|
||||||
* @return @
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "新佳信捷设备识别记录重传", notes = "新佳信捷设备识别记录重传", httpMethod="GET")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "startTime", value = "开始时间 格式2022-01-15 00:00:00", paramType = "query", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "endTime", value = "结束时间 格式2022-01-15 23:59:59", paramType = "query", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "idcard", value = "身份证号", paramType = "query", required = false, dataType = "String"),
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/retryNewJxJAttendance")
|
|
||||||
public Result retryNewJxjAttendance(String projectSn, String startTime, String endTime, String idcard) {
|
|
||||||
ufaceDevService.retryNewJxjAttendance(projectSn, startTime, endTime, idcard);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计设备在线离线的数量
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/count/onoffline")
|
|
||||||
@ApiOperation(value = "统计设备在线离线的数量", notes = "统计设备在线离线的数量", httpMethod="GET")
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
||||||
public Result<HashMap<String, Object>> countUfaceDevOnOffline(@RequestParam String projectSn) {
|
@PostMapping(value = "/getDevByHk")
|
||||||
return ufaceDevService.countUfaceDevOnOffline(projectSn);
|
public Result getDevByHk(@RequestBody Map<String, Object> param) throws Exception {
|
||||||
}
|
String projectSn = MapUtils.getString(param, "projectSn");
|
||||||
}
|
ProjectInfoExtVo project = projectService.getProjectInfoBySn(projectSn);
|
||||||
|
JSONObject gdvJo = HikvisionUtil.getDoorsV2(project, HikvisionUtil.addPageParamIfAbsent(new JSONObject()));
|
||||||
|
return Result.success(gdvJo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user