mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
feat: add service config templates and extraction script
Former-commit-id: 1de24b7eb79676d1aba9d799a58c5a753290cf52
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-from-lib-reactor</artifactId>
|
||||
<version>2.9.1_210630-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>ninca-crk-access-control-web</artifactId>
|
||||
<name>ninca-crk-access-control-web</name>
|
||||
<description>CFR from ninca-crk-access-control-web-2.9.1_210630-SNAPSHOT.jar (embedded pom: none)</description>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-access-control-service</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-access-control-interface</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.intelligent</groupId>
|
||||
<artifactId>intelligent-cwoscomponent-interface</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.cloud</groupId>
|
||||
<artifactId>cloudwalk-common-result</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.intelligent</groupId>
|
||||
<artifactId>davinci-manager-storage</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.web.bind.annotation.ExceptionHandler
|
||||
* org.springframework.web.bind.annotation.ResponseBody
|
||||
* org.springframework.web.bind.annotation.RestControllerAdvice
|
||||
* org.springframework.web.servlet.NoHandlerFoundException
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol;
|
||||
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.NoHandlerFoundException;
|
||||
|
||||
@RestControllerAdvice(basePackages={"cn.cloudwalk.web.ninca.accesscontrol"})
|
||||
public class AcsGlobalExceptionHandler {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@ExceptionHandler(value={Exception.class})
|
||||
@ResponseBody
|
||||
public CloudwalkResult<Void> exceptionHandler(HttpServletRequest req, Exception e) {
|
||||
this.logger.error("\u670d\u52a1\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
if (e instanceof NoHandlerFoundException) {
|
||||
return CloudwalkResult.fail((String)"76250001", (String)"\u670d\u52a1\u4e0d\u5b58\u5728");
|
||||
}
|
||||
return CloudwalkResult.fail((String)"76250000", (String)"\u670d\u52a1\u5185\u90e8\u9519\u8bef");
|
||||
}
|
||||
}
|
||||
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.acsswitch.param.AcsOperateRecordPageParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.acsswitch.param.AcsSwitchParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.acsswitch.result.AcsOperateRecordExcelResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.acsswitch.service.AcsSwitchService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.record.AcsOperateRecordResultDTO
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsOperateRecordExportAsyncService
|
||||
* javax.annotation.Resource
|
||||
* javax.validation.Valid
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.validation.BindingResult
|
||||
* org.springframework.validation.ObjectError
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.acsswitch.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.acsswitch.param.AcsOperateRecordPageParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.acsswitch.param.AcsSwitchParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.acsswitch.result.AcsOperateRecordExcelResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.acsswitch.service.AcsSwitchService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.record.AcsOperateRecordResultDTO;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsOperateRecordExportAsyncService;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.acsswitch.form.AcsOperateRecordPageFrom;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.acsswitch.form.AcsSwitchAlwaysForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.acsswitch.form.AcsSwitchForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/switch"})
|
||||
public class AcsSwitchController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsSwitchService acsSwitchService;
|
||||
@Resource
|
||||
private AcsOperateRecordExportAsyncService acsOperateRecordExportAsyncService;
|
||||
|
||||
@RequestMapping(value={"/on"})
|
||||
public CloudwalkResult<Boolean> on(@RequestBody AcsSwitchForm form) {
|
||||
AcsSwitchParam param = (AcsSwitchParam)BeanCopyUtils.copyProperties((Object)form, AcsSwitchParam.class);
|
||||
try {
|
||||
return this.acsSwitchService.on(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u4e0b\u53d1\u5f00\u95e8\u64cd\u4f5c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260200", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/off"})
|
||||
public CloudwalkResult<Boolean> off(@RequestBody AcsSwitchForm form) {
|
||||
AcsSwitchParam param = (AcsSwitchParam)BeanCopyUtils.copyProperties((Object)form, AcsSwitchParam.class);
|
||||
try {
|
||||
return this.acsSwitchService.off(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u4e0b\u53d1\u5173\u95e8\u95e8\u64cd\u4f5c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260201", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/always-on"})
|
||||
public CloudwalkResult<Boolean> alwaysOn(@RequestBody AcsSwitchAlwaysForm form) {
|
||||
AcsSwitchParam param = (AcsSwitchParam)BeanCopyUtils.copyProperties((Object)form, AcsSwitchParam.class);
|
||||
try {
|
||||
return this.acsSwitchService.alwaysOn(this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u4e0b\u53d1\u5e38\u5f00\u64cd\u4f5c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260202", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/recovery"})
|
||||
public CloudwalkResult<Boolean> recovery(@RequestBody AcsSwitchAlwaysForm form) {
|
||||
try {
|
||||
return this.acsSwitchService.recovery(this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u4e0b\u53d1\u6062\u590d\u64cd\u4f5c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260203", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/group/always-on"})
|
||||
public CloudwalkResult<Boolean> groupOpen(@RequestBody AcsSwitchForm form) {
|
||||
AcsSwitchParam param = (AcsSwitchParam)BeanCopyUtils.copyProperties((Object)form, AcsSwitchParam.class);
|
||||
try {
|
||||
return this.acsSwitchService.groupOn(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u4e0b\u53d1\u5f00\u95e8\u64cd\u4f5c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260202", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/group/recovery"})
|
||||
public CloudwalkResult<Boolean> groupRecovery(@RequestBody AcsSwitchForm form) {
|
||||
AcsSwitchParam param = (AcsSwitchParam)BeanCopyUtils.copyProperties((Object)form, AcsSwitchParam.class);
|
||||
try {
|
||||
return this.acsSwitchService.groupRecovery(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u4e0b\u53d1\u6062\u590d\u64cd\u4f5c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260203", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/record/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsOperateRecordResultDTO>> pageRecord(@RequestBody AcsOperateRecordPageFrom form) {
|
||||
AcsOperateRecordPageParam param = (AcsOperateRecordPageParam)BeanCopyUtils.copyProperties((Object)form, AcsOperateRecordPageParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.acsSwitchService.pageRecord(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7acb\u5373\u5f00\u95e8\u8bb0\u5f55\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260305", (String)this.getMessage("76260305"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/record/export"})
|
||||
public CloudwalkResult<Boolean> recordExport(@RequestBody @Valid AcsOperateRecordPageFrom form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsOperateRecordPageParam param = (AcsOperateRecordPageParam)BeanCopyUtils.copyProperties((Object)form, AcsOperateRecordPageParam.class);
|
||||
return this.acsOperateRecordExportAsyncService.startExportTask((Object)param, AcsOperateRecordExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u7acb\u5373\u5f00\u95e8\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)"76260307");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.acsswitch.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsOperateRecordPageFrom
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3755204177673375034L;
|
||||
private String deviceName;
|
||||
private String deviceCode;
|
||||
private String operateName;
|
||||
private Integer status;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getOperateName() {
|
||||
return this.operateName;
|
||||
}
|
||||
|
||||
public void setOperateName(String operateName) {
|
||||
this.operateName = operateName;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.acsswitch.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsSwitchAlwaysForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -2434614193337960171L;
|
||||
private String groupId;
|
||||
private Integer switchOn;
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Integer getSwitchOn() {
|
||||
return this.switchOn;
|
||||
}
|
||||
|
||||
public void setSwitchOn(Integer switchOn) {
|
||||
this.switchOn = switchOn;
|
||||
}
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.acsswitch.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsSwitchForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -2434614193337960171L;
|
||||
private String deviceId;
|
||||
private String groupId;
|
||||
private Integer switchOn;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Integer getSwitchOn() {
|
||||
return this.switchOn;
|
||||
}
|
||||
|
||||
public void setSwitchOn(Integer switchOn) {
|
||||
this.switchOn = switchOn;
|
||||
}
|
||||
}
|
||||
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.annotation.DavinciPic
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.CollectionUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils
|
||||
* javax.annotation.Resource
|
||||
* org.aspectj.lang.JoinPoint
|
||||
* org.aspectj.lang.annotation.AfterReturning
|
||||
* org.aspectj.lang.annotation.Aspect
|
||||
* org.aspectj.lang.annotation.Pointcut
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.aspect;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.annotation.DavinciPic;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.CollectionUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.annotation.Resource;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Aspect
|
||||
@Component
|
||||
public class AcsControllerAspect {
|
||||
private Logger logger = LoggerFactory.getLogger(AcsControllerAspect.class);
|
||||
@Resource
|
||||
private AccessControlProperties accessControlProperties;
|
||||
|
||||
@Pointcut(value="execution(public * cn.cloudwalk.web.ninca.accesscontrol..*.controller..*(..))")
|
||||
public void controllerPointcut() {
|
||||
}
|
||||
|
||||
@AfterReturning(returning="ret", value="controllerPointcut()")
|
||||
public void doAfter(JoinPoint joinPoint, Object ret) {
|
||||
if (ret instanceof CloudwalkResult) {
|
||||
CloudwalkResult cloudwalkResult = (CloudwalkResult)ret;
|
||||
Object o = cloudwalkResult.getData();
|
||||
if (o == null) {
|
||||
return;
|
||||
}
|
||||
if (o instanceof CloudwalkPageAble) {
|
||||
CloudwalkPageAble cloudwalkPageAble = (CloudwalkPageAble)o;
|
||||
List tList = (List)cloudwalkPageAble.getDatas();
|
||||
if (CollectionUtils.isNotEmpty((Collection)tList)) {
|
||||
for (Object obj : tList) {
|
||||
this.genFullPicUrl(obj);
|
||||
}
|
||||
}
|
||||
} else if (o instanceof ArrayList) {
|
||||
List tList = (List)o;
|
||||
if (CollectionUtils.isNotEmpty((Collection)tList)) {
|
||||
for (Object obj : tList) {
|
||||
this.genFullPicUrl(obj);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.genFullPicUrl(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void genFullPicUrl(Object o) {
|
||||
Field[] allFields;
|
||||
if (o == null) {
|
||||
return;
|
||||
}
|
||||
Class<?> clazz = o.getClass();
|
||||
for (Field field : allFields = clazz.getDeclaredFields()) {
|
||||
if (!field.isAnnotationPresent(DavinciPic.class)) continue;
|
||||
String getMethodName = "get" + StringUtils.toUpperCase((String)field.getName(), (int)1);
|
||||
String setMethodName = "set" + StringUtils.toUpperCase((String)field.getName(), (int)1);
|
||||
try {
|
||||
if (field.getType() == List.class) {
|
||||
ArrayList<String> urls = new ArrayList<String>();
|
||||
Method getMethod = clazz.getMethod(getMethodName, new Class[0]);
|
||||
List paths = (List)getMethod.invoke(o, new Object[0]);
|
||||
if (!CollectionUtils.isNotEmpty((Collection)paths)) continue;
|
||||
for (String path : paths) {
|
||||
urls.add(this.isFullPath(path) ? path : this.accessControlProperties.getCwosPicUrl() + path);
|
||||
}
|
||||
Method setMethod = clazz.getMethod(setMethodName, field.getType());
|
||||
setMethod.invoke(o, urls);
|
||||
continue;
|
||||
}
|
||||
Method getMethod = clazz.getMethod(getMethodName, new Class[0]);
|
||||
String path = (String)getMethod.invoke(o, new Object[0]);
|
||||
if (!StringUtils.isNotBlank((String)path)) continue;
|
||||
Method setMethod = clazz.getMethod(setMethodName, field.getType());
|
||||
setMethod.invoke(o, this.isFullPath(path) ? path : this.accessControlProperties.getCwosPicUrl() + path);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("controller\u5207\u9762\u83b7\u53d6\u56fe\u7247\u5168\u8def\u5f84\u5f02\u5e38,\u539f\u56e0=[{}]", (Object)e.getMessage(), (Object)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFullPath(String path) {
|
||||
String pattern = "^http[s]{0,1}:\\/\\/([\\w.]+\\/?)\\S*";
|
||||
return Pattern.matches("^http[s]{0,1}:\\/\\/([\\w.]+\\/?)\\S*", path);
|
||||
}
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContextBuilder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.context.CloudWalkExtendContextValue
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.context.MessageSource
|
||||
* org.springframework.context.i18n.LocaleContextHolder
|
||||
* org.springframework.web.context.request.RequestContextHolder
|
||||
* org.springframework.web.context.request.ServletRequestAttributes
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.common;
|
||||
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContextBuilder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.context.CloudWalkExtendContextValue;
|
||||
import java.net.URLEncoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
public abstract class AbstractCloudwalkController {
|
||||
protected final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
|
||||
@Autowired
|
||||
private MessageSource messageSource;
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
|
||||
public CloudwalkCallContext getCloudwalkContext() {
|
||||
CloudwalkCallContext cloudwalkCallContext = CloudwalkCallContextBuilder.buildContext((CloudwalkSessionContextHolder)this.cloudwalkSessionContextHolder);
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||
if (null != attributes) {
|
||||
DefaultExtendContext extendContext = new DefaultExtendContext();
|
||||
CloudWalkExtendContextValue cloudWalkExtendContextValue = new CloudWalkExtendContextValue();
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
cloudWalkExtendContextValue.setLoginId(request.getHeader("loginid"));
|
||||
cloudWalkExtendContextValue.setAuthorization(request.getHeader("authorization"));
|
||||
extendContext.setValue((Object)cloudWalkExtendContextValue);
|
||||
cloudwalkCallContext.setExt((ExtendContext)extendContext);
|
||||
}
|
||||
return cloudwalkCallContext;
|
||||
}
|
||||
|
||||
protected HttpServletRequest getHttpServletRequest() {
|
||||
return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
}
|
||||
|
||||
public String getMessage(String code, String defaultMsg) {
|
||||
return this.messageSource.getMessage(code, null, defaultMsg, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
public String getMessage(String code) {
|
||||
return this.getMessage(code, "");
|
||||
}
|
||||
|
||||
protected void makeExcelresponse(HttpServletRequest request, HttpServletResponse response, String fileName) {
|
||||
response.setContentType("application/vnd.ms-excel;charset=utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + this.encodeFileName(fileName, request));
|
||||
}
|
||||
|
||||
protected String encodeFileName(String fileNames, HttpServletRequest request) {
|
||||
String codedFilename = null;
|
||||
try {
|
||||
codedFilename = URLEncoder.encode(fileNames, "UTF-8");
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u8f6c\u6362\u6587\u4ef6\u540d\u5b57\u7b26\u7c7b\u578b\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
}
|
||||
return codedFilename;
|
||||
}
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.annotation.ExcelAttribute
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.annotation.ExcelBytesAttribute
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.common.ExcelCallback
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.ExcelUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils
|
||||
* com.google.common.base.Stopwatch
|
||||
* javax.annotation.PreDestroy
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.common;
|
||||
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.annotation.ExcelAttribute;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.annotation.ExcelBytesAttribute;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.common.ExcelCallback;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.ExcelUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.BatchDownloadTask;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ForkJoinPool;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.PreDestroy;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class AccessExcelUtilExtend
|
||||
extends ExcelUtil {
|
||||
protected final Logger logger = LoggerFactory.getLogger(AccessExcelUtilExtend.class);
|
||||
private static ForkJoinPool forkJoinPool = new ForkJoinPool(8);
|
||||
|
||||
@PreDestroy
|
||||
public void destory() {
|
||||
forkJoinPool.shutdown();
|
||||
}
|
||||
|
||||
public <T> boolean exportFromList(List<T> list, String sheetName, OutputStream output, Class<T> clazz) throws Exception {
|
||||
this.resolveFilePath(list, clazz);
|
||||
return AccessExcelUtilExtend.getListToExcel(list, (String)sheetName, (OutputStream)output, clazz);
|
||||
}
|
||||
|
||||
public <T> boolean exportFromList(List<T> list, String sheetName, OutputStream output, Class<T> clazz, Integer startRow, ExcelCallback callback) throws Exception {
|
||||
this.resolveFilePath(list, clazz);
|
||||
return AccessExcelUtilExtend.getListToExcel(list, (String)sheetName, (OutputStream)output, clazz, (Integer)startRow, (ExcelCallback)callback);
|
||||
}
|
||||
|
||||
private <T> void resolveFilePath(List<T> list, Class<T> clazz) throws Exception {
|
||||
Field[] allFields = clazz.getDeclaredFields();
|
||||
HashMap<String, Field> fieldMap = new HashMap<String, Field>();
|
||||
for (Field field : allFields) {
|
||||
ExcelBytesAttribute bytesAttribute;
|
||||
String pathField;
|
||||
if (!field.isAnnotationPresent(ExcelAttribute.class) || !field.isAnnotationPresent(ExcelBytesAttribute.class) || !StringUtils.isNotBlank((String)(pathField = (bytesAttribute = field.getAnnotation(ExcelBytesAttribute.class)).pathField()))) continue;
|
||||
String getMethod = "get" + StringUtils.toUpperCase((String)pathField, (int)1);
|
||||
fieldMap.put(getMethod, field);
|
||||
}
|
||||
if (fieldMap.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Stopwatch stopwatch = Stopwatch.createStarted();
|
||||
BatchDownloadTask<T> batchDownloadTask = new BatchDownloadTask<T>(fieldMap, clazz, list);
|
||||
forkJoinPool.submit(batchDownloadTask).get();
|
||||
this.logger.info("\u4e0b\u8f7d\u56fe\u7247\u8017\u65f6:{},\u8bb0\u5f55\u6761\u6570:{}", (Object)stopwatch.elapsed(TimeUnit.SECONDS), (Object)list.size());
|
||||
}
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.SpringContextUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils
|
||||
* cn.cloudwalk.intelligent.davinci.common.exception.DavinciServiceException
|
||||
* cn.cloudwalk.intelligent.davinci.storage.manager.FileStorageManager
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.common;
|
||||
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.SpringContextUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils;
|
||||
import cn.cloudwalk.intelligent.davinci.common.exception.DavinciServiceException;
|
||||
import cn.cloudwalk.intelligent.davinci.storage.manager.FileStorageManager;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.RecursiveAction;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class BatchDownloadTask<T>
|
||||
extends RecursiveAction {
|
||||
private static final Logger logger = LoggerFactory.getLogger(BatchDownloadTask.class);
|
||||
private static final Integer SIZE = 50;
|
||||
private Map<String, Field> fileField;
|
||||
private Class cls;
|
||||
private List<T> list;
|
||||
|
||||
public BatchDownloadTask(Map<String, Field> fileField, Class cls, List<T> list) {
|
||||
this.fileField = fileField;
|
||||
this.cls = cls;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void compute() {
|
||||
if (this.list.size() <= SIZE) {
|
||||
for (T entry : this.list) {
|
||||
try {
|
||||
this.computeSingle(entry, this.fileField, this.cls);
|
||||
}
|
||||
catch (ServiceException | DavinciServiceException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||
logger.error("\u5e76\u884c\u5904\u7406\u6587\u4ef6\u4e0b\u8f7d\u51fa\u73b0\u5f02\u5e38", e);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
int middle = this.list.size() / 2;
|
||||
BatchDownloadTask<T> taskLeft = new BatchDownloadTask<T>(this.fileField, this.cls, this.list.subList(0, middle));
|
||||
BatchDownloadTask<T> taskRight = new BatchDownloadTask<T>(this.fileField, this.cls, this.list.subList(middle, this.list.size()));
|
||||
BatchDownloadTask.invokeAll(taskLeft, taskRight);
|
||||
}
|
||||
|
||||
private void computeSingle(T obj, Map<String, Field> fileField, Class cls) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ServiceException, DavinciServiceException {
|
||||
for (Map.Entry<String, Field> fieldEntry : fileField.entrySet()) {
|
||||
Method getMethod = cls.getMethod(fieldEntry.getKey(), new Class[0]);
|
||||
Object filePathObj = getMethod.invoke(obj, new Object[0]);
|
||||
String filePath = null;
|
||||
if (filePathObj == null || !StringUtils.isNotBlank((String)(filePath = (String)filePathObj))) continue;
|
||||
FileStorageManager fileStorageManager = (FileStorageManager)SpringContextUtils.getApplicationContext().getBean(FileStorageManager.class);
|
||||
byte[] bytes = fileStorageManager.fileDownload(filePath);
|
||||
String setMethodName = "set" + StringUtils.toUpperCase((String)fieldEntry.getValue().getName(), (int)1);
|
||||
Method setMethod = cls.getMethod(setMethodName, fieldEntry.getValue().getType());
|
||||
setMethod.invoke(obj, new Object[]{bytes});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsCheckDeviceAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsCheckDeviceQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsCheckDeviceService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsCheckDeviceAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsCheckDeviceQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsCheckDeviceService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsCheckDeviceQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsCheckDeviceSaveForm;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/check/device"})
|
||||
public class AcsCheckDeviceController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsCheckDeviceService acsCheckDeviceService;
|
||||
|
||||
@PostMapping(value={"/added"})
|
||||
public CloudwalkResult listAdded(@RequestBody AcsCheckDeviceQueryForm form) {
|
||||
try {
|
||||
AcsCheckDeviceQueryParam param = new AcsCheckDeviceQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsCheckDeviceService.listAdded(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u5df2\u6dfb\u52a0\u7684\u8003\u52e4\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260151", (String)this.getMessage("76260151"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/save"})
|
||||
public CloudwalkResult saveCheckDevices(@RequestBody AcsCheckDeviceSaveForm form) {
|
||||
try {
|
||||
AcsCheckDeviceAddParam param = new AcsCheckDeviceAddParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsCheckDeviceService.saveCheckDevices(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4fdd\u5b58\u8003\u52e4\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260151", (String)this.getMessage("76260151"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceCreateQrcodeParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceDeleteParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceEditParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceFeaturesQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceNewQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceQrcodeParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsdeviceDetailQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceAddResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceDetailResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceFeaturesResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceNewResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceTypeResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceTypeService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsDeviceRecordExcelResult
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.AcsExportTypeEnum
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsDeviceExportAsyncService
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsQrcodeExportAsyncService
|
||||
* com.alibaba.fastjson.JSONObject
|
||||
* javax.annotation.Resource
|
||||
* javax.validation.Valid
|
||||
* org.springframework.validation.BindingResult
|
||||
* org.springframework.validation.ObjectError
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceCreateQrcodeParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceDeleteParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceEditParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceFeaturesQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceNewQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceQrcodeParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsdeviceDetailQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceAddResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceDetailResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceFeaturesResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceNewResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceTypeResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceTypeService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsDeviceRecordExcelResult;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.AcsExportTypeEnum;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsDeviceExportAsyncService;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsQrcodeExportAsyncService;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceAddForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceCreateQrcodeForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceDeleteForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceEditForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceFeaturesQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceNewPageForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceQrcodeForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsdeviceDetailQueryForm;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/device"})
|
||||
public class AcsDeviceController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsDeviceTypeService acsDeviceTypeService;
|
||||
@Resource
|
||||
private AcsDeviceService acsDeviceService;
|
||||
@Resource
|
||||
private AcsQrcodeExportAsyncService acsQrcodeExportAsyncService;
|
||||
@Resource
|
||||
private AcsDeviceExportAsyncService acsDeviceExportAsyncService;
|
||||
|
||||
@PostMapping(value={"/type/list"})
|
||||
@Deprecated
|
||||
public CloudwalkResult<List<AcsDeviceTypeResult>> typeList() {
|
||||
try {
|
||||
return this.acsDeviceTypeService.list();
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u8bbe\u5907\u7c7b\u578b\u5217\u8868\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260105", (String)this.getMessage("76260105"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/features/query"})
|
||||
public CloudwalkResult<AcsDeviceFeaturesResult> featuresQuery(@RequestBody AcsDeviceFeaturesQueryForm form) {
|
||||
try {
|
||||
AcsDeviceFeaturesQueryParam param = new AcsDeviceFeaturesQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceTypeService.features(param);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u83b7\u53d6\u8bbe\u5907\u80fd\u529b\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260106", (String)this.getMessage("76260106"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/devicePage"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsDeviceNewResult>> devicePage(@RequestBody AcsDeviceNewPageForm form) {
|
||||
try {
|
||||
AcsDeviceNewQueryParam param = new AcsDeviceNewQueryParam();
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.devicePage(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u8bbe\u5907\u4fe1\u606f\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260108", (String)this.getMessage("76260108"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/export"})
|
||||
public CloudwalkResult<Boolean> deviceExport(@RequestBody @Valid AcsDeviceNewPageForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsDeviceNewQueryParam param = new AcsDeviceNewQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceExportAsyncService.startExportTask((Object)param, AcsDeviceRecordExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u95e8\u7981\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)"76260307");
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/typePage"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsDeviceNewResult>> typePage(@RequestBody AcsDeviceNewPageForm form) {
|
||||
try {
|
||||
if (this.LOGGER.isDebugEnabled()) {
|
||||
this.LOGGER.debug("typePage form {}", (Object)JSONObject.toJSONString((Object)form));
|
||||
}
|
||||
AcsDeviceNewQueryParam param = new AcsDeviceNewQueryParam();
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
if (this.LOGGER.isDebugEnabled()) {
|
||||
this.LOGGER.debug("typePage param {}", (Object)JSONObject.toJSONString((Object)param));
|
||||
}
|
||||
return this.acsDeviceService.typePage(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u8bbe\u5907\u4fe1\u606f\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260128", (String)this.getMessage("76260128"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/detail"})
|
||||
public CloudwalkResult<AcsDeviceDetailResult> detail(@RequestBody AcsdeviceDetailQueryForm form) {
|
||||
try {
|
||||
AcsdeviceDetailQueryParam param = new AcsdeviceDetailQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.detail(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u95e8\u7981\u8bbe\u5907\u8be6\u60c5\u5f02\u5e38\uff0c\u539f\u56e0", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260120", (String)this.getMessage("76260120"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/add"})
|
||||
public CloudwalkResult<AcsDeviceAddResult> add(@RequestBody AcsDeviceAddForm form) {
|
||||
try {
|
||||
AcsDeviceAddParam param = new AcsDeviceAddParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6dfb\u52a0\u95e8\u7981\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/edit"})
|
||||
CloudwalkResult<Boolean> edit(@RequestBody AcsDeviceEditForm form) {
|
||||
try {
|
||||
AcsDeviceEditParam param = new AcsDeviceEditParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7f16\u8f91\u95e8\u7981\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a[{}]", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/delete"})
|
||||
CloudwalkResult<Boolean> delete(@RequestBody AcsDeviceDeleteForm form) {
|
||||
try {
|
||||
AcsDeviceDeleteParam param = new AcsDeviceDeleteParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u79fb\u9664\u95e8\u7981\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260119", (String)this.getMessage("76260119"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/allTreeByVendor"})
|
||||
CloudwalkResult<List<DeviceTypeResult>> allTreeByVendor() {
|
||||
try {
|
||||
return this.acsDeviceService.allTreeByVendor();
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u5382\u5546\u8bbe\u5907\u7c7b\u578b\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260129", (String)this.getMessage("76260129"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/qrcode/export"})
|
||||
public CloudwalkResult<Boolean> qrcodeExport(@RequestBody AcsDeviceQrcodeForm form) {
|
||||
try {
|
||||
AcsDeviceQrcodeParam param = (AcsDeviceQrcodeParam)BeanCopyUtils.copyProperties((Object)form, AcsDeviceQrcodeParam.class);
|
||||
return this.acsQrcodeExportAsyncService.startExportTask((Object)param, null, null, AcsExportTypeEnum.QRCODE, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6279\u91cf\u5bfc\u51fa\u626b\u7801\u5f00\u95e8\u4e8c\u7ef4\u7801\u5f02\u5e38\uff0c\u539f\u56e0={}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)this.getMessage("76260307"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/qrcode/create"})
|
||||
public CloudwalkResult<String> qrcodeCreate(@RequestBody AcsDeviceCreateQrcodeForm form) {
|
||||
AcsDeviceCreateQrcodeParam param = (AcsDeviceCreateQrcodeParam)BeanCopyUtils.copyProperties((Object)form, AcsDeviceCreateQrcodeParam.class);
|
||||
try {
|
||||
return this.acsDeviceService.qrcodeCreate(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u751f\u6210\u626b\u7801\u5f00\u95e8\u4e8c\u7ef4\u7801\u5f02\u5e38\uff0c\u539f\u56e0={}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260144", (String)this.getMessage("76260144"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureBindingParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureBindingPersonParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureConditionParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureTaskParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.device.dto.AcsDeviceTaskDTO
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureBindingParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureBindingPersonParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureConditionParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDeviceRestructureTaskParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.device.dto.AcsDeviceTaskDTO;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceRestructureBindingForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceRestructureBindingPersonForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceRestructureConditionForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsDeviceRestructureTaskForm;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/device/restructure"})
|
||||
public class AcsDeviceRestructureController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsDeviceService acsDeviceService;
|
||||
|
||||
@PostMapping(value={"/condition"})
|
||||
public CloudwalkResult listCondition(@RequestBody AcsDeviceRestructureConditionForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureConditionParam param = new AcsDeviceRestructureConditionParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.listCondition(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6839\u636e\u6761\u4ef6\u67e5\u8be2\u95e8\u7981\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260151", (String)this.getMessage("76260151"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/binding"})
|
||||
public CloudwalkResult<String> devicesBinding(@RequestBody AcsDeviceRestructureBindingForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureBindingParam param = new AcsDeviceRestructureBindingParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.devicesBinding(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5173\u8054\u95e8\u7981\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260152", (String)this.getMessage("76260152"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/binding/person"})
|
||||
public CloudwalkResult<String> devicesBindingPerson(@RequestBody AcsDeviceRestructureBindingPersonForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureBindingPersonParam param = new AcsDeviceRestructureBindingPersonParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.devicesBindingPerson(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6839\u636e\u4eba\u5458\u5173\u8054\u95e8\u7981\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260153", (String)this.getMessage("76260153"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/task/progress"})
|
||||
public CloudwalkResult<AcsDeviceTaskDTO> getTask(@RequestBody AcsDeviceRestructureTaskForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureTaskParam param = new AcsDeviceRestructureTaskParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.getTask(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u83b7\u53d6\u4efb\u52a1\u8fdb\u7a0b\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260154", (String)this.getMessage("76260154"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/task/stop"})
|
||||
public CloudwalkResult<Boolean> setTaskStop(@RequestBody AcsDeviceRestructureTaskForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureTaskParam param = new AcsDeviceRestructureTaskParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsDeviceService.setTaskStop(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7ec8\u6b62\u7ed1\u5b9a\u8fdb\u7a0b\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260155", (String)this.getMessage("76260155"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceUploadService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.param.ReportOrderTypeParam
|
||||
* cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.result.ReportOrderTypeResult
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceUploadService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.param.ReportOrderTypeParam;
|
||||
import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.result.ReportOrderTypeResult;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/device/V2"})
|
||||
public class AcsDeviceUploadController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsDeviceUploadService acsDeviceUploadService;
|
||||
|
||||
@RequestMapping(value={"/20047"})
|
||||
public CloudwalkResult<ReportOrderTypeResult> updateOpenStatus(ReportOrderTypeParam param) {
|
||||
try {
|
||||
return this.acsDeviceUploadService.updateOpenStatus(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.warn("device updateOpenStatus error\uff0ccause\uff1a{}", (Object)e.getMessage());
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)this.getMessage(e.getCode()));
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("device updateOpenStatus error\uff0ccause\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"52003005", (String)this.getMessage("52003005"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceDeleteParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceNewParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDevicePageParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsUrgentDeviceResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsUrgentDeviceService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceDeleteParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceNewParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDevicePageParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsUrgentDeviceResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsUrgentDeviceService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDeviceDeleteForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDeviceNewForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDevicePageForm;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/device/urgent"})
|
||||
public class AcsUrgentDeviceController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsUrgentDeviceService acsUrgentDeviceService;
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<Boolean> add(@RequestBody AcsUrgentDeviceNewForm form) {
|
||||
AcsUrgentDeviceNewParam param = new AcsUrgentDeviceNewParam();
|
||||
param = (AcsUrgentDeviceNewParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u6dfb\u52a0\u7d27\u6025\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260109", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsUrgentDeviceDeleteForm form) {
|
||||
AcsUrgentDeviceDeleteParam param = new AcsUrgentDeviceDeleteParam();
|
||||
param = (AcsUrgentDeviceDeleteParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5220\u9664\u7d27\u6025\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260110", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsUrgentDeviceResult>> page(@RequestBody AcsUrgentDevicePageForm form) {
|
||||
try {
|
||||
AcsUrgentDevicePageParam param = new AcsUrgentDevicePageParam();
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsUrgentDeviceService.page(param, page, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u7d27\u6025\u8bbe\u5907\u4fe1\u606f\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260111", (String)this.getMessage("76260111"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupDeleteParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupEditParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentGroupDeviceAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentGroupDeviceDelParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceNewResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsUrgentDeviceGroupResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsUrgentDeviceGroupService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsUrgentGroupDeviceService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupDeleteParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupEditParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentDeviceGroupQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentGroupDeviceAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsUrgentGroupDeviceDelParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDeviceNewResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsUrgentDeviceGroupResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsUrgentDeviceGroupService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsUrgentGroupDeviceService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDeviceGroupAddForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDeviceGroupDeleteForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDeviceGroupEditForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentDeviceGroupQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentGroupDeviceAddForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.device.form.AcsUrgentGroupDeviceDelForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/urgentGroup"})
|
||||
public class AcsUrgentDeviceGroupController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsUrgentDeviceGroupService acsUrgentDeviceGroupService;
|
||||
@Autowired
|
||||
private AcsUrgentGroupDeviceService acsUrgentGroupDeviceService;
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<Boolean> add(@RequestBody AcsUrgentDeviceGroupAddForm form) {
|
||||
AcsUrgentDeviceGroupAddParam param = new AcsUrgentDeviceGroupAddParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceGroupService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6dfb\u52a0\u7d27\u6025\u758f\u6563\u5206\u7ec4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260130", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody AcsUrgentDeviceGroupEditForm form) {
|
||||
AcsUrgentDeviceGroupEditParam param = new AcsUrgentDeviceGroupEditParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceGroupService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7f16\u8f91\u7d27\u6025\u758f\u6563\u5206\u7ec4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260132", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsUrgentDeviceGroupDeleteForm form) {
|
||||
AcsUrgentDeviceGroupDeleteParam param = new AcsUrgentDeviceGroupDeleteParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceGroupService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5220\u9664\u7d27\u6025\u758f\u6563\u5206\u7ec4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260135", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsUrgentDeviceGroupResult>> page(@RequestBody AcsUrgentDeviceGroupQueryForm form) {
|
||||
AcsUrgentDeviceGroupQueryParam param = new AcsUrgentDeviceGroupQueryParam();
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceGroupService.page(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u7d27\u6025\u758f\u6563\u5206\u7ec4\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260136", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/detail"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsDeviceNewResult>> detail(@RequestBody AcsUrgentDeviceGroupQueryForm form) {
|
||||
AcsUrgentDeviceGroupQueryParam param = new AcsUrgentDeviceGroupQueryParam();
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentDeviceGroupService.detail(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u7d27\u6025\u758f\u6563\u5206\u7ec4\u8bbe\u5907\u8be6\u60c5\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260139", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/query"})
|
||||
public CloudwalkResult<AcsUrgentDeviceGroupResult> query(@RequestBody AcsUrgentDeviceGroupQueryForm form) {
|
||||
try {
|
||||
AcsUrgentDeviceGroupQueryParam param = new AcsUrgentDeviceGroupQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsUrgentDeviceGroupService.query(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u7d27\u6025\u758f\u6563\u5206\u7ec4\u8be6\u60c5\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260138", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/addDevice"})
|
||||
public CloudwalkResult<Boolean> addDevice(@RequestBody AcsUrgentGroupDeviceAddForm form) {
|
||||
AcsUrgentGroupDeviceAddParam param = new AcsUrgentGroupDeviceAddParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentGroupDeviceService.batchAdd(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7d27\u6025\u758f\u6563\u5206\u7ec4\u589e\u52a0\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260133", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/deleteDevice"})
|
||||
public CloudwalkResult<Boolean> deleteDevice(@RequestBody AcsUrgentGroupDeviceDelForm form) {
|
||||
AcsUrgentGroupDeviceDelParam param = new AcsUrgentGroupDeviceDelParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentGroupDeviceService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7d27\u6025\u758f\u6563\u5206\u7ec4\u5220\u9664\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260134", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/deviceListByArea"})
|
||||
public CloudwalkResult<List<DeviceResult>> deviceListByArea(@RequestBody AcsUrgentDeviceGroupQueryForm form) {
|
||||
AcsUrgentDeviceGroupQueryParam param = new AcsUrgentDeviceGroupQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.acsUrgentGroupDeviceService.listByArea(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6309\u533a\u57df\u67e5\u8be2\u7d27\u6025\u758f\u6563\u8bbe\u5907\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260139", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/devicePage"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsDeviceNewResult>> devicePage(@RequestBody AcsUrgentDeviceGroupQueryForm form) {
|
||||
try {
|
||||
AcsUrgentDeviceGroupQueryParam param = new AcsUrgentDeviceGroupQueryParam();
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsUrgentGroupDeviceService.devicePage(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u5206\u7ec4\u672a\u6dfb\u52a0\u7684\u95e8\u7981\u8bbe\u5907\u4fe1\u606f\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260128", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AcsCheckDeviceQueryForm {
|
||||
private String deviceId;
|
||||
private String deviceName;
|
||||
private List<String> areaIds;
|
||||
private String areaId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return this.areaId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsCheckDeviceQueryForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsCheckDeviceQueryForm other = (AcsCheckDeviceQueryForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
String this$deviceId = this.getDeviceId();
|
||||
String other$deviceId = other.getDeviceId();
|
||||
if (this$deviceId == null ? other$deviceId != null : !this$deviceId.equals(other$deviceId)) {
|
||||
return false;
|
||||
}
|
||||
String this$deviceName = this.getDeviceName();
|
||||
String other$deviceName = other.getDeviceName();
|
||||
if (this$deviceName == null ? other$deviceName != null : !this$deviceName.equals(other$deviceName)) {
|
||||
return false;
|
||||
}
|
||||
List<String> this$areaIds = this.getAreaIds();
|
||||
List<String> other$areaIds = other.getAreaIds();
|
||||
if (this$areaIds == null ? other$areaIds != null : !((Object)this$areaIds).equals(other$areaIds)) {
|
||||
return false;
|
||||
}
|
||||
String this$areaId = this.getAreaId();
|
||||
String other$areaId = other.getAreaId();
|
||||
return !(this$areaId == null ? other$areaId != null : !this$areaId.equals(other$areaId));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsCheckDeviceQueryForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $deviceId = this.getDeviceId();
|
||||
result = result * 59 + ($deviceId == null ? 43 : $deviceId.hashCode());
|
||||
String $deviceName = this.getDeviceName();
|
||||
result = result * 59 + ($deviceName == null ? 43 : $deviceName.hashCode());
|
||||
List<String> $areaIds = this.getAreaIds();
|
||||
result = result * 59 + ($areaIds == null ? 43 : ((Object)$areaIds).hashCode());
|
||||
String $areaId = this.getAreaId();
|
||||
result = result * 59 + ($areaId == null ? 43 : $areaId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsCheckDeviceQueryForm(deviceId=" + this.getDeviceId() + ", deviceName=" + this.getDeviceName() + ", areaIds=" + this.getAreaIds() + ", areaId=" + this.getAreaId() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AcsCheckDeviceSaveForm {
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsCheckDeviceSaveForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsCheckDeviceSaveForm other = (AcsCheckDeviceSaveForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
List<String> this$deviceIds = this.getDeviceIds();
|
||||
List<String> other$deviceIds = other.getDeviceIds();
|
||||
return !(this$deviceIds == null ? other$deviceIds != null : !((Object)this$deviceIds).equals(other$deviceIds));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsCheckDeviceSaveForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
List<String> $deviceIds = this.getDeviceIds();
|
||||
result = result * 59 + ($deviceIds == null ? 43 : ((Object)$deviceIds).hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsCheckDeviceSaveForm(deviceIds=" + this.getDeviceIds() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -589181640469062646L;
|
||||
private String deviceId;
|
||||
private String subDeviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getSubDeviceId() {
|
||||
return this.subDeviceId;
|
||||
}
|
||||
|
||||
public void setSubDeviceId(String subDeviceId) {
|
||||
this.subDeviceId = subDeviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceCreateQrcodeForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 2635704379048373959L;
|
||||
private String deviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceDeleteForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 1743773114391330724L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 8536585774160988995L;
|
||||
private String deviceId;
|
||||
private String subDeviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getSubDeviceId() {
|
||||
return this.subDeviceId;
|
||||
}
|
||||
|
||||
public void setSubDeviceId(String subDeviceId) {
|
||||
this.subDeviceId = subDeviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceFeaturesQueryForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7349123760464380004L;
|
||||
private String deviceTypeCode;
|
||||
|
||||
public String getDeviceTypeCode() {
|
||||
return this.deviceTypeCode;
|
||||
}
|
||||
|
||||
public void setDeviceTypeCode(String deviceTypeCode) {
|
||||
this.deviceTypeCode = deviceTypeCode;
|
||||
}
|
||||
}
|
||||
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceNewPageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 5688215744877695100L;
|
||||
private String deviceCategoryId;
|
||||
private String deviceTypeCode;
|
||||
private List<String> deviceIds;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private Integer acsDeviceType;
|
||||
private Integer deviceQueryType;
|
||||
private String deviceName;
|
||||
private Integer onlineStatus;
|
||||
private Integer deviceOpenStatus;
|
||||
private String deviceCode;
|
||||
private String deviceIp;
|
||||
private Integer order;
|
||||
|
||||
public Integer getOrder() {
|
||||
return this.order;
|
||||
}
|
||||
|
||||
public void setOrder(Integer order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public String getDeviceIp() {
|
||||
return this.deviceIp;
|
||||
}
|
||||
|
||||
public void setDeviceIp(String deviceIp) {
|
||||
this.deviceIp = deviceIp;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public Integer getOnlineStatus() {
|
||||
return this.onlineStatus;
|
||||
}
|
||||
|
||||
public void setOnlineStatus(Integer onlineStatus) {
|
||||
this.onlineStatus = onlineStatus;
|
||||
}
|
||||
|
||||
public String getDeviceCategoryId() {
|
||||
return this.deviceCategoryId;
|
||||
}
|
||||
|
||||
public void setDeviceCategoryId(String deviceCategoryId) {
|
||||
this.deviceCategoryId = deviceCategoryId;
|
||||
}
|
||||
|
||||
public String getDeviceTypeCode() {
|
||||
return this.deviceTypeCode;
|
||||
}
|
||||
|
||||
public void setDeviceTypeCode(String deviceTypeCode) {
|
||||
this.deviceTypeCode = deviceTypeCode;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public Integer getAcsDeviceType() {
|
||||
return this.acsDeviceType;
|
||||
}
|
||||
|
||||
public void setAcsDeviceType(Integer acsDeviceType) {
|
||||
this.acsDeviceType = acsDeviceType;
|
||||
}
|
||||
|
||||
public Integer getDeviceQueryType() {
|
||||
return this.deviceQueryType;
|
||||
}
|
||||
|
||||
public void setDeviceQueryType(Integer deviceQueryType) {
|
||||
this.deviceQueryType = deviceQueryType;
|
||||
}
|
||||
|
||||
public Integer getDeviceOpenStatus() {
|
||||
return this.deviceOpenStatus;
|
||||
}
|
||||
|
||||
public void setDeviceOpenStatus(Integer deviceOpenStatus) {
|
||||
this.deviceOpenStatus = deviceOpenStatus;
|
||||
}
|
||||
}
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
public class AcsDevicePageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 6542805846023465767L;
|
||||
private String deviceTypeCode;
|
||||
private List<String> deviceIds;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
|
||||
public String getDeviceTypeCode() {
|
||||
return this.deviceTypeCode;
|
||||
}
|
||||
|
||||
public void setDeviceTypeCode(String deviceTypeCode) {
|
||||
this.deviceTypeCode = deviceTypeCode;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceQrcodeForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 1885250927112283700L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceRestructureBindingForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7349123760464380004L;
|
||||
private String orgId;
|
||||
private String orgName;
|
||||
private String labelId;
|
||||
private String labelName;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public String getOrgId() {
|
||||
return this.orgId;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return this.orgName;
|
||||
}
|
||||
|
||||
public String getLabelId() {
|
||||
return this.labelId;
|
||||
}
|
||||
|
||||
public String getLabelName() {
|
||||
return this.labelName;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public void setOrgName(String orgName) {
|
||||
this.orgName = orgName;
|
||||
}
|
||||
|
||||
public void setLabelId(String labelId) {
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public void setLabelName(String labelName) {
|
||||
this.labelName = labelName;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsDeviceRestructureBindingForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsDeviceRestructureBindingForm other = (AcsDeviceRestructureBindingForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
String this$orgId = this.getOrgId();
|
||||
String other$orgId = other.getOrgId();
|
||||
if (this$orgId == null ? other$orgId != null : !this$orgId.equals(other$orgId)) {
|
||||
return false;
|
||||
}
|
||||
String this$orgName = this.getOrgName();
|
||||
String other$orgName = other.getOrgName();
|
||||
if (this$orgName == null ? other$orgName != null : !this$orgName.equals(other$orgName)) {
|
||||
return false;
|
||||
}
|
||||
String this$labelId = this.getLabelId();
|
||||
String other$labelId = other.getLabelId();
|
||||
if (this$labelId == null ? other$labelId != null : !this$labelId.equals(other$labelId)) {
|
||||
return false;
|
||||
}
|
||||
String this$labelName = this.getLabelName();
|
||||
String other$labelName = other.getLabelName();
|
||||
if (this$labelName == null ? other$labelName != null : !this$labelName.equals(other$labelName)) {
|
||||
return false;
|
||||
}
|
||||
List<String> this$deviceIds = this.getDeviceIds();
|
||||
List<String> other$deviceIds = other.getDeviceIds();
|
||||
return !(this$deviceIds == null ? other$deviceIds != null : !((Object)this$deviceIds).equals(other$deviceIds));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsDeviceRestructureBindingForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $orgId = this.getOrgId();
|
||||
result = result * 59 + ($orgId == null ? 43 : $orgId.hashCode());
|
||||
String $orgName = this.getOrgName();
|
||||
result = result * 59 + ($orgName == null ? 43 : $orgName.hashCode());
|
||||
String $labelId = this.getLabelId();
|
||||
result = result * 59 + ($labelId == null ? 43 : $labelId.hashCode());
|
||||
String $labelName = this.getLabelName();
|
||||
result = result * 59 + ($labelName == null ? 43 : $labelName.hashCode());
|
||||
List<String> $deviceIds = this.getDeviceIds();
|
||||
result = result * 59 + ($deviceIds == null ? 43 : ((Object)$deviceIds).hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsDeviceRestructureBindingForm(orgId=" + this.getOrgId() + ", orgName=" + this.getOrgName() + ", labelId=" + this.getLabelId() + ", labelName=" + this.getLabelName() + ", deviceIds=" + this.getDeviceIds() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceRestructureBindingPersonForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7349123760464380004L;
|
||||
private String personId;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsDeviceRestructureBindingPersonForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsDeviceRestructureBindingPersonForm other = (AcsDeviceRestructureBindingPersonForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
String this$personId = this.getPersonId();
|
||||
String other$personId = other.getPersonId();
|
||||
if (this$personId == null ? other$personId != null : !this$personId.equals(other$personId)) {
|
||||
return false;
|
||||
}
|
||||
List<String> this$deviceIds = this.getDeviceIds();
|
||||
List<String> other$deviceIds = other.getDeviceIds();
|
||||
return !(this$deviceIds == null ? other$deviceIds != null : !((Object)this$deviceIds).equals(other$deviceIds));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsDeviceRestructureBindingPersonForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $personId = this.getPersonId();
|
||||
result = result * 59 + ($personId == null ? 43 : $personId.hashCode());
|
||||
List<String> $deviceIds = this.getDeviceIds();
|
||||
result = result * 59 + ($deviceIds == null ? 43 : ((Object)$deviceIds).hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsDeviceRestructureBindingPersonForm(personId=" + this.getPersonId() + ", deviceIds=" + this.getDeviceIds() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceRestructureConditionForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7349123760464380004L;
|
||||
private String businessId;
|
||||
private String orgId;
|
||||
private String labelId;
|
||||
private String personId;
|
||||
private List<String> areaIds;
|
||||
private String deviceName;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public String getOrgId() {
|
||||
return this.orgId;
|
||||
}
|
||||
|
||||
public String getLabelId() {
|
||||
return this.labelId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public void setLabelId(String labelId) {
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsDeviceRestructureConditionForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsDeviceRestructureConditionForm other = (AcsDeviceRestructureConditionForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
String this$businessId = this.getBusinessId();
|
||||
String other$businessId = other.getBusinessId();
|
||||
if (this$businessId == null ? other$businessId != null : !this$businessId.equals(other$businessId)) {
|
||||
return false;
|
||||
}
|
||||
String this$orgId = this.getOrgId();
|
||||
String other$orgId = other.getOrgId();
|
||||
if (this$orgId == null ? other$orgId != null : !this$orgId.equals(other$orgId)) {
|
||||
return false;
|
||||
}
|
||||
String this$labelId = this.getLabelId();
|
||||
String other$labelId = other.getLabelId();
|
||||
if (this$labelId == null ? other$labelId != null : !this$labelId.equals(other$labelId)) {
|
||||
return false;
|
||||
}
|
||||
String this$personId = this.getPersonId();
|
||||
String other$personId = other.getPersonId();
|
||||
if (this$personId == null ? other$personId != null : !this$personId.equals(other$personId)) {
|
||||
return false;
|
||||
}
|
||||
List<String> this$areaIds = this.getAreaIds();
|
||||
List<String> other$areaIds = other.getAreaIds();
|
||||
if (this$areaIds == null ? other$areaIds != null : !((Object)this$areaIds).equals(other$areaIds)) {
|
||||
return false;
|
||||
}
|
||||
String this$deviceName = this.getDeviceName();
|
||||
String other$deviceName = other.getDeviceName();
|
||||
return !(this$deviceName == null ? other$deviceName != null : !this$deviceName.equals(other$deviceName));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsDeviceRestructureConditionForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $businessId = this.getBusinessId();
|
||||
result = result * 59 + ($businessId == null ? 43 : $businessId.hashCode());
|
||||
String $orgId = this.getOrgId();
|
||||
result = result * 59 + ($orgId == null ? 43 : $orgId.hashCode());
|
||||
String $labelId = this.getLabelId();
|
||||
result = result * 59 + ($labelId == null ? 43 : $labelId.hashCode());
|
||||
String $personId = this.getPersonId();
|
||||
result = result * 59 + ($personId == null ? 43 : $personId.hashCode());
|
||||
List<String> $areaIds = this.getAreaIds();
|
||||
result = result * 59 + ($areaIds == null ? 43 : ((Object)$areaIds).hashCode());
|
||||
String $deviceName = this.getDeviceName();
|
||||
result = result * 59 + ($deviceName == null ? 43 : $deviceName.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsDeviceRestructureConditionForm(businessId=" + this.getBusinessId() + ", orgId=" + this.getOrgId() + ", labelId=" + this.getLabelId() + ", personId=" + this.getPersonId() + ", areaIds=" + this.getAreaIds() + ", deviceName=" + this.getDeviceName() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceRestructureTaskForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7349123760464380004L;
|
||||
private String taskId;
|
||||
|
||||
public String getTaskId() {
|
||||
return this.taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsDeviceRestructureTaskForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsDeviceRestructureTaskForm other = (AcsDeviceRestructureTaskForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
String this$taskId = this.getTaskId();
|
||||
String other$taskId = other.getTaskId();
|
||||
return !(this$taskId == null ? other$taskId != null : !this$taskId.equals(other$taskId));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsDeviceRestructureTaskForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $taskId = this.getTaskId();
|
||||
result = result * 59 + ($taskId == null ? 43 : $taskId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsDeviceRestructureTaskForm(taskId=" + this.getTaskId() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsUrgentDeviceDeleteForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -8241217398166081548L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsUrgentDeviceGroupAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 3898569025266319330L;
|
||||
private String groupName;
|
||||
private Integer isDefaultGroup;
|
||||
|
||||
public String getGroupName() {
|
||||
return this.groupName;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public Integer getIsDefaultGroup() {
|
||||
return this.isDefaultGroup;
|
||||
}
|
||||
|
||||
public void setIsDefaultGroup(Integer isDefaultGroup) {
|
||||
this.isDefaultGroup = isDefaultGroup;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsUrgentDeviceGroupDeleteForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -871143637869486647L;
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsUrgentDeviceGroupEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -982869731024373650L;
|
||||
private String id;
|
||||
private String groupName;
|
||||
private Integer isDefaultGroup;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getGroupName() {
|
||||
return this.groupName;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public Integer getIsDefaultGroup() {
|
||||
return this.isDefaultGroup;
|
||||
}
|
||||
|
||||
public void setIsDefaultGroup(Integer isDefaultGroup) {
|
||||
this.isDefaultGroup = isDefaultGroup;
|
||||
}
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsUrgentDeviceGroupQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 6523455593332711011L;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private List<String> deviceIds;
|
||||
private String groupId;
|
||||
private String groupName;
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getGroupName() {
|
||||
return this.groupName;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsUrgentDeviceNewForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -8241217398166081548L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsUrgentDevicePageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -5475153845784229582L;
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsUrgentGroupDeviceAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -1668752124596793359L;
|
||||
private String groupId;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsUrgentGroupDeviceDelForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -5363885322662865771L;
|
||||
private List<String> deviceIds;
|
||||
private String groupId;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsdeviceDetailQueryForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -8922653334367165658L;
|
||||
private String deviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.biz.ninca.accesscontrol.device.AcsDeviceManager
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsFaceCaptureParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.exception.DataAccessException
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.session.company.CompanyContext
|
||||
* cn.cloudwalk.cloud.session.user.UserContext
|
||||
* cn.cloudwalk.cloud.utils.CloudwalkDateUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.device.dto.AcsDeviceQueryDTO
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.device.dto.AcsDeviceResultDTO
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.CollectionUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils
|
||||
* javax.annotation.Resource
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.context.MessageSource
|
||||
* org.springframework.context.i18n.LocaleContextHolder
|
||||
* org.springframework.data.redis.core.RedisTemplate
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.handler;
|
||||
|
||||
import cn.cloudwalk.biz.ninca.accesscontrol.device.AcsDeviceManager;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsFaceCaptureParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.session.company.CompanyContext;
|
||||
import cn.cloudwalk.cloud.session.user.UserContext;
|
||||
import cn.cloudwalk.cloud.utils.CloudwalkDateUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.device.dto.AcsDeviceQueryDTO;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.device.dto.AcsDeviceResultDTO;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.CollectionUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
|
||||
public abstract class AbstractEventHandler {
|
||||
protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractEventHandler.class);
|
||||
@Resource
|
||||
private DeviceService deviceService;
|
||||
@Resource
|
||||
private AcsDeviceManager acsDeviceManager;
|
||||
@Resource
|
||||
private DoorOpenRecordService doorOpenRecordService;
|
||||
@Resource
|
||||
protected RedisTemplate<String, Object> redisTemplate;
|
||||
@Autowired
|
||||
private MessageSource messageSource;
|
||||
@Autowired
|
||||
private AccessControlProperties properties;
|
||||
|
||||
public CloudwalkCallContext getCloudwalkContext(String businessId) throws ServiceException {
|
||||
CloudwalkCallContext context = new CloudwalkCallContext();
|
||||
CompanyContext companyContext = new CompanyContext();
|
||||
companyContext.setCompanyId(businessId);
|
||||
context.setCompany(companyContext);
|
||||
UserContext userContext = new UserContext();
|
||||
userContext.setCaller("defaultUserId");
|
||||
userContext.setCallerName("defaultUserName");
|
||||
context.setUser(userContext);
|
||||
context.setCallTime(CloudwalkDateUtils.getCurrentDate());
|
||||
HashMap<String, String> feignThreadLoaclMap = new HashMap<String, String>(3);
|
||||
feignThreadLoaclMap.put("businessid", businessId);
|
||||
feignThreadLoaclMap.put("platformuserid", "defaultUserId");
|
||||
feignThreadLoaclMap.put("username", "defaultUserName");
|
||||
FeignThreadLocalUtil.set(feignThreadLoaclMap);
|
||||
return context;
|
||||
}
|
||||
|
||||
Boolean checkDevice(String deviceId, String businessId) throws DataAccessException {
|
||||
AcsDeviceQueryDTO queryDTO = new AcsDeviceQueryDTO();
|
||||
queryDTO.setDeviceId(deviceId);
|
||||
queryDTO.setBusinessId(businessId);
|
||||
List list = this.acsDeviceManager.list(queryDTO);
|
||||
return CollectionUtils.isNotEmpty((Collection)list);
|
||||
}
|
||||
|
||||
DeviceResult queryDeviceResult(String deviceCode, CloudwalkCallContext context) throws ServiceException {
|
||||
DeviceQueryParam deviceQueryParam = new DeviceQueryParam();
|
||||
deviceQueryParam.setDeviceCode(deviceCode);
|
||||
CloudwalkResult deviceQueryResult = this.deviceService.list(deviceQueryParam, context);
|
||||
if (deviceQueryResult.isSuccess() && CollectionUtils.isNotEmpty((Collection)((Collection)deviceQueryResult.getData()))) {
|
||||
return (DeviceResult)((List)deviceQueryResult.getData()).get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void statisticsAddCache(String key, long value) {
|
||||
if (!this.redisTemplate.hasKey((Object)key).booleanValue()) {
|
||||
this.doorOpenRecordService.createCache(key, 0L);
|
||||
}
|
||||
this.redisTemplate.opsForValue().increment((Object)key, value);
|
||||
}
|
||||
|
||||
public String getAcsDeviceIdBySub(String businessId, String subDeviceCode) throws ServiceException {
|
||||
AcsDeviceQueryDTO queryDTO = new AcsDeviceQueryDTO();
|
||||
queryDTO.setBusinessId(businessId);
|
||||
queryDTO.setDeviceCode(subDeviceCode);
|
||||
try {
|
||||
List list = this.acsDeviceManager.list(queryDTO);
|
||||
if (CollectionUtils.isNotEmpty((Collection)list) && StringUtils.isNotBlank((String)((AcsDeviceResultDTO)list.get(0)).getParentDeviceId())) {
|
||||
return ((AcsDeviceResultDTO)list.get(0)).getParentDeviceId();
|
||||
}
|
||||
LOGGER.info("\u95e8\u7981\u63a7\u5236\u5668[{}]\u672a\u5173\u8054\u8bbe\u5907", (Object)subDeviceCode);
|
||||
throw new ServiceException("\u95e8\u7981\u63a7\u5236\u5668\u672a\u5173\u8054\u8bbe\u5907");
|
||||
}
|
||||
catch (DataAccessException e) {
|
||||
throw new ServiceException("\u6570\u636e\u5e93\u5f02\u5e38");
|
||||
}
|
||||
}
|
||||
|
||||
public String getMessage(String code, String defaultMsg) {
|
||||
return this.messageSource.getMessage(code, null, defaultMsg, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
public String getMessage(String code) {
|
||||
return this.getMessage(code, "");
|
||||
}
|
||||
|
||||
protected void checkIsExpire(String logId, long checkTime) throws ServiceException {
|
||||
long invalidTime = DateUtils.getCurrentTime() - this.properties.getFaceCaptureTimeExpiredMilliseconds();
|
||||
if (checkTime < invalidTime) {
|
||||
LOGGER.info("\u4e0a\u4f20\u8bb0\u5f55\u5df2\u8fc7\u65f6,\u4e0d\u5904\u7406,logId=[{}],checkTime=[{}]", (Object)logId, (Object)checkTime);
|
||||
throw new ServiceException("76260329", this.getMessage("76260329"));
|
||||
}
|
||||
}
|
||||
|
||||
protected String getAcsSubDeviceCode(String businessId, DeviceResult deviceResult) throws ServiceException {
|
||||
AcsDeviceQueryDTO queryDTO = new AcsDeviceQueryDTO();
|
||||
queryDTO.setBusinessId(businessId);
|
||||
queryDTO.setParentDeviceId(deviceResult.getId());
|
||||
try {
|
||||
List list = this.acsDeviceManager.list(queryDTO);
|
||||
if (CollectionUtils.isNotEmpty((Collection)list)) {
|
||||
return ((AcsDeviceResultDTO)list.get(0)).getDeviceCode();
|
||||
}
|
||||
LOGGER.info("\u8bbe\u5907[{}]\u672a\u5173\u8054\u95e8\u7981\u63a7\u5236\u5668", (Object)deviceResult.getDeviceCode());
|
||||
throw new ServiceException("76260125", this.getMessage("76260125"));
|
||||
}
|
||||
catch (DataAccessException e) {
|
||||
throw new ServiceException("76260007", this.getMessage("76260007"));
|
||||
}
|
||||
}
|
||||
|
||||
protected DeviceResult getDeviceByCode(String deviceCode, CloudwalkCallContext context) throws ServiceException {
|
||||
DeviceQueryParam deviceQueryParam = new DeviceQueryParam();
|
||||
deviceQueryParam.setDeviceCode(deviceCode);
|
||||
CloudwalkResult deviceQueryResult = this.deviceService.list(deviceQueryParam, context);
|
||||
if (deviceQueryResult.isSuccess() && CollectionUtils.isNotEmpty((Collection)((Collection)deviceQueryResult.getData()))) {
|
||||
return (DeviceResult)((List)deviceQueryResult.getData()).get(0);
|
||||
}
|
||||
LOGGER.error("\u672a\u67e5\u5230\u8bbe\u5907[{}]\u7684\u4fe1\u606f", (Object)deviceCode);
|
||||
throw new ServiceException("\u672a\u67e5\u5230\u8be5\u8bbe\u5907\u4fe1\u606f");
|
||||
}
|
||||
|
||||
protected void setDevice(String deviceCode, AcsFaceCaptureParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
if (StringUtils.isBlank((String)deviceCode)) {
|
||||
throw new ServiceException("76260314", this.getMessage("76260314"));
|
||||
}
|
||||
DeviceResult deviceResult = this.getDeviceByCode(deviceCode, context);
|
||||
param.setDeviceCode(deviceCode);
|
||||
param.setAcsSubDeviceCode(this.getAcsSubDeviceCode(context.getCompany().getCompanyId(), deviceResult));
|
||||
param.setDeviceResult(deviceResult);
|
||||
}
|
||||
}
|
||||
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.biz.ninca.accesscontrol.passtime.AcsPassRuleManager
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureQueryResult
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonCheckTimeParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.service.AcsPersonService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsCompareParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsFaceCaptureParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsFaceCaptureService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.exception.DataAccessException
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.pass.dto.AcsPassRuleQueryDto
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.pass.dto.AcsPassRuleResultDto
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.AcsDeviceSettingEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.AcsRecognitionStatusEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.CollectionUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils
|
||||
* cn.cloudwalk.cwos.client.event.event.FaceCaptureEvent
|
||||
* cn.cloudwalk.cwos.client.event.event.mode.FaceCapture
|
||||
* cn.cloudwalk.cwos.client.event.event.mode.FaceQuality
|
||||
* cn.cloudwalk.cwos.client.event.event.mode.Panorama
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* com.alibaba.fastjson.JSONObject
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.handler;
|
||||
|
||||
import cn.cloudwalk.biz.ninca.accesscontrol.passtime.AcsPassRuleManager;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureQueryResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonCheckTimeParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.service.AcsPersonService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsCompareParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsFaceCaptureParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsFaceCaptureService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.pass.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.pass.dto.AcsPassRuleResultDto;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.AcsDeviceSettingEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.AcsRecognitionStatusEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.CollectionUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils;
|
||||
import cn.cloudwalk.cwos.client.event.event.FaceCaptureEvent;
|
||||
import cn.cloudwalk.cwos.client.event.event.mode.FaceCapture;
|
||||
import cn.cloudwalk.cwos.client.event.event.mode.FaceQuality;
|
||||
import cn.cloudwalk.cwos.client.event.event.mode.Panorama;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.handler.AbstractEventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"access-control"})
|
||||
public class AcsFaceCaptureEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<FaceCaptureEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AcsFaceCaptureEventHandler.class);
|
||||
@Autowired
|
||||
private AcsFaceCaptureService faceCaptureService;
|
||||
@Autowired
|
||||
protected DeviceService deviceService;
|
||||
@Autowired
|
||||
private AcsPassRuleManager acsPassRuleManager;
|
||||
@Autowired
|
||||
private AcsPersonService acsPersonService;
|
||||
@Autowired
|
||||
private AccessControlProperties properties;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
public void onEvent(FaceCaptureEvent event) {
|
||||
LOGGER.info("\u95e8\u7981\u5e94\u7528\u6536\u5230FaceCaptureEvent\u6d88\u606f\u5f00\u59cb:{}", (Object)JSON.toJSONString((Object)event));
|
||||
try {
|
||||
CloudwalkCallContext context = this.getCloudwalkContext(event.getBusinessId());
|
||||
AcsFaceCaptureParam saveParam = this.getParam(event, context);
|
||||
List<String> acsImageStoreIds = this.queryAcsImageStoreIds(event.getDeviceId(), context.getCompany().getCompanyId());
|
||||
for (FaceCapture faceCapture : event.getFace()) {
|
||||
AcsCompareParam compareParam = new AcsCompareParam();
|
||||
compareParam.setImageStoreIds(acsImageStoreIds);
|
||||
compareParam.setImagePath(faceCapture.getImagePath());
|
||||
CloudwalkResult compareResult = this.faceCaptureService.compare(compareParam, context);
|
||||
if (compareResult.isSuccess()) {
|
||||
FeatureQueryResult featureQueryResult = (FeatureQueryResult)compareResult.getData();
|
||||
if (BigDecimal.valueOf(featureQueryResult.getScore()).multiply(new BigDecimal("100")).compareTo(saveParam.getFaceRegThreshold()) < 0) {
|
||||
LOGGER.info("\u540e\u7aef\u6bd4\u5bf9\u8bc6\u522b\u5206\u4e0d\u8db3,imagePath=[{}], personId=[{}],\u8bc6\u522b\u5206:[{}],\u9608\u503c:[{}]", new Object[]{faceCapture.getImagePath(), featureQueryResult.getPersonId(), featureQueryResult.getScore(), saveParam.getFaceRegThreshold()});
|
||||
saveParam.setRecognitionResult(AcsRecognitionStatusEnum.FAIL.getCode());
|
||||
saveParam.setGroupId(acsImageStoreIds.get(0));
|
||||
} else {
|
||||
String imageStoreId = this.checkPassInterval(featureQueryResult.getPersonId(), acsImageStoreIds, faceCapture.getCaptureTime(), context);
|
||||
if (StringUtils.isNotBlank((String)imageStoreId)) {
|
||||
saveParam.setGroupId(imageStoreId);
|
||||
} else {
|
||||
saveParam.setGroupId(acsImageStoreIds.get(0));
|
||||
saveParam.setRecognitionResult(AcsRecognitionStatusEnum.FAIL.getCode());
|
||||
}
|
||||
}
|
||||
FaceQuality faceQuality = faceCapture.getFaceQuality();
|
||||
if (faceQuality != null) {
|
||||
if (faceQuality.getQualityScore() != null) {
|
||||
saveParam.setQualityScore(BigDecimal.valueOf(faceQuality.getQualityScore().floatValue()));
|
||||
}
|
||||
if (faceQuality.getMaskScore() != null) {
|
||||
saveParam.setMaskScore(BigDecimal.valueOf(faceQuality.getMaskScore().floatValue()));
|
||||
}
|
||||
if (faceQuality.getTempScore() != null) {
|
||||
saveParam.setTempScore(BigDecimal.valueOf(faceQuality.getTempScore().floatValue()));
|
||||
}
|
||||
} else {
|
||||
saveParam.setQualityScore(BigDecimal.ZERO);
|
||||
}
|
||||
saveParam.setFaceId(featureQueryResult.getImageId());
|
||||
saveParam.setScore(BigDecimal.valueOf(featureQueryResult.getScore() * 100.0));
|
||||
saveParam.setFaceImagePath(faceCapture.getImagePath());
|
||||
saveParam.setRecognitionTime(Long.valueOf(faceCapture.getCaptureTime()));
|
||||
saveParam.setCaptureId(faceCapture.getCaptureId());
|
||||
CloudwalkResult result = this.faceCaptureService.saveRecordAndOpenDoor(saveParam, context);
|
||||
if (!result.isSuccess()) {
|
||||
LOGGER.error("\u95e8\u7981\u5e94\u7528\u540e\u7aef\u6bd4\u5bf9\u5e76\u4e0b\u53d1\u5f00\u95e8\u6307\u4ee4\u5931\u8d25\uff0c\u8bbe\u5907\u7f16\u7801:[{}]\uff0c\u539f\u56e0:[{}]", (Object)event.getDeviceId(), (Object)result.getMessage());
|
||||
continue;
|
||||
}
|
||||
this.statisticsAddCache(AcsCacheKeyUtil.getRecogCountKey((String)DateUtils.parseDate((Date)new Date(), (String)"yyyy-MM-dd"), (String)event.getBusinessId()), 1L);
|
||||
continue;
|
||||
}
|
||||
LOGGER.error("\u540e\u7aef\u6bd4\u5bf9\u5931\u8d25,\u8bbe\u5907\u7f16\u7801:[{}],logId:[{}],\u6293\u62cd\u7f16\u53f7:[{}],\u6293\u62cd\u5934\u50cf\u8def\u5f84:[{}]\u539f\u56e0:[{}]", new Object[]{event.getDeviceId(), event.getLogId(), faceCapture.getCaptureId(), faceCapture.getImagePath(), compareResult.getMessage()});
|
||||
}
|
||||
LOGGER.info("\u95e8\u7981\u5e94\u7528\u5904\u7406FaceCaptureEvent\u6d88\u606f\u5b8c\u6210:{}", (Object)JSON.toJSONString((Object)event));
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u95e8\u7981\u5e94\u7528\u6d88\u8d39\u6293\u62cd\u8bb0\u5f55\u5f02\u5e38\uff0c\u8bbe\u5907\u7f16\u7801:[{}]\uff0c\u539f\u56e0:[{}]", new Object[]{event.getDeviceId(), e.getMessage(), e});
|
||||
}
|
||||
finally {
|
||||
FeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private AcsFaceCaptureParam getParam(FaceCaptureEvent event, CloudwalkCallContext context) throws ServiceException {
|
||||
AcsFaceCaptureParam param = (AcsFaceCaptureParam)BeanCopyUtils.copyProperties((Object)event, AcsFaceCaptureParam.class);
|
||||
if (CollectionUtils.isEmpty((Collection)event.getFace())) {
|
||||
throw new ServiceException("76260324", this.getMessage("76260324"));
|
||||
}
|
||||
Panorama panorama = event.getPanorama();
|
||||
if (panorama != null) {
|
||||
param.setPanoramaImagePath(panorama.getPanoramaImagePath());
|
||||
}
|
||||
for (FaceCapture faceCapture : event.getFace()) {
|
||||
super.checkIsExpire(event.getLogId(), faceCapture.getCaptureTime());
|
||||
}
|
||||
super.setDevice(event.getDeviceId(), param, context);
|
||||
param.setFaceRegThreshold(this.getFaceRegThreshold());
|
||||
param.setCompareType(CompareTypeEnum.ACS_BACK_RECOG.getCode());
|
||||
param.setRecognitionResult(AcsRecognitionStatusEnum.SUCESS.getCode());
|
||||
return param;
|
||||
}
|
||||
|
||||
private BigDecimal getFaceRegThreshold() {
|
||||
return new BigDecimal((String)this.properties.getDeviceAtrrMap().get(AcsDeviceSettingEnum.ACS_FACE_REG_THRESHOLD.getCode()));
|
||||
}
|
||||
|
||||
private List<String> queryAcsImageStoreIds(String deviceCode, String businessId) throws ServiceException {
|
||||
List list;
|
||||
AcsPassRuleQueryDto queryDto = new AcsPassRuleQueryDto();
|
||||
queryDto.setBusinessId(businessId);
|
||||
queryDto.setDeviceCode(deviceCode);
|
||||
try {
|
||||
list = this.acsPassRuleManager.query(queryDto);
|
||||
}
|
||||
catch (DataAccessException e) {
|
||||
throw new ServiceException("76260007", this.getMessage("76260007"));
|
||||
}
|
||||
if (CollectionUtils.isEmpty((Collection)list)) {
|
||||
throw new ServiceException("76260123", this.getMessage("76260123"));
|
||||
}
|
||||
return list.stream().map(AcsPassRuleResultDto::getImageStoreId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private String checkPassInterval(String personId, List<String> imageStoreIds, Long checkTime, CloudwalkCallContext context) throws ServiceException {
|
||||
AcsPersonCheckTimeParam checkTimeParam = new AcsPersonCheckTimeParam();
|
||||
checkTimeParam.setPersonId(personId);
|
||||
checkTimeParam.setImageStoreIds(imageStoreIds);
|
||||
checkTimeParam.setTime(checkTime);
|
||||
LOGGER.info("\u6821\u9a8c\u4eba\u5458\u901a\u884c\u65f6\u95f4\u5f00\u59cb:AcsPersonCheckTimeParam=[{}], CloudwalkCallContext=[{}]", (Object)JSONObject.toJSONString((Object)checkTimeParam), (Object)JSONObject.toJSONString((Object)context));
|
||||
CloudwalkResult result = this.acsPersonService.checkPersonTime(checkTimeParam, context);
|
||||
LOGGER.info("\u6821\u9a8c\u4eba\u5458\u901a\u884c\u65f6\u95f4\u7ed3\u675f");
|
||||
if (!result.isSuccess()) {
|
||||
LOGGER.error("\u6821\u9a8c\u4eba\u5458\u901a\u884c\u65f6\u95f4\u5931\u8d25\u6216\u4e0d\u5728\u901a\u884c\u65f6\u95f4\u5185");
|
||||
return null;
|
||||
}
|
||||
return (String)result.getData();
|
||||
}
|
||||
}
|
||||
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsElevatorRecordAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsOpenDoorRecordAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsOpenDoorRecordEditParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsElevatorRecordService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsOpenDoorRecordService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.bean.record.AcsElevatorRecordExtraDTO
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.AcsConstants
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.AcsDeviceIdentifyTypeEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils
|
||||
* cn.cloudwalk.cwos.client.event.event.OpenDoorRecordEvent
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* com.alibaba.fastjson.JSONObject
|
||||
* javax.annotation.Resource
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.data.redis.core.RedisTemplate
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.handler;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsElevatorRecordAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsOpenDoorRecordAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsOpenDoorRecordEditParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsElevatorRecordService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsOpenDoorRecordService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.bean.record.AcsElevatorRecordExtraDTO;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.AccessControlProperties;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.AcsConstants;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.AcsDeviceIdentifyTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.StringUtils;
|
||||
import cn.cloudwalk.cwos.client.event.event.OpenDoorRecordEvent;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.handler.AbstractEventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"all"})
|
||||
public class OpenDoorRecordEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<OpenDoorRecordEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(OpenDoorRecordEventHandler.class);
|
||||
@Resource
|
||||
private AcsOpenDoorRecordService acsOpenDoorRecordService;
|
||||
@Resource
|
||||
private AcsElevatorRecordService acsElevatorRecordService;
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
@Autowired
|
||||
private AccessControlProperties accessControlProperties;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
public void onEvent(OpenDoorRecordEvent openDoorRecordEvent) {
|
||||
LOGGER.info("\u6536\u5230openDoorRecordEvent\u6d88\u606f:{}", (Object)JSON.toJSONString((Object)openDoorRecordEvent));
|
||||
try {
|
||||
JSONObject reserveInfo;
|
||||
CloudwalkCallContext context = this.getCloudwalkContext(openDoorRecordEvent.getBusinessId());
|
||||
DeviceResult deviceResult = super.queryDeviceResult(openDoorRecordEvent.getDeviceId(), context);
|
||||
AcsOpenDoorRecordAddParam param = this.getParam(openDoorRecordEvent);
|
||||
param.setDeviceResult(deviceResult);
|
||||
AcsElevatorRecordExtraDTO elevatorRecordExtraDTO = null;
|
||||
if (StringUtils.isNotBlank((String)openDoorRecordEvent.getReserveInfo()) && !(reserveInfo = JSON.parseObject((String)openDoorRecordEvent.getReserveInfo())).isEmpty() && reserveInfo.containsKey((Object)"srcFloor")) {
|
||||
elevatorRecordExtraDTO = (AcsElevatorRecordExtraDTO)reserveInfo.toJavaObject(AcsElevatorRecordExtraDTO.class);
|
||||
}
|
||||
if (deviceResult != null && AcsDeviceIdentifyTypeEnum.BACKEND_REG.getCode().equals(deviceResult.getIdentifyType())) {
|
||||
this.updateRecordResult(openDoorRecordEvent, context, deviceResult, elevatorRecordExtraDTO);
|
||||
} else {
|
||||
CloudwalkResult addResult;
|
||||
if (elevatorRecordExtraDTO != null) {
|
||||
AcsElevatorRecordAddParam elevatorParam = this.getElevatorParam(param, elevatorRecordExtraDTO);
|
||||
addResult = this.acsElevatorRecordService.add(elevatorParam, context);
|
||||
} else {
|
||||
addResult = this.acsOpenDoorRecordService.add(param, context);
|
||||
}
|
||||
if (param.getRecordResult() == 1 && addResult.isSuccess()) {
|
||||
this.statisticsAddCache(AcsCacheKeyUtil.getOpenDoorCountKey((String)DateUtils.parseDate((Date)new Date(), (String)"yyyy-MM-dd"), (String)openDoorRecordEvent.getBusinessId()), 1L);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u6d88\u8d39\u5f00\u95e8\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0:", (Throwable)e);
|
||||
}
|
||||
finally {
|
||||
FeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRecordResult(OpenDoorRecordEvent openDoorRecordEvent, CloudwalkCallContext context, DeviceResult deviceResult, AcsElevatorRecordExtraDTO elevatorRecordExtraDTO) throws ServiceException {
|
||||
if (StringUtils.isNotBlank((String)openDoorRecordEvent.getLogId())) {
|
||||
AcsOpenDoorRecordEditParam editParam = this.getEditParam(openDoorRecordEvent, context, deviceResult.getDeviceCode());
|
||||
CloudwalkResult modifyResult = elevatorRecordExtraDTO != null ? this.acsElevatorRecordService.modify(editParam) : this.acsOpenDoorRecordService.modify(editParam);
|
||||
if (!modifyResult.isSuccess()) {
|
||||
LOGGER.info("\u66f4\u65b0\u5f00\u95e8\u8bb0\u5f55\u72b6\u6001\u5931\u8d25\uff0c\u539f\u56e0\uff1a[{}]", (Object)modifyResult.getMessage());
|
||||
}
|
||||
this.cleanCache(context, deviceResult, editParam.getLogId(), editParam.getRecognitionNo());
|
||||
} else {
|
||||
LOGGER.info("\u540e\u7aef\u8bbe\u5907\u4e0a\u62a5\u5f00\u95e8\u8bb0\u5f55logId\u4e3a\u7a7a\uff0c\u4e0d\u5904\u7406");
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanCache(CloudwalkCallContext context, DeviceResult deviceResult, String openDoorLogId, String recognitionNo) {
|
||||
String backendRegLogIdKey = AcsCacheKeyUtil.getBackendRegLogIdKey((String)deviceResult.getDeviceCode(), (String)context.getCompany().getCompanyId(), (String)recognitionNo);
|
||||
String backendRegExpireKey = AcsCacheKeyUtil.getBackendRegExpireKey((String)context.getCompany().getCompanyId(), (String)openDoorLogId);
|
||||
this.redisTemplate.delete((Object)backendRegLogIdKey);
|
||||
this.redisTemplate.delete((Object)backendRegExpireKey);
|
||||
}
|
||||
|
||||
private AcsOpenDoorRecordEditParam getEditParam(OpenDoorRecordEvent event, CloudwalkCallContext context, String subDeviceCode) throws ServiceException {
|
||||
String acsDeviceId = super.getAcsDeviceIdBySub(context.getCompany().getCompanyId(), subDeviceCode);
|
||||
AcsOpenDoorRecordEditParam param = (AcsOpenDoorRecordEditParam)BeanCopyUtils.copyProperties((Object)event, AcsOpenDoorRecordEditParam.class);
|
||||
param.setDeviceId(acsDeviceId);
|
||||
param.setRecordResult(Integer.valueOf(event.getRecordResult()));
|
||||
param.setStartDay(Long.valueOf(DateUtils.getCurrentTime() - this.accessControlProperties.getFaceCaptureOpenDoorFailMilliseconds() - AcsConstants.ONE_DAY_MILLISECONDS));
|
||||
param.setEndDay(Long.valueOf(DateUtils.getCurrentTime()));
|
||||
return param;
|
||||
}
|
||||
|
||||
private AcsOpenDoorRecordAddParam getParam(OpenDoorRecordEvent event) {
|
||||
AcsOpenDoorRecordAddParam param = (AcsOpenDoorRecordAddParam)BeanCopyUtils.copyProperties((Object)event, AcsOpenDoorRecordAddParam.class);
|
||||
param.setRecordResult(Integer.valueOf(Integer.parseInt(event.getRecordResult())));
|
||||
param.setDeviceCode(event.getDeviceId());
|
||||
param.setOpenDoorType(event.getOpenDoorType());
|
||||
return param;
|
||||
}
|
||||
|
||||
private AcsElevatorRecordAddParam getElevatorParam(AcsOpenDoorRecordAddParam addParam, AcsElevatorRecordExtraDTO elevatorRecordExtraDTO) {
|
||||
AcsElevatorRecordAddParam param = (AcsElevatorRecordAddParam)BeanCopyUtils.copyProperties((Object)addParam, AcsElevatorRecordAddParam.class);
|
||||
return (AcsElevatorRecordAddParam)BeanCopyUtils.copyProperties((Object)elevatorRecordExtraDTO, (Object)param);
|
||||
}
|
||||
}
|
||||
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsFaceCaptureParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsFaceCaptureService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.AcsRecognitionStatusEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum
|
||||
* cn.cloudwalk.cwos.client.event.event.app.OpendoorFaceCaptureRecordEvent
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.handler;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsFaceCaptureParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsFaceCaptureService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.AcsRecognitionStatusEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum;
|
||||
import cn.cloudwalk.cwos.client.event.event.app.OpendoorFaceCaptureRecordEvent;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.handler.AbstractEventHandler;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.handler.OpenDoorRecordEventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import java.math.BigDecimal;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"access-control"})
|
||||
public class OpendoorFaceCaptureRecordEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<OpendoorFaceCaptureRecordEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(OpenDoorRecordEventHandler.class);
|
||||
@Autowired
|
||||
private AcsFaceCaptureService faceCaptureService;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
public void onEvent(OpendoorFaceCaptureRecordEvent event) {
|
||||
LOGGER.info("\u6536\u5230OpendoorFaceCaptureRecordEvent\u6d88\u606f:{}", (Object)JSON.toJSONString((Object)event));
|
||||
try {
|
||||
CloudwalkCallContext context = this.getCloudwalkContext(event.getBusinessId());
|
||||
AcsFaceCaptureParam param = this.getParam(event, context);
|
||||
CloudwalkResult result = this.faceCaptureService.saveRecordAndOpenDoor(param, context);
|
||||
if (!result.isSuccess()) {
|
||||
LOGGER.error("\u95e8\u7981\u5e94\u7528\u6d88\u8d39\u540e\u7aef\u6bd4\u5bf9\u8bb0\u5f55\u5931\u8d25\uff0c\u8bbe\u5907\u7f16\u7801:[{}]\uff0c\u539f\u56e0:[{}]", (Object)event.getDeviceId(), (Object)result.getMessage());
|
||||
}
|
||||
LOGGER.info("\u95e8\u7981\u5e94\u7528\u5904\u7406OpendoorFaceCaptureRecordEvent\u6d88\u606f\u5b8c\u6210:{}", (Object)JSON.toJSONString((Object)event));
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u95e8\u7981\u5e94\u7528\u6d88\u8d39\u540e\u7aef\u6bd4\u5bf9\u8bb0\u5f55\u5f02\u5e38\uff0c\u539f\u56e0:", (Throwable)e);
|
||||
}
|
||||
finally {
|
||||
FeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private AcsFaceCaptureParam getParam(OpendoorFaceCaptureRecordEvent event, CloudwalkCallContext context) throws ServiceException {
|
||||
AcsFaceCaptureParam param = (AcsFaceCaptureParam)BeanCopyUtils.copyProperties((Object)event, AcsFaceCaptureParam.class);
|
||||
if (event.getRecognitionTime() == null) {
|
||||
throw new ServiceException("76260321", this.getMessage("76260321"));
|
||||
}
|
||||
super.checkIsExpire(event.getLogId(), event.getRecognitionTime());
|
||||
super.setDevice(event.getDeviceId(), param, context);
|
||||
param.setFaceRegThreshold(BigDecimal.valueOf(event.getThreshold()));
|
||||
if (event.getQualityScore() != null) {
|
||||
param.setQualityScore(BigDecimal.valueOf(event.getQualityScore().floatValue()));
|
||||
} else {
|
||||
param.setQualityScore(BigDecimal.ZERO);
|
||||
}
|
||||
if (event.getScore() != null) {
|
||||
param.setScore(BigDecimal.valueOf(event.getScore().floatValue()));
|
||||
}
|
||||
if (event.getMaskScore() != null) {
|
||||
param.setMaskScore(BigDecimal.valueOf(event.getMaskScore().floatValue()));
|
||||
}
|
||||
if (event.getTempScore() != null) {
|
||||
param.setTempScore(BigDecimal.valueOf(event.getTempScore().floatValue()));
|
||||
}
|
||||
param.setCompareType(CompareTypeEnum.ACS_BACK_RECOG.getCode());
|
||||
param.setRecognitionResult(AcsRecognitionStatusEnum.SUCESS.getCode());
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsPersonCardCompareAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsRecogRecordService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils
|
||||
* cn.cloudwalk.cwos.client.event.event.PersonCardCompareEvent
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* javax.annotation.Resource
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.handler;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsPersonCardCompareAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsRecogRecordService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils;
|
||||
import cn.cloudwalk.cwos.client.event.event.PersonCardCompareEvent;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.handler.AbstractEventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"access-control"})
|
||||
public class PersonCardCompareEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<PersonCardCompareEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PersonCardCompareEventHandler.class);
|
||||
@Resource
|
||||
private AcsRecogRecordService acsRecogRecordService;
|
||||
@Resource
|
||||
private DoorOpenRecordService doorOpenRecordService;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
public void onEvent(PersonCardCompareEvent event) {
|
||||
LOGGER.info("\u6536\u5230personCardCompareEvent\u6d88\u606f:{}", (Object)JSON.toJSONString((Object)event));
|
||||
try {
|
||||
CloudwalkCallContext context = this.getCloudwalkContext(event.getBusinessId());
|
||||
DeviceResult deviceResult = super.queryDeviceResult(event.getDeviceId(), context);
|
||||
AcsPersonCardCompareAddParam param = this.getParam(event);
|
||||
param.setDeviceResult(deviceResult);
|
||||
this.acsRecogRecordService.addCompareRecord(param, context);
|
||||
this.statisticsAddCache(AcsCacheKeyUtil.getRecogCountKey((String)DateUtils.parseDate((Date)new Date(), (String)"yyyy-MM-dd"), (String)event.getBusinessId()), 1L);
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u6d88\u8d39\u4eba\u8bc1\u6bd4\u5bf9\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0:", (Throwable)e);
|
||||
}
|
||||
finally {
|
||||
FeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private AcsPersonCardCompareAddParam getParam(PersonCardCompareEvent event) {
|
||||
AcsPersonCardCompareAddParam param = (AcsPersonCardCompareAddParam)BeanCopyUtils.copyProperties((Object)event, AcsPersonCardCompareAddParam.class);
|
||||
param.setDeviceCode(event.getDeviceId());
|
||||
param.setPanoramaImagePath(event.getPanoramaImagePath());
|
||||
param.setRegisterImagePath(event.getCardData().getCardImagePath());
|
||||
param.setFaceImagePath(event.getSpotImagePath());
|
||||
param.setPersonName(event.getCardData().getName());
|
||||
param.setCardType(event.getCardData().getCardType());
|
||||
param.setDeviceCode(event.getDeviceId());
|
||||
param.setThreshold(BigDecimal.valueOf(event.getThreshold()));
|
||||
param.setScore(BigDecimal.valueOf(event.getScore()));
|
||||
if (event.getMaskScore() != null) {
|
||||
param.setMaskScore(BigDecimal.valueOf(event.getMaskScore().floatValue()));
|
||||
}
|
||||
if (event.getTempScore() != null) {
|
||||
param.setTempScore(BigDecimal.valueOf(event.getTempScore().floatValue()));
|
||||
}
|
||||
param.setRecognitionResult(event.getCompareResult());
|
||||
param.setRecognitionTime(event.getCompareTime());
|
||||
param.setTempImagePath(event.getTempImagePath());
|
||||
param.setCompareType(CompareTypeEnum.PERSON_CARD.getCode());
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecogRecordAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsRecogRecordService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils
|
||||
* cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent
|
||||
* cn.cloudwalk.cwos.client.event.event.mode.Face
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* javax.annotation.Resource
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.stereotype.Component
|
||||
* org.springframework.util.ObjectUtils
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.handler;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecogRecordAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsRecogRecordService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.em.CompareTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.AcsCacheKeyUtil;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.util.DateUtils;
|
||||
import cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent;
|
||||
import cn.cloudwalk.cwos.client.event.event.mode.Face;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.handler.AbstractEventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"all"})
|
||||
public class PersonRecordEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<PersonRecordUploadEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PersonRecordEventHandler.class);
|
||||
@Resource
|
||||
private AcsRecogRecordService acsRecogRecordService;
|
||||
@Resource
|
||||
private DoorOpenRecordService doorOpenRecordService;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
public void onEvent(PersonRecordUploadEvent personRecordUploadEvent) {
|
||||
LOGGER.info("\u6536\u5230personRecordUploadEvent\u6d88\u606f:{}", (Object)JSON.toJSONString((Object)personRecordUploadEvent));
|
||||
try {
|
||||
CloudwalkCallContext context = this.getCloudwalkContext(personRecordUploadEvent.getBusinessId());
|
||||
DeviceResult deviceResult = super.queryDeviceResult(personRecordUploadEvent.getDeviceId(), context);
|
||||
DeviceResult subDeviceResult = super.queryDeviceResult(personRecordUploadEvent.getSubDeviceId(), context);
|
||||
Map<String, List<Face>> faceMap = personRecordUploadEvent.getFaces().stream().collect(Collectors.groupingBy(Face::getFaceId));
|
||||
for (String faceId : faceMap.keySet()) {
|
||||
try {
|
||||
Face face = faceMap.get(faceId).get(0);
|
||||
AcsRecogRecordAddParam param = this.getParam(personRecordUploadEvent, face);
|
||||
param.setDeviceResult(deviceResult);
|
||||
param.setSubDeviceResult(subDeviceResult);
|
||||
this.acsRecogRecordService.add(param, context);
|
||||
this.statisticsAddCache(AcsCacheKeyUtil.getRecogCountKey((String)DateUtils.parseDate((Date)new Date(), (String)"yyyy-MM-dd"), (String)personRecordUploadEvent.getBusinessId()), 1L);
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u4fdd\u5b58\u4eba\u5458\u8bc6\u522b\u8bb0\u5f55\u5931\u8d25\uff0cfaceId\uff1a{}\uff0c\u539f\u56e0\uff1a", (Object)faceId, (Object)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u6d88\u8d39\u4eba\u5458\u8bc6\u522b\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0:", (Throwable)e);
|
||||
}
|
||||
finally {
|
||||
FeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private AcsRecogRecordAddParam getParam(PersonRecordUploadEvent event, Face face) {
|
||||
AcsRecogRecordAddParam param = (AcsRecogRecordAddParam)BeanCopyUtils.copyProperties((Object)event, AcsRecogRecordAddParam.class);
|
||||
BeanCopyUtils.copyProperties((Object)face, (Object)param);
|
||||
if (event.getPanoramaData() != null) {
|
||||
param.setPanoramaImagePath(event.getPanoramaData().getPanoramaImagePath());
|
||||
}
|
||||
param.setDeviceCode(event.getDeviceId());
|
||||
param.setThreshold(BigDecimal.valueOf(event.getThreshold()));
|
||||
param.setScore(BigDecimal.valueOf(face.getScore().floatValue()));
|
||||
param.setQualityScore(BigDecimal.valueOf(face.getQualityScore().floatValue()));
|
||||
if (face.getMaskScore() != null) {
|
||||
param.setMaskScore(BigDecimal.valueOf(face.getMaskScore().floatValue()));
|
||||
}
|
||||
if (face.getTempScore() != null) {
|
||||
param.setTempScore(BigDecimal.valueOf(face.getTempScore().floatValue()));
|
||||
}
|
||||
if (!ObjectUtils.isEmpty((Object)event.getReserveInfo())) {
|
||||
param.setReserveInfo(event.getReserveInfo());
|
||||
}
|
||||
param.setCompareType(CompareTypeEnum.RECOG.getCode());
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDevicePersonQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsQrcodeOpenDoorParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDevicePersonResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsDevicePersonQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.param.AcsQrcodeOpenDoorParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.result.AcsDevicePersonResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.device.service.AcsDeviceService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.open.form.AcsDevicePersonQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.open.form.AcsQrcodeOpenDoorForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/open/device"})
|
||||
public class AcsDeviceOpenController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsDeviceService acsDeviceService;
|
||||
|
||||
@PostMapping(value={"/listByPerson"})
|
||||
public CloudwalkResult<List<AcsDevicePersonResult>> listByPerson(@RequestBody AcsDevicePersonQueryForm form) {
|
||||
AcsDevicePersonQueryParam param = (AcsDevicePersonQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsDevicePersonQueryParam.class);
|
||||
try {
|
||||
return this.acsDeviceService.listByPerson(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u4eba\u5458\u5173\u8054\u95e8\u7981\u8bbe\u5907\u5217\u8868\u5931\u8d25,\u539f\u56e0={}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260413", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/qrcode/openDoor"})
|
||||
public CloudwalkResult<Boolean> qrcodeOpenDoor(@RequestBody AcsQrcodeOpenDoorForm form) {
|
||||
AcsQrcodeOpenDoorParam param = (AcsQrcodeOpenDoorParam)BeanCopyUtils.copyProperties((Object)form, AcsQrcodeOpenDoorParam.class);
|
||||
try {
|
||||
return this.acsDeviceService.qrcodeOpenDoor(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u626b\u7801\u5f00\u95e8\u5931\u8d25,\u539f\u56e0={}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260204", (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u626b\u7801\u5f00\u95e8\u5f02\u5e38,\u539f\u56e0={}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260204", (String)this.getMessage("76260204"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsElevatorRecordDetailParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsElevatorRecordDetailParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.open.form.AcsElevatorRecordQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.open.result.AcsElevatorRecordDetailResult;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/elevator/record"})
|
||||
public class AcsElevatorRecordController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private DoorOpenRecordService doorOpenRecordService;
|
||||
|
||||
@PostMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsElevatorRecordDetailResult>> detail(@RequestBody AcsElevatorRecordQueryForm form) {
|
||||
AcsElevatorRecordDetailParam param = (AcsElevatorRecordDetailParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorRecordDetailParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.convertServicePageAbleResultToOpen(this.doorOpenRecordService.elevatorRecord(param, pageInfo, this.getCloudwalkContext()), AcsElevatorRecordDetailResult.class);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5f00\u95e8\u8bb0\u5f55\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260305", (String)this.getMessage("76260305"));
|
||||
}
|
||||
}
|
||||
|
||||
protected <V, T> CloudwalkResult<CloudwalkPageAble<T>> convertServicePageAbleResultToOpen(CloudwalkResult<CloudwalkPageAble<V>> result, Class<T> cls) {
|
||||
CloudwalkPageAble pageAble;
|
||||
if (result.isSuccess() && null != (pageAble = (CloudwalkPageAble)result.getData()) && null != pageAble.getDatas()) {
|
||||
ArrayList openList = new ArrayList(pageAble.getDatas().size());
|
||||
pageAble.getDatas().stream().forEach(item -> openList.add(BeanCopyUtils.copyProperties((Object)item, (Class)cls)));
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo((int)pageAble.getCurrentPage(), (int)pageAble.getPageSize());
|
||||
CloudwalkPageAble openPageAble = new CloudwalkPageAble(openList, pageInfo, pageAble.getTotalRows());
|
||||
return CloudwalkResult.success((Object)openPageAble);
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordDetailParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordDetailParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.open.form.AcsRecordQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.open.result.AcsRecordDetailOpenResult;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/open/record"})
|
||||
public class AcsRecordOpenController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private DoorOpenRecordService doorOpenRecordService;
|
||||
|
||||
@PostMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsRecordDetailOpenResult>> detail(@RequestBody AcsRecordQueryForm form) {
|
||||
AcsRecordDetailParam param = (AcsRecordDetailParam)BeanCopyUtils.copyProperties((Object)form, AcsRecordDetailParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.convertServicePageAbleResultToOpen(this.doorOpenRecordService.openRecord(param, pageInfo, this.getCloudwalkContext()), AcsRecordDetailOpenResult.class);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5f00\u95e8\u8bb0\u5f55\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260305", (String)this.getMessage("76260305"));
|
||||
}
|
||||
}
|
||||
|
||||
protected <V, T> CloudwalkResult<CloudwalkPageAble<T>> convertServicePageAbleResultToOpen(CloudwalkResult<CloudwalkPageAble<V>> result, Class<T> cls) {
|
||||
CloudwalkPageAble pageAble;
|
||||
if (result.isSuccess() && null != (pageAble = (CloudwalkPageAble)result.getData()) && null != pageAble.getDatas()) {
|
||||
ArrayList openList = new ArrayList(pageAble.getDatas().size());
|
||||
pageAble.getDatas().stream().forEach(item -> openList.add(BeanCopyUtils.copyProperties((Object)item, (Class)cls)));
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo((int)pageAble.getCurrentPage(), (int)pageAble.getPageSize());
|
||||
CloudwalkPageAble openPageAble = new CloudwalkPageAble(openList, pageInfo, pageAble.getTotalRows());
|
||||
return CloudwalkResult.success((Object)openPageAble);
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDevicePersonQueryForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7004525596087724952L;
|
||||
private String personId;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
* javax.validation.constraints.NotNull
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsElevatorRecordQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
@NotNull(message="76260302")
|
||||
private Long startTime;
|
||||
@NotNull(message="76260303")
|
||||
private Long endTime;
|
||||
private String personName;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private List<String> deviceIds;
|
||||
private String openDoorTypeCode;
|
||||
private Integer recordResult;
|
||||
private String srcFloor;
|
||||
private String destFloor;
|
||||
private String dispatchElevatorNo;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getOpenDoorTypeCode() {
|
||||
return this.openDoorTypeCode;
|
||||
}
|
||||
|
||||
public void setOpenDoorTypeCode(String openDoorTypeCode) {
|
||||
this.openDoorTypeCode = openDoorTypeCode;
|
||||
}
|
||||
|
||||
public Integer getRecordResult() {
|
||||
return this.recordResult;
|
||||
}
|
||||
|
||||
public void setRecordResult(Integer recordResult) {
|
||||
this.recordResult = recordResult;
|
||||
}
|
||||
|
||||
public String getSrcFloor() {
|
||||
return this.srcFloor;
|
||||
}
|
||||
|
||||
public void setSrcFloor(String srcFloor) {
|
||||
this.srcFloor = srcFloor;
|
||||
}
|
||||
|
||||
public String getDestFloor() {
|
||||
return this.destFloor;
|
||||
}
|
||||
|
||||
public void setDestFloor(String destFloor) {
|
||||
this.destFloor = destFloor;
|
||||
}
|
||||
|
||||
public String getDispatchElevatorNo() {
|
||||
return this.dispatchElevatorNo;
|
||||
}
|
||||
|
||||
public void setDispatchElevatorNo(String dispatchElevatorNo) {
|
||||
this.dispatchElevatorNo = dispatchElevatorNo;
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsQrcodeOpenDoorForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 3602797843501125579L;
|
||||
private String deviceId;
|
||||
private List<String> personIds;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
}
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
* javax.validation.constraints.NotNull
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsRecordQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3755204177673375034L;
|
||||
@NotNull(message="76260302")
|
||||
private Long startTime;
|
||||
@NotNull(message="76260303")
|
||||
private Long endTime;
|
||||
private String personName;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private List<String> deviceIds;
|
||||
private String openDoorTypeCode;
|
||||
private Integer recordResult;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getOpenDoorTypeCode() {
|
||||
return this.openDoorTypeCode;
|
||||
}
|
||||
|
||||
public void setOpenDoorTypeCode(String openDoorTypeCode) {
|
||||
this.openDoorTypeCode = openDoorTypeCode;
|
||||
}
|
||||
|
||||
public Integer getRecordResult() {
|
||||
return this.recordResult;
|
||||
}
|
||||
|
||||
public void setRecordResult(Integer recordResult) {
|
||||
this.recordResult = recordResult;
|
||||
}
|
||||
}
|
||||
|
||||
+269
@@ -0,0 +1,269 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.annotation.DavinciPic
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.result;
|
||||
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.annotation.DavinciPic;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class AcsElevatorRecordDetailResult {
|
||||
@DavinciPic
|
||||
private String panoramaImage;
|
||||
@DavinciPic
|
||||
private String faceImage;
|
||||
@DavinciPic
|
||||
private String registerImage;
|
||||
private String personName;
|
||||
private long recognitionTime;
|
||||
private String districtName;
|
||||
private String areaName;
|
||||
private String deviceTypeName;
|
||||
private String deviceName;
|
||||
private String openDoorType;
|
||||
private String operateName;
|
||||
private String openDoorTypeCode;
|
||||
private BigDecimal score;
|
||||
private Integer recordResult;
|
||||
private String recognitionNo;
|
||||
private BigDecimal threshold;
|
||||
private Integer recognitionResult;
|
||||
private String groupId;
|
||||
private String faceId;
|
||||
private BigDecimal qualityScore;
|
||||
private String logId;
|
||||
private BigDecimal tempScore;
|
||||
private BigDecimal maskScore;
|
||||
private BigDecimal tempThreshold;
|
||||
private String srcFloor;
|
||||
private String destFloor;
|
||||
private String dispatchElevatorNo;
|
||||
private Long dispatchElevatorTime;
|
||||
|
||||
public String getPanoramaImage() {
|
||||
return this.panoramaImage;
|
||||
}
|
||||
|
||||
public void setPanoramaImage(String panoramaImage) {
|
||||
this.panoramaImage = panoramaImage;
|
||||
}
|
||||
|
||||
public String getFaceImage() {
|
||||
return this.faceImage;
|
||||
}
|
||||
|
||||
public void setFaceImage(String faceImage) {
|
||||
this.faceImage = faceImage;
|
||||
}
|
||||
|
||||
public String getRegisterImage() {
|
||||
return this.registerImage;
|
||||
}
|
||||
|
||||
public void setRegisterImage(String registerImage) {
|
||||
this.registerImage = registerImage;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public long getRecognitionTime() {
|
||||
return this.recognitionTime;
|
||||
}
|
||||
|
||||
public void setRecognitionTime(long recognitionTime) {
|
||||
this.recognitionTime = recognitionTime;
|
||||
}
|
||||
|
||||
public String getDistrictName() {
|
||||
return this.districtName;
|
||||
}
|
||||
|
||||
public void setDistrictName(String districtName) {
|
||||
this.districtName = districtName;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return this.areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getDeviceTypeName() {
|
||||
return this.deviceTypeName;
|
||||
}
|
||||
|
||||
public void setDeviceTypeName(String deviceTypeName) {
|
||||
this.deviceTypeName = deviceTypeName;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getOpenDoorType() {
|
||||
return this.openDoorType;
|
||||
}
|
||||
|
||||
public void setOpenDoorType(String openDoorType) {
|
||||
this.openDoorType = openDoorType;
|
||||
}
|
||||
|
||||
public String getOperateName() {
|
||||
return this.operateName;
|
||||
}
|
||||
|
||||
public void setOperateName(String operateName) {
|
||||
this.operateName = operateName;
|
||||
}
|
||||
|
||||
public String getOpenDoorTypeCode() {
|
||||
return this.openDoorTypeCode;
|
||||
}
|
||||
|
||||
public void setOpenDoorTypeCode(String openDoorTypeCode) {
|
||||
this.openDoorTypeCode = openDoorTypeCode;
|
||||
}
|
||||
|
||||
public BigDecimal getScore() {
|
||||
return this.score;
|
||||
}
|
||||
|
||||
public void setScore(BigDecimal score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Integer getRecordResult() {
|
||||
return this.recordResult;
|
||||
}
|
||||
|
||||
public void setRecordResult(Integer recordResult) {
|
||||
this.recordResult = recordResult;
|
||||
}
|
||||
|
||||
public String getRecognitionNo() {
|
||||
return this.recognitionNo;
|
||||
}
|
||||
|
||||
public void setRecognitionNo(String recognitionNo) {
|
||||
this.recognitionNo = recognitionNo;
|
||||
}
|
||||
|
||||
public BigDecimal getThreshold() {
|
||||
return this.threshold;
|
||||
}
|
||||
|
||||
public void setThreshold(BigDecimal threshold) {
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
public Integer getRecognitionResult() {
|
||||
return this.recognitionResult;
|
||||
}
|
||||
|
||||
public void setRecognitionResult(Integer recognitionResult) {
|
||||
this.recognitionResult = recognitionResult;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getFaceId() {
|
||||
return this.faceId;
|
||||
}
|
||||
|
||||
public void setFaceId(String faceId) {
|
||||
this.faceId = faceId;
|
||||
}
|
||||
|
||||
public BigDecimal getQualityScore() {
|
||||
return this.qualityScore;
|
||||
}
|
||||
|
||||
public void setQualityScore(BigDecimal qualityScore) {
|
||||
this.qualityScore = qualityScore;
|
||||
}
|
||||
|
||||
public String getLogId() {
|
||||
return this.logId;
|
||||
}
|
||||
|
||||
public void setLogId(String logId) {
|
||||
this.logId = logId;
|
||||
}
|
||||
|
||||
public BigDecimal getTempScore() {
|
||||
return this.tempScore;
|
||||
}
|
||||
|
||||
public void setTempScore(BigDecimal tempScore) {
|
||||
this.tempScore = tempScore;
|
||||
}
|
||||
|
||||
public BigDecimal getMaskScore() {
|
||||
return this.maskScore;
|
||||
}
|
||||
|
||||
public void setMaskScore(BigDecimal maskScore) {
|
||||
this.maskScore = maskScore;
|
||||
}
|
||||
|
||||
public BigDecimal getTempThreshold() {
|
||||
return this.tempThreshold;
|
||||
}
|
||||
|
||||
public void setTempThreshold(BigDecimal tempThreshold) {
|
||||
this.tempThreshold = tempThreshold;
|
||||
}
|
||||
|
||||
public String getSrcFloor() {
|
||||
return this.srcFloor;
|
||||
}
|
||||
|
||||
public void setSrcFloor(String srcFloor) {
|
||||
this.srcFloor = srcFloor;
|
||||
}
|
||||
|
||||
public String getDestFloor() {
|
||||
return this.destFloor;
|
||||
}
|
||||
|
||||
public void setDestFloor(String destFloor) {
|
||||
this.destFloor = destFloor;
|
||||
}
|
||||
|
||||
public String getDispatchElevatorNo() {
|
||||
return this.dispatchElevatorNo;
|
||||
}
|
||||
|
||||
public void setDispatchElevatorNo(String dispatchElevatorNo) {
|
||||
this.dispatchElevatorNo = dispatchElevatorNo;
|
||||
}
|
||||
|
||||
public Long getDispatchElevatorTime() {
|
||||
return this.dispatchElevatorTime;
|
||||
}
|
||||
|
||||
public void setDispatchElevatorTime(Long dispatchElevatorTime) {
|
||||
this.dispatchElevatorTime = dispatchElevatorTime;
|
||||
}
|
||||
}
|
||||
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.annotation.DavinciPic
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.open.result;
|
||||
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.annotation.DavinciPic;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class AcsRecordDetailOpenResult
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7541286997299370066L;
|
||||
@DavinciPic
|
||||
private String panoramaImage;
|
||||
@DavinciPic
|
||||
private String faceImage;
|
||||
@DavinciPic
|
||||
private String registerImage;
|
||||
private String personName;
|
||||
private long recognitionTime;
|
||||
private String districtName;
|
||||
private String areaName;
|
||||
private String deviceTypeName;
|
||||
private String deviceName;
|
||||
private String openDoorType;
|
||||
private String operateName;
|
||||
private String openDoorTypeCode;
|
||||
private BigDecimal score;
|
||||
private Integer recordResult;
|
||||
private String recognitionNo;
|
||||
private BigDecimal threshold;
|
||||
private Integer recognitionResult;
|
||||
private String groupId;
|
||||
private String faceId;
|
||||
private BigDecimal qualityScore;
|
||||
private String logId;
|
||||
private BigDecimal tempScore;
|
||||
private BigDecimal maskScore;
|
||||
private BigDecimal tempThreshold;
|
||||
|
||||
public String getPanoramaImage() {
|
||||
return this.panoramaImage;
|
||||
}
|
||||
|
||||
public void setPanoramaImage(String panoramaImage) {
|
||||
this.panoramaImage = panoramaImage;
|
||||
}
|
||||
|
||||
public String getFaceImage() {
|
||||
return this.faceImage;
|
||||
}
|
||||
|
||||
public void setFaceImage(String faceImage) {
|
||||
this.faceImage = faceImage;
|
||||
}
|
||||
|
||||
public String getRegisterImage() {
|
||||
return this.registerImage;
|
||||
}
|
||||
|
||||
public void setRegisterImage(String registerImage) {
|
||||
this.registerImage = registerImage;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public long getRecognitionTime() {
|
||||
return this.recognitionTime;
|
||||
}
|
||||
|
||||
public void setRecognitionTime(long recognitionTime) {
|
||||
this.recognitionTime = recognitionTime;
|
||||
}
|
||||
|
||||
public String getDistrictName() {
|
||||
return this.districtName;
|
||||
}
|
||||
|
||||
public void setDistrictName(String districtName) {
|
||||
this.districtName = districtName;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return this.areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getDeviceTypeName() {
|
||||
return this.deviceTypeName;
|
||||
}
|
||||
|
||||
public void setDeviceTypeName(String deviceTypeName) {
|
||||
this.deviceTypeName = deviceTypeName;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getOpenDoorType() {
|
||||
return this.openDoorType;
|
||||
}
|
||||
|
||||
public void setOpenDoorType(String openDoorType) {
|
||||
this.openDoorType = openDoorType;
|
||||
}
|
||||
|
||||
public String getOperateName() {
|
||||
return this.operateName;
|
||||
}
|
||||
|
||||
public void setOperateName(String operateName) {
|
||||
this.operateName = operateName;
|
||||
}
|
||||
|
||||
public String getOpenDoorTypeCode() {
|
||||
return this.openDoorTypeCode;
|
||||
}
|
||||
|
||||
public void setOpenDoorTypeCode(String openDoorTypeCode) {
|
||||
this.openDoorTypeCode = openDoorTypeCode;
|
||||
}
|
||||
|
||||
public BigDecimal getScore() {
|
||||
return this.score;
|
||||
}
|
||||
|
||||
public void setScore(BigDecimal score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Integer getRecordResult() {
|
||||
return this.recordResult;
|
||||
}
|
||||
|
||||
public void setRecordResult(Integer recordResult) {
|
||||
this.recordResult = recordResult;
|
||||
}
|
||||
|
||||
public String getRecognitionNo() {
|
||||
return this.recognitionNo;
|
||||
}
|
||||
|
||||
public void setRecognitionNo(String recognitionNo) {
|
||||
this.recognitionNo = recognitionNo;
|
||||
}
|
||||
|
||||
public BigDecimal getThreshold() {
|
||||
return this.threshold;
|
||||
}
|
||||
|
||||
public void setThreshold(BigDecimal threshold) {
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
public Integer getRecognitionResult() {
|
||||
return this.recognitionResult;
|
||||
}
|
||||
|
||||
public void setRecognitionResult(Integer recognitionResult) {
|
||||
this.recognitionResult = recognitionResult;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getFaceId() {
|
||||
return this.faceId;
|
||||
}
|
||||
|
||||
public void setFaceId(String faceId) {
|
||||
this.faceId = faceId;
|
||||
}
|
||||
|
||||
public BigDecimal getQualityScore() {
|
||||
return this.qualityScore;
|
||||
}
|
||||
|
||||
public void setQualityScore(BigDecimal qualityScore) {
|
||||
this.qualityScore = qualityScore;
|
||||
}
|
||||
|
||||
public String getLogId() {
|
||||
return this.logId;
|
||||
}
|
||||
|
||||
public void setLogId(String logId) {
|
||||
this.logId = logId;
|
||||
}
|
||||
|
||||
public BigDecimal getTempScore() {
|
||||
return this.tempScore;
|
||||
}
|
||||
|
||||
public void setTempScore(BigDecimal tempScore) {
|
||||
this.tempScore = tempScore;
|
||||
}
|
||||
|
||||
public BigDecimal getMaskScore() {
|
||||
return this.maskScore;
|
||||
}
|
||||
|
||||
public void setMaskScore(BigDecimal maskScore) {
|
||||
this.maskScore = maskScore;
|
||||
}
|
||||
|
||||
public BigDecimal getTempThreshold() {
|
||||
return this.tempThreshold;
|
||||
}
|
||||
|
||||
public void setTempThreshold(BigDecimal tempThreshold) {
|
||||
this.tempThreshold = tempThreshold;
|
||||
}
|
||||
}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleDeleteParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleEditParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleNewParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.result.AcsPassRuleDetailResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.result.AcsPassRuleResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.service.AcsPassRuleService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleDeleteParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleEditParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleNewParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.result.AcsPassRuleDetailResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.result.AcsPassRuleResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.service.AcsPassRuleService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassRuleDeleteForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassRuleEditForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassRuleNewForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassRuleQueryForm;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/passRule"})
|
||||
public class AcsPassRuleController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsPassRuleService acsPassRuleService;
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<String> add(@RequestBody AcsPassRuleNewForm form) {
|
||||
AcsPassRuleNewParam param = (AcsPassRuleNewParam)BeanCopyUtils.copyProperties((Object)form, AcsPassRuleNewParam.class);
|
||||
try {
|
||||
return this.acsPassRuleService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u65b0\u589e\u901a\u884c\u89c4\u5219\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260505", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody AcsPassRuleEditForm form) {
|
||||
AcsPassRuleEditParam param = (AcsPassRuleEditParam)BeanCopyUtils.copyProperties((Object)form, AcsPassRuleEditParam.class);
|
||||
try {
|
||||
return this.acsPassRuleService.update(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4fee\u6539\u901a\u884c\u89c4\u5219\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260506", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsPassRuleDeleteForm form) {
|
||||
AcsPassRuleDeleteParam param = (AcsPassRuleDeleteParam)BeanCopyUtils.copyProperties((Object)form, AcsPassRuleDeleteParam.class);
|
||||
try {
|
||||
return this.acsPassRuleService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5220\u9664\u901a\u884c\u89c4\u5219\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260507", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/detail"})
|
||||
public CloudwalkResult<AcsPassRuleDetailResult> detail(@RequestBody AcsPassRuleQueryForm form) {
|
||||
AcsPassRuleQueryParam param = (AcsPassRuleQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPassRuleQueryParam.class);
|
||||
try {
|
||||
return this.acsPassRuleService.detail(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u901a\u884c\u89c4\u5219\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260508", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPassRuleResult>> page(@RequestBody AcsPassRuleQueryForm form) {
|
||||
AcsPassRuleQueryParam param = (AcsPassRuleQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPassRuleQueryParam.class);
|
||||
try {
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
return this.acsPassRuleService.page(param, page, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u901a\u884c\u89c4\u5219\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260508", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeDeleteParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeEditParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.result.AcsPassTimeResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.service.AcsPassTimeService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeDeleteParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeEditParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.result.AcsPassTimeResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.service.AcsPassTimeService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassTimeAddForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassTimeDeleteForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassTimeEditForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.passtime.form.AcsPassTimeQueryForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/passableTime"})
|
||||
public class AcsPassTimeController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsPassTimeService acsPassTimeService;
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<String> add(@RequestBody AcsPassTimeAddForm form) {
|
||||
AcsPassTimeAddParam param = (AcsPassTimeAddParam)BeanCopyUtils.copyProperties((Object)form, AcsPassTimeAddParam.class);
|
||||
try {
|
||||
return this.acsPassTimeService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6dfb\u52a0\u901a\u884c\u65f6\u95f4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260501", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody AcsPassTimeEditForm form) {
|
||||
AcsPassTimeEditParam param = (AcsPassTimeEditParam)BeanCopyUtils.copyProperties((Object)form, AcsPassTimeEditParam.class);
|
||||
try {
|
||||
return this.acsPassTimeService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7f16\u8f91\u901a\u884c\u65f6\u95f4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260502", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsPassTimeDeleteForm form) {
|
||||
AcsPassTimeDeleteParam param = (AcsPassTimeDeleteParam)BeanCopyUtils.copyProperties((Object)form, AcsPassTimeDeleteParam.class);
|
||||
try {
|
||||
return this.acsPassTimeService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5220\u9664\u901a\u884c\u65f6\u95f4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260503", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/query"})
|
||||
public CloudwalkResult<List<AcsPassTimeResult>> list(@RequestBody AcsPassTimeQueryForm form) {
|
||||
AcsPassTimeQueryParam param = (AcsPassTimeQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPassTimeQueryParam.class);
|
||||
try {
|
||||
return this.acsPassTimeService.list(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u901a\u884c\u65f6\u95f4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260504", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/detail"})
|
||||
public CloudwalkResult<AcsPassTimeResult> detail(@RequestBody AcsPassTimeQueryForm form) {
|
||||
AcsPassTimeQueryParam param = (AcsPassTimeQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPassTimeQueryParam.class);
|
||||
try {
|
||||
return this.acsPassTimeService.get(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u901a\u884c\u65f6\u95f4\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260504", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleDeleteForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -52051042529262978L;
|
||||
private List<String> ids;
|
||||
private String deviceId;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -27068608402591250L;
|
||||
private String id;
|
||||
private String deviceId;
|
||||
private String deviceCode;
|
||||
private String ruleName;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
private List<String> excludeLabels;
|
||||
private String passableTimeId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public String getPassableTimeId() {
|
||||
return this.passableTimeId;
|
||||
}
|
||||
|
||||
public void setPassableTimeId(String passableTimeId) {
|
||||
this.passableTimeId = passableTimeId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
}
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleNewForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -46113273262522744L;
|
||||
private String deviceId;
|
||||
private String deviceCode;
|
||||
private String ruleName;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
private List<String> excludeLabels;
|
||||
private String passableTimeId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public String getPassableTimeId() {
|
||||
return this.passableTimeId;
|
||||
}
|
||||
|
||||
public void setPassableTimeId(String passableTimeId) {
|
||||
this.passableTimeId = passableTimeId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private String deviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeCycleParam
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeCycleParam;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassTimeAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3133621949173807211L;
|
||||
private String passableTimeName;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassTimeDeleteForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -6992613937888321721L;
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeCycleParam
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.passtime.param.AcsPassTimeCycleParam;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassTimeEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 8659901654800151811L;
|
||||
private String id;
|
||||
private String passableTimeName;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.passtime.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassTimeQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
}
|
||||
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonAddNewParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonAddParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonDeleteParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonDetailParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonEditParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonFaceParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonQueryByAppParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonQueryParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonTimeDetailParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsImagestorePersonStatisticsResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonDetailResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonFaceResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonTimeDetailResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.service.AcsPersonService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsPersonRecordExcelResult
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsRulePersonExportAsyncService
|
||||
* javax.annotation.Resource
|
||||
* javax.validation.Valid
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.validation.BindingResult
|
||||
* org.springframework.validation.ObjectError
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonAddNewParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonAddParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonDeleteParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonDetailParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonEditParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonFaceParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonQueryByAppParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonTimeDetailParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsImagestorePersonStatisticsResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonDetailResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonFaceResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.result.AcsPersonTimeDetailResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.service.AcsPersonService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsPersonRecordExcelResult;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsRulePersonExportAsyncService;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonAddForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonAddNewForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonDeleteForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonDetailForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonEditForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonFaceForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonQueryForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.person.form.AcsPersonTimeDetailForm;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/person"})
|
||||
public class AcsPersonController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsPersonService acsPersonService;
|
||||
@Resource
|
||||
private AcsRulePersonExportAsyncService acsRulePersonExportAsyncService;
|
||||
|
||||
@RequestMapping(value={"/face-compare"})
|
||||
public CloudwalkResult<AcsPersonFaceResult> faceCompare(@RequestBody AcsPersonFaceForm form) {
|
||||
AcsPersonFaceParam param = (AcsPersonFaceParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonFaceParam.class);
|
||||
try {
|
||||
return this.acsPersonService.faceCompare(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4eba\u8138\u6bd4\u5bf9\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260401", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<Boolean> add(@RequestBody AcsPersonAddForm form) {
|
||||
AcsPersonAddParam param = (AcsPersonAddParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonAddParam.class);
|
||||
try {
|
||||
return this.acsPersonService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4ece\u73b0\u6709\u4eba\u5458\u6dfb\u52a0\u95e8\u7981\u901a\u884c\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260404", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/addNew"})
|
||||
public CloudwalkResult<Boolean> addNew(@RequestBody AcsPersonAddNewForm form) {
|
||||
try {
|
||||
AcsPersonAddNewParam param = (AcsPersonAddNewParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonAddNewParam.class);
|
||||
return this.acsPersonService.addNew(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4ece\u65b0\u589e\u4eba\u5458\u6dfb\u52a0\u95e8\u7981\u901a\u884c\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260404", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody AcsPersonEditForm form) {
|
||||
AcsPersonEditParam param = (AcsPersonEditParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonEditParam.class);
|
||||
try {
|
||||
return this.acsPersonService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u7f16\u8f91\u95e8\u7981\u901a\u884c\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260406", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsPersonDeleteForm form) {
|
||||
AcsPersonDeleteParam param = (AcsPersonDeleteParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonDeleteParam.class);
|
||||
try {
|
||||
return this.acsPersonService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5220\u9664\u95e8\u7981\u901a\u884c\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260407", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/imagestorePersonStatistics"})
|
||||
public CloudwalkResult<AcsImagestorePersonStatisticsResult> imagestorePersonStatistics(@RequestBody AcsPersonQueryForm form) {
|
||||
try {
|
||||
AcsPersonQueryParam param = (AcsPersonQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonQueryParam.class);
|
||||
return this.acsPersonService.imagestorePersonStatistics(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5e94\u7528\u56fe\u5e93\u4eba\u5458\u7edf\u8ba1\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260409", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page(@RequestBody AcsPersonQueryForm form) {
|
||||
try {
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
AcsPersonQueryParam param = (AcsPersonQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonQueryParam.class);
|
||||
return this.acsPersonService.page(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u901a\u884c\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260410", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/personDetail"})
|
||||
public CloudwalkResult<AcsPersonDetailResult> personDetail(@RequestBody AcsPersonDetailForm form) {
|
||||
try {
|
||||
AcsPersonDetailParam param = (AcsPersonDetailParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonDetailParam.class);
|
||||
return this.acsPersonService.personDetail(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u901a\u884c\u4eba\u5458\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260411", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/timeDetail"})
|
||||
public CloudwalkResult<AcsPersonTimeDetailResult> timeDetail(@RequestBody AcsPersonTimeDetailForm form) {
|
||||
try {
|
||||
AcsPersonTimeDetailParam param = (AcsPersonTimeDetailParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonTimeDetailParam.class);
|
||||
return this.acsPersonService.timeDetail(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u901a\u884c\u4eba\u5458\u65f6\u95f4\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260416", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/pageByApp"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> pageByApp(@RequestBody AcsPersonQueryForm form) {
|
||||
try {
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
AcsPersonQueryByAppParam param = (AcsPersonQueryByAppParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonQueryByAppParam.class);
|
||||
return this.acsPersonService.pageByApp(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u5e94\u7528\u901a\u884c\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260417", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/page/export"})
|
||||
public CloudwalkResult<Boolean> pageExport(@RequestBody @Valid AcsPersonQueryForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsPersonQueryParam param = (AcsPersonQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsPersonQueryParam.class);
|
||||
return this.acsRulePersonExportAsyncService.startExportTask((Object)param, AcsPersonRecordExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u901a\u884c\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)this.getMessage("76260307"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String deviceId;
|
||||
private List<String> personIds;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private String passableTimeId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPassableTimeId() {
|
||||
return this.passableTimeId;
|
||||
}
|
||||
|
||||
public void setPassableTimeId(String passableTimeId) {
|
||||
this.passableTimeId = passableTimeId;
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonPropertiesParam
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.person.param.AcsPersonPropertiesParam;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonAddNewForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -5310626681307061439L;
|
||||
private String deviceId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private AcsPersonPropertiesParam personProperties;
|
||||
private String passableTimeId;
|
||||
|
||||
public String getPassableTimeId() {
|
||||
return this.passableTimeId;
|
||||
}
|
||||
|
||||
public void setPassableTimeId(String passableTimeId) {
|
||||
this.passableTimeId = passableTimeId;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public AcsPersonPropertiesParam getPersonProperties() {
|
||||
return this.personProperties;
|
||||
}
|
||||
|
||||
public void setPersonProperties(AcsPersonPropertiesParam personProperties) {
|
||||
this.personProperties = personProperties;
|
||||
}
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonDeleteForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String deviceId;
|
||||
private List<String> personIds;
|
||||
private String imageStoreId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonDetailForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 1211300452037642058L;
|
||||
private String deviceId;
|
||||
private String personId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String deviceId;
|
||||
private String personId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private String passableTimeId;
|
||||
private String imageStoreId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPassableTimeId() {
|
||||
return this.passableTimeId;
|
||||
}
|
||||
|
||||
public void setPassableTimeId(String passableTimeId) {
|
||||
this.passableTimeId = passableTimeId;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonFaceForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String deviceId;
|
||||
private String faceImage;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getFaceImage() {
|
||||
return this.faceImage;
|
||||
}
|
||||
|
||||
public void setFaceImage(String faceImage) {
|
||||
this.faceImage = faceImage;
|
||||
}
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -8830219133147503297L;
|
||||
private String deviceId;
|
||||
private String imageStoreId;
|
||||
private List<String> personIds;
|
||||
private String personName;
|
||||
private String applicationId;
|
||||
private List<String> organizationIds;
|
||||
private List<String> labelIds;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getOrganizationIds() {
|
||||
return this.organizationIds;
|
||||
}
|
||||
|
||||
public void setOrganizationIds(List<String> organizationIds) {
|
||||
this.organizationIds = organizationIds;
|
||||
}
|
||||
|
||||
public List<String> getLabelIds() {
|
||||
return this.labelIds;
|
||||
}
|
||||
|
||||
public void setLabelIds(List<String> labelIds) {
|
||||
this.labelIds = labelIds;
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return this.applicationId;
|
||||
}
|
||||
|
||||
public void setApplicationId(String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonTimeDetailForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -1135110893682603631L;
|
||||
private String imageStoreId;
|
||||
private String personId;
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.ping.controller;
|
||||
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.ping.form.PingForm;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/ping"})
|
||||
public class PingController
|
||||
extends AbstractCloudwalkController {
|
||||
@RequestMapping(value={"/index"})
|
||||
public CloudwalkResult<String> index(@RequestBody PingForm form) {
|
||||
String name = form.getName();
|
||||
return CloudwalkResult.success((Object)name);
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.ping.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PingForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -5928824592425234904L;
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
+301
@@ -0,0 +1,301 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsEvacuateRecordPageParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecogRecordPageParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordDetailParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordStatisticsParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordThreeSendParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsTemperatureRecordDetailParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsEvacuateRecordExcelResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsEvacuateRecordResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecogRecordExcelResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecogRecordResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecordDetailExcelResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecordDetailResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecordThreeSendResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsTemperatureRecordDetailExcelResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsTemperatureRecordDetailResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsEvacuateRecordService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsRecordStatisticsService
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.accesscontrol.config.AcsConstants
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsEvacuateRecordExportAsyncService
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsOpenRecordExportAsyncService
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsPersoncCardCompareExportAsyncService
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsRecogRecordExportAsyncService
|
||||
* cn.cloudwalk.service.ninca.accesscontrol.export.AcsTemperatureExportAsyncService
|
||||
* javax.annotation.Resource
|
||||
* javax.validation.Valid
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.validation.BindingResult
|
||||
* org.springframework.validation.ObjectError
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.record.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsEvacuateRecordPageParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecogRecordPageParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordDetailParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordStatisticsParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsRecordThreeSendParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.param.AcsTemperatureRecordDetailParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsEvacuateRecordExcelResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsEvacuateRecordResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecogRecordExcelResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecogRecordResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecordDetailExcelResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecordDetailResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsRecordThreeSendResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsTemperatureRecordDetailExcelResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.result.AcsTemperatureRecordDetailResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsEvacuateRecordService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.AcsRecordStatisticsService;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.record.service.DoorOpenRecordService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.accesscontrol.config.AcsConstants;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsEvacuateRecordExportAsyncService;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsOpenRecordExportAsyncService;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsPersoncCardCompareExportAsyncService;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsRecogRecordExportAsyncService;
|
||||
import cn.cloudwalk.service.ninca.accesscontrol.export.AcsTemperatureExportAsyncService;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.record.form.AcsEvacuateRecordPageForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.record.form.AcsRecogRecordPageForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.record.form.AcsRecordDetailForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.record.form.AcsRecordThreeSendForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.record.form.AcsTemperatureRecordDetailForm;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/record"})
|
||||
public class RecordController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private DoorOpenRecordService doorOpenRecordService;
|
||||
@Autowired
|
||||
private AcsTemperatureExportAsyncService acsTemperatureExportAsyncService;
|
||||
@Autowired
|
||||
private AcsOpenRecordExportAsyncService acsOpenRecordExportAsyncService;
|
||||
@Autowired
|
||||
private AcsRecogRecordExportAsyncService acsRecogRecordExportAsyncService;
|
||||
@Autowired
|
||||
private AcsPersoncCardCompareExportAsyncService acsPersoncCardCompareExportAsyncService;
|
||||
@Autowired
|
||||
private AcsEvacuateRecordService acsEvacuateRecordService;
|
||||
@Resource
|
||||
private AcsEvacuateRecordExportAsyncService acsEvacuateRecordExportAsyncService;
|
||||
@Autowired
|
||||
private AcsRecordStatisticsService acsRecordStatisticsService;
|
||||
|
||||
@PostMapping(value={"/recog-record"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsRecogRecordResult>> recogRecordPage(@RequestBody AcsRecogRecordPageForm form) {
|
||||
AcsRecogRecordPageParam param = (AcsRecogRecordPageParam)BeanCopyUtils.copyProperties((Object)form, AcsRecogRecordPageParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.doorOpenRecordService.recogRecordPage(param, pageInfo, this.getCloudwalkContext(), false);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u8bc6\u522b\u8bb0\u5f55\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260306", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/door/open"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsRecordDetailResult>> detail(@RequestBody AcsRecordDetailForm form) {
|
||||
AcsRecordDetailParam param = (AcsRecordDetailParam)BeanCopyUtils.copyProperties((Object)form, AcsRecordDetailParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.doorOpenRecordService.openRecord(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5f00\u95e8\u8bb0\u5f55\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260305", (String)this.getMessage("76260305"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/three/send"})
|
||||
public CloudwalkResult<List<AcsRecordThreeSendResult>> listByTime(@RequestBody AcsRecordThreeSendForm form) {
|
||||
AcsRecordThreeSendParam param = (AcsRecordThreeSendParam)BeanCopyUtils.copyProperties((Object)form, AcsRecordThreeSendParam.class);
|
||||
try {
|
||||
return this.doorOpenRecordService.listByTime(param);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6839\u636e\u65f6\u95f4\u67e5\u8be2\u6210\u529f\u7684\u5f00\u95e8\u8bb0\u5f55\uff08100\u6761\uff09\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260305", (String)this.getMessage("76260305"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/temperature/abnormal"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsTemperatureRecordDetailResult>> temperature(@RequestBody AcsTemperatureRecordDetailForm form) {
|
||||
AcsTemperatureRecordDetailParam param = (AcsTemperatureRecordDetailParam)BeanCopyUtils.copyProperties((Object)form, AcsTemperatureRecordDetailParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.doorOpenRecordService.temperature(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5f02\u5e38\u4f53\u6e29\u8bb0\u5f55\u8be6\u60c5\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260322", (String)this.getMessage("76260322"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/evacuation/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsEvacuateRecordResult>> evacuateRecordPage(@RequestBody AcsEvacuateRecordPageForm form) {
|
||||
AcsEvacuateRecordPageParam param = (AcsEvacuateRecordPageParam)BeanCopyUtils.copyProperties((Object)form, AcsEvacuateRecordPageParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.acsEvacuateRecordService.page(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u5206\u9875\u67e5\u8be2\u758f\u6563\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260323", (String)this.getMessage("76260323"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/evacuation/export"})
|
||||
public CloudwalkResult<Boolean> evacuateExport(@RequestBody @Valid AcsEvacuateRecordPageForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsEvacuateRecordPageParam param = new AcsEvacuateRecordPageParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.acsEvacuateRecordExportAsyncService.startExportTask((Object)param, AcsEvacuateRecordExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u758f\u6563\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)"76260307");
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/temperature/abnormal/export"})
|
||||
public CloudwalkResult<Boolean> temperatureExport(@RequestBody @Valid AcsTemperatureRecordDetailForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsTemperatureRecordDetailParam param = new AcsTemperatureRecordDetailParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
if (param.getEndTime() - param.getStartTime() > AcsConstants.ONE_YEAR_MILLISECONDS) {
|
||||
return CloudwalkResult.fail((String)"76260304", (String)this.getMessage("76260304"));
|
||||
}
|
||||
return this.acsTemperatureExportAsyncService.startExportTask((Object)param, AcsTemperatureRecordDetailExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u5f02\u5e38\u4f53\u6e29\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)this.getMessage("76260307"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/door/open/export"})
|
||||
public CloudwalkResult<Boolean> detailExport(@RequestBody AcsRecordDetailForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsRecordDetailParam param = new AcsRecordDetailParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
if (param.getEndTime() - param.getStartTime() > AcsConstants.ONE_YEAR_MILLISECONDS) {
|
||||
return CloudwalkResult.fail((String)"76260304", (String)this.getMessage("76260304"));
|
||||
}
|
||||
return this.acsOpenRecordExportAsyncService.startExportTask((Object)param, AcsRecordDetailExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u5f00\u95e8\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)this.getMessage("76260307"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/recog-record/export"})
|
||||
public CloudwalkResult<Boolean> recogRecordExport(@RequestBody AcsRecogRecordPageForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsRecogRecordPageParam param = new AcsRecogRecordPageParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
if (param.getEndTime() - param.getStartTime() > AcsConstants.ONE_YEAR_MILLISECONDS) {
|
||||
return CloudwalkResult.fail((String)"76260304", (String)this.getMessage("76260304"));
|
||||
}
|
||||
return this.acsRecogRecordExportAsyncService.startExportTask((Object)param, AcsRecogRecordExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u8bc6\u522b\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)this.getMessage("76260307"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/person-card/export"})
|
||||
public CloudwalkResult<Boolean> personCardExport(@RequestBody AcsRecogRecordPageForm form, BindingResult bindingResult) {
|
||||
try {
|
||||
if (bindingResult.hasErrors()) {
|
||||
ObjectError objectError = (ObjectError)bindingResult.getAllErrors().get(0);
|
||||
String code = objectError.getDefaultMessage();
|
||||
return CloudwalkResult.fail((String)code, (String)this.getMessage(code));
|
||||
}
|
||||
AcsRecogRecordPageParam param = new AcsRecogRecordPageParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
if (param.getEndTime() - param.getStartTime() > AcsConstants.ONE_YEAR_MILLISECONDS) {
|
||||
return CloudwalkResult.fail((String)"76260304", (String)this.getMessage("76260304"));
|
||||
}
|
||||
return this.acsPersoncCardCompareExportAsyncService.startExportTask((Object)param, AcsRecogRecordExcelResult.class, null, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u5bfc\u51fa\u4eba\u8bc1\u6bd4\u5bf9\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"76260307", (String)this.getMessage("76260307"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/door/open/export/count"})
|
||||
public CloudwalkResult<Long> exportCount() throws ServiceException {
|
||||
try {
|
||||
return this.acsEvacuateRecordExportAsyncService.exportCount();
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u83b7\u53d6\u6700\u5927\u5bfc\u51fa\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260333", (String)this.getMessage("76260333"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"statistics"})
|
||||
public CloudwalkResult<?> recordStatistics(AcsRecordStatisticsParam param) {
|
||||
try {
|
||||
return this.acsRecordStatisticsService.recordStatistics(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u83b7\u53d6\u7edf\u8ba1\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260334", (String)this.getMessage("76260334"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.record.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsEvacuateRecordPageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7957634083624686501L;
|
||||
private Long switchOnTimeBegin;
|
||||
private Long switchOnTimeEnd;
|
||||
private Long switchOffTimeBegin;
|
||||
private Long switchOffTimeEnd;
|
||||
private List<String> groupIds;
|
||||
|
||||
public Long getSwitchOnTimeBegin() {
|
||||
return this.switchOnTimeBegin;
|
||||
}
|
||||
|
||||
public void setSwitchOnTimeBegin(Long switchOnTimeBegin) {
|
||||
this.switchOnTimeBegin = switchOnTimeBegin;
|
||||
}
|
||||
|
||||
public Long getSwitchOnTimeEnd() {
|
||||
return this.switchOnTimeEnd;
|
||||
}
|
||||
|
||||
public void setSwitchOnTimeEnd(Long switchOnTimeEnd) {
|
||||
this.switchOnTimeEnd = switchOnTimeEnd;
|
||||
}
|
||||
|
||||
public Long getSwitchOffTimeBegin() {
|
||||
return this.switchOffTimeBegin;
|
||||
}
|
||||
|
||||
public void setSwitchOffTimeBegin(Long switchOffTimeBegin) {
|
||||
this.switchOffTimeBegin = switchOffTimeBegin;
|
||||
}
|
||||
|
||||
public Long getSwitchOffTimeEnd() {
|
||||
return this.switchOffTimeEnd;
|
||||
}
|
||||
|
||||
public void setSwitchOffTimeEnd(Long switchOffTimeEnd) {
|
||||
this.switchOffTimeEnd = switchOffTimeEnd;
|
||||
}
|
||||
|
||||
public List<String> getGroupIds() {
|
||||
return this.groupIds;
|
||||
}
|
||||
|
||||
public void setGroupIds(List<String> groupIds) {
|
||||
this.groupIds = groupIds;
|
||||
}
|
||||
}
|
||||
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.record.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsRecogRecordPageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private String personName;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private List<String> deviceIds;
|
||||
private Integer recognitionResult;
|
||||
private Integer compareType;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public Integer getRecognitionResult() {
|
||||
return this.recognitionResult;
|
||||
}
|
||||
|
||||
public void setRecognitionResult(Integer recognitionResult) {
|
||||
this.recognitionResult = recognitionResult;
|
||||
}
|
||||
|
||||
public Integer getCompareType() {
|
||||
return this.compareType;
|
||||
}
|
||||
|
||||
public void setCompareType(Integer compareType) {
|
||||
this.compareType = compareType;
|
||||
}
|
||||
}
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
* javax.validation.constraints.NotNull
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.record.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsRecordDetailForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3475211265359169812L;
|
||||
@NotNull(message="76260302")
|
||||
private Long startTime;
|
||||
@NotNull(message="76260303")
|
||||
private Long endTime;
|
||||
private String personName;
|
||||
private String personId;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private List<String> deviceIds;
|
||||
private String openDoorTypeCode;
|
||||
private Integer recordResult;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public String getOpenDoorTypeCode() {
|
||||
return this.openDoorTypeCode;
|
||||
}
|
||||
|
||||
public void setOpenDoorTypeCode(String openDoorTypeCode) {
|
||||
this.openDoorTypeCode = openDoorTypeCode;
|
||||
}
|
||||
|
||||
public Integer getRecordResult() {
|
||||
return this.recordResult;
|
||||
}
|
||||
|
||||
public void setRecordResult(Integer recordResult) {
|
||||
this.recordResult = recordResult;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.record.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsRecordThreeSendForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3475211265359169812L;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
* javax.validation.constraints.NotNull
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.record.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsTemperatureRecordDetailForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 5575193625166256076L;
|
||||
@NotNull(message="76260302")
|
||||
private Long startTime;
|
||||
@NotNull(message="76260303")
|
||||
private Long endTime;
|
||||
private String personName;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceDefaultSettingParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceSettingGetsParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceSettingParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceTemperatureSettingParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsSettingAttrParam
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.result.AcsDeviceSettingResult
|
||||
* cn.cloudwalk.client.ninca.accesscontrol.setting.service.AcsDeviceSettingService
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.setting.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceDefaultSettingParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceSettingGetsParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceSettingParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsDeviceTemperatureSettingParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.param.AcsSettingAttrParam;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.result.AcsDeviceSettingResult;
|
||||
import cn.cloudwalk.client.ninca.accesscontrol.setting.service.AcsDeviceSettingService;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.setting.form.AcsDeviceSettingForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.setting.form.AcsDeviceSettingGetDefaultForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.setting.form.AcsDeviceSettingGetsForm;
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.setting.form.AcsDeviceTemperatureSettingForm;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/acs/setting"})
|
||||
public class AcsDeviceSettingController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsDeviceSettingService acsDeviceSettingService;
|
||||
|
||||
@RequestMapping(value={"/gets"})
|
||||
public CloudwalkResult<List<AcsDeviceSettingResult>> gets(@RequestBody AcsDeviceSettingGetsForm form) {
|
||||
AcsDeviceSettingGetsParam param = (AcsDeviceSettingGetsParam)BeanCopyUtils.copyProperties((Object)form, AcsDeviceSettingGetsParam.class);
|
||||
try {
|
||||
return this.acsDeviceSettingService.gets(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u8bbe\u5907\u53c2\u6570\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260100", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/get-init"})
|
||||
public CloudwalkResult<List<AcsDeviceSettingResult>> getInit(@RequestBody AcsDeviceSettingGetDefaultForm form) {
|
||||
AcsDeviceDefaultSettingParam param = (AcsDeviceDefaultSettingParam)BeanCopyUtils.copyProperties((Object)form, AcsDeviceDefaultSettingParam.class);
|
||||
try {
|
||||
return this.acsDeviceSettingService.getDefault(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u8bbe\u5907\u9ed8\u8ba4\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260101", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/get-temperature"})
|
||||
public CloudwalkResult<AcsDeviceSettingResult> getTemperatureSetting(@RequestBody AcsDeviceTemperatureSettingForm form) {
|
||||
AcsDeviceTemperatureSettingParam param = (AcsDeviceTemperatureSettingParam)BeanCopyUtils.copyProperties((Object)form, AcsDeviceTemperatureSettingParam.class);
|
||||
try {
|
||||
return this.acsDeviceSettingService.getTemperatureSetting(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u8bbe\u5907\u6e29\u5ea6\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260104", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/save"})
|
||||
public CloudwalkResult<Boolean> save(@RequestBody AcsDeviceSettingForm form) {
|
||||
AcsDeviceSettingParam param = (AcsDeviceSettingParam)BeanCopyUtils.copyProperties((Object)form, AcsDeviceSettingParam.class);
|
||||
List attrs = BeanCopyUtils.copy(form.getAttrs(), AcsSettingAttrParam.class);
|
||||
param.setAttrs(attrs);
|
||||
try {
|
||||
return this.acsDeviceSettingService.setting(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u8bbe\u7f6e\u8bbe\u5907\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260102", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/getTemperatureInit"})
|
||||
public CloudwalkResult<BigDecimal> getTemperatureInit() {
|
||||
try {
|
||||
return this.acsDeviceSettingService.getTemperatureInit();
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u8bbe\u5907\u6e29\u5ea6\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76260104", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.setting.form;
|
||||
|
||||
import cn.cloudwalk.web.ninca.accesscontrol.setting.form.AcsSettingAttrForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceSettingForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 3050256069347697332L;
|
||||
private List<String> deviceIds;
|
||||
private List<AcsSettingAttrForm> attrs;
|
||||
|
||||
public List<AcsSettingAttrForm> getAttrs() {
|
||||
return this.attrs;
|
||||
}
|
||||
|
||||
public void setAttrs(List<AcsSettingAttrForm> attrs) {
|
||||
this.attrs = attrs;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.setting.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceSettingGetDefaultForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 3550788921132261969L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.setting.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsDeviceSettingGetsForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 3550788921132261969L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.setting.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceTemperatureSettingForm
|
||||
implements Serializable {
|
||||
private String deviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
}
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.accesscontrol.setting.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsSettingAttrForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 1670487736253830287L;
|
||||
private String name;
|
||||
private String value;
|
||||
private String remark;
|
||||
private String code;
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Summary for /tmp/crk_lib_extract_6o_f40r3/ninca-crk-access-control-web-2.9.1_210630-SNAPSHOT.jar
|
||||
Decompiled with CFR 0.152
|
||||
Reference in New Issue
Block a user