mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
fix: relocate cwos-portal decompiled output to correct path; remove nested directory
Former-commit-id: dc30d42a8c55ed8b2382a41dc2434233fbed9930
This commit is contained in:
+103
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* 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.cloud.context.CloudwalkCallContext
|
||||
* 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.elevator.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.elevator.record.service.AcsElevatorRecordService
|
||||
* org.apache.commons.collections4.CollectionUtils
|
||||
* 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.elevator.handler;
|
||||
|
||||
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.cloud.context.CloudwalkCallContext;
|
||||
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.elevator.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
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 AcsElevatorRecordService acsElevatorRecordService;
|
||||
@Resource
|
||||
protected RedisTemplate<String, Object> redisTemplate;
|
||||
@Autowired
|
||||
private MessageSource messageSource;
|
||||
|
||||
public CloudwalkCallContext getCloudwalkContext(String businessId) {
|
||||
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;
|
||||
}
|
||||
|
||||
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) {
|
||||
if (!this.redisTemplate.hasKey((Object)key).booleanValue()) {
|
||||
this.acsElevatorRecordService.createCache(key, 0L);
|
||||
}
|
||||
this.redisTemplate.opsForValue().increment((Object)key, 1L);
|
||||
}
|
||||
|
||||
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, "");
|
||||
}
|
||||
}
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.cwos.client.event.event.OpenDoorRecordEvent
|
||||
* cn.cloudwalk.elevator.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.elevator.em.AcsDeviceIdentifyTypeEnum
|
||||
* cn.cloudwalk.elevator.record.dto.AcsElevatorRecordExtraDTO
|
||||
* cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam
|
||||
* cn.cloudwalk.elevator.record.param.AcsOpenDoorRecordAddParam
|
||||
* cn.cloudwalk.elevator.record.service.AcsElevatorRecordService
|
||||
* cn.cloudwalk.elevator.util.AcsCacheKeyUtil
|
||||
* cn.cloudwalk.elevator.util.DateUtils
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* com.alibaba.fastjson.JSONObject
|
||||
* org.apache.commons.lang3.StringUtils
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.data.redis.core.RedisTemplate
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.cwos.client.event.event.OpenDoorRecordEvent;
|
||||
import cn.cloudwalk.elevator.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.elevator.em.AcsDeviceIdentifyTypeEnum;
|
||||
import cn.cloudwalk.elevator.handler.AbstractEventHandler;
|
||||
import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordExtraDTO;
|
||||
import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam;
|
||||
import cn.cloudwalk.elevator.record.param.AcsOpenDoorRecordAddParam;
|
||||
import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService;
|
||||
import cn.cloudwalk.elevator.util.AcsCacheKeyUtil;
|
||||
import cn.cloudwalk.elevator.util.DateUtils;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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 AcsElevatorRecordService acsElevatorRecordService;
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
/*
|
||||
* 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((CharSequence)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())) {
|
||||
} else if (elevatorRecordExtraDTO != null) {
|
||||
AcsElevatorRecordAddParam elevatorParam = this.getElevatorParam(param, elevatorRecordExtraDTO);
|
||||
CloudwalkResult addResult = this.acsElevatorRecordService.add(elevatorParam, context);
|
||||
if (param.getRecordResult() == 1 && addResult.isSuccess() && "1".equals(elevatorRecordExtraDTO.getSrcFloor())) {
|
||||
this.statisticsAddCache(AcsCacheKeyUtil.getOpenDoorCountKey((String)DateUtils.parseDate((Date)new Date(), (String)"yyyy-MM-dd"), (String)openDoorRecordEvent.getBusinessId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u6d88\u8d39\u5f00\u95e8\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0:", (Throwable)e);
|
||||
}
|
||||
finally {
|
||||
FeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
}
|
||||
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent
|
||||
* cn.cloudwalk.cwos.client.event.event.mode.Face
|
||||
* cn.cloudwalk.elevator.config.FeignThreadLocalUtil
|
||||
* cn.cloudwalk.elevator.em.CompareTypeEnum
|
||||
* cn.cloudwalk.elevator.record.param.AcsRecogRecordAddParam
|
||||
* cn.cloudwalk.elevator.record.service.AcsRecogRecordService
|
||||
* cn.cloudwalk.elevator.util.AcsCacheKeyUtil
|
||||
* cn.cloudwalk.elevator.util.DateUtils
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* com.alibaba.fastjson.JSON
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent;
|
||||
import cn.cloudwalk.cwos.client.event.event.mode.Face;
|
||||
import cn.cloudwalk.elevator.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.elevator.em.CompareTypeEnum;
|
||||
import cn.cloudwalk.elevator.handler.AbstractEventHandler;
|
||||
import cn.cloudwalk.elevator.record.param.AcsRecogRecordAddParam;
|
||||
import cn.cloudwalk.elevator.record.service.AcsRecogRecordService;
|
||||
import cn.cloudwalk.elevator.util.AcsCacheKeyUtil;
|
||||
import cn.cloudwalk.elevator.util.DateUtils;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
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;
|
||||
|
||||
@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;
|
||||
|
||||
/*
|
||||
* 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()));
|
||||
}
|
||||
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()));
|
||||
}
|
||||
param.setCompareType(CompareTypeEnum.RECOG.getCode());
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* 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.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO
|
||||
* cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam
|
||||
* cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService
|
||||
* cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO
|
||||
* cn.cloudwalk.elevator.device.param.AcsDeviceQueryParam
|
||||
* cn.cloudwalk.elevator.device.param.AcsElevatorDeviceAddParam
|
||||
* cn.cloudwalk.elevator.device.param.AcsElevatorDeviceEditParam
|
||||
* cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryByIdParam
|
||||
* cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam
|
||||
* cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService
|
||||
* cn.cloudwalk.elevator.export.impl.ElevatorDeviceExportService
|
||||
* cn.cloudwalk.elevator.export.result.ElevatorDeviceRecordExcelResult
|
||||
* cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam
|
||||
* cn.cloudwalk.elevator.zone.result.ZoneTreeResult
|
||||
* cn.cloudwalk.elevator.zone.service.ZoneService
|
||||
* com.alibaba.fastjson.JSON
|
||||
* com.alibaba.fastjson.JSONObject
|
||||
* org.springframework.util.ObjectUtils
|
||||
* 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.elevator.handler.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
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.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO;
|
||||
import cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam;
|
||||
import cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService;
|
||||
import cn.cloudwalk.elevator.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO;
|
||||
import cn.cloudwalk.elevator.device.param.AcsDeviceQueryParam;
|
||||
import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceAddParam;
|
||||
import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceEditParam;
|
||||
import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryByIdParam;
|
||||
import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam;
|
||||
import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService;
|
||||
import cn.cloudwalk.elevator.export.impl.ElevatorDeviceExportService;
|
||||
import cn.cloudwalk.elevator.export.result.ElevatorDeviceRecordExcelResult;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsDeviceQueryForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorCodeForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceAddForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceDeleteForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceEditForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceQueryByIdForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceQueryForm;
|
||||
import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam;
|
||||
import cn.cloudwalk.elevator.zone.result.ZoneTreeResult;
|
||||
import cn.cloudwalk.elevator.zone.service.ZoneService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
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={"/elevator/device/"})
|
||||
public class AcsElevatorDeviceController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsElevatorDeviceService elevatorDeviceService;
|
||||
@Resource
|
||||
private AcsElevatorCodeService elevatorCodeService;
|
||||
@Resource
|
||||
private ZoneService zoneService;
|
||||
@Resource
|
||||
private DeviceService deviceService;
|
||||
@Resource
|
||||
private ElevatorDeviceExportService elevatorDeviceExportService;
|
||||
|
||||
@PostMapping(value={"/add"})
|
||||
public CloudwalkResult add(@RequestBody AcsElevatorDeviceAddForm form) throws ServiceException {
|
||||
this.LOGGER.info("\u6dfb\u52a0\u6d3e\u68af\u8bbe\u5907\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
AcsElevatorDeviceAddParam param = (AcsElevatorDeviceAddParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceAddParam.class);
|
||||
String deviceCode = form.getDeviceCode();
|
||||
AcsElevatorDeviceResultDTO queryResultDTO = this.elevatorDeviceService.getByDeciveCode(deviceCode);
|
||||
if (queryResultDTO != null) {
|
||||
return CloudwalkResult.success((Object)"\u8be5\u8bbe\u5907\u5df2\u6dfb\u52a0\u8fc7\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01");
|
||||
}
|
||||
String businessId = this.getCloudwalkContext().getCompany().getCompanyId();
|
||||
param.setBusinessId(businessId);
|
||||
try {
|
||||
int result = this.elevatorDeviceService.add(param, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6dfb\u52a0\u6d3e\u68af\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u6dfb\u52a0\u6d3e\u68af\u8bbe\u5907\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/edit"})
|
||||
public CloudwalkResult edit(@RequestBody AcsElevatorDeviceEditForm form) {
|
||||
this.LOGGER.info("\u4fee\u6539\u6d3e\u68af\u8bbe\u5907\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
AcsElevatorDeviceEditParam param = (AcsElevatorDeviceEditParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceEditParam.class);
|
||||
try {
|
||||
int result = this.elevatorDeviceService.edit(param, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4fee\u6539\u6d3e\u68af\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u4fee\u6539\u6d3e\u68af\u8bbe\u5907\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/getById"})
|
||||
public CloudwalkResult<AcsElevatorDeviceResultDTO> getById(@RequestBody AcsElevatorDeviceQueryByIdForm form) {
|
||||
this.LOGGER.info("\u6839\u636eid\u83b7\u53d6\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
AcsElevatorDeviceQueryByIdParam param = (AcsElevatorDeviceQueryByIdParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceQueryByIdParam.class);
|
||||
try {
|
||||
AcsElevatorDeviceResultDTO result = this.elevatorDeviceService.getById(param, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6839\u636eid\u83b7\u53d6\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u6839\u636eid\u83b7\u53d6\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/delete"})
|
||||
public CloudwalkResult delete(@RequestBody AcsElevatorDeviceDeleteForm form) {
|
||||
try {
|
||||
this.LOGGER.info("\u5220\u9664\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
if (form == null) {
|
||||
this.LOGGER.error("\u5220\u9664\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a\u65e0\u7f16\u53f7\u4f20\u8f93\u8fc7\u6765\uff01");
|
||||
return CloudwalkResult.fail((String)"\u65e0\u7f16\u53f7\u4f20\u8f93\u8fc7\u6765\uff01", (String)this.getMessage("\u65e0\u7f16\u53f7\u4f20\u8f93\u8fc7\u6765\uff01"));
|
||||
}
|
||||
List<String> idList = form.getIds();
|
||||
int result = this.elevatorDeviceService.delete(idList, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4fee\u6539\u6d3e\u68af\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u5220\u9664\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/editCode"})
|
||||
public CloudwalkResult editCode(@RequestBody AcsElevatorCodeForm form) {
|
||||
try {
|
||||
AcsElevatorCodeResultDTO firstResult;
|
||||
this.LOGGER.info("\u8bbe\u7f6e\u7535\u68af\u7f16\u7801\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
AcsElevatorCodeParam param = (AcsElevatorCodeParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorCodeParam.class);
|
||||
if (param.getIsFirst() == 1 && !ObjectUtils.isEmpty((Object)(firstResult = this.elevatorCodeService.getFirstByParentId(param.getParentId()))) && !firstResult.getZoneId().equals(param.getZoneId())) {
|
||||
return CloudwalkResult.fail((String)"76260525", (String)this.getMessage("76260525"));
|
||||
}
|
||||
AcsElevatorCodeResultDTO result = this.elevatorCodeService.get(param);
|
||||
if (!ObjectUtils.isEmpty((Object)result)) {
|
||||
this.elevatorCodeService.updateOld(param);
|
||||
return CloudwalkResult.success((Object)1);
|
||||
}
|
||||
this.elevatorCodeService.insertNew(param);
|
||||
return CloudwalkResult.success((Object)1);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u8bbe\u7f6e\u7535\u68af\u7f16\u7801\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u8bbe\u7f6e\u7535\u68af\u7f16\u7801\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/get"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsElevatorDeviceResultDTO>> get(@RequestBody AcsElevatorDeviceQueryForm form) {
|
||||
this.LOGGER.info("\u5206\u9875\u67e5\u8be2\u6d3e\u68af\u8bbe\u5907\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
AcsElevatorDeviceQueryParam param = (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceQueryParam.class);
|
||||
try {
|
||||
return this.elevatorDeviceService.get(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5217\u8868\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u67e5\u8be2\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5217\u8868\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/export"})
|
||||
public CloudwalkResult<Boolean> export(@RequestBody AcsElevatorDeviceQueryForm form) {
|
||||
this.LOGGER.info("\u6d3e\u68af\u8bbe\u5907\u5bfc\u51fa\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)form));
|
||||
AcsElevatorDeviceQueryParam param = (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceQueryParam.class);
|
||||
try {
|
||||
CloudwalkCallContext cloudwalkContext = this.getCloudwalkContext();
|
||||
if (cloudwalkContext.getCompany().getCompanyId() == null) {
|
||||
cloudwalkContext.getCompany().setCompanyId("default");
|
||||
}
|
||||
return this.elevatorDeviceExportService.startExportTask((Object)param, ElevatorDeviceRecordExcelResult.class, null, cloudwalkContext);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5bfc\u51fa\u5931\u8d25", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u67e5\u8be2\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5217\u8868\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/zone/treeCode"})
|
||||
public CloudwalkResult<List<ZoneTreeResult>> queryZoneTreeCode(@RequestBody ZoneNextTreeParam zoneNextTreeParam) {
|
||||
try {
|
||||
this.LOGGER.info("\u83b7\u53d6\u533a\u57df\u7684\u7535\u68af\u7f16\u7801\uff0c\u8bf7\u6c42\u53c2\u6570\uff1a{}", (Object)JSON.toJSONString((Object)zoneNextTreeParam));
|
||||
CloudwalkResult query = this.zoneService.tree(zoneNextTreeParam, this.getCloudwalkContext());
|
||||
CloudwalkResult result = new CloudwalkResult();
|
||||
List treeList = (List)query.getData();
|
||||
ArrayList<ZoneTreeResult> treeResultList = new ArrayList<ZoneTreeResult>();
|
||||
if (treeList != null && treeList.size() > 0) {
|
||||
for (ZoneTreeResult zoneTreeResult : treeList) {
|
||||
String zoneId = zoneTreeResult.getId();
|
||||
AcsElevatorCodeParam param = new AcsElevatorCodeParam();
|
||||
param.setZoneId(zoneId);
|
||||
AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(param);
|
||||
if (!ObjectUtils.isEmpty((Object)code)) {
|
||||
zoneTreeResult.setElevatorCode(code.getCode());
|
||||
zoneTreeResult.setIsFirst(code.getIsFirst());
|
||||
}
|
||||
if (zoneTreeResult.getChildren() != null) {
|
||||
List<ZoneTreeResult> chidList = this.treeRecursionDataList(zoneTreeResult.getChildren());
|
||||
zoneTreeResult.setChildren(chidList);
|
||||
}
|
||||
treeResultList.add(zoneTreeResult);
|
||||
}
|
||||
}
|
||||
query.setData(treeResultList);
|
||||
return query;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u83b7\u53d6\u533a\u57df\u7684\u7535\u68af\u7f16\u7801\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u83b7\u53d6\u533a\u57df\u7684\u7535\u68af\u7f16\u7801\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public List<ZoneTreeResult> treeRecursionDataList(List<ZoneTreeResult> childList) throws ServiceException {
|
||||
ArrayList<ZoneTreeResult> childResultList = new ArrayList<ZoneTreeResult>();
|
||||
for (ZoneTreeResult zoneTreeResult : childList) {
|
||||
String id = zoneTreeResult.getId();
|
||||
AcsElevatorCodeParam param = new AcsElevatorCodeParam();
|
||||
param.setZoneId(id);
|
||||
AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(param);
|
||||
if (!ObjectUtils.isEmpty((Object)code)) {
|
||||
zoneTreeResult.setElevatorCode(code.getCode());
|
||||
zoneTreeResult.setIsFirst(code.getIsFirst());
|
||||
}
|
||||
if (zoneTreeResult.getChildren() != null && zoneTreeResult.getChildren().size() > 0) {
|
||||
zoneTreeResult.setChildren(this.treeRecursionDataList(zoneTreeResult.getChildren()));
|
||||
}
|
||||
childResultList.add(zoneTreeResult);
|
||||
}
|
||||
return childResultList;
|
||||
}
|
||||
|
||||
@PostMapping(value={"/devicePage"})
|
||||
public CloudwalkResult<CloudwalkPageAble<DeviceResult>> devicePage(@RequestBody AcsDeviceQueryForm form) {
|
||||
try {
|
||||
if (this.LOGGER.isDebugEnabled()) {
|
||||
this.LOGGER.debug("devicePage form {}", (Object)JSONObject.toJSONString((Object)form));
|
||||
}
|
||||
AcsDeviceQueryParam param = new AcsDeviceQueryParam();
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
if (this.LOGGER.isDebugEnabled()) {
|
||||
this.LOGGER.debug("devicePage param {}", (Object)JSONObject.toJSONString((Object)param));
|
||||
}
|
||||
return this.elevatorDeviceService.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)"76260529", (String)this.getMessage("76260529"));
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, String> queryZone() throws ServiceException {
|
||||
HashMap<String, String> zoneMap = new HashMap<String, String>();
|
||||
CloudwalkResult query = this.zoneService.tree(new ZoneNextTreeParam(), this.getCloudwalkContext());
|
||||
List treeList = (List)query.getData();
|
||||
if (treeList != null && treeList.size() > 0) {
|
||||
for (ZoneTreeResult zoneTreeResult : treeList) {
|
||||
String zoneId = zoneTreeResult.getId();
|
||||
String zoneName = zoneTreeResult.getName();
|
||||
zoneMap.put(zoneId, zoneName);
|
||||
this.getZoneMap(zoneTreeResult.getChildren(), zoneMap);
|
||||
}
|
||||
}
|
||||
return zoneMap;
|
||||
}
|
||||
|
||||
public Map<String, String> getZoneMap(List<ZoneTreeResult> childList, Map<String, String> zoneMap) throws ServiceException {
|
||||
ArrayList childResultList = new ArrayList();
|
||||
for (ZoneTreeResult zoneTreeResult : childList) {
|
||||
String zoneId = zoneTreeResult.getId();
|
||||
String zoneName = zoneTreeResult.getName();
|
||||
zoneMap.put(zoneId, zoneName);
|
||||
if (zoneTreeResult.getChildren() == null || zoneTreeResult.getChildren().size() <= 0) continue;
|
||||
this.getZoneMap(zoneTreeResult.getChildren(), zoneMap);
|
||||
}
|
||||
return zoneMap;
|
||||
}
|
||||
}
|
||||
|
||||
+258
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeQueryDTO
|
||||
* cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO
|
||||
* cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam
|
||||
* cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService
|
||||
* cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryFoDTO
|
||||
* cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO
|
||||
* cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam
|
||||
* cn.cloudwalk.elevator.device.result.KeyValueResult
|
||||
* cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService
|
||||
* cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam
|
||||
* cn.cloudwalk.elevator.record.service.AcsElevatorRecordService
|
||||
* cn.cloudwalk.elevator.util.StringUtils
|
||||
* cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam
|
||||
* cn.cloudwalk.elevator.zone.result.ZoneTreeResult
|
||||
* cn.cloudwalk.elevator.zone.service.ZoneService
|
||||
* org.springframework.beans.factory.annotation.Value
|
||||
* org.springframework.util.ObjectUtils
|
||||
* 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.elevator.handler.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeQueryDTO;
|
||||
import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO;
|
||||
import cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam;
|
||||
import cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService;
|
||||
import cn.cloudwalk.elevator.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryFoDTO;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO;
|
||||
import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam;
|
||||
import cn.cloudwalk.elevator.device.result.KeyValueResult;
|
||||
import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorCodeQueryForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceQueryForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsElevatorRecordAddForm;
|
||||
import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam;
|
||||
import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService;
|
||||
import cn.cloudwalk.elevator.util.StringUtils;
|
||||
import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam;
|
||||
import cn.cloudwalk.elevator.zone.result.ZoneTreeResult;
|
||||
import cn.cloudwalk.elevator.zone.service.ZoneService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
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={"/device/v2/"})
|
||||
public class AcsElevatorDeviceGetWayController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsElevatorDeviceService elevatorDeviceService;
|
||||
@Resource
|
||||
private AcsElevatorCodeService elevatorCodeService;
|
||||
@Resource
|
||||
private ZoneService zoneService;
|
||||
@Resource
|
||||
private DeviceService deviceService;
|
||||
@Resource
|
||||
private AcsElevatorRecordService elevatorRecordService;
|
||||
@Value(value="${elevator.application.key}")
|
||||
private String key;
|
||||
@Value(value="${elevator.application.time}")
|
||||
private Long time;
|
||||
@Value(value="${elevator.application.keyA}")
|
||||
private String keyA;
|
||||
|
||||
@PostMapping(value={"/39201"})
|
||||
public CloudwalkResult<List<AcsElevatorDeviceQueryFoDTO>> get(@RequestBody AcsElevatorDeviceQueryForm form) {
|
||||
AcsElevatorDeviceQueryParam param = (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceQueryParam.class);
|
||||
try {
|
||||
List list = this.elevatorDeviceService.getFo(param);
|
||||
if (list != null && list.size() > 0) {
|
||||
return CloudwalkResult.success((Object)list);
|
||||
}
|
||||
return CloudwalkResult.success(new ArrayList());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5217\u8868\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u67e5\u8be2\u6d3e\u68af\u8bbe\u5907\u4fe1\u606f\u5217\u8868\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"39202"})
|
||||
public CloudwalkResult<List<AcsElevatorCodeQueryDTO>> queryZoneTreeCode(@RequestBody AcsElevatorCodeQueryForm form) {
|
||||
try {
|
||||
AcsElevatorDeviceQueryParam param = (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorDeviceQueryParam.class);
|
||||
String buildingId = "";
|
||||
String businessId = "";
|
||||
if (StringUtils.isNotBlank((String)form.getDeviceCode())) {
|
||||
buildingId = this.elevatorDeviceService.getBuildingId(param);
|
||||
businessId = this.elevatorDeviceService.getBusinessId(param);
|
||||
}
|
||||
ZoneNextTreeParam zoneNextTreeParam = new ZoneNextTreeParam();
|
||||
if (StringUtils.isNotBlank((String)buildingId)) {
|
||||
zoneNextTreeParam.setParentId(buildingId);
|
||||
}
|
||||
zoneNextTreeParam.setBusinessId(businessId);
|
||||
CloudwalkResult query = this.zoneService.tree(zoneNextTreeParam, this.getCloudwalkContext());
|
||||
List treeList = (List)query.getData();
|
||||
ArrayList<AcsElevatorCodeQueryDTO> treeResultList = new ArrayList<AcsElevatorCodeQueryDTO>();
|
||||
if (treeList != null && treeList.size() > 0) {
|
||||
for (ZoneTreeResult zoneTreeResult : treeList) {
|
||||
AcsElevatorCodeResultDTO code;
|
||||
AcsElevatorCodeParam paramCode;
|
||||
AcsElevatorCodeQueryDTO querydTO;
|
||||
if ("PARK".equals(zoneTreeResult.getType())) {
|
||||
List buildingList = zoneTreeResult.getChildren();
|
||||
if (buildingList == null || buildingList.size() <= 0) continue;
|
||||
for (ZoneTreeResult building : buildingList) {
|
||||
if ("BUILDING".equals(building.getType())) {
|
||||
List floorList = building.getChildren();
|
||||
if (floorList == null || floorList.size() <= 0) continue;
|
||||
for (ZoneTreeResult floor : floorList) {
|
||||
AcsElevatorCodeQueryDTO querydTO2 = new AcsElevatorCodeQueryDTO();
|
||||
querydTO2.setZoneId(floor.getId());
|
||||
querydTO2.setId(floor.getId());
|
||||
querydTO2.setZoneName(floor.getName());
|
||||
querydTO2.setZoneType(floor.getType());
|
||||
AcsElevatorCodeParam paramCode2 = new AcsElevatorCodeParam();
|
||||
paramCode2.setZoneId(floor.getId());
|
||||
AcsElevatorCodeResultDTO code2 = this.elevatorCodeService.get(paramCode2);
|
||||
if (!ObjectUtils.isEmpty((Object)code2)) {
|
||||
querydTO2.setCode(code2.getCode());
|
||||
querydTO2.setIsFirst(code2.getIsFirst());
|
||||
}
|
||||
treeResultList.add(querydTO2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!"FLOOR".equals(building.getType())) continue;
|
||||
querydTO = new AcsElevatorCodeQueryDTO();
|
||||
querydTO.setZoneId(building.getId());
|
||||
querydTO.setZoneName(building.getName());
|
||||
querydTO.setZoneType("FLOOR");
|
||||
querydTO.setId(building.getId());
|
||||
paramCode = new AcsElevatorCodeParam();
|
||||
paramCode.setZoneId(zoneTreeResult.getId());
|
||||
code = this.elevatorCodeService.get(paramCode);
|
||||
if (!ObjectUtils.isEmpty((Object)code)) {
|
||||
querydTO.setCode(code.getCode());
|
||||
querydTO.setIsFirst(code.getIsFirst());
|
||||
}
|
||||
treeResultList.add(querydTO);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if ("BUILDING".equals(zoneTreeResult.getType())) {
|
||||
List floorList = zoneTreeResult.getChildren();
|
||||
if (floorList == null || floorList.size() <= 0) continue;
|
||||
for (ZoneTreeResult floor : floorList) {
|
||||
querydTO = new AcsElevatorCodeQueryDTO();
|
||||
querydTO.setZoneId(floor.getId());
|
||||
querydTO.setZoneName(floor.getName());
|
||||
querydTO.setZoneType(floor.getType());
|
||||
querydTO.setId(floor.getId());
|
||||
paramCode = new AcsElevatorCodeParam();
|
||||
paramCode.setZoneId(floor.getId());
|
||||
code = this.elevatorCodeService.get(paramCode);
|
||||
if (!ObjectUtils.isEmpty((Object)code)) {
|
||||
querydTO.setCode(code.getCode());
|
||||
querydTO.setIsFirst(code.getIsFirst());
|
||||
}
|
||||
treeResultList.add(querydTO);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!"FLOOR".equals(zoneTreeResult.getType())) continue;
|
||||
AcsElevatorCodeQueryDTO querydTO3 = new AcsElevatorCodeQueryDTO();
|
||||
querydTO3.setZoneId(zoneTreeResult.getId());
|
||||
querydTO3.setZoneName(zoneTreeResult.getName());
|
||||
querydTO3.setZoneType("FLOOR");
|
||||
querydTO3.setId(zoneTreeResult.getId());
|
||||
AcsElevatorCodeParam paramCode3 = new AcsElevatorCodeParam();
|
||||
paramCode3.setZoneId(zoneTreeResult.getId());
|
||||
AcsElevatorCodeResultDTO code3 = this.elevatorCodeService.get(paramCode3);
|
||||
if (!ObjectUtils.isEmpty((Object)code3)) {
|
||||
querydTO3.setCode(code3.getCode());
|
||||
querydTO3.setIsFirst(code3.getIsFirst());
|
||||
}
|
||||
treeResultList.add(querydTO3);
|
||||
}
|
||||
}
|
||||
CloudwalkResult result = CloudwalkResult.success(treeResultList);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("\u83b7\u53d6\u533a\u57df\u7684\u7535\u68af\u7f16\u7801\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u83b7\u53d6\u533a\u57df\u7684\u7535\u68af\u7f16\u7801\u5931\u8d25", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"39203"})
|
||||
public CloudwalkResult addElevatorRecord(@RequestBody AcsElevatorRecordAddForm form) {
|
||||
AcsElevatorRecordAddParam param = (AcsElevatorRecordAddParam)BeanCopyUtils.copyProperties((Object)form, AcsElevatorRecordAddParam.class);
|
||||
try {
|
||||
String deviceCode = form.getDeviceCode();
|
||||
AcsElevatorDeviceQueryParam paramDevice = new AcsElevatorDeviceQueryParam();
|
||||
paramDevice.setDeviceCode(deviceCode);
|
||||
Long time1 = System.currentTimeMillis();
|
||||
String businessId = this.elevatorDeviceService.getBusinessId(paramDevice);
|
||||
if (StringUtils.isNotBlank((String)businessId)) {
|
||||
param.setBusinessId(businessId);
|
||||
} else {
|
||||
param.setBusinessId("000");
|
||||
}
|
||||
Long time2 = System.currentTimeMillis();
|
||||
AcsElevatorDeviceResultDTO deviceResultDTO = this.elevatorDeviceService.getByDeciveCode(deviceCode);
|
||||
DeviceResult deviceResult = new DeviceResult();
|
||||
if (deviceResultDTO != null) {
|
||||
deviceResult.setId(deviceResultDTO.getId());
|
||||
deviceResult.setDeviceCode(deviceCode);
|
||||
deviceResult.setDeviceName(deviceResultDTO.getDeviceName());
|
||||
deviceResult.setDeviceTypeName(deviceResultDTO.getDeviceTypeName());
|
||||
deviceResult.setAreaId(deviceResultDTO.getAreaId());
|
||||
}
|
||||
param.setDeviceResult(deviceResult);
|
||||
Long time3 = System.currentTimeMillis();
|
||||
CloudwalkResult result = this.elevatorRecordService.add(param, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6dfb\u52a0\u5237\u8138\u6d3e\u68af\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"00", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"39204"})
|
||||
public CloudwalkResult<KeyValueResult> getKey(@RequestBody AcsElevatorRecordAddForm form) {
|
||||
KeyValueResult result = new KeyValueResult();
|
||||
result.setKey(this.key);
|
||||
result.setTime(this.time);
|
||||
result.setKeyA(this.keyA);
|
||||
return CloudwalkResult.success((Object)result);
|
||||
}
|
||||
}
|
||||
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO
|
||||
* cn.cloudwalk.elevator.device.param.AcsDeviceRestructureTaskParam
|
||||
* cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam
|
||||
* cn.cloudwalk.elevator.device.param.AcsRestructureQueryParam
|
||||
* cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService
|
||||
* 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.elevator.handler.device.controller;
|
||||
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.elevator.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO;
|
||||
import cn.cloudwalk.elevator.device.param.AcsDeviceRestructureTaskParam;
|
||||
import cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam;
|
||||
import cn.cloudwalk.elevator.device.param.AcsRestructureQueryParam;
|
||||
import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsDeviceRestructureTaskForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsRestructureBindingForm;
|
||||
import cn.cloudwalk.elevator.handler.device.form.AcsRestructureQueryForm;
|
||||
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={"/elevator/restructure"})
|
||||
public class AcsElevatorRestructureController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsElevatorDeviceService elevatorDeviceService;
|
||||
|
||||
@PostMapping(value={"/unbind/floors"})
|
||||
public CloudwalkResult listUnbindFloors(@RequestBody AcsRestructureQueryForm form) {
|
||||
try {
|
||||
AcsRestructureQueryParam param = new AcsRestructureQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.listUnbindFloors(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u672a\u7ed1\u5b9a\u7684\u697c\u5c42\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u67e5\u8be2\u672a\u7ed1\u5b9a\u7684\u6d3e\u68af\u697c\u5c42\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/floors"})
|
||||
public CloudwalkResult listFloors(@RequestBody AcsRestructureQueryForm form) {
|
||||
try {
|
||||
AcsRestructureQueryParam param = new AcsRestructureQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.listFloors(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u67e5\u8be2\u672a\u7ed1\u5b9a\u7684\u6d3e\u68af\u697c\u5c42\u548c\u8bbe\u5907\u60c5\u51b5\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u67e5\u8be2\u672a\u7ed1\u5b9a\u7684\u6d3e\u68af\u697c\u5c42\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/condition"})
|
||||
public CloudwalkResult listCondition(@RequestBody AcsRestructureQueryForm form) {
|
||||
try {
|
||||
AcsRestructureQueryParam param = new AcsRestructureQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.listCondition(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6839\u636e\u6761\u4ef6\u67e5\u8be2\u6d3e\u68af\u697c\u5c42\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u6839\u636e\u6761\u4ef6\u67e5\u8be2\u6d3e\u68af\u697c\u5c42\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/condition/labels"})
|
||||
public CloudwalkResult listConditionByLabelIds(@RequestBody AcsRestructureQueryForm form) {
|
||||
try {
|
||||
AcsRestructureQueryParam param = new AcsRestructureQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.listConditionByLabelIds(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u6839\u636e\u6807\u7b7eid\u96c6\u5408\u67e5\u8be2\u6d3e\u68af\u697c\u5c42\u6743\u9650\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u6839\u636e\u6807\u7b7eid\u96c6\u5408\u67e5\u8be2\u6d3e\u68af\u697c\u5c42\u6743\u9650\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/binding"})
|
||||
public CloudwalkResult<String> bindingFloors(@RequestBody AcsRestructureBindingForm form) {
|
||||
try {
|
||||
AcsRestructureBindingParam param = new AcsRestructureBindingParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.bindingFloors(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u673a\u6784id\u3001\u6807\u7b7eid\u7ed1\u5b9a\u6d3e\u68af\u697c\u5c42\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u673a\u6784id\u3001\u6807\u7b7eid\u7ed1\u5b9a\u6d3e\u68af\u697c\u5c42\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/binding/person"})
|
||||
public CloudwalkResult<String> bindingPerson(@RequestBody AcsRestructureBindingForm form) {
|
||||
try {
|
||||
AcsRestructureBindingParam param = new AcsRestructureBindingParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.bindingPerson(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.LOGGER.error("\u4eba\u5458\u6279\u91cf\u7ed1\u5b9a\u6d3e\u68af\u697c\u5c42\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"\u4eba\u5458\u6279\u91cf\u7ed1\u5b9a\u6d3e\u68af\u697c\u5c42\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/task/progress"})
|
||||
public CloudwalkResult<AcsDeviceTaskDTO> getTask(@RequestBody AcsDeviceRestructureTaskForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureTaskParam param = new AcsDeviceRestructureTaskParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.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)"\u83b7\u53d6\u4efb\u52a1\u8fdb\u7a0b\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/task/stop"})
|
||||
public CloudwalkResult<Boolean> setTaskStop(@RequestBody AcsDeviceRestructureTaskForm form) {
|
||||
try {
|
||||
AcsDeviceRestructureTaskParam param = new AcsDeviceRestructureTaskParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.elevatorDeviceService.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)"\u7ec8\u6b62\u7ed1\u5b9a\u8fdb\u7a0b\u5f02\u5e38", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.elevator.config.ImageStoreConstants
|
||||
* cn.cloudwalk.elevator.record.service.PersonFileService
|
||||
* cn.cloudwalk.elevator.util.ToolUtil
|
||||
* org.apache.commons.lang3.StringUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RequestMethod
|
||||
* org.springframework.web.bind.annotation.RequestParam
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.controller;
|
||||
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.elevator.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.elevator.config.ImageStoreConstants;
|
||||
import cn.cloudwalk.elevator.record.service.PersonFileService;
|
||||
import cn.cloudwalk.elevator.util.ToolUtil;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/file"})
|
||||
public class FileController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private PersonFileService personFileService;
|
||||
|
||||
@RequestMapping(value={"/imgupload"}, method={RequestMethod.POST}, consumes={"multipart/form-data"})
|
||||
public CloudwalkResult<String> fileUpload(@RequestParam(value="img") String base64) {
|
||||
if (StringUtils.isEmpty((CharSequence)base64)) {
|
||||
return CloudwalkResult.fail((String)"53060544", (String)this.getMessage("53060544"));
|
||||
}
|
||||
try {
|
||||
byte[] bytes = DatatypeConverter.parseBase64Binary(base64);
|
||||
if (bytes.length > ImageStoreConstants.MAX_FILE) {
|
||||
return CloudwalkResult.fail((String)"53060428", (String)this.getMessage("53060428"));
|
||||
}
|
||||
String fileName = ToolUtil.generateUUID();
|
||||
this.LOGGER.info("\u4e0a\u4f20\u6587\u4ef6:{},size={}", (Object)fileName, (Object)bytes.length);
|
||||
CloudwalkResult storeResult = this.personFileService.upload(fileName, bytes);
|
||||
if (storeResult != null && StringUtils.isNotBlank((CharSequence)((CharSequence)storeResult.getData()))) {
|
||||
return CloudwalkResult.success((Object)storeResult.getData());
|
||||
}
|
||||
return storeResult;
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.LOGGER.error("", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"80014013", (String)this.getMessage("80014013"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsDeviceQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private String deviceName;
|
||||
private String deviceCategoryId;
|
||||
private String areaId;
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceCategoryId() {
|
||||
return this.deviceCategoryId;
|
||||
}
|
||||
|
||||
public void setDeviceCategoryId(String deviceCategoryId) {
|
||||
this.deviceCategoryId = deviceCategoryId;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return this.areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
}
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.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() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.entity.CloudwalkBaseTimes
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsElevatorCodeForm
|
||||
extends CloudwalkBaseTimes
|
||||
implements Serializable {
|
||||
private String zoneId;
|
||||
private String parentId;
|
||||
private String code;
|
||||
private Integer isFirst;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Integer getIsFirst() {
|
||||
return this.isFirst;
|
||||
}
|
||||
|
||||
public void setIsFirst(Integer isFirst) {
|
||||
this.isFirst = isFirst;
|
||||
}
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.entity.CloudwalkBaseTimes
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsElevatorCodeQueryForm
|
||||
extends CloudwalkBaseTimes
|
||||
implements Serializable {
|
||||
private String deviceCode;
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsElevatorCodeQueryForm{deviceCode='" + this.deviceCode + '\'' + '}';
|
||||
}
|
||||
}
|
||||
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.entity.CloudwalkBaseTimes
|
||||
* javax.validation.constraints.NotNull
|
||||
* org.hibernate.validator.constraints.NotEmpty
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class AcsElevatorDeviceAddForm
|
||||
extends CloudwalkBaseTimes
|
||||
implements Serializable {
|
||||
private String businessId;
|
||||
@NotEmpty
|
||||
private String deviceId;
|
||||
@NotEmpty
|
||||
private String deviceCode;
|
||||
@NotNull
|
||||
private String deviceName;
|
||||
private String deviceTypeName;
|
||||
private String elevatorFloorList;
|
||||
@NotNull
|
||||
private String currentFloorId;
|
||||
private String currentFloor;
|
||||
private String currentBuilding;
|
||||
private String currentBuildingId;
|
||||
private String areaName;
|
||||
private Integer deleteFlag;
|
||||
private String areaId;
|
||||
private String elevatorFloorIdList;
|
||||
|
||||
public String getElevatorFloorIdList() {
|
||||
return this.elevatorFloorIdList;
|
||||
}
|
||||
|
||||
public void setElevatorFloorIdList(String elevatorFloorIdList) {
|
||||
this.elevatorFloorIdList = elevatorFloorIdList;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return this.areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getCurrentBuildingId() {
|
||||
return this.currentBuildingId;
|
||||
}
|
||||
|
||||
public void setCurrentBuildingId(String currentBuildingId) {
|
||||
this.currentBuildingId = currentBuildingId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
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 String getDeviceTypeName() {
|
||||
return this.deviceTypeName;
|
||||
}
|
||||
|
||||
public void setDeviceTypeName(String deviceTypeName) {
|
||||
this.deviceTypeName = deviceTypeName;
|
||||
}
|
||||
|
||||
public String getElevatorFloorList() {
|
||||
return this.elevatorFloorList;
|
||||
}
|
||||
|
||||
public void setElevatorFloorList(String elevatorFloorList) {
|
||||
this.elevatorFloorList = elevatorFloorList;
|
||||
}
|
||||
|
||||
public String getCurrentFloorId() {
|
||||
return this.currentFloorId;
|
||||
}
|
||||
|
||||
public void setCurrentFloorId(String currentFloorId) {
|
||||
this.currentFloorId = currentFloorId;
|
||||
}
|
||||
|
||||
public String getCurrentFloor() {
|
||||
return this.currentFloor;
|
||||
}
|
||||
|
||||
public void setCurrentFloor(String currentFloor) {
|
||||
this.currentFloor = currentFloor;
|
||||
}
|
||||
|
||||
public String getCurrentBuilding() {
|
||||
return this.currentBuilding;
|
||||
}
|
||||
|
||||
public void setCurrentBuilding(String currentBuilding) {
|
||||
this.currentBuilding = currentBuilding;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return this.areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public Integer getDeleteFlag() {
|
||||
return this.deleteFlag;
|
||||
}
|
||||
|
||||
public void setDeleteFlag(Integer deleteFlag) {
|
||||
this.deleteFlag = deleteFlag;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsElevatorDeviceAddDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + ", deviceCode='" + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + ", deviceTypeName='" + this.deviceTypeName + '\'' + ", elevatorFloorList='" + this.elevatorFloorList + '\'' + ", currentFloorId='" + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + ", currentBuilding='" + this.currentBuilding + '\'' + ", areaName='" + this.areaName + '\'' + ", deleteFlag=" + this.deleteFlag + '}';
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.entity.CloudwalkBaseTimes
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsElevatorDeviceDeleteForm
|
||||
extends CloudwalkBaseTimes
|
||||
implements Serializable {
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.entity.CloudwalkBaseTimes
|
||||
* javax.validation.constraints.NotNull
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsElevatorDeviceEditForm
|
||||
extends CloudwalkBaseTimes
|
||||
implements Serializable {
|
||||
private String elevatorFloorList;
|
||||
@NotNull
|
||||
private String currentFloorId;
|
||||
private String currentFloor;
|
||||
private String currentBuilding;
|
||||
private String currentBuildingId;
|
||||
private String areaId;
|
||||
private String elevatorFloorIdList;
|
||||
private String businessId;
|
||||
private String deviceId;
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private String deviceTypeName;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
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 String getDeviceTypeName() {
|
||||
return this.deviceTypeName;
|
||||
}
|
||||
|
||||
public void setDeviceTypeName(String deviceTypeName) {
|
||||
this.deviceTypeName = deviceTypeName;
|
||||
}
|
||||
|
||||
public String getElevatorFloorIdList() {
|
||||
return this.elevatorFloorIdList;
|
||||
}
|
||||
|
||||
public void setElevatorFloorIdList(String elevatorFloorIdList) {
|
||||
this.elevatorFloorIdList = elevatorFloorIdList;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return this.areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getElevatorFloorList() {
|
||||
return this.elevatorFloorList;
|
||||
}
|
||||
|
||||
public void setElevatorFloorList(String elevatorFloorList) {
|
||||
this.elevatorFloorList = elevatorFloorList;
|
||||
}
|
||||
|
||||
public String getCurrentFloorId() {
|
||||
return this.currentFloorId;
|
||||
}
|
||||
|
||||
public void setCurrentFloorId(String currentFloorId) {
|
||||
this.currentFloorId = currentFloorId;
|
||||
}
|
||||
|
||||
public String getCurrentFloor() {
|
||||
return this.currentFloor;
|
||||
}
|
||||
|
||||
public void setCurrentFloor(String currentFloor) {
|
||||
this.currentFloor = currentFloor;
|
||||
}
|
||||
|
||||
public String getCurrentBuilding() {
|
||||
return this.currentBuilding;
|
||||
}
|
||||
|
||||
public void setCurrentBuilding(String currentBuilding) {
|
||||
this.currentBuilding = currentBuilding;
|
||||
}
|
||||
|
||||
public String getCurrentBuildingId() {
|
||||
return this.currentBuildingId;
|
||||
}
|
||||
|
||||
public void setCurrentBuildingId(String currentBuildingId) {
|
||||
this.currentBuildingId = currentBuildingId;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsElevatorDeviceAddDTO{, elevatorFloorList='" + this.elevatorFloorList + '\'' + ", currentFloorId='" + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + ", currentBuilding='" + this.currentBuilding + '\'' + '}';
|
||||
}
|
||||
}
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsElevatorDeviceQueryByIdForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
* javax.validation.constraints.NotNull
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsElevatorDeviceQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
@NotNull
|
||||
private String deviceName;
|
||||
private String deviceId;
|
||||
private String deviceTypeName;
|
||||
private String areaName;
|
||||
private String deviceCode;
|
||||
private String ip;
|
||||
private List<String> areaIds;
|
||||
private Integer status;
|
||||
private Integer onlineStatus;
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getOnlineStatus() {
|
||||
return this.onlineStatus;
|
||||
}
|
||||
|
||||
public void setOnlineStatus(Integer onlineStatus) {
|
||||
this.onlineStatus = onlineStatus;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return this.ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceTypeName() {
|
||||
return this.deviceTypeName;
|
||||
}
|
||||
|
||||
public void setDeviceTypeName(String deviceTypeName) {
|
||||
this.deviceTypeName = deviceTypeName;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return this.areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
}
|
||||
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult
|
||||
* javax.validation.constraints.NotNull
|
||||
* org.hibernate.validator.constraints.NotEmpty
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class AcsElevatorRecordAddForm
|
||||
implements Serializable {
|
||||
@NotEmpty(message="76260310")
|
||||
private String businessId;
|
||||
@NotEmpty(message="76260314")
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
@NotEmpty(message="76260319")
|
||||
private String openDoorType;
|
||||
private String faceImagePath;
|
||||
private String panoramaImagePath;
|
||||
@NotNull(message="76260320")
|
||||
private Integer recordResult;
|
||||
private String recognitionNo;
|
||||
@NotNull(message="76260301")
|
||||
private Long recognitionTime;
|
||||
private String logId;
|
||||
private String recognitionFaceId;
|
||||
private DeviceResult deviceResult;
|
||||
private String srcFloor;
|
||||
private String destFloor;
|
||||
private String dispatchElevatorNo;
|
||||
private Long dispatchElevatorTime;
|
||||
private String operateName;
|
||||
private String token;
|
||||
|
||||
public String getOperateName() {
|
||||
return this.operateName;
|
||||
}
|
||||
|
||||
public void setOperateName(String operateName) {
|
||||
this.operateName = operateName;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
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 String getOpenDoorType() {
|
||||
return this.openDoorType;
|
||||
}
|
||||
|
||||
public void setOpenDoorType(String openDoorType) {
|
||||
this.openDoorType = openDoorType;
|
||||
}
|
||||
|
||||
public String getFaceImagePath() {
|
||||
return this.faceImagePath;
|
||||
}
|
||||
|
||||
public void setFaceImagePath(String faceImagePath) {
|
||||
this.faceImagePath = faceImagePath;
|
||||
}
|
||||
|
||||
public String getPanoramaImagePath() {
|
||||
return this.panoramaImagePath;
|
||||
}
|
||||
|
||||
public void setPanoramaImagePath(String panoramaImagePath) {
|
||||
this.panoramaImagePath = panoramaImagePath;
|
||||
}
|
||||
|
||||
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 Long getRecognitionTime() {
|
||||
return this.recognitionTime;
|
||||
}
|
||||
|
||||
public void setRecognitionTime(Long recognitionTime) {
|
||||
this.recognitionTime = recognitionTime;
|
||||
}
|
||||
|
||||
public String getLogId() {
|
||||
return this.logId;
|
||||
}
|
||||
|
||||
public void setLogId(String logId) {
|
||||
this.logId = logId;
|
||||
}
|
||||
|
||||
public String getRecognitionFaceId() {
|
||||
return this.recognitionFaceId;
|
||||
}
|
||||
|
||||
public void setRecognitionFaceId(String recognitionFaceId) {
|
||||
this.recognitionFaceId = recognitionFaceId;
|
||||
}
|
||||
|
||||
public DeviceResult getDeviceResult() {
|
||||
return this.deviceResult;
|
||||
}
|
||||
|
||||
public void setDeviceResult(DeviceResult deviceResult) {
|
||||
this.deviceResult = deviceResult;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return this.token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsRestructureBindingForm
|
||||
implements Serializable {
|
||||
private String parentId;
|
||||
private String orgId;
|
||||
private String orgName;
|
||||
private String labelId;
|
||||
private String labelName;
|
||||
private String personId;
|
||||
private List<String> zoneIds;
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
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 String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public List<String> getZoneIds() {
|
||||
return this.zoneIds;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
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 setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setZoneIds(List<String> zoneIds) {
|
||||
this.zoneIds = zoneIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsRestructureBindingForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsRestructureBindingForm other = (AcsRestructureBindingForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
String this$parentId = this.getParentId();
|
||||
String other$parentId = other.getParentId();
|
||||
if (this$parentId == null ? other$parentId != null : !this$parentId.equals(other$parentId)) {
|
||||
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;
|
||||
}
|
||||
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$zoneIds = this.getZoneIds();
|
||||
List<String> other$zoneIds = other.getZoneIds();
|
||||
return !(this$zoneIds == null ? other$zoneIds != null : !((Object)this$zoneIds).equals(other$zoneIds));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsRestructureBindingForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $parentId = this.getParentId();
|
||||
result = result * 59 + ($parentId == null ? 43 : $parentId.hashCode());
|
||||
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());
|
||||
String $personId = this.getPersonId();
|
||||
result = result * 59 + ($personId == null ? 43 : $personId.hashCode());
|
||||
List<String> $zoneIds = this.getZoneIds();
|
||||
result = result * 59 + ($zoneIds == null ? 43 : ((Object)$zoneIds).hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsRestructureBindingForm(parentId=" + this.getParentId() + ", orgId=" + this.getOrgId() + ", orgName=" + this.getOrgName() + ", labelId=" + this.getLabelId() + ", labelName=" + this.getLabelName() + ", personId=" + this.getPersonId() + ", zoneIds=" + this.getZoneIds() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.elevator.handler.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsRestructureQueryForm
|
||||
implements Serializable {
|
||||
private String orgId;
|
||||
private String labelId;
|
||||
private List<String> labelIds;
|
||||
private String personId;
|
||||
private String zoneId;
|
||||
private String businessId;
|
||||
|
||||
public String getOrgId() {
|
||||
return this.orgId;
|
||||
}
|
||||
|
||||
public String getLabelId() {
|
||||
return this.labelId;
|
||||
}
|
||||
|
||||
public List<String> getLabelIds() {
|
||||
return this.labelIds;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public void setLabelId(String labelId) {
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public void setLabelIds(List<String> labelIds) {
|
||||
this.labelIds = labelIds;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsRestructureQueryForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsRestructureQueryForm other = (AcsRestructureQueryForm)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$labelId = this.getLabelId();
|
||||
String other$labelId = other.getLabelId();
|
||||
if (this$labelId == null ? other$labelId != null : !this$labelId.equals(other$labelId)) {
|
||||
return false;
|
||||
}
|
||||
List<String> this$labelIds = this.getLabelIds();
|
||||
List<String> other$labelIds = other.getLabelIds();
|
||||
if (this$labelIds == null ? other$labelIds != null : !((Object)this$labelIds).equals(other$labelIds)) {
|
||||
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;
|
||||
}
|
||||
String this$zoneId = this.getZoneId();
|
||||
String other$zoneId = other.getZoneId();
|
||||
if (this$zoneId == null ? other$zoneId != null : !this$zoneId.equals(other$zoneId)) {
|
||||
return false;
|
||||
}
|
||||
String this$businessId = this.getBusinessId();
|
||||
String other$businessId = other.getBusinessId();
|
||||
return !(this$businessId == null ? other$businessId != null : !this$businessId.equals(other$businessId));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsRestructureQueryForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
String $orgId = this.getOrgId();
|
||||
result = result * 59 + ($orgId == null ? 43 : $orgId.hashCode());
|
||||
String $labelId = this.getLabelId();
|
||||
result = result * 59 + ($labelId == null ? 43 : $labelId.hashCode());
|
||||
List<String> $labelIds = this.getLabelIds();
|
||||
result = result * 59 + ($labelIds == null ? 43 : ((Object)$labelIds).hashCode());
|
||||
String $personId = this.getPersonId();
|
||||
result = result * 59 + ($personId == null ? 43 : $personId.hashCode());
|
||||
String $zoneId = this.getZoneId();
|
||||
result = result * 59 + ($zoneId == null ? 43 : $zoneId.hashCode());
|
||||
String $businessId = this.getBusinessId();
|
||||
result = result * 59 + ($businessId == null ? 43 : $businessId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsRestructureQueryForm(orgId=" + this.getOrgId() + ", labelId=" + this.getLabelId() + ", labelIds=" + this.getLabelIds() + ", personId=" + this.getPersonId() + ", zoneId=" + this.getZoneId() + ", businessId=" + this.getBusinessId() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user