mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 08:50:29 +08:00
fix: relocate cwos-portal decompiled output to correct path; remove nested directory
Former-commit-id: dc30d42a8c55ed8b2382a41dc2434233fbed9930
This commit is contained in:
+148
@@ -0,0 +1,148 @@
|
||||
package cn.cloudwalk.elevator.passrule.controller;
|
||||
|
||||
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.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRuleDeleteForm;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRuleEditForm;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRuleFloorForm;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRuleImageForm;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRuleNewForm;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRulePersonListForm;
|
||||
import cn.cloudwalk.elevator.passrule.form.AcsPassRuleQueryForm;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRulePersonListParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.ImageRuleRefDetailResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.ImageRuleRefPageResult;
|
||||
import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService;
|
||||
import cn.cloudwalk.elevator.passrule.service.ImageRuleRefService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping({"/elevator/passRule"})
|
||||
public class AcsPassRuleController extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private AcsPassRuleService acsPassRuleService;
|
||||
@Resource
|
||||
private ImageRuleRefService imageRuleRefService;
|
||||
|
||||
@RequestMapping({"/floor"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPassRuleFloorResult>>
|
||||
listFloor(@RequestBody AcsPassRuleFloorForm form) {
|
||||
AcsPassRuleFloorParam param =
|
||||
(AcsPassRuleFloorParam)BeanCopyUtils.copyProperties(form, AcsPassRuleFloorParam.class);
|
||||
try {
|
||||
return this.imageRuleRefService.listFloor(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("查询所有楼层信息失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260520", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/add"})
|
||||
public CloudwalkResult<Boolean> add(@RequestBody AcsPassRuleNewForm form) {
|
||||
AcsPassRuleNewParam param = (AcsPassRuleNewParam)BeanCopyUtils.copyProperties(form, AcsPassRuleNewParam.class);
|
||||
try {
|
||||
return this.imageRuleRefService.addOnlyRule(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("新增通行规则失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260505", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody AcsPassRuleEditForm form) {
|
||||
AcsPassRuleEditParam param =
|
||||
(AcsPassRuleEditParam)BeanCopyUtils.copyProperties(form, AcsPassRuleEditParam.class);
|
||||
try {
|
||||
return this.imageRuleRefService.update(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("修改通行规则失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260506", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsPassRuleDeleteForm form) {
|
||||
AcsPassRuleDeleteParam param =
|
||||
(AcsPassRuleDeleteParam)BeanCopyUtils.copyProperties(form, AcsPassRuleDeleteParam.class);
|
||||
try {
|
||||
return this.imageRuleRefService.delete(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("删除通行规则失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260507", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/detail"})
|
||||
public CloudwalkResult<ImageRuleRefDetailResult> detail(@RequestBody AcsPassRuleQueryForm form) {
|
||||
AcsPassRuleQueryParam param =
|
||||
(AcsPassRuleQueryParam)BeanCopyUtils.copyProperties(form, AcsPassRuleQueryParam.class);
|
||||
try {
|
||||
return this.imageRuleRefService.detail(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("查询通行规则详情失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260508", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<ImageRuleRefPageResult>> page(@RequestBody AcsPassRuleQueryForm form) {
|
||||
AcsPassRuleQueryParam param =
|
||||
(AcsPassRuleQueryParam)BeanCopyUtils.copyProperties(form, AcsPassRuleQueryParam.class);
|
||||
try {
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getPageNo().intValue(), form.getPageSize().intValue());
|
||||
return this.imageRuleRefService.page(param, page, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("分页查询通行规则失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260508", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/image"})
|
||||
public CloudwalkResult<List<AcsPassRuleImageResultDto>> listByImageId(@RequestBody AcsPassRuleImageForm form) {
|
||||
AcsPassRuleImageParam param =
|
||||
(AcsPassRuleImageParam)BeanCopyUtils.copyProperties(form, AcsPassRuleImageParam.class);
|
||||
try {
|
||||
return this.imageRuleRefService.listByPersonInfo(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("根据人员id、标签集合、机构集合获取楼层权限失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260526", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/image/list"})
|
||||
public CloudwalkResult<List<AcsPassRulePersonListResultDto>>
|
||||
listByPersonList(@RequestBody AcsPassRulePersonListForm form) {
|
||||
AcsPassRulePersonListParam param = new AcsPassRulePersonListParam();
|
||||
List<AcsPassRuleImageParam> imageParam = new ArrayList<>();
|
||||
for (AcsPassRuleImageForm imageForm : form.getPersonList()) {
|
||||
AcsPassRuleImageParam copyProperties =
|
||||
(AcsPassRuleImageParam)BeanCopyUtils.copyProperties(imageForm, AcsPassRuleImageParam.class);
|
||||
imageParam.add(copyProperties);
|
||||
}
|
||||
param.setPersonList(imageParam);
|
||||
try {
|
||||
return this.imageRuleRefService.listByPersonList(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("批量获取楼层权限失败,原因:{}", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260526", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package cn.cloudwalk.elevator.passrule.dao;
|
||||
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto;
|
||||
import java.util.List;
|
||||
|
||||
public interface AcsPassRuleDao {
|
||||
Integer insert(AcsPassRuleAddDto paramAcsPassRuleAddDto) throws DataAccessException;
|
||||
|
||||
Integer update(AcsPassRuleEditDto paramAcsPassRuleEditDto) throws DataAccessException;
|
||||
|
||||
Integer delete(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto) throws DataAccessException;
|
||||
|
||||
CloudwalkPageAble<AcsPassRuleResultDto> page(AcsPassRuleQueryDto paramAcsPassRuleQueryDto,
|
||||
CloudwalkPageInfo paramCloudwalkPageInfo) throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleResultDto> list(AcsPassRuleQueryDto paramAcsPassRuleQueryDto) throws DataAccessException;
|
||||
|
||||
String getIsDefaultByZoneId(AcsPassRuleIsDefaultDto paramAcsPassRuleIsDefaultDto) throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByImageId(AcsPassRuleImageDto paramAcsPassRuleImageDto)
|
||||
throws DataAccessException;
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package cn.cloudwalk.elevator.passrule.dao;
|
||||
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto;
|
||||
import java.util.List;
|
||||
|
||||
public interface ImageRuleRefDao {
|
||||
CloudwalkPageAble<ImageRuleRefResultDto> page(AcsPassRuleQueryDto paramAcsPassRuleQueryDto,
|
||||
CloudwalkPageInfo paramCloudwalkPageInfo) throws DataAccessException;
|
||||
|
||||
List<String> listRuleByZoneIdExtDefault(String paramString);
|
||||
|
||||
List<ImageRuleRefResultDto> listByParentRule(List<String> paramList);
|
||||
|
||||
List<ImageRuleRefResultDto> listByPersonId(String paramString) throws DataAccessException;
|
||||
|
||||
List<ImageRuleRefResultDto> listByLabelId(String paramString) throws DataAccessException;
|
||||
|
||||
List<ImageRuleRefResultDto> listByOrgId(String paramString) throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByPersonInfo(AcsPassRuleImageDto paramAcsPassRuleImageDto)
|
||||
throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto)
|
||||
throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleLabelResultDto> listFloorsByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto)
|
||||
throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleImageResultDto> listZoneInfoByIds(List<String> paramList) throws DataAccessException;
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByNotZoneIds(AcsPassRuleQueryDto paramAcsPassRuleQueryDto)
|
||||
throws DataAccessException;
|
||||
|
||||
List<ImageRuleRefResultDto> listByPersonList(AcsPassRulePersonListDto paramAcsPassRulePersonListDto)
|
||||
throws DataAccessException;
|
||||
|
||||
List<String> listPersonDelByZoneId(String paramString) throws DataAccessException;
|
||||
|
||||
List<String> listPersonDelByPersonId(String paramString) throws DataAccessException;
|
||||
|
||||
ImageRuleRefResultDto getDefaultByZoneId(String paramString) throws DataAccessException;
|
||||
|
||||
ImageRuleRefResultDto getById(String paramString) throws DataAccessException;
|
||||
|
||||
String getByRuleName(String paramString1, String paramString2) throws DataAccessException;
|
||||
|
||||
ImageRuleRefResultDto getByPersonIdAndZoneId(List<String> paramList, String paramString) throws DataAccessException;
|
||||
|
||||
ImageRuleRefResultDto getDelByPersonIdAndZoneId(String paramString1, String paramString2)
|
||||
throws DataAccessException;
|
||||
|
||||
List<String> countPersonIdByZoneId(String paramString) throws DataAccessException;
|
||||
|
||||
Boolean insert(ImageRuleRefAddDto paramImageRuleRefAddDto) throws DataAccessException;
|
||||
|
||||
Boolean insertList(List<ImageRuleRefAddDto> paramList) throws DataAccessException;
|
||||
|
||||
Boolean deleteById(String paramString) throws DataAccessException;
|
||||
|
||||
Boolean deleteByZoneIdAndName(String paramString1, String paramString2) throws DataAccessException;
|
||||
|
||||
Boolean deleteByPersonIdsIsDel(List<String> paramList, String paramString) throws DataAccessException;
|
||||
|
||||
Boolean deleteByPersonId(String paramString1, String paramString2) throws DataAccessException;
|
||||
|
||||
Boolean deleteByOrgAndLabel(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto) throws DataAccessException;
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleAddDto extends CloudwalkBaseTimes implements Serializable {
|
||||
private static final long serialVersionUID = 6909321999650444051L;
|
||||
private String businessId;
|
||||
private String name;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String imageStoreId;
|
||||
private Integer isDefault;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleDeleteDto implements Serializable {
|
||||
private static final long serialVersionUID = -6255045079103336579L;
|
||||
private String businessId;
|
||||
private String deviceId;
|
||||
private List<String> ids;
|
||||
private String zoneId;
|
||||
private String orgId;
|
||||
private String labelId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getOrgId() {
|
||||
return this.orgId;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public String getLabelId() {
|
||||
return this.labelId;
|
||||
}
|
||||
|
||||
public void setLabelId(String labelId) {
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleEditDto extends CloudwalkBaseTimes implements Serializable {
|
||||
private static final long serialVersionUID = -9212159235737030371L;
|
||||
private String businessId;
|
||||
private String name;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String imageStoreId;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleImageDto extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private List<String> imageStoreIds;
|
||||
private String businessId;
|
||||
private String personId;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
|
||||
public List<String> getImageStoreIds() {
|
||||
return this.imageStoreIds;
|
||||
}
|
||||
|
||||
public void setImageStoreIds(List<String> imageStoreIds) {
|
||||
this.imageStoreIds = imageStoreIds;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
public class AcsPassRuleImageResultDto {
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String imageStoreId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleIsDefaultDto extends CloudwalkBaseTimes implements Serializable {
|
||||
private static final long serialVersionUID = 6909321999650444051L;
|
||||
private String businessId;
|
||||
private String zoneId;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
public class AcsPassRuleLabelResultDto {
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String labelId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getLabelId() {
|
||||
return this.labelId;
|
||||
}
|
||||
|
||||
public void setLabelId(String labelId) {
|
||||
this.labelId = labelId;
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRulePersonListDto implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private String businessId;
|
||||
private List<String> personIds;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRulePersonListResultDto {
|
||||
private String personId;
|
||||
private List<AcsPassRuleImageResultDto> zoneList;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public List<AcsPassRuleImageResultDto> getZoneList() {
|
||||
return this.zoneList;
|
||||
}
|
||||
|
||||
public void setZoneList(List<AcsPassRuleImageResultDto> zoneList) {
|
||||
this.zoneList = zoneList;
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleQueryDto implements Serializable {
|
||||
private static final long serialVersionUID = 7280163220219331909L;
|
||||
private String id;
|
||||
private String zoneId;
|
||||
private String businessId;
|
||||
private String imageStoreId;
|
||||
private List<String> imageStoreIds;
|
||||
private List<String> ids;
|
||||
private List<String> zoneIds;
|
||||
|
||||
public List<String> getZoneIds() {
|
||||
return this.zoneIds;
|
||||
}
|
||||
|
||||
public void setZoneIds(List<String> zoneIds) {
|
||||
this.zoneIds = zoneIds;
|
||||
}
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public List<String> getImageStoreIds() {
|
||||
return this.imageStoreIds;
|
||||
}
|
||||
|
||||
public void setImageStoreIds(List<String> imageStoreIds) {
|
||||
this.imageStoreIds = imageStoreIds;
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleResultDto extends CloudwalkBaseTimes implements Serializable {
|
||||
private static final long serialVersionUID = -8387459232695360257L;
|
||||
private String businessId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String name;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String imageStoreId;
|
||||
private Integer isDefault;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ImageRuleRefAddDto extends CloudwalkBaseTimes implements Serializable {
|
||||
private static final long serialVersionUID = 6909321999650444051L;
|
||||
private String businessId;
|
||||
private String name;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String personId;
|
||||
private String includeLabels;
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
private String includeOrganizations;
|
||||
private String excludeLabels;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private Integer isDefault;
|
||||
private String parentRule;
|
||||
private Integer personDelete;
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(String includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(String includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(String excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
public void setParentRule(String parentRule) {
|
||||
this.parentRule = parentRule;
|
||||
}
|
||||
|
||||
public void setPersonDelete(Integer personDelete) {
|
||||
this.personDelete = personDelete;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (!(o instanceof ImageRuleRefAddDto))
|
||||
return false;
|
||||
ImageRuleRefAddDto other = (ImageRuleRefAddDto)o;
|
||||
if (!other.canEqual(this))
|
||||
return false;
|
||||
Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId();
|
||||
if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId))
|
||||
return false;
|
||||
Object this$name = getName(), other$name = other.getName();
|
||||
if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name))
|
||||
return false;
|
||||
Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId();
|
||||
if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId))
|
||||
return false;
|
||||
Object this$zoneName = getZoneName(), other$zoneName = other.getZoneName();
|
||||
if ((this$zoneName == null) ? (other$zoneName != null) : !this$zoneName.equals(other$zoneName))
|
||||
return false;
|
||||
Object this$personId = getPersonId(), other$personId = other.getPersonId();
|
||||
if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId))
|
||||
return false;
|
||||
Object this$includeLabels = getIncludeLabels(), other$includeLabels = other.getIncludeLabels();
|
||||
if ((this$includeLabels == null) ? (other$includeLabels != null)
|
||||
: !this$includeLabels.equals(other$includeLabels))
|
||||
return false;
|
||||
Object this$includeOrganizations = getIncludeOrganizations(),
|
||||
other$includeOrganizations = other.getIncludeOrganizations();
|
||||
if ((this$includeOrganizations == null) ? (other$includeOrganizations != null)
|
||||
: !this$includeOrganizations.equals(other$includeOrganizations))
|
||||
return false;
|
||||
Object this$excludeLabels = getExcludeLabels(), other$excludeLabels = other.getExcludeLabels();
|
||||
if ((this$excludeLabels == null) ? (other$excludeLabels != null)
|
||||
: !this$excludeLabels.equals(other$excludeLabels))
|
||||
return false;
|
||||
Object this$startTime = getStartTime(), other$startTime = other.getStartTime();
|
||||
if ((this$startTime == null) ? (other$startTime != null) : !this$startTime.equals(other$startTime))
|
||||
return false;
|
||||
Object this$endTime = getEndTime(), other$endTime = other.getEndTime();
|
||||
if ((this$endTime == null) ? (other$endTime != null) : !this$endTime.equals(other$endTime))
|
||||
return false;
|
||||
Object this$isDefault = getIsDefault(), other$isDefault = other.getIsDefault();
|
||||
if ((this$isDefault == null) ? (other$isDefault != null) : !this$isDefault.equals(other$isDefault))
|
||||
return false;
|
||||
Object this$parentRule = getParentRule(), other$parentRule = other.getParentRule();
|
||||
if ((this$parentRule == null) ? (other$parentRule != null) : !this$parentRule.equals(other$parentRule))
|
||||
return false;
|
||||
Object this$personDelete = getPersonDelete(), other$personDelete = other.getPersonDelete();
|
||||
return !((this$personDelete == null) ? (other$personDelete != null)
|
||||
: !this$personDelete.equals(other$personDelete));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof ImageRuleRefAddDto;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
Object $businessId = getBusinessId();
|
||||
result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode());
|
||||
Object $name = getName();
|
||||
result = result * 59 + (($name == null) ? 43 : $name.hashCode());
|
||||
Object $zoneId = getZoneId();
|
||||
result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode());
|
||||
Object $zoneName = getZoneName();
|
||||
result = result * 59 + (($zoneName == null) ? 43 : $zoneName.hashCode());
|
||||
Object $personId = getPersonId();
|
||||
result = result * 59 + (($personId == null) ? 43 : $personId.hashCode());
|
||||
Object $includeLabels = getIncludeLabels();
|
||||
result = result * 59 + (($includeLabels == null) ? 43 : $includeLabels.hashCode());
|
||||
Object $includeOrganizations = getIncludeOrganizations();
|
||||
result = result * 59 + (($includeOrganizations == null) ? 43 : $includeOrganizations.hashCode());
|
||||
Object $excludeLabels = getExcludeLabels();
|
||||
result = result * 59 + (($excludeLabels == null) ? 43 : $excludeLabels.hashCode());
|
||||
Object $startTime = getStartTime();
|
||||
result = result * 59 + (($startTime == null) ? 43 : $startTime.hashCode());
|
||||
Object $endTime = getEndTime();
|
||||
result = result * 59 + (($endTime == null) ? 43 : $endTime.hashCode());
|
||||
Object $isDefault = getIsDefault();
|
||||
result = result * 59 + (($isDefault == null) ? 43 : $isDefault.hashCode());
|
||||
Object $parentRule = getParentRule();
|
||||
result = result * 59 + (($parentRule == null) ? 43 : $parentRule.hashCode());
|
||||
Object $personDelete = getPersonDelete();
|
||||
return result * 59 + (($personDelete == null) ? 43 : $personDelete.hashCode());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ImageRuleRefAddDto(businessId=" + getBusinessId() + ", name=" + getName() + ", zoneId=" + getZoneId()
|
||||
+ ", zoneName=" + getZoneName() + ", personId=" + getPersonId() + ", includeLabels=" + getIncludeLabels()
|
||||
+ ", includeOrganizations=" + getIncludeOrganizations() + ", excludeLabels=" + getExcludeLabels()
|
||||
+ ", startTime=" + getStartTime() + ", endTime=" + getEndTime() + ", isDefault=" + getIsDefault()
|
||||
+ ", parentRule=" + getParentRule() + ", personDelete=" + getPersonDelete() + ")";
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public String getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public String getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public String getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public String getParentRule() {
|
||||
return this.parentRule;
|
||||
}
|
||||
|
||||
public Integer getPersonDelete() {
|
||||
return this.personDelete;
|
||||
}
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class ImageRuleRefListResult extends CloudwalkBaseTimes implements Serializable {
|
||||
private static final long serialVersionUID = 6909321999650444051L;
|
||||
private String businessId;
|
||||
private String name;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String personId;
|
||||
private List<String> includeLabels;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> excludeLabels;
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (!(o instanceof ImageRuleRefListResult))
|
||||
return false;
|
||||
ImageRuleRefListResult other = (ImageRuleRefListResult)o;
|
||||
if (!other.canEqual(this))
|
||||
return false;
|
||||
Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId();
|
||||
if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId))
|
||||
return false;
|
||||
Object this$name = getName(), other$name = other.getName();
|
||||
if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name))
|
||||
return false;
|
||||
Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId();
|
||||
if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId))
|
||||
return false;
|
||||
Object this$zoneName = getZoneName(), other$zoneName = other.getZoneName();
|
||||
if ((this$zoneName == null) ? (other$zoneName != null) : !this$zoneName.equals(other$zoneName))
|
||||
return false;
|
||||
Object this$personId = getPersonId(), other$personId = other.getPersonId();
|
||||
if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId))
|
||||
return false;
|
||||
Object this$includeLabels = getIncludeLabels(), other$includeLabels = other.getIncludeLabels();
|
||||
if ((this$includeLabels == null) ? (other$includeLabels != null)
|
||||
: !this$includeLabels.equals(other$includeLabels))
|
||||
return false;
|
||||
Object this$includeOrganizations = getIncludeOrganizations(),
|
||||
other$includeOrganizations = other.getIncludeOrganizations();
|
||||
if ((this$includeOrganizations == null) ? (other$includeOrganizations != null)
|
||||
: !this$includeOrganizations.equals(other$includeOrganizations))
|
||||
return false;
|
||||
Object this$excludeLabels = getExcludeLabels(), other$excludeLabels = other.getExcludeLabels();
|
||||
return !((this$excludeLabels == null) ? (other$excludeLabels != null)
|
||||
: !this$excludeLabels.equals(other$excludeLabels));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof ImageRuleRefListResult;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
Object $businessId = getBusinessId();
|
||||
result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode());
|
||||
Object $name = getName();
|
||||
result = result * 59 + (($name == null) ? 43 : $name.hashCode());
|
||||
Object $zoneId = getZoneId();
|
||||
result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode());
|
||||
Object $zoneName = getZoneName();
|
||||
result = result * 59 + (($zoneName == null) ? 43 : $zoneName.hashCode());
|
||||
Object $personId = getPersonId();
|
||||
result = result * 59 + (($personId == null) ? 43 : $personId.hashCode());
|
||||
Object $includeLabels = getIncludeLabels();
|
||||
result = result * 59 + (($includeLabels == null) ? 43 : $includeLabels.hashCode());
|
||||
Object $includeOrganizations = getIncludeOrganizations();
|
||||
result = result * 59 + (($includeOrganizations == null) ? 43 : $includeOrganizations.hashCode());
|
||||
Object $excludeLabels = getExcludeLabels();
|
||||
return result * 59 + (($excludeLabels == null) ? 43 : $excludeLabels.hashCode());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ImageRuleRefListResult(businessId=" + getBusinessId() + ", name=" + getName() + ", zoneId="
|
||||
+ getZoneId() + ", zoneName=" + getZoneName() + ", personId=" + getPersonId() + ", includeLabels="
|
||||
+ getIncludeLabels() + ", includeOrganizations=" + getIncludeOrganizations() + ", excludeLabels="
|
||||
+ getExcludeLabels() + ")";
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package cn.cloudwalk.elevator.passrule.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ImageRuleRefResultDto implements Serializable {
|
||||
private static final long serialVersionUID = 6909321999650444051L;
|
||||
private String id;
|
||||
private Long createTime;
|
||||
private Long lastUpdateTime;
|
||||
private String businessId;
|
||||
private String name;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private String personId;
|
||||
private String includeLabels;
|
||||
private String includeOrganizations;
|
||||
private String excludeLabels;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private Integer isDefault;
|
||||
private String parentRule;
|
||||
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public void setLastUpdateTime(Long lastUpdateTime) {
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(String includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(String includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(String excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
public void setParentRule(String parentRule) {
|
||||
this.parentRule = parentRule;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
public Long getLastUpdateTime() {
|
||||
return this.lastUpdateTime;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public String getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public String getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public String getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public String getParentRule() {
|
||||
return this.parentRule;
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleDeleteForm implements Serializable {
|
||||
private static final long serialVersionUID = -52051042529262978L;
|
||||
private List<String> ids;
|
||||
private String zoneId;
|
||||
private String parentId;
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleEditForm implements Serializable {
|
||||
private static final long serialVersionUID = -27068608402591250L;
|
||||
private String id;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String ruleName;
|
||||
private String oldName;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
private List<String> excludeLabels;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getOldName() {
|
||||
return this.oldName;
|
||||
}
|
||||
|
||||
public void setOldName(String oldName) {
|
||||
this.oldName = oldName;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleFloorForm extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = -46113273262522744L;
|
||||
private String zoneId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleImageForm implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private List<String> imageStoreIds;
|
||||
private String businessId;
|
||||
private String personId;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
|
||||
public List<String> getImageStoreIds() {
|
||||
return this.imageStoreIds;
|
||||
}
|
||||
|
||||
public void setImageStoreIds(List<String> imageStoreIds) {
|
||||
this.imageStoreIds = imageStoreIds;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleNewForm implements Serializable {
|
||||
private static final long serialVersionUID = -46113273262522744L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String ruleName;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
private List<String> excludeLabels;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRulePersonListForm extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private List<AcsPassRuleImageForm> personList;
|
||||
|
||||
public List<AcsPassRuleImageForm> getPersonList() {
|
||||
return this.personList;
|
||||
}
|
||||
|
||||
public void setPersonList(List<AcsPassRuleImageForm> personList) {
|
||||
this.personList = personList;
|
||||
}
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package cn.cloudwalk.elevator.passrule.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleQueryForm implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private String id;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private Integer isDefault;
|
||||
private Integer pageSize = Integer.valueOf(10);
|
||||
private Integer pageNo = Integer.valueOf(1);
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public Integer getPageNo() {
|
||||
return this.pageNo;
|
||||
}
|
||||
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package cn.cloudwalk.elevator.passrule.impl;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonData;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.elevator.common.AbstractCloudwalkService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
public class AbstractAcsPassService extends AbstractCloudwalkService {
|
||||
@Resource
|
||||
private ImageStoreService imageStoreService;
|
||||
|
||||
protected ImageStoreDetailResult getImageStoreDetail(String imageStoreId, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
ImageStoreQueryParam param = new ImageStoreQueryParam();
|
||||
param.setId(imageStoreId);
|
||||
param.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<ImageStoreDetailResult> imageStoreDetail = this.imageStoreService.detail(param, context);
|
||||
if (!imageStoreDetail.isSuccess()) {
|
||||
this.logger.error("远程调用查询图库详情失败,原因:" + imageStoreDetail.getMessage());
|
||||
throw new ServiceException("远程调用查询图库详情失败");
|
||||
}
|
||||
return (ImageStoreDetailResult)imageStoreDetail.getData();
|
||||
}
|
||||
|
||||
protected ImageStoreEditParam getEditParamByImageStore(ImageStoreDetailResult imageStoreDetail) {
|
||||
ImageStoreEditParam param = new ImageStoreEditParam();
|
||||
BeanCopyUtils.copyProperties(imageStoreDetail, param);
|
||||
param.setIncludeOrganizations((List)imageStoreDetail.getIncludeOrganizations().stream()
|
||||
.map(OrganizationResult::getId).collect(Collectors.toList()));
|
||||
param.setIncludeLabels(
|
||||
(List)imageStoreDetail.getIncludeLabels().stream().map(LabelResult::getId).collect(Collectors.toList()));
|
||||
param.setIncludePersons(getImageStorePersonData(imageStoreDetail.getIncludePersons()));
|
||||
param.setExcludeLabels(
|
||||
(List)imageStoreDetail.getExcludeLabels().stream().map(LabelResult::getId).collect(Collectors.toList()));
|
||||
param.setExcludePersons((List)imageStoreDetail.getExcludePersons().stream().map(ImgStorePersonResult::getId)
|
||||
.collect(Collectors.toList()));
|
||||
return param;
|
||||
}
|
||||
|
||||
private List<ImageStorePersonData> getImageStorePersonData(List<ImgStorePersonResult> imgStorePersonResults) {
|
||||
List<ImageStorePersonData> personDataList = new ArrayList<>();
|
||||
for (ImgStorePersonResult personResult : imgStorePersonResults) {
|
||||
ImageStorePersonData personData = new ImageStorePersonData();
|
||||
BeanCopyUtils.copyProperties(personResult, personData);
|
||||
personData.setObjectId(personResult.getId());
|
||||
personDataList.add(personData);
|
||||
}
|
||||
return personDataList;
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package cn.cloudwalk.elevator.passrule.impl;
|
||||
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.mapper.AcsPassRuleMapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class AcsPassRuleDaoImpl implements AcsPassRuleDao {
|
||||
@Resource
|
||||
private AcsPassRuleMapper acsPassRuleMapper;
|
||||
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
public Integer insert(AcsPassRuleAddDto dto) {
|
||||
return this.acsPassRuleMapper.insert(dto);
|
||||
}
|
||||
|
||||
public Integer update(AcsPassRuleEditDto dto) {
|
||||
return this.acsPassRuleMapper.update(dto);
|
||||
}
|
||||
|
||||
public Integer delete(AcsPassRuleDeleteDto dto) {
|
||||
return this.acsPassRuleMapper.delete(dto);
|
||||
}
|
||||
|
||||
public CloudwalkPageAble<AcsPassRuleResultDto> page(AcsPassRuleQueryDto dto, CloudwalkPageInfo page) {
|
||||
PageHelper.startPage(page.getCurrentPage(), page.getPageSize());
|
||||
Page<AcsPassRuleResultDto> result = (Page<AcsPassRuleResultDto>)this.acsPassRuleMapper.list(dto);
|
||||
return new CloudwalkPageAble(BeanCopyUtils.copy(result.getResult(), AcsPassRuleResultDto.class), page,
|
||||
result.getTotal());
|
||||
}
|
||||
|
||||
public List<AcsPassRuleResultDto> list(AcsPassRuleQueryDto dto) throws DataAccessException {
|
||||
try {
|
||||
return this.acsPassRuleMapper.list(dto);
|
||||
} catch (Exception e) {
|
||||
this.logger.error("查询紧通行规则异常,原因:[{}]", e.getMessage(), e);
|
||||
throw new DataAccessException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getIsDefaultByZoneId(AcsPassRuleIsDefaultDto dto) throws DataAccessException {
|
||||
try {
|
||||
return this.acsPassRuleMapper.getIsDefaultByZoneId(dto);
|
||||
} catch (Exception e) {
|
||||
this.logger.error("根据楼层id获取默认图库id异常,原因:[{}]", e.getMessage(), e);
|
||||
throw new DataAccessException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<AcsPassRuleImageResultDto> listByImageId(AcsPassRuleImageDto dto) throws DataAccessException {
|
||||
try {
|
||||
return this.acsPassRuleMapper.listByImageId(dto);
|
||||
} catch (Exception e) {
|
||||
this.logger.error("根据图库id集合查询对应楼层信息异常,原因:[{}]", e.getMessage(), e);
|
||||
throw new DataAccessException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
+576
@@ -0,0 +1,576 @@
|
||||
package cn.cloudwalk.elevator.passrule.impl;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService;
|
||||
import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
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.common.service.AcsApplicationService;
|
||||
import cn.cloudwalk.elevator.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.elevator.device.dao.AcsElevatorDeviceDao;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO;
|
||||
import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppBindParam;
|
||||
import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppUnbindParam;
|
||||
import cn.cloudwalk.elevator.device.setting.service.AcsDeviceImageStoreAppBindService;
|
||||
import cn.cloudwalk.elevator.em.AcsPassTypeEnum;
|
||||
import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleIsDefaultParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleDetailResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult;
|
||||
import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.service.AcsPersonService;
|
||||
import cn.cloudwalk.elevator.util.CollectionUtils;
|
||||
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.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
@Service
|
||||
public class AcsPassRuleServiceImpl extends AbstractAcsPassService implements AcsPassRuleService {
|
||||
/** 约定 §3.3 / §3.4:与 {@code ninca.elevator.remote-io.pool} 默认 core 对齐 */
|
||||
private static final int REMOTE_IO_PARALLEL = 6;
|
||||
@Resource
|
||||
private ImageStoreService imageStoreService;
|
||||
@Resource
|
||||
private ImageStorePersonService imageStorePersonService;
|
||||
@Resource
|
||||
private PersonService personService;
|
||||
@Resource
|
||||
private ZoneService zoneService;
|
||||
@Autowired
|
||||
private AcsApplicationService acsApplicationService;
|
||||
@Autowired
|
||||
private AcsPersonService acsPersonService;
|
||||
@Resource
|
||||
private AcsPassRuleDao acsPassRuleDao;
|
||||
@Resource
|
||||
private AcsDeviceImageStoreAppBindService acsDeviceImageStoreAppBindService;
|
||||
@Resource
|
||||
private AcsElevatorDeviceDao acsElevatorDeviceDao;
|
||||
@Autowired
|
||||
@Qualifier("elevatorRemoteBoundedExecutor")
|
||||
private ThreadPoolTaskExecutor elevatorRemoteBoundedExecutor;
|
||||
|
||||
public CloudwalkResult<List<AcsPassRuleFloorResult>> listFloor(AcsPassRuleFloorParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ZoneNextTreeParam treeParam = new ZoneNextTreeParam();
|
||||
treeParam.setParentId(param.getZoneId());
|
||||
CloudwalkResult<List<ZoneTreeResult>> zoneTree = this.zoneService.tree(treeParam, context);
|
||||
if (!zoneTree.isSuccess()) {
|
||||
this.logger.info("远程调用查询区域树状图失败,原因:" + zoneTree.getMessage());
|
||||
throw new ServiceException(zoneTree.getCode(), zoneTree.getMessage());
|
||||
}
|
||||
try {
|
||||
List<AcsPassRuleFloorResult> passRuleResults = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty((Collection)zoneTree.getData())) {
|
||||
for (ZoneTreeResult zoneTreeResult : zoneTree.getData()) {
|
||||
getZoneTypeIsThree(zoneTreeResult, passRuleResults);
|
||||
}
|
||||
} else {
|
||||
return CloudwalkResult.success(passRuleResults);
|
||||
}
|
||||
for (AcsPassRuleFloorResult passRuleResult : passRuleResults) {
|
||||
AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto();
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setCurrentFloorId(passRuleResult.getId());
|
||||
List<AcsElevatorDeviceResultDTO> deviceList = this.acsElevatorDeviceDao.listByZoneId(dto);
|
||||
passRuleResult.setDeviceNumber(Integer.valueOf(deviceList.size()));
|
||||
}
|
||||
int floorCount = passRuleResults.size();
|
||||
long[] personTotals = new long[floorCount];
|
||||
for (int i = 0; i < floorCount;) {
|
||||
int end = Math.min(i + REMOTE_IO_PARALLEL, floorCount);
|
||||
List<Callable<Void>> batch = new ArrayList<>();
|
||||
for (int j = i; j < end; j++) {
|
||||
final int idx = j;
|
||||
final String zoneId = passRuleResults.get(j).getId();
|
||||
batch.add(() -> {
|
||||
personTotals[idx] = pagePersonTotalRowsForZone(zoneId, context);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
List<Future<Void>> floorFutures;
|
||||
try {
|
||||
floorFutures = this.elevatorRemoteBoundedExecutor.getThreadPoolExecutor().invokeAll(batch);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ServiceException("76260520", getMessage("76260520"));
|
||||
}
|
||||
for (Future<Void> fu : floorFutures) {
|
||||
try {
|
||||
fu.get();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ServiceException("76260520", getMessage("76260520"));
|
||||
} catch (ExecutionException e) {
|
||||
Throwable c = e.getCause();
|
||||
if (c instanceof ServiceException) {
|
||||
throw (ServiceException)c;
|
||||
}
|
||||
throw new ServiceException("76260520", getMessage("76260520"));
|
||||
}
|
||||
}
|
||||
i = end;
|
||||
}
|
||||
for (int k = 0; k < floorCount; k++) {
|
||||
passRuleResults.get(k).setPersonNumber(Long.valueOf(personTotals[k]));
|
||||
}
|
||||
return CloudwalkResult.success(passRuleResults);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("查询所有楼层信息失败");
|
||||
throw new ServiceException("76260520", getMessage("76260520"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<String> getIsDefaultByZoneId(AcsPassRuleIsDefaultParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleIsDefaultDto dto = new AcsPassRuleIsDefaultDto();
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
return CloudwalkResult.success(this.acsPassRuleDao.getIsDefaultByZoneId(dto));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("根据楼层id获取默认图库id失败");
|
||||
throw new ServiceException("76260524", getMessage("76260524"));
|
||||
}
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate(argsIndexs = {0, 1})
|
||||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
|
||||
public CloudwalkResult<String> add(AcsPassRuleNewParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
String imageStoreId = addImageStore(param, context);
|
||||
AcsPassRuleAddDto dto = new AcsPassRuleAddDto();
|
||||
dto.setId(genUUID());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setName(param.getRuleName());
|
||||
dto.setImageStoreId(imageStoreId);
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setZoneName(param.getZoneName());
|
||||
dto.setBeginDate(param.getStartTime());
|
||||
dto.setEndDate(param.getEndTime());
|
||||
dto.setIsDefault(param.getIsDefault());
|
||||
try {
|
||||
this.acsPassRuleDao.insert(dto);
|
||||
return CloudwalkResult.success(imageStoreId);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("添加通行规则失败");
|
||||
throw new ServiceException("76260505", getMessage("76260505"));
|
||||
}
|
||||
}
|
||||
|
||||
private String addImageStore(AcsPassRuleNewParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStoreAddParam imageStoreAddParam = new ImageStoreAddParam();
|
||||
String applicationId = this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId());
|
||||
BeanCopyUtils.copyProperties(param, imageStoreAddParam);
|
||||
imageStoreAddParam.setExpiryBeginDate(param.getStartTime());
|
||||
imageStoreAddParam.setExpiryEndDate(param.getEndTime());
|
||||
imageStoreAddParam.setName(param.getZoneName() + "-" + param.getRuleName());
|
||||
imageStoreAddParam.setType(Short.valueOf((short)1));
|
||||
imageStoreAddParam.setSourceApplicationId(applicationId);
|
||||
imageStoreAddParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<String> imageStoreId = this.imageStoreService.add(imageStoreAddParam, context);
|
||||
if (!imageStoreId.isSuccess()) {
|
||||
this.logger.info("远程调用新增图库失败,原因:" + imageStoreId.getMessage());
|
||||
throw new ServiceException(imageStoreId.getCode(), imageStoreId.getMessage());
|
||||
}
|
||||
AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto();
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setCurrentFloorId(param.getZoneId());
|
||||
List<AcsElevatorDeviceResultDTO> deviceList = null;
|
||||
try {
|
||||
deviceList = this.acsElevatorDeviceDao.listByZoneId(dto);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("根据楼层id获取设备信息失败,原因是:{}", e.getMessage());
|
||||
}
|
||||
DeviceImageStoreAppBindParam appBindParam = new DeviceImageStoreAppBindParam();
|
||||
appBindParam.setImageStoreId((String)imageStoreId.getData());
|
||||
appBindParam.setApplicationId(applicationId);
|
||||
this.acsDeviceImageStoreAppBindService.bindAppImageStoreDevice(appBindParam, context);
|
||||
if (!CollectionUtils.isEmpty(deviceList)) {
|
||||
final String newImageStoreId = (String)imageStoreId.getData();
|
||||
for (int i = 0; i < deviceList.size();) {
|
||||
int end = Math.min(i + REMOTE_IO_PARALLEL, deviceList.size());
|
||||
List<Callable<Void>> bindBatch = new ArrayList<>();
|
||||
for (int j = i; j < end; j++) {
|
||||
final AcsElevatorDeviceResultDTO device = deviceList.get(j);
|
||||
bindBatch.add(() -> {
|
||||
FeignThreadLocalUtil.callWithContext(context, () -> {
|
||||
DeviceImageStoreAppBindParam bindParam = new DeviceImageStoreAppBindParam();
|
||||
bindParam.setImageStoreId(newImageStoreId);
|
||||
bindParam.setDeviceId(device.getDeviceId());
|
||||
bindParam.setApplicationId(applicationId);
|
||||
this.acsDeviceImageStoreAppBindService.bindDeviceAndImageStore(bindParam, context);
|
||||
return null;
|
||||
});
|
||||
return null;
|
||||
});
|
||||
}
|
||||
List<Future<Void>> bindFutures;
|
||||
try {
|
||||
bindFutures = this.elevatorRemoteBoundedExecutor.getThreadPoolExecutor().invokeAll(bindBatch);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ServiceException("76260505", getMessage("76260505"));
|
||||
}
|
||||
for (Future<Void> f : bindFutures) {
|
||||
try {
|
||||
f.get();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ServiceException("76260505", getMessage("76260505"));
|
||||
} catch (ExecutionException e) {
|
||||
Throwable c = e.getCause();
|
||||
if (c instanceof ServiceException) {
|
||||
ServiceException se = (ServiceException)c;
|
||||
this.logger.error("图库关联失败,图库id={},原因:{}", newImageStoreId, se.getMessage());
|
||||
rollbackImageStoreAfterBindFailure(newImageStoreId, context);
|
||||
throw new ServiceException(se.getCode(), se.getMessage());
|
||||
}
|
||||
this.logger.error("图库关联失败,图库id={},原因:{}", newImageStoreId, e.getMessage());
|
||||
rollbackImageStoreAfterBindFailure(newImageStoreId, context);
|
||||
throw new ServiceException("76260505", getMessage("76260505"));
|
||||
}
|
||||
}
|
||||
i = end;
|
||||
}
|
||||
}
|
||||
return (String)imageStoreId.getData();
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate(argsIndexs = {0, 1})
|
||||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
|
||||
public CloudwalkResult<Boolean> update(AcsPassRuleEditParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
checkDefaultRule(Collections.singletonList(param.getId()), context);
|
||||
AcsPassRuleEditDto dto = new AcsPassRuleEditDto();
|
||||
BeanCopyUtils.copyProperties(param, context, dto);
|
||||
dto.setValidDateCron(null);
|
||||
dto.setValidDateJson(null);
|
||||
dto.setBeginDate(param.getStartTime());
|
||||
dto.setEndDate(param.getEndTime());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setName(param.getRuleName());
|
||||
try {
|
||||
this.acsPassRuleDao.update(dto);
|
||||
List<AcsPassRuleResultDto> ruleList = getRuleByIds(Collections.singletonList(dto.getId()), context);
|
||||
updateImageStore(param, ruleList.get(0), context);
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("编辑通行规则编辑失败");
|
||||
throw new ServiceException("76260506", getMessage("76260506"));
|
||||
}
|
||||
}
|
||||
|
||||
private List<AcsPassRuleResultDto> checkDefaultRule(List<String> ruleIds, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
List<AcsPassRuleResultDto> resultDtoList = getRuleByIds(ruleIds, context);
|
||||
for (AcsPassRuleResultDto resultDto : resultDtoList) {
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIsDefault()) && resultDto.getIsDefault().intValue() == 1) {
|
||||
throw new ServiceException("门禁默认规则不可编辑和删除");
|
||||
}
|
||||
}
|
||||
return resultDtoList;
|
||||
}
|
||||
|
||||
private void updateImageStore(AcsPassRuleEditParam param, AcsPassRuleResultDto ruleResultDto,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStoreDetailResult imageStoreDetail = getImageStoreDetail(ruleResultDto.getImageStoreId(), context);
|
||||
ImageStoreEditParam imageStoreEditParam = getEditParamByImageStore(imageStoreDetail);
|
||||
BeanCopyUtils.copyProperties(ruleResultDto, imageStoreEditParam);
|
||||
BeanCopyUtils.copyProperties(param, imageStoreEditParam);
|
||||
imageStoreEditParam.setName(param.getZoneName() + "-" + param.getRuleName());
|
||||
imageStoreEditParam.setExpiryBeginDate(param.getStartTime());
|
||||
imageStoreEditParam.setExpiryEndDate(param.getEndTime());
|
||||
imageStoreEditParam.setValidDateCron(null);
|
||||
imageStoreEditParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<Boolean> result = this.imageStoreService.edit(imageStoreEditParam, context);
|
||||
if (!result.isSuccess()) {
|
||||
this.logger.info("远程调用编辑图库失败:原因:" + result.getMessage());
|
||||
throw new ServiceException(result.getCode(), result.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private List<AcsPassRuleResultDto> getRuleByIds(List<String> ruleIds, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto();
|
||||
dto.setIds(ruleIds);
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
try {
|
||||
return this.acsPassRuleDao.list(dto);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("通行规则查询失败");
|
||||
throw new ServiceException("通行规则查询失败");
|
||||
}
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate(argsIndexs = {0, 1})
|
||||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
|
||||
public CloudwalkResult<Boolean> delete(AcsPassRuleDeleteParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
List<AcsPassRuleResultDto> resultDtos = checkDefaultRule(param.getIds(), context);
|
||||
String applicationId = this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId());
|
||||
AcsElevatorDeviceListDto deviceListDto = new AcsElevatorDeviceListDto();
|
||||
deviceListDto.setBusinessId(context.getCompany().getCompanyId());
|
||||
deviceListDto.setCurrentFloorId(param.getZoneId());
|
||||
List<AcsElevatorDeviceResultDTO> deviceList = null;
|
||||
try {
|
||||
deviceList = this.acsElevatorDeviceDao.listByZoneId(deviceListDto);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("根据楼层id获取设备信息失败,原因是:{}", e.getMessage());
|
||||
}
|
||||
for (AcsPassRuleResultDto acsPassRuleResultDto : resultDtos) {
|
||||
if (!CollectionUtils.isEmpty(deviceList)) {
|
||||
for (AcsElevatorDeviceResultDTO device : deviceList) {
|
||||
DeviceImageStoreAppUnbindParam deviceImageStoreAppUnbindParam =
|
||||
new DeviceImageStoreAppUnbindParam();
|
||||
deviceImageStoreAppUnbindParam.setApplicationId(applicationId);
|
||||
deviceImageStoreAppUnbindParam.setDeviceId(device.getDeviceId());
|
||||
deviceImageStoreAppUnbindParam.setDeviceCode(device.getDeviceCode());
|
||||
deviceImageStoreAppUnbindParam.setImageStoreId(acsPassRuleResultDto.getImageStoreId());
|
||||
this.acsDeviceImageStoreAppBindService.unbindAppImageStoreDevice(deviceImageStoreAppUnbindParam,
|
||||
context);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
DeviceImageStoreAppUnbindParam unbindParam = new DeviceImageStoreAppUnbindParam();
|
||||
unbindParam.setApplicationId(applicationId);
|
||||
unbindParam.setImageStoreId(acsPassRuleResultDto.getImageStoreId());
|
||||
this.acsDeviceImageStoreAppBindService.deleteImageStore(unbindParam, context);
|
||||
}
|
||||
AcsPassRuleDeleteDto dto = new AcsPassRuleDeleteDto();
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setIds(param.getIds());
|
||||
try {
|
||||
this.acsPassRuleDao.delete(dto);
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("通行规则删除失败");
|
||||
throw new ServiceException("76260507", getMessage("76260507"));
|
||||
}
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate(argsIndexs = {0, 1})
|
||||
public CloudwalkResult<AcsPassRuleDetailResult> detail(AcsPassRuleQueryParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto();
|
||||
BeanCopyUtils.copyProperties(param, dto);
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
List<AcsPassRuleResultDto> passRuleResult = this.acsPassRuleDao.list(dto);
|
||||
if (CollectionUtils.isEmpty(passRuleResult)) {
|
||||
return CloudwalkResult.fail("76260517", getMessage("76260517"));
|
||||
}
|
||||
AcsPassRuleDetailResult result = coverRuleDetailResult(passRuleResult.get(0), context);
|
||||
return CloudwalkResult.success(result);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("查询通行规则详情失败");
|
||||
throw new ServiceException("76260508", getMessage("76260508"));
|
||||
}
|
||||
}
|
||||
|
||||
private List<AcsPassRuleResult> coverRulePageResult(List<AcsPassRuleResultDto> passRuleResultDtos,
|
||||
CloudwalkCallContext context, boolean needDetail) throws ServiceException {
|
||||
List<AcsPassRuleResult> results = new ArrayList<>();
|
||||
Map<String, ImageStoreListResult> imageStoreResultMap = null;
|
||||
if (needDetail) {
|
||||
List<String> imageStoreIds = (List<String>)passRuleResultDtos.stream()
|
||||
.map(AcsPassRuleResultDto::getImageStoreId).collect(Collectors.toList());
|
||||
List<ImageStoreListResult> imageStoreListResult = getImageStorePageResult(imageStoreIds, context);
|
||||
imageStoreResultMap = (Map<String, ImageStoreListResult>)imageStoreListResult.stream()
|
||||
.collect(Collectors.toMap(ImageStoreListResult::getId, r -> r));
|
||||
}
|
||||
for (AcsPassRuleResultDto dto : passRuleResultDtos) {
|
||||
AcsPassRuleResult result = new AcsPassRuleResult();
|
||||
BeanCopyUtils.copyProperties(dto, result);
|
||||
result.setRuleName(dto.getName());
|
||||
result.setPassType(AcsPassTypeEnum.LONG_TIME.getCode());
|
||||
if (dto.getBeginDate() != null || dto.getEndDate() != null) {
|
||||
result.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode());
|
||||
}
|
||||
if (needDetail && imageStoreResultMap.containsKey(dto.getImageStoreId())) {
|
||||
ImageStoreListResult imageStoreListResult = imageStoreResultMap.get(dto.getImageStoreId());
|
||||
result.setPersonSum(imageStoreListResult.getPersonNum().intValue());
|
||||
result.setIncludeOrganizations(imageStoreListResult.getIncludeOrganizations());
|
||||
result.setIncludeLabels(imageStoreListResult.getIncludeLabels());
|
||||
result.setExcludeLabels(imageStoreListResult.getExcludeLabels());
|
||||
}
|
||||
results.add(result);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private List<ImageStoreListResult> getImageStorePageResult(List<String> imageStoreIds, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
ImageStoreQueryParam param = new ImageStoreQueryParam();
|
||||
param.setIds(imageStoreIds);
|
||||
param.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<List<ImageStoreListResult>> imageStoreResult = this.imageStoreService.list(param, context);
|
||||
if (!imageStoreResult.isSuccess()) {
|
||||
this.logger.info("远程调用分页查询图库失败,原因:" + imageStoreResult.getMessage());
|
||||
throw new ServiceException(imageStoreResult.getCode(), imageStoreResult.getMessage());
|
||||
}
|
||||
return (List<ImageStoreListResult>)imageStoreResult.getData();
|
||||
}
|
||||
|
||||
private AcsPassRuleDetailResult coverRuleDetailResult(AcsPassRuleResultDto dto, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
AcsPassRuleDetailResult result = new AcsPassRuleDetailResult();
|
||||
BeanCopyUtils.copyProperties(dto, result);
|
||||
result.setRuleName(dto.getName());
|
||||
ImageStoreDetailResult imageStoreDetailResult = getImageStoreDetail(dto.getImageStoreId(), context);
|
||||
result.setIncludeOrganizations(imageStoreDetailResult.getIncludeOrganizations());
|
||||
result.setIncludeLabels(imageStoreDetailResult.getIncludeLabels());
|
||||
result.setExcludeLabels(imageStoreDetailResult.getExcludeLabels());
|
||||
List<AcsPassTimeCycleParam> timeCycleParams =
|
||||
JSONObject.parseArray(dto.getValidDateJson(), AcsPassTimeCycleParam.class);
|
||||
result.setPassableCycle(timeCycleParams);
|
||||
result.setPassType(AcsPassTypeEnum.LONG_TIME.getCode());
|
||||
if (dto.getBeginDate() != null || dto.getEndDate() != null) {
|
||||
result.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate(argsIndexs = {0, 1})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPassRuleResult>> page(AcsPassRuleQueryParam param,
|
||||
CloudwalkPageInfo page, CloudwalkCallContext context) throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto();
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkPageAble<AcsPassRuleResultDto> passRuleResult = this.acsPassRuleDao.page(dto, page);
|
||||
if (CollectionUtils.isEmpty(passRuleResult.getDatas()) && ObjectUtils.isEmpty(param.getIsDefault())) {
|
||||
AcsPassRuleNewParam ruleNewParam = new AcsPassRuleNewParam();
|
||||
ruleNewParam.setZoneId(param.getZoneId());
|
||||
ruleNewParam.setZoneName(param.getZoneName());
|
||||
ruleNewParam.setRuleName("默认规则");
|
||||
ruleNewParam.setIsDefault(Integer.valueOf(1));
|
||||
add(ruleNewParam, context);
|
||||
passRuleResult = this.acsPassRuleDao.page(dto, page);
|
||||
}
|
||||
List<AcsPassRuleResult> results =
|
||||
coverRulePageResult((List<AcsPassRuleResultDto>)passRuleResult.getDatas(), context, true);
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(results, page, passRuleResult.getTotalRows()));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("分页查询通行规则失败");
|
||||
throw new ServiceException("76260508", getMessage("76260508"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<List<AcsPassRuleResult>> list(AcsPassRuleQueryParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto();
|
||||
BeanCopyUtils.copyProperties(param, dto);
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
List<AcsPassRuleResultDto> passRuleResult = this.acsPassRuleDao.list(dto);
|
||||
return CloudwalkResult.success(coverRulePageResult(passRuleResult, context, false));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("查询通行规则失败");
|
||||
throw new ServiceException("76260508", getMessage("76260508"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<List<AcsPassRuleImageResultDto>> listByImageId(AcsPassRuleImageParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleImageDto dto = new AcsPassRuleImageDto();
|
||||
BeanCopyUtils.copyProperties(param, dto);
|
||||
List<AcsPassRuleImageResultDto> resultDtos = this.acsPassRuleDao.listByImageId(dto);
|
||||
return CloudwalkResult.success(resultDtos);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("根据图库id集合查询对应楼层信息失败");
|
||||
throw new ServiceException("76260526", getMessage("76260526"));
|
||||
}
|
||||
}
|
||||
|
||||
private long pagePersonTotalRowsForZone(String zoneId, CloudwalkCallContext context) throws Exception {
|
||||
return FeignThreadLocalUtil.callWithContext(context, () -> {
|
||||
AcsPersonQueryParam personParam = new AcsPersonQueryParam();
|
||||
personParam.setZoneId(zoneId);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(1, 1);
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page =
|
||||
this.acsPersonService.page(personParam, pageInfo, context);
|
||||
if (!page.isSuccess()) {
|
||||
this.logger.info("远程调用查询通行人员分页失败,原因:" + page.getMessage());
|
||||
throw new ServiceException(page.getCode(), page.getMessage());
|
||||
}
|
||||
if (ObjectUtils.isEmpty(page.getData())) {
|
||||
return 0L;
|
||||
}
|
||||
return ((CloudwalkPageAble)page.getData()).getTotalRows();
|
||||
});
|
||||
}
|
||||
|
||||
private void rollbackImageStoreAfterBindFailure(String imageStoreIdValue, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
ImageStoreDelParam delParam = new ImageStoreDelParam();
|
||||
delParam.setId(imageStoreIdValue);
|
||||
delParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
this.logger.info("回滚删除图库开始,delParam={},context={}", JSONObject.toJSON(delParam), JSONObject.toJSON(context));
|
||||
CloudwalkResult<Boolean> deleteResult = this.imageStoreService.delete(delParam, context);
|
||||
this.logger.info("删除图库:图库id={},结果:{}", imageStoreIdValue, deleteResult.getMessage());
|
||||
}
|
||||
|
||||
private void getZoneTypeIsThree(ZoneTreeResult zoneTreeResult, List<AcsPassRuleFloorResult> passRuleResults) {
|
||||
if ("FLOOR".equals(zoneTreeResult.getType())) {
|
||||
AcsPassRuleFloorResult result = new AcsPassRuleFloorResult();
|
||||
result.setId(zoneTreeResult.getId());
|
||||
result.setName(zoneTreeResult.getName());
|
||||
result.setUnitNumber(zoneTreeResult.getUnitCount());
|
||||
passRuleResults.add(result);
|
||||
} else if (!CollectionUtils.isEmpty(zoneTreeResult.getChildren())) {
|
||||
for (ZoneTreeResult treeResult : zoneTreeResult.getChildren())
|
||||
getZoneTypeIsThree(treeResult, passRuleResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
package cn.cloudwalk.elevator.passrule.impl;
|
||||
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.mapper.ImageRuleRefMapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class ImageRuleRefDaoImpl implements ImageRuleRefDao {
|
||||
@Resource
|
||||
private ImageRuleRefMapper imageRuleRefMapper;
|
||||
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
public CloudwalkPageAble<ImageRuleRefResultDto> page(AcsPassRuleQueryDto dto, CloudwalkPageInfo page)
|
||||
throws DataAccessException {
|
||||
PageHelper.startPage(page.getCurrentPage(), page.getPageSize());
|
||||
Page<ImageRuleRefResultDto> result = (Page<ImageRuleRefResultDto>)this.imageRuleRefMapper.page(dto);
|
||||
return new CloudwalkPageAble(BeanCopyUtils.copy(result.getResult(), ImageRuleRefResultDto.class), page,
|
||||
result.getTotal());
|
||||
}
|
||||
|
||||
public List<String> listRuleByZoneIdExtDefault(String zoneId) {
|
||||
return this.imageRuleRefMapper.listRuleByZoneIdExtDefault(zoneId);
|
||||
}
|
||||
|
||||
public List<ImageRuleRefResultDto> listByParentRule(List<String> parentRuleIds) {
|
||||
return this.imageRuleRefMapper.listByParentRule(parentRuleIds);
|
||||
}
|
||||
|
||||
public List<ImageRuleRefResultDto> listByPersonId(String personId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByPersonId(personId);
|
||||
}
|
||||
|
||||
public List<ImageRuleRefResultDto> listByLabelId(String labelId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByLabelId(labelId);
|
||||
}
|
||||
|
||||
public List<ImageRuleRefResultDto> listByOrgId(String orgId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByOrgId(orgId);
|
||||
}
|
||||
|
||||
public List<AcsPassRuleImageResultDto> listByPersonInfo(AcsPassRuleImageDto dto) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByPersonInfo(dto);
|
||||
}
|
||||
|
||||
public List<AcsPassRuleImageResultDto> listByRestructure(AcsPassRuleImageDto dto) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByRestructure(dto);
|
||||
}
|
||||
|
||||
public List<AcsPassRuleLabelResultDto> listFloorsByRestructure(AcsPassRuleImageDto dto) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listFloorsByRestructure(dto);
|
||||
}
|
||||
|
||||
public List<AcsPassRuleImageResultDto> listZoneInfoByIds(List<String> zoneIds) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listZoneInfoByIds(zoneIds);
|
||||
}
|
||||
|
||||
public List<AcsPassRuleImageResultDto> listByNotZoneIds(AcsPassRuleQueryDto dto) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByNotZoneIds(dto);
|
||||
}
|
||||
|
||||
public List<ImageRuleRefResultDto> listByPersonList(AcsPassRulePersonListDto dto) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listByPersonList(dto);
|
||||
}
|
||||
|
||||
public List<String> listPersonDelByZoneId(String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listPersonDelByZoneId(zoneId);
|
||||
}
|
||||
|
||||
public List<String> listPersonDelByPersonId(String personId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.listPersonDelByPersonId(personId);
|
||||
}
|
||||
|
||||
public ImageRuleRefResultDto getDefaultByZoneId(String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.getDefaultByZoneId(zoneId);
|
||||
}
|
||||
|
||||
public ImageRuleRefResultDto getById(String id) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.getById(id);
|
||||
}
|
||||
|
||||
public String getByRuleName(String ruleName, String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.getByRuleName(ruleName, zoneId);
|
||||
}
|
||||
|
||||
public ImageRuleRefResultDto getByPersonIdAndZoneId(List<String> personId, String zoneId)
|
||||
throws DataAccessException {
|
||||
return this.imageRuleRefMapper.getByPersonIdAndZoneId(personId, zoneId);
|
||||
}
|
||||
|
||||
public ImageRuleRefResultDto getDelByPersonIdAndZoneId(String personId, String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.getDelByPersonIdAndZoneId(personId, zoneId);
|
||||
}
|
||||
|
||||
public List<String> countPersonIdByZoneId(String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.countPersonIdByZoneId(zoneId);
|
||||
}
|
||||
|
||||
public Boolean insert(ImageRuleRefAddDto dto) {
|
||||
return this.imageRuleRefMapper.insert(dto);
|
||||
}
|
||||
|
||||
public Boolean insertList(List<ImageRuleRefAddDto> insertList) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.insertList(insertList);
|
||||
}
|
||||
|
||||
public Boolean deleteById(String id) throws DataAccessException {
|
||||
this.imageRuleRefMapper.deleteById(id);
|
||||
this.imageRuleRefMapper.deleteByParentRule(id);
|
||||
return Boolean.valueOf(true);
|
||||
}
|
||||
|
||||
public Boolean deleteByZoneIdAndName(String zoneId, String oldName) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.deleteByZoneIdAndName(zoneId, oldName);
|
||||
}
|
||||
|
||||
public Boolean deleteByPersonIdsIsDel(List<String> personId, String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.deleteByPersonIdsIsDel(personId, zoneId);
|
||||
}
|
||||
|
||||
public Boolean deleteByPersonId(String personId, String zoneId) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.deleteByPersonId(personId, zoneId);
|
||||
}
|
||||
|
||||
public Boolean deleteByOrgAndLabel(AcsPassRuleDeleteDto dto) throws DataAccessException {
|
||||
return this.imageRuleRefMapper.deleteByOrgAndLabel(dto);
|
||||
}
|
||||
}
|
||||
+810
@@ -0,0 +1,810 @@
|
||||
package cn.cloudwalk.elevator.passrule.impl;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonData;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelDetailParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.service.LabelService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationListParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.service.OrganizationService;
|
||||
import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.DataAccessException;
|
||||
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.device.dao.AcsElevatorDeviceDao;
|
||||
import cn.cloudwalk.elevator.device.dao.DeviceImageStoreDao;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListByBuildingIdDto;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto;
|
||||
import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO;
|
||||
import cn.cloudwalk.elevator.em.AcsPassTypeEnum;
|
||||
import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefListResult;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRulePersonListParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.ImageRuleRefDetailResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.ImageRuleRefPageResult;
|
||||
import cn.cloudwalk.elevator.passrule.service.ImageRuleRefService;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.service.PersonRuleService;
|
||||
import cn.cloudwalk.elevator.util.CollectionUtils;
|
||||
import cn.cloudwalk.elevator.zone.param.ZoneQueryParam;
|
||||
import cn.cloudwalk.elevator.zone.result.ZoneResult;
|
||||
import cn.cloudwalk.elevator.zone.service.ZoneService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
@Service
|
||||
public class ImageRuleRefServiceImpl extends AbstractAcsPassService implements ImageRuleRefService {
|
||||
@Autowired
|
||||
private ImageStorePersonService imageStorePersonService;
|
||||
@Autowired
|
||||
private OrganizationService organizationService;
|
||||
@Autowired
|
||||
private LabelService labelService;
|
||||
@Resource
|
||||
private ImageRuleRefDao imageRuleRefDao;
|
||||
@Resource
|
||||
private DeviceImageStoreDao deviceImageStoreDao;
|
||||
@Resource
|
||||
private ImageStoreService imageStoreService;
|
||||
@Resource
|
||||
private ZoneService zoneService;
|
||||
@Resource
|
||||
private AcsElevatorDeviceDao acsElevatorDeviceDao;
|
||||
@Resource
|
||||
private PersonRuleService personRuleService;
|
||||
|
||||
public CloudwalkResult<CloudwalkPageAble<ImageRuleRefPageResult>> page(AcsPassRuleQueryParam param,
|
||||
CloudwalkPageInfo page, CloudwalkCallContext context) throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto();
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkPageAble<ImageRuleRefResultDto> passRuleResult = this.imageRuleRefDao.page(dto, page);
|
||||
if (CollectionUtils.isEmpty(passRuleResult.getDatas()) && ObjectUtils.isEmpty(param.getIsDefault())) {
|
||||
AcsPassRuleNewParam ruleNewParam = new AcsPassRuleNewParam();
|
||||
ruleNewParam.setZoneId(param.getZoneId());
|
||||
ruleNewParam.setZoneName(param.getZoneName());
|
||||
ruleNewParam.setRuleName("默认规则");
|
||||
ruleNewParam.setIsDefault(Integer.valueOf(1));
|
||||
ruleNewParam.setParentId(param.getParentId());
|
||||
addOnlyRule(ruleNewParam, context);
|
||||
passRuleResult = this.imageRuleRefDao.page(dto, page);
|
||||
}
|
||||
List<ImageRuleRefPageResult> results = coverRulePageResult(
|
||||
(List<ImageRuleRefResultDto>)passRuleResult.getDatas(), param.getParentId(), context);
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(results, page, passRuleResult.getTotalRows()));
|
||||
} catch (Exception e) {
|
||||
this.logger.error("分页查询通行规则失败", e);
|
||||
throw new ServiceException("76260508", getMessage("76260508"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPassRuleFloorResult>> listFloor(AcsPassRuleFloorParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ZoneQueryParam queryParam = new ZoneQueryParam();
|
||||
queryParam.setParentId(param.getZoneId());
|
||||
queryParam.setRowsOfPage(param.getRowsOfPage());
|
||||
queryParam.setCurrentPage(param.getCurrentPage());
|
||||
CloudwalkResult<CloudwalkPageAble<ZoneResult>> zonePageData = this.zoneService.page(queryParam, context);
|
||||
if (!zonePageData.isSuccess()) {
|
||||
this.logger.info("远程调用分页查询区域失败,原因:" + zonePageData.getMessage());
|
||||
throw new ServiceException(zonePageData.getCode(), zonePageData.getMessage());
|
||||
}
|
||||
try {
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(param.getCurrentPage(), param.getRowsOfPage());
|
||||
CloudwalkPageAble<AcsPassRuleFloorResult> ruleFloorResult = null;
|
||||
if (!ObjectUtils.isEmpty(zonePageData.getData())
|
||||
&& !CollectionUtils.isEmpty(((CloudwalkPageAble)zonePageData.getData()).getDatas())) {
|
||||
List<AcsPassRuleFloorResult> resultList = BeanCopyUtils
|
||||
.copy(((CloudwalkPageAble)zonePageData.getData()).getDatas(), AcsPassRuleFloorResult.class);
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getZoneId());
|
||||
for (AcsPassRuleFloorResult floorResult : resultList) {
|
||||
AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto();
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setCurrentFloorId(floorResult.getId());
|
||||
List<AcsElevatorDeviceResultDTO> deviceList = this.acsElevatorDeviceDao.listByZoneId(dto);
|
||||
floorResult.setDeviceNumber(Integer.valueOf(deviceList.size()));
|
||||
Long number = Long.valueOf(0L);
|
||||
floorResult.setPersonNumber(number);
|
||||
if (!ObjectUtils.isEmpty(imageStoreId)) {
|
||||
AcsPersonQueryParam personQueryParam = new AcsPersonQueryParam();
|
||||
personQueryParam.setImageStoreId(imageStoreId);
|
||||
personQueryParam.setZoneId(floorResult.getId());
|
||||
personQueryParam.setParentId(param.getZoneId());
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(1, 10);
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> result =
|
||||
this.personRuleService.page(personQueryParam, pageInfo, context);
|
||||
floorResult.setPersonNumber(Long.valueOf(((CloudwalkPageAble)result.getData()).getTotalRows()));
|
||||
}
|
||||
}
|
||||
ruleFloorResult =
|
||||
new CloudwalkPageAble(resultList, page, ((CloudwalkPageAble)zonePageData.getData()).getTotalRows());
|
||||
}
|
||||
return CloudwalkResult.success(ruleFloorResult);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("查询所有楼层信息失败", (Throwable)e);
|
||||
throw new ServiceException("76260520", getMessage("76260520"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<List<AcsPassRuleImageResultDto>> listByPersonInfo(AcsPassRuleImageParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleImageDto dto = new AcsPassRuleImageDto();
|
||||
BeanCopyUtils.copyProperties(param, dto);
|
||||
List<AcsPassRuleImageResultDto> resultDtos = this.imageRuleRefDao.listByPersonInfo(dto);
|
||||
return CloudwalkResult.success(resultDtos);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("根据人员id、标签集合、机构集合获取楼层权限失败", (Throwable)e);
|
||||
throw new ServiceException("76260526", getMessage("76260526"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<List<AcsPassRulePersonListResultDto>> listByPersonList(AcsPassRulePersonListParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
try {
|
||||
AcsPassRulePersonListDto dto = new AcsPassRulePersonListDto();
|
||||
List<String> personIds = new ArrayList<>();
|
||||
List<String> labelIds = new ArrayList<>();
|
||||
List<String> orgIds = new ArrayList<>();
|
||||
for (AcsPassRuleImageParam imageParam : param.getPersonList()) {
|
||||
personIds.add(imageParam.getPersonId());
|
||||
if (!CollectionUtils.isEmpty(imageParam.getIncludeLabels())) {
|
||||
labelIds.addAll(imageParam.getIncludeLabels());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(imageParam.getIncludeOrganizations())) {
|
||||
orgIds.addAll(imageParam.getIncludeOrganizations());
|
||||
}
|
||||
}
|
||||
dto.setPersonIds(personIds);
|
||||
dto.setIncludeLabels(labelIds);
|
||||
dto.setIncludeOrganizations(orgIds);
|
||||
List<ImageRuleRefResultDto> resultDtos = this.imageRuleRefDao.listByPersonList(dto);
|
||||
Map<String, List<ImageRuleRefResultDto>> personIdMap = new HashMap<>();
|
||||
Map<String, List<ImageRuleRefResultDto>> labelIdMap = new HashMap<>();
|
||||
Map<String, List<ImageRuleRefResultDto>> orgIdMap = new HashMap<>();
|
||||
for (ImageRuleRefResultDto resultDto : resultDtos) {
|
||||
if (!ObjectUtils.isEmpty(resultDto.getPersonId())) {
|
||||
List<ImageRuleRefResultDto> personList = personIdMap.get(resultDto.getPersonId());
|
||||
if (!CollectionUtils.isEmpty(personList)) {
|
||||
personList.add(resultDto);
|
||||
continue;
|
||||
}
|
||||
List<ImageRuleRefResultDto> personListDto = new ArrayList<>();
|
||||
personListDto.add(resultDto);
|
||||
personIdMap.put(resultDto.getPersonId(), personListDto);
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) {
|
||||
List<ImageRuleRefResultDto> labelList = labelIdMap.get(resultDto.getIncludeLabels());
|
||||
if (!CollectionUtils.isEmpty(labelList)) {
|
||||
labelList.add(resultDto);
|
||||
continue;
|
||||
}
|
||||
List<ImageRuleRefResultDto> labelListDto = new ArrayList<>();
|
||||
labelListDto.add(resultDto);
|
||||
labelIdMap.put(resultDto.getIncludeLabels(), labelListDto);
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) {
|
||||
List<ImageRuleRefResultDto> orgList = orgIdMap.get(resultDto.getIncludeOrganizations());
|
||||
if (!CollectionUtils.isEmpty(orgList)) {
|
||||
orgList.add(resultDto);
|
||||
continue;
|
||||
}
|
||||
List<ImageRuleRefResultDto> orgListDto = new ArrayList<>();
|
||||
orgListDto.add(resultDto);
|
||||
orgIdMap.put(resultDto.getIncludeOrganizations(), orgListDto);
|
||||
}
|
||||
}
|
||||
List<AcsPassRulePersonListResultDto> returnList = new ArrayList<>();
|
||||
for (AcsPassRuleImageParam imageParam : param.getPersonList()) {
|
||||
List<String> zoneIdList = this.imageRuleRefDao.listPersonDelByPersonId(imageParam.getPersonId());
|
||||
AcsPassRulePersonListResultDto listResultDto = new AcsPassRulePersonListResultDto();
|
||||
listResultDto.setPersonId(imageParam.getPersonId());
|
||||
List<AcsPassRuleImageResultDto> zoneList = new ArrayList<>();
|
||||
List<String> listZoneIds = new ArrayList<>();
|
||||
List<ImageRuleRefResultDto> personMapDto = personIdMap.get(imageParam.getPersonId());
|
||||
if (!CollectionUtils.isEmpty(personMapDto)) {
|
||||
for (ImageRuleRefResultDto resultDto : personMapDto) {
|
||||
if (!zoneIdList.contains(resultDto.getZoneId())) {
|
||||
listZoneIds.add(resultDto.getZoneId());
|
||||
AcsPassRuleImageResultDto result = new AcsPassRuleImageResultDto();
|
||||
result.setZoneId(resultDto.getZoneId());
|
||||
result.setZoneName(resultDto.getZoneName());
|
||||
zoneList.add(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(imageParam.getIncludeLabels())) {
|
||||
for (String labelId : imageParam.getIncludeLabels()) {
|
||||
List<ImageRuleRefResultDto> labelMapDto = labelIdMap.get(labelId);
|
||||
if (!CollectionUtils.isEmpty(labelMapDto)) {
|
||||
for (ImageRuleRefResultDto resultDto : labelMapDto) {
|
||||
if (!zoneIdList.contains(resultDto.getZoneId())
|
||||
&& !listZoneIds.contains(resultDto.getZoneId())) {
|
||||
listZoneIds.add(resultDto.getZoneId());
|
||||
AcsPassRuleImageResultDto result = new AcsPassRuleImageResultDto();
|
||||
result.setZoneId(resultDto.getZoneId());
|
||||
result.setZoneName(resultDto.getZoneName());
|
||||
zoneList.add(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(imageParam.getIncludeOrganizations())) {
|
||||
for (String orgId : imageParam.getIncludeOrganizations()) {
|
||||
List<ImageRuleRefResultDto> orgMapDto = orgIdMap.get(orgId);
|
||||
if (!CollectionUtils.isEmpty(orgMapDto)) {
|
||||
for (ImageRuleRefResultDto resultDto : orgMapDto) {
|
||||
if (!zoneIdList.contains(resultDto.getZoneId())
|
||||
&& !listZoneIds.contains(resultDto.getZoneId())) {
|
||||
listZoneIds.add(resultDto.getZoneId());
|
||||
AcsPassRuleImageResultDto result = new AcsPassRuleImageResultDto();
|
||||
result.setZoneId(resultDto.getZoneId());
|
||||
result.setZoneName(resultDto.getZoneName());
|
||||
zoneList.add(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
listResultDto.setZoneList(zoneList);
|
||||
returnList.add(listResultDto);
|
||||
}
|
||||
return CloudwalkResult.success(returnList);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("根据人员id、标签集合、机构集合批量获取楼层权限失败", (Throwable)e);
|
||||
throw new ServiceException("76260526", getMessage("76260526"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<ImageRuleRefDetailResult> detail(AcsPassRuleQueryParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
ImageRuleRefResultDto byId = this.imageRuleRefDao.getById(param.getId());
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
List<ImageRuleRefResultDto> child =
|
||||
this.imageRuleRefDao.listByParentRule(Collections.singletonList(param.getId()));
|
||||
if (!CollectionUtils.isEmpty(child)) {
|
||||
for (ImageRuleRefResultDto resultDto : child) {
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) {
|
||||
includeLabels.add(resultDto.getIncludeLabels());
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) {
|
||||
includeOrganizations.add(resultDto.getIncludeOrganizations());
|
||||
}
|
||||
}
|
||||
}
|
||||
ImageRuleRefDetailResult result =
|
||||
(ImageRuleRefDetailResult)BeanCopyUtils.copyProperties(byId, ImageRuleRefDetailResult.class);
|
||||
result.setRuleName(byId.getName());
|
||||
if (!CollectionUtils.isEmpty(includeLabels)) {
|
||||
Map<String, LabelDetailResult> labelById = loadLabelDetailMap(context);
|
||||
List<LabelDetailResult> labelDetailResultList = new ArrayList<>();
|
||||
fillLabelDetailsFromMap(includeLabels, labelById, labelDetailResultList, context);
|
||||
result.setIncludeLabels(labelDetailResultList);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(includeOrganizations)) {
|
||||
OrganizationListParam orgParam = new OrganizationListParam();
|
||||
orgParam.setIds(includeOrganizations);
|
||||
CloudwalkResult<List<OrganizationResult>> orglist = this.organizationService.list(orgParam, context);
|
||||
result.setIncludeOrganizations((List)orglist.getData());
|
||||
}
|
||||
return CloudwalkResult.success(result);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("查询通行规则详情失败", (Throwable)e);
|
||||
throw new ServiceException("76260508", getMessage("76260508"));
|
||||
}
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate(argsIndexs = {0, 1})
|
||||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
|
||||
public CloudwalkResult<Boolean> addOnlyRule(AcsPassRuleNewParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
AcsElevatorDeviceListByBuildingIdDto buildingIdDto = new AcsElevatorDeviceListByBuildingIdDto();
|
||||
buildingIdDto.setCurrentBuildingId(param.getParentId());
|
||||
buildingIdDto.setBusinessId(context.getCompany().getCompanyId());
|
||||
List<AcsElevatorDeviceResultDTO> deviceList = this.acsElevatorDeviceDao.listBuBuildingId(buildingIdDto);
|
||||
if (CollectionUtils.isEmpty(deviceList)) {
|
||||
return CloudwalkResult.fail("76260527", getMessage("76260527"));
|
||||
}
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
ImageRuleRefAddDto addDto = createAddDto(param, context);
|
||||
this.imageRuleRefDao.insert(addDto);
|
||||
if (!ObjectUtils.isEmpty(param.getIsDefault()) && param.getIsDefault().intValue() == 1) {
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
ImageStoreQueryParam queryParam = new ImageStoreQueryParam();
|
||||
queryParam.setId(imageStoreId);
|
||||
queryParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<ImageStoreDetailResult> imageDetail = this.imageStoreService.detail(queryParam, context);
|
||||
ImageStoreEditParam editParam =
|
||||
(ImageStoreEditParam)BeanCopyUtils.copyProperties(imageDetail.getData(), ImageStoreEditParam.class);
|
||||
editParam.setImageStoreId(((ImageStoreDetailResult)imageDetail.getData()).getId());
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludePersons())) {
|
||||
List<ImageStorePersonData> includePersons = new ArrayList<>();
|
||||
for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData())
|
||||
.getIncludePersons()) {
|
||||
ImageStorePersonData data = new ImageStorePersonData();
|
||||
data.setObjectId(personResult.getId());
|
||||
includePersons.add(data);
|
||||
}
|
||||
editParam.setIncludePersons(includePersons);
|
||||
}
|
||||
List<String> oldIncludeLabels = new ArrayList<>();
|
||||
List<String> oldIncludeOrganizations = new ArrayList<>();
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels())) {
|
||||
for (LabelResult labelResult : ((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels()) {
|
||||
oldIncludeLabels.add(labelResult.getId());
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeOrganizations())) {
|
||||
for (OrganizationResult organizationResult : ((ImageStoreDetailResult)imageDetail.getData())
|
||||
.getIncludeOrganizations()) {
|
||||
oldIncludeOrganizations.add(organizationResult.getId());
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(param.getIncludeLabels())) {
|
||||
for (String label : param.getIncludeLabels()) {
|
||||
ImageRuleRefAddDto dto = createAddDto(param, context);
|
||||
dto.setParentRule(addDto.getId());
|
||||
dto.setIncludeLabels(label);
|
||||
this.imageRuleRefDao.insert(dto);
|
||||
if (!oldIncludeLabels.contains(label)) {
|
||||
includeLabels.add(label);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(param.getIncludeOrganizations())) {
|
||||
for (String org : param.getIncludeOrganizations()) {
|
||||
ImageRuleRefAddDto dto = createAddDto(param, context);
|
||||
dto.setParentRule(addDto.getId());
|
||||
dto.setIncludeOrganizations(org);
|
||||
this.imageRuleRefDao.insert(dto);
|
||||
if (!oldIncludeOrganizations.contains(org)) {
|
||||
includeOrganizations.add(org);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(includeLabels) || !CollectionUtils.isEmpty(includeOrganizations)) {
|
||||
includeLabels.addAll(oldIncludeLabels);
|
||||
includeOrganizations.addAll(oldIncludeOrganizations);
|
||||
editParam.setIncludeLabels(includeLabels);
|
||||
editParam.setIncludeOrganizations(includeOrganizations);
|
||||
editParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getExcludePersons())) {
|
||||
List<String> excPersonIds = new ArrayList<>();
|
||||
for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData())
|
||||
.getExcludePersons()) {
|
||||
excPersonIds.add(personResult.getId());
|
||||
}
|
||||
editParam.setExcludePersons(excPersonIds);
|
||||
}
|
||||
CloudwalkResult<Boolean> edit = this.imageStoreService.edit(editParam, context);
|
||||
if (ObjectUtils.isEmpty(edit.getData()) || !((Boolean)edit.getData()).booleanValue()) {
|
||||
throw new ServiceException(edit.getCode(), edit.getMessage());
|
||||
}
|
||||
}
|
||||
UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam();
|
||||
refParam.setImageStoreId(imageStoreId);
|
||||
refParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
refParam.setLabelIds(param.getIncludeLabels());
|
||||
refParam.setOrganizationIds(param.getIncludeOrganizations());
|
||||
this.imageStorePersonService.updateGroupPersonRef(refParam, context);
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("添加通行规则失败", (Throwable)e);
|
||||
throw new ServiceException("76260505", getMessage("76260505"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<Boolean> update(AcsPassRuleEditParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
checkDefaultRule(param.getId());
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
ImageStoreQueryParam queryParam = new ImageStoreQueryParam();
|
||||
queryParam.setId(imageStoreId);
|
||||
queryParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<ImageStoreDetailResult> imageDetail = this.imageStoreService.detail(queryParam, context);
|
||||
ImageStoreEditParam editParam =
|
||||
(ImageStoreEditParam)BeanCopyUtils.copyProperties(imageDetail.getData(), ImageStoreEditParam.class);
|
||||
editParam.setImageStoreId(imageStoreId);
|
||||
List<String> oldIncludeLabels = new ArrayList<>();
|
||||
List<String> oldIncludeOrganizations = new ArrayList<>();
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
List<String> includeLabels2 = new ArrayList<>();
|
||||
List<String> includeOrganizations2 = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels())) {
|
||||
for (LabelResult labelResult : ((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels()) {
|
||||
oldIncludeLabels.add(labelResult.getId());
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeOrganizations())) {
|
||||
for (OrganizationResult organizationResult : ((ImageStoreDetailResult)imageDetail.getData())
|
||||
.getIncludeOrganizations()) {
|
||||
oldIncludeOrganizations.add(organizationResult.getId());
|
||||
}
|
||||
}
|
||||
try {
|
||||
List<ImageRuleRefResultDto> oldRule =
|
||||
this.imageRuleRefDao.listByParentRule(Collections.singletonList(param.getId()));
|
||||
List<String> updateLabels = new ArrayList<>(param.getIncludeLabels());
|
||||
List<String> updateOrgIds = new ArrayList<>(param.getIncludeOrganizations());
|
||||
Boolean isTrue = Boolean.valueOf(true);
|
||||
if (!CollectionUtils.isEmpty(oldRule)) {
|
||||
for (ImageRuleRefResultDto dto : oldRule) {
|
||||
if (!ObjectUtils.isEmpty(dto.getIncludeLabels())
|
||||
&& !updateLabels.contains(dto.getIncludeLabels())) {
|
||||
updateLabels.add(dto.getIncludeLabels());
|
||||
isTrue = Boolean.valueOf(false);
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(dto.getIncludeOrganizations())
|
||||
&& !updateOrgIds.contains(dto.getIncludeOrganizations())) {
|
||||
updateOrgIds.add(dto.getIncludeOrganizations());
|
||||
isTrue = Boolean.valueOf(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.imageRuleRefDao.deleteById(param.getId());
|
||||
ImageRuleRefAddDto addDto = createUpdateDto(param, context);
|
||||
this.imageRuleRefDao.insert(addDto);
|
||||
if (!CollectionUtils.isEmpty(param.getIncludeLabels())) {
|
||||
for (String label : param.getIncludeLabels()) {
|
||||
ImageRuleRefAddDto dto = createUpdateDto(param, context);
|
||||
dto.setIncludeLabels(label);
|
||||
dto.setParentRule(addDto.getId());
|
||||
this.imageRuleRefDao.insert(dto);
|
||||
if (!editParam.getIncludeLabels().contains(label)) {
|
||||
includeLabels.add(label);
|
||||
includeLabels2.add(label);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(param.getExcludeLabels())) {
|
||||
for (String label : param.getExcludeLabels()) {
|
||||
ImageRuleRefAddDto dto = createUpdateDto(param, context);
|
||||
dto.setExcludeLabels(label);
|
||||
dto.setParentRule(addDto.getId());
|
||||
this.imageRuleRefDao.insert(dto);
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(param.getIncludeOrganizations())) {
|
||||
for (String org : param.getIncludeOrganizations()) {
|
||||
ImageRuleRefAddDto dto = createUpdateDto(param, context);
|
||||
dto.setIncludeOrganizations(org);
|
||||
dto.setParentRule(addDto.getId());
|
||||
this.imageRuleRefDao.insert(dto);
|
||||
if (!editParam.getIncludeOrganizations().contains(org)) {
|
||||
includeOrganizations.add(org);
|
||||
includeOrganizations2.add(org);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(includeLabels) || !CollectionUtils.isEmpty(includeOrganizations)) {
|
||||
includeLabels.addAll(oldIncludeLabels);
|
||||
includeOrganizations.addAll(oldIncludeOrganizations);
|
||||
editParam.setIncludeLabels(includeLabels);
|
||||
editParam.setIncludeOrganizations(includeOrganizations);
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getExcludePersons())) {
|
||||
List<String> excPersonIds = new ArrayList<>();
|
||||
for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData())
|
||||
.getExcludePersons()) {
|
||||
excPersonIds.add(personResult.getId());
|
||||
}
|
||||
editParam.setExcludePersons(excPersonIds);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludePersons())) {
|
||||
List<ImageStorePersonData> includePersons = new ArrayList<>();
|
||||
for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData())
|
||||
.getIncludePersons()) {
|
||||
ImageStorePersonData personData = new ImageStorePersonData();
|
||||
personData.setObjectId(personResult.getId());
|
||||
includePersons.add(personData);
|
||||
}
|
||||
editParam.setIncludePersons(includePersons);
|
||||
}
|
||||
editParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult cloudwalkResult = this.imageStoreService.edit(editParam, context);
|
||||
}
|
||||
if (!isTrue.booleanValue()) {
|
||||
UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam();
|
||||
refParam.setImageStoreId(imageStoreId);
|
||||
refParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
refParam.setLabelIds(updateLabels);
|
||||
refParam.setOrganizationIds(updateOrgIds);
|
||||
this.imageStorePersonService.updateGroupPersonRef(refParam, context);
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("添加通行规则失败", (Throwable)e);
|
||||
throw new ServiceException("76260505", getMessage("76260505"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<Boolean> delete(AcsPassRuleDeleteParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
for (String id : param.getIds()) {
|
||||
checkDefaultRule(id);
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
List<ImageRuleRefResultDto> child =
|
||||
this.imageRuleRefDao.listByParentRule(Collections.singletonList(id));
|
||||
if (!CollectionUtils.isEmpty(child)) {
|
||||
for (ImageRuleRefResultDto resultDto : child) {
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) {
|
||||
includeLabels.add(resultDto.getIncludeLabels());
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) {
|
||||
includeOrganizations.add(resultDto.getIncludeOrganizations());
|
||||
}
|
||||
}
|
||||
}
|
||||
this.imageRuleRefDao.deleteById(id);
|
||||
UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam();
|
||||
refParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
refParam.setImageStoreId(imageStoreId);
|
||||
refParam.setLabelIds(includeLabels);
|
||||
refParam.setOrganizationIds(includeOrganizations);
|
||||
this.imageStorePersonService.updateGroupPersonRef(refParam, context);
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("通行规则删除失败", (Throwable)e);
|
||||
throw new ServiceException("76260507", getMessage("76260507"));
|
||||
}
|
||||
}
|
||||
|
||||
private List<ImageRuleRefPageResult> coverRulePageResult(List<ImageRuleRefResultDto> datas, String parentId,
|
||||
CloudwalkCallContext context) throws Exception {
|
||||
List<ImageRuleRefPageResult> detailResultList = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(datas)) {
|
||||
return detailResultList;
|
||||
}
|
||||
Map<String, LabelDetailResult> labelById = loadLabelDetailMap(context);
|
||||
List<String> personSum =
|
||||
this.imageRuleRefDao.countPersonIdByZoneId(((ImageRuleRefResultDto)datas.get(0)).getZoneId());
|
||||
for (ImageRuleRefResultDto data : datas) {
|
||||
ImageRuleRefPageResult detailResult = new ImageRuleRefPageResult();
|
||||
AcsPersonQueryParam personQueryParam = new AcsPersonQueryParam();
|
||||
BeanCopyUtils.copyProperties(data, detailResult);
|
||||
detailResult.setRuleName(data.getName());
|
||||
detailResult.setPassType(AcsPassTypeEnum.LONG_TIME.getCode());
|
||||
if (data.getIsDefault().intValue() == 1) {
|
||||
detailResult.setPersonSum(personSum.size());
|
||||
} else {
|
||||
personQueryParam.setDelPersonIds(personSum);
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
List<ImageRuleRefResultDto> child =
|
||||
this.imageRuleRefDao.listByParentRule(Collections.singletonList(data.getId()));
|
||||
if (!CollectionUtils.isEmpty(child)) {
|
||||
for (ImageRuleRefResultDto resultDto : child) {
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) {
|
||||
includeLabels.add(resultDto.getIncludeLabels());
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) {
|
||||
includeOrganizations.add(resultDto.getIncludeOrganizations());
|
||||
}
|
||||
}
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(parentId);
|
||||
personQueryParam.setImageStoreId(imageStoreId);
|
||||
personQueryParam.setLabelIds(includeLabels);
|
||||
personQueryParam.setOrganizationIds(includeOrganizations);
|
||||
if (!CollectionUtils.isEmpty(personQueryParam.getOrganizationIds())
|
||||
&& !CollectionUtils.isEmpty(personQueryParam.getLabelIds())) {
|
||||
personQueryParam.setIsElevator(Integer.valueOf(3));
|
||||
} else if (!CollectionUtils.isEmpty(personQueryParam.getOrganizationIds())) {
|
||||
personQueryParam.setIsElevator(Integer.valueOf(1));
|
||||
} else if (!CollectionUtils.isEmpty(personQueryParam.getLabelIds())) {
|
||||
personQueryParam.setIsElevator(Integer.valueOf(2));
|
||||
}
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(1, 10);
|
||||
CloudwalkPageAble<ImageStorePersonResult> pageResult =
|
||||
getImageStorePerson(personQueryParam, page, context);
|
||||
List<String> delPerson = this.imageRuleRefDao.listPersonDelByZoneId(data.getZoneId());
|
||||
if (!ObjectUtils.isEmpty(pageResult.getDatas())) {
|
||||
detailResult.setPersonSum(Math.toIntExact(pageResult.getTotalRows()) - delPerson.size());
|
||||
} else {
|
||||
detailResult.setPersonSum(0);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(includeLabels)) {
|
||||
List<LabelDetailResult> labelDetailResultList = new ArrayList<>();
|
||||
fillLabelDetailsFromMap(includeLabels, labelById, labelDetailResultList, context);
|
||||
detailResult.setIncludeLabels(labelDetailResultList);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(includeOrganizations)) {
|
||||
OrganizationListParam orgParam = new OrganizationListParam();
|
||||
orgParam.setIds(includeOrganizations);
|
||||
CloudwalkResult<List<OrganizationResult>> orglist =
|
||||
this.organizationService.list(orgParam, context);
|
||||
detailResult.setIncludeOrganizations((List)orglist.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
detailResultList.add(detailResult);
|
||||
}
|
||||
return detailResultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 一次 {@link LabelService#getAll} 建 id→详情索引,避免规则详情/分页组装时对 {@link LabelService#detail} 的 N 次远程调用。 若某 id
|
||||
* 不在全量列表中(数据不同步),回退单次 detail。
|
||||
*/
|
||||
private Map<String, LabelDetailResult> loadLabelDetailMap(CloudwalkCallContext context) throws ServiceException {
|
||||
CloudwalkResult<List<LabelDetailResult>> all = this.labelService.getAll(new LabelQueryParam(), context);
|
||||
if (all == null || !all.isSuccess() || all.getData() == null) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<String, LabelDetailResult> map = new HashMap<>(Math.max(16, all.getData().size() * 2));
|
||||
for (LabelDetailResult row : all.getData()) {
|
||||
if (row != null && row.getId() != null) {
|
||||
map.put(row.getId(), row);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
private void fillLabelDetailsFromMap(List<String> labelIds, Map<String, LabelDetailResult> labelById,
|
||||
List<LabelDetailResult> out, CloudwalkCallContext context) throws ServiceException {
|
||||
if (CollectionUtils.isEmpty(labelIds)) {
|
||||
return;
|
||||
}
|
||||
for (String labelId : labelIds) {
|
||||
LabelDetailResult cached = (labelById != null) ? labelById.get(labelId) : null;
|
||||
if (cached != null) {
|
||||
out.add(cached);
|
||||
continue;
|
||||
}
|
||||
LabelDetailParam p = new LabelDetailParam();
|
||||
p.setId(labelId);
|
||||
CloudwalkResult<LabelDetailResult> detail = this.labelService.detail(p, context);
|
||||
if (detail != null && detail.isSuccess() && detail.getData() != null) {
|
||||
out.add(detail.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CloudwalkPageAble<ImageStorePersonResult> getImageStorePerson(AcsPersonQueryParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException {
|
||||
CloudwalkPageAble<ImageStorePersonResult> results = new CloudwalkPageAble();
|
||||
ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam();
|
||||
imageStorePersonQueryParam.setImageStoreId(param.getImageStoreId());
|
||||
imageStorePersonQueryParam.setOrganizationIds(param.getOrganizationIds());
|
||||
imageStorePersonQueryParam.setLabelIds(param.getLabelIds());
|
||||
imageStorePersonQueryParam.setCurrentPage(pageInfo.getCurrentPage());
|
||||
imageStorePersonQueryParam.setRowsOfPage(pageInfo.getPageSize());
|
||||
imageStorePersonQueryParam.setIsElevator(param.getIsElevator());
|
||||
imageStorePersonQueryParam.setDelPersonIds(param.getDelPersonIds());
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> pageResult =
|
||||
this.imageStorePersonService.page(imageStorePersonQueryParam, context);
|
||||
if (!pageResult.isSuccess()) {
|
||||
this.logger.error("远程调用查询图库人员失败,原因:[{}]", pageResult.getMessage());
|
||||
throw new ServiceException(pageResult.getCode(), pageResult.getMessage());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(((CloudwalkPageAble)pageResult.getData()).getDatas())) {
|
||||
results = (CloudwalkPageAble<ImageStorePersonResult>)pageResult.getData();
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private ImageRuleRefListResult refListByZoneId(String zoneId) {
|
||||
ImageRuleRefListResult listResult = new ImageRuleRefListResult();
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
List<String> parentRuleList = this.imageRuleRefDao.listRuleByZoneIdExtDefault(zoneId);
|
||||
if (!CollectionUtils.isEmpty(parentRuleList)) {
|
||||
List<ImageRuleRefResultDto> child = this.imageRuleRefDao.listByParentRule(parentRuleList);
|
||||
if (!CollectionUtils.isEmpty(child)) {
|
||||
for (ImageRuleRefResultDto resultDto : child) {
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) {
|
||||
includeLabels.add(resultDto.getExcludeLabels());
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) {
|
||||
includeOrganizations.add(resultDto.getIncludeOrganizations());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
listResult.setIncludeLabels(includeLabels);
|
||||
listResult.setIncludeOrganizations(includeOrganizations);
|
||||
return listResult;
|
||||
}
|
||||
|
||||
private ImageRuleRefAddDto createAddDto(AcsPassRuleNewParam param, CloudwalkCallContext context) {
|
||||
ImageRuleRefAddDto dto = new ImageRuleRefAddDto();
|
||||
dto.setId(genUUID());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setName(param.getRuleName());
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setZoneName(param.getZoneName());
|
||||
dto.setStartTime(param.getStartTime());
|
||||
dto.setEndTime(param.getEndTime());
|
||||
if (!ObjectUtils.isEmpty(param.getIsDefault())) {
|
||||
dto.setIsDefault(param.getIsDefault());
|
||||
} else {
|
||||
dto.setIsDefault(Integer.valueOf(0));
|
||||
}
|
||||
dto.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
dto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
return dto;
|
||||
}
|
||||
|
||||
private ImageRuleRefAddDto createUpdateDto(AcsPassRuleEditParam param, CloudwalkCallContext context) {
|
||||
ImageRuleRefAddDto dto = new ImageRuleRefAddDto();
|
||||
dto.setId(genUUID());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setName(param.getRuleName());
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setZoneName(param.getZoneName());
|
||||
dto.setStartTime(param.getStartTime());
|
||||
dto.setEndTime(param.getEndTime());
|
||||
dto.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
dto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
dto.setIsDefault(Integer.valueOf(0));
|
||||
return dto;
|
||||
}
|
||||
|
||||
private ImageRuleRefResultDto checkDefaultRule(String id) throws ServiceException {
|
||||
try {
|
||||
ImageRuleRefResultDto resultDto = this.imageRuleRefDao.getById(id);
|
||||
if (!ObjectUtils.isEmpty(resultDto.getIsDefault()) && resultDto.getIsDefault().intValue() == 1) {
|
||||
throw new ServiceException("派梯默认规则不可编辑和删除");
|
||||
}
|
||||
return resultDto;
|
||||
} catch (DataAccessException e) {
|
||||
throw new ServiceException("派梯默认规则不可编辑和删除");
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package cn.cloudwalk.elevator.passrule.mapper;
|
||||
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto;
|
||||
import java.util.List;
|
||||
|
||||
public interface AcsPassRuleMapper {
|
||||
Integer insert(AcsPassRuleAddDto paramAcsPassRuleAddDto);
|
||||
|
||||
Integer update(AcsPassRuleEditDto paramAcsPassRuleEditDto);
|
||||
|
||||
Integer delete(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto);
|
||||
|
||||
List<AcsPassRuleResultDto> list(AcsPassRuleQueryDto paramAcsPassRuleQueryDto);
|
||||
|
||||
String getIsDefaultByZoneId(AcsPassRuleIsDefaultDto paramAcsPassRuleIsDefaultDto);
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByImageId(AcsPassRuleImageDto paramAcsPassRuleImageDto);
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package cn.cloudwalk.elevator.passrule.mapper;
|
||||
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ImageRuleRefMapper {
|
||||
List<ImageRuleRefResultDto> page(AcsPassRuleQueryDto paramAcsPassRuleQueryDto);
|
||||
|
||||
List<String> listRuleByZoneIdExtDefault(String paramString);
|
||||
|
||||
List<String> listPersonDelByZoneId(@Param("zoneId") String paramString);
|
||||
|
||||
List<String> listPersonDelByPersonId(@Param("personId") String paramString);
|
||||
|
||||
List<ImageRuleRefResultDto> listByParentRule(@Param("parentRuleIds") List<String> paramList);
|
||||
|
||||
List<ImageRuleRefResultDto> listByPersonId(@Param("personId") String paramString);
|
||||
|
||||
List<ImageRuleRefResultDto> listByLabelId(@Param("labelId") String paramString);
|
||||
|
||||
List<ImageRuleRefResultDto> listByOrgId(@Param("orgId") String paramString);
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByPersonInfo(AcsPassRuleImageDto paramAcsPassRuleImageDto);
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto);
|
||||
|
||||
List<AcsPassRuleLabelResultDto> listFloorsByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto);
|
||||
|
||||
List<AcsPassRuleImageResultDto> listZoneInfoByIds(@Param("zoneIds") List<String> paramList);
|
||||
|
||||
List<AcsPassRuleImageResultDto> listByNotZoneIds(@Param("request") AcsPassRuleQueryDto paramAcsPassRuleQueryDto);
|
||||
|
||||
List<ImageRuleRefResultDto> listByPersonList(AcsPassRulePersonListDto paramAcsPassRulePersonListDto);
|
||||
|
||||
ImageRuleRefResultDto getDefaultByZoneId(String paramString);
|
||||
|
||||
ImageRuleRefResultDto getById(String paramString);
|
||||
|
||||
String getByRuleName(@Param("ruleName") String paramString1, @Param("zoneId") String paramString2);
|
||||
|
||||
ImageRuleRefResultDto getByPersonIdAndZoneId(@Param("personIds") List<String> paramList,
|
||||
@Param("zoneId") String paramString);
|
||||
|
||||
ImageRuleRefResultDto getDelByPersonIdAndZoneId(@Param("personId") String paramString1,
|
||||
@Param("zoneId") String paramString2);
|
||||
|
||||
List<String> countPersonIdByZoneId(String paramString);
|
||||
|
||||
Boolean insert(ImageRuleRefAddDto paramImageRuleRefAddDto);
|
||||
|
||||
Boolean insertList(@Param("dtoList") List<ImageRuleRefAddDto> paramList);
|
||||
|
||||
Boolean deleteByZoneIdAndName(String paramString1, String paramString2);
|
||||
|
||||
Boolean deleteById(String paramString);
|
||||
|
||||
Boolean deleteByParentRule(String paramString);
|
||||
|
||||
Boolean deleteByPersonIdsIsDel(@Param("personIds") List<String> paramList, @Param("zoneId") String paramString);
|
||||
|
||||
Boolean deleteByPersonId(@Param("personId") String paramString1, @Param("zoneId") String paramString2);
|
||||
|
||||
Boolean deleteByOrgAndLabel(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto);
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 通行/人员规则与图库规则引用:规则增删、与区域/标签/组织维度的组合,及与设备任务的协作。
|
||||
* <p>
|
||||
* 与 {@code person} 包在“按人下发”和“按规则下发”两种路径上常共同出现在设备任务流中。
|
||||
*/
|
||||
package cn.cloudwalk.elevator.passrule;
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class AcsPassRuleDeleteParam implements Serializable {
|
||||
private static final long serialVersionUID = -40026518356914854L;
|
||||
@NotEmpty(message = "76260515")
|
||||
private List<String> ids;
|
||||
private String zoneId;
|
||||
private String parentId;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPassRuleEditParam implements Serializable {
|
||||
private static final long serialVersionUID = 924203126937866288L;
|
||||
@NotBlank(message = "76260515")
|
||||
private String id;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
@NotBlank(message = "76260514")
|
||||
@Size(min = 1, max = 32, message = "76260518")
|
||||
private String ruleName;
|
||||
private String oldName;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
private List<String> excludeLabels;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getOldName() {
|
||||
return this.oldName;
|
||||
}
|
||||
|
||||
public void setOldName(String oldName) {
|
||||
this.oldName = oldName;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleFloorParam extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = 137892620174267456L;
|
||||
private String zoneId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleImageParam implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private List<String> imageStoreIds;
|
||||
private String businessId;
|
||||
private String personId;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> includeLabels;
|
||||
|
||||
public List<String> getImageStoreIds() {
|
||||
return this.imageStoreIds;
|
||||
}
|
||||
|
||||
public void setImageStoreIds(List<String> imageStoreIds) {
|
||||
this.imageStoreIds = imageStoreIds;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleIsDefaultParam implements Serializable {
|
||||
private static final long serialVersionUID = 137892620174267456L;
|
||||
private String zoneId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPassRuleNewParam implements Serializable {
|
||||
private static final long serialVersionUID = 137892620174267456L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
@NotBlank(message = "76260514")
|
||||
@Size(min = 1, max = 32, message = "76260518")
|
||||
private String ruleName;
|
||||
private List<String> includeLabels;
|
||||
private List<String> includeOrganizations;
|
||||
private List<String> excludeLabels;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private Integer isDefault;
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public List<String> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<String> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<String> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<String> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRulePersonListParam extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = -52687427633888290L;
|
||||
private List<AcsPassRuleImageParam> personList;
|
||||
|
||||
public List<AcsPassRuleImageParam> getPersonList() {
|
||||
return this.personList;
|
||||
}
|
||||
|
||||
public void setPersonList(List<AcsPassRuleImageParam> personList) {
|
||||
this.personList = personList;
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleQueryParam implements Serializable {
|
||||
private static final long serialVersionUID = -31004388036379268L;
|
||||
private String id;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String imageStoreId;
|
||||
private Integer isDefault;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPassTimeAddParam implements Serializable {
|
||||
private static final long serialVersionUID = 8600793178515359164L;
|
||||
@NotBlank(message = "76260512")
|
||||
@Size(min = 1, max = 64, message = "76260519")
|
||||
private String passableTimeName;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassTimeCycleParam implements Serializable {
|
||||
private static final long serialVersionUID = 9084516985152275888L;
|
||||
private int weekday;
|
||||
private List<AcsPassTimeParam> time;
|
||||
|
||||
public int getWeekday() {
|
||||
return this.weekday;
|
||||
}
|
||||
|
||||
public void setWeekday(int weekday) {
|
||||
this.weekday = weekday;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeParam> getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
public void setTime(List<AcsPassTimeParam> time) {
|
||||
this.time = time;
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class AcsPassTimeDeleteParam implements Serializable {
|
||||
private static final long serialVersionUID = -1142611457619464538L;
|
||||
@NotEmpty(message = "76260513")
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPassTimeEditParam implements Serializable {
|
||||
private static final long serialVersionUID = -8271994630899900554L;
|
||||
@NotBlank(message = "76260513")
|
||||
private String id;
|
||||
@NotBlank(message = "76260512")
|
||||
@Size(min = 1, max = 64, message = "76260519")
|
||||
private String passableTimeName;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassTimeParam implements Serializable {
|
||||
private static final long serialVersionUID = 7496987389322298594L;
|
||||
private String beginTime;
|
||||
private String endTime;
|
||||
|
||||
public String getBeginTime() {
|
||||
return this.beginTime;
|
||||
}
|
||||
|
||||
public void setBeginTime(String beginTime) {
|
||||
this.beginTime = beginTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package cn.cloudwalk.elevator.passrule.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPassTimeQueryParam implements Serializable {
|
||||
private static final long serialVersionUID = 7311660131290856391L;
|
||||
@NotBlank(message = "76260513")
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
package cn.cloudwalk.elevator.passrule.result;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleDetailResult {
|
||||
private static final long serialVersionUID = -90554404684210529L;
|
||||
private String id;
|
||||
private String ruleName;
|
||||
private String imageStoreId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private List<LabelResult> excludeLabels;
|
||||
private List<OrganizationResult> includeOrganizations;
|
||||
private List<LabelResult> includeLabels;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
private Integer passType;
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public List<LabelResult> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<LabelResult> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public List<OrganizationResult> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<OrganizationResult> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<LabelResult> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<LabelResult> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
|
||||
public Integer getPassType() {
|
||||
return this.passType;
|
||||
}
|
||||
|
||||
public void setPassType(Integer passType) {
|
||||
this.passType = passType;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
}
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package cn.cloudwalk.elevator.passrule.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPassRuleFloorResult implements Serializable {
|
||||
private static final long serialVersionUID = -90554404684210529L;
|
||||
private String id;
|
||||
private String name;
|
||||
private Integer deviceNumber;
|
||||
private Integer unitNumber;
|
||||
private Long personNumber;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDeviceNumber(Integer deviceNumber) {
|
||||
this.deviceNumber = deviceNumber;
|
||||
}
|
||||
|
||||
public void setUnitNumber(Integer unitNumber) {
|
||||
this.unitNumber = unitNumber;
|
||||
}
|
||||
|
||||
public void setPersonNumber(Long personNumber) {
|
||||
this.personNumber = personNumber;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (!(o instanceof AcsPassRuleFloorResult))
|
||||
return false;
|
||||
AcsPassRuleFloorResult other = (AcsPassRuleFloorResult)o;
|
||||
if (!other.canEqual(this))
|
||||
return false;
|
||||
Object this$id = getId(), other$id = other.getId();
|
||||
if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id))
|
||||
return false;
|
||||
Object this$name = getName(), other$name = other.getName();
|
||||
if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name))
|
||||
return false;
|
||||
Object this$deviceNumber = getDeviceNumber(), other$deviceNumber = other.getDeviceNumber();
|
||||
if ((this$deviceNumber == null) ? (other$deviceNumber != null) : !this$deviceNumber.equals(other$deviceNumber))
|
||||
return false;
|
||||
Object this$unitNumber = getUnitNumber(), other$unitNumber = other.getUnitNumber();
|
||||
if ((this$unitNumber == null) ? (other$unitNumber != null) : !this$unitNumber.equals(other$unitNumber))
|
||||
return false;
|
||||
Object this$personNumber = getPersonNumber(), other$personNumber = other.getPersonNumber();
|
||||
return !((this$personNumber == null) ? (other$personNumber != null)
|
||||
: !this$personNumber.equals(other$personNumber));
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsPassRuleFloorResult;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int PRIME = 59;
|
||||
int result = 1;
|
||||
Object $id = getId();
|
||||
result = result * 59 + (($id == null) ? 43 : $id.hashCode());
|
||||
Object $name = getName();
|
||||
result = result * 59 + (($name == null) ? 43 : $name.hashCode());
|
||||
Object $deviceNumber = getDeviceNumber();
|
||||
result = result * 59 + (($deviceNumber == null) ? 43 : $deviceNumber.hashCode());
|
||||
Object $unitNumber = getUnitNumber();
|
||||
result = result * 59 + (($unitNumber == null) ? 43 : $unitNumber.hashCode());
|
||||
Object $personNumber = getPersonNumber();
|
||||
return result * 59 + (($personNumber == null) ? 43 : $personNumber.hashCode());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsPassRuleFloorResult(id=" + getId() + ", name=" + getName() + ", deviceNumber=" + getDeviceNumber()
|
||||
+ ", unitNumber=" + getUnitNumber() + ", personNumber=" + getPersonNumber() + ")";
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public Integer getDeviceNumber() {
|
||||
return this.deviceNumber;
|
||||
}
|
||||
|
||||
public Integer getUnitNumber() {
|
||||
return this.unitNumber;
|
||||
}
|
||||
|
||||
public Long getPersonNumber() {
|
||||
return this.personNumber;
|
||||
}
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
package cn.cloudwalk.elevator.passrule.result;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPassRuleResult implements Serializable {
|
||||
private static final long serialVersionUID = -90554404684210529L;
|
||||
private String id;
|
||||
private String ruleName;
|
||||
private int personSum;
|
||||
private String imageStoreId;
|
||||
private String passableTimeName;
|
||||
private String zoneId;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private List<LabelResult> excludeLabels;
|
||||
private List<OrganizationResult> includeOrganizations;
|
||||
private List<LabelResult> includeLabels;
|
||||
private List<ImgStorePersonResult> includePersons;
|
||||
private Integer passType;
|
||||
private Integer isDefault;
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public int getPersonSum() {
|
||||
return this.personSum;
|
||||
}
|
||||
|
||||
public void setPersonSum(int personSum) {
|
||||
this.personSum = personSum;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public List<LabelResult> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<LabelResult> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public List<OrganizationResult> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<OrganizationResult> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<LabelResult> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<LabelResult> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public List<ImgStorePersonResult> getIncludePersons() {
|
||||
return this.includePersons;
|
||||
}
|
||||
|
||||
public void setIncludePersons(List<ImgStorePersonResult> includePersons) {
|
||||
this.includePersons = includePersons;
|
||||
}
|
||||
|
||||
public Integer getPassType() {
|
||||
return this.passType;
|
||||
}
|
||||
|
||||
public void setPassType(Integer passType) {
|
||||
this.passType = passType;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
package cn.cloudwalk.elevator.passrule.result;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam;
|
||||
import java.util.List;
|
||||
|
||||
public class ImageRuleRefDetailResult {
|
||||
private static final long serialVersionUID = -90554404684210529L;
|
||||
private String id;
|
||||
private String ruleName;
|
||||
private String imageStoreId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private List<String> excludeLabels;
|
||||
private List<OrganizationResult> includeOrganizations;
|
||||
private List<LabelDetailResult> includeLabels;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
private Integer passType;
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public List<OrganizationResult> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<OrganizationResult> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<LabelDetailResult> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<LabelDetailResult> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
|
||||
public Integer getPassType() {
|
||||
return this.passType;
|
||||
}
|
||||
|
||||
public void setPassType(Integer passType) {
|
||||
this.passType = passType;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package cn.cloudwalk.elevator.passrule.result;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult;
|
||||
import java.util.List;
|
||||
|
||||
public class ImageRuleRefPageResult {
|
||||
private static final long serialVersionUID = -90554404684210529L;
|
||||
private String id;
|
||||
private String ruleName;
|
||||
private int personSum;
|
||||
private String imageStoreId;
|
||||
private String passableTimeName;
|
||||
private String zoneId;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private String validDateCron;
|
||||
private String validDateJson;
|
||||
private List<String> excludeLabels;
|
||||
private List<OrganizationResult> includeOrganizations;
|
||||
private List<LabelDetailResult> includeLabels;
|
||||
private List<ImgStorePersonResult> includePersons;
|
||||
private Integer passType;
|
||||
private Integer isDefault;
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
|
||||
public int getPersonSum() {
|
||||
return this.personSum;
|
||||
}
|
||||
|
||||
public void setPersonSum(int personSum) {
|
||||
this.personSum = personSum;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getBeginDate() {
|
||||
return this.beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Long beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Long getEndDate() {
|
||||
return this.endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Long endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getValidDateCron() {
|
||||
return this.validDateCron;
|
||||
}
|
||||
|
||||
public void setValidDateCron(String validDateCron) {
|
||||
this.validDateCron = validDateCron;
|
||||
}
|
||||
|
||||
public String getValidDateJson() {
|
||||
return this.validDateJson;
|
||||
}
|
||||
|
||||
public void setValidDateJson(String validDateJson) {
|
||||
this.validDateJson = validDateJson;
|
||||
}
|
||||
|
||||
public List<String> getExcludeLabels() {
|
||||
return this.excludeLabels;
|
||||
}
|
||||
|
||||
public void setExcludeLabels(List<String> excludeLabels) {
|
||||
this.excludeLabels = excludeLabels;
|
||||
}
|
||||
|
||||
public List<OrganizationResult> getIncludeOrganizations() {
|
||||
return this.includeOrganizations;
|
||||
}
|
||||
|
||||
public void setIncludeOrganizations(List<OrganizationResult> includeOrganizations) {
|
||||
this.includeOrganizations = includeOrganizations;
|
||||
}
|
||||
|
||||
public List<LabelDetailResult> getIncludeLabels() {
|
||||
return this.includeLabels;
|
||||
}
|
||||
|
||||
public void setIncludeLabels(List<LabelDetailResult> includeLabels) {
|
||||
this.includeLabels = includeLabels;
|
||||
}
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public List<ImgStorePersonResult> getIncludePersons() {
|
||||
return this.includePersons;
|
||||
}
|
||||
|
||||
public void setIncludePersons(List<ImgStorePersonResult> includePersons) {
|
||||
this.includePersons = includePersons;
|
||||
}
|
||||
|
||||
public Integer getPassType() {
|
||||
return this.passType;
|
||||
}
|
||||
|
||||
public void setPassType(Integer passType) {
|
||||
this.passType = passType;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package cn.cloudwalk.elevator.passrule.service;
|
||||
|
||||
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.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleIsDefaultParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleDetailResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult;
|
||||
import java.util.List;
|
||||
|
||||
public interface AcsPassRuleService {
|
||||
CloudwalkResult<List<AcsPassRuleFloorResult>> listFloor(AcsPassRuleFloorParam paramAcsPassRuleFloorParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<String> getIsDefaultByZoneId(AcsPassRuleIsDefaultParam paramAcsPassRuleIsDefaultParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<String> add(AcsPassRuleNewParam paramAcsPassRuleNewParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> update(AcsPassRuleEditParam paramAcsPassRuleEditParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> delete(AcsPassRuleDeleteParam paramAcsPassRuleDeleteParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<AcsPassRuleDetailResult> detail(AcsPassRuleQueryParam paramAcsPassRuleQueryParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPassRuleResult>> page(AcsPassRuleQueryParam paramAcsPassRuleQueryParam,
|
||||
CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
|
||||
CloudwalkResult<List<AcsPassRuleResult>> list(AcsPassRuleQueryParam paramAcsPassRuleQueryParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<List<AcsPassRuleImageResultDto>> listByImageId(AcsPassRuleImageParam paramAcsPassRuleImageParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package cn.cloudwalk.elevator.passrule.service;
|
||||
|
||||
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.elevator.passrule.dto.AcsPassRuleImageResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRulePersonListParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.ImageRuleRefDetailResult;
|
||||
import cn.cloudwalk.elevator.passrule.result.ImageRuleRefPageResult;
|
||||
import java.util.List;
|
||||
|
||||
public interface ImageRuleRefService {
|
||||
CloudwalkResult<CloudwalkPageAble<ImageRuleRefPageResult>> page(AcsPassRuleQueryParam paramAcsPassRuleQueryParam,
|
||||
CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPassRuleFloorResult>>
|
||||
listFloor(AcsPassRuleFloorParam paramAcsPassRuleFloorParam, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
|
||||
CloudwalkResult<List<AcsPassRuleImageResultDto>> listByPersonInfo(AcsPassRuleImageParam paramAcsPassRuleImageParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<List<AcsPassRulePersonListResultDto>> listByPersonList(
|
||||
AcsPassRulePersonListParam paramAcsPassRulePersonListParam, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
|
||||
CloudwalkResult<ImageRuleRefDetailResult> detail(AcsPassRuleQueryParam paramAcsPassRuleQueryParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> addOnlyRule(AcsPassRuleNewParam paramAcsPassRuleNewParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> update(AcsPassRuleEditParam paramAcsPassRuleEditParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> delete(AcsPassRuleDeleteParam paramAcsPassRuleDeleteParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
}
|
||||
Reference in New Issue
Block a user