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:
+140
@@ -0,0 +1,140 @@
|
||||
package cn.cloudwalk.elevator.person.controller;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult;
|
||||
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.person.form.AcsPersonAddForm;
|
||||
import cn.cloudwalk.elevator.person.form.AcsPersonAddVisitorForm;
|
||||
import cn.cloudwalk.elevator.person.form.AcsPersonDeleteForm;
|
||||
import cn.cloudwalk.elevator.person.form.AcsPersonEditForm;
|
||||
import cn.cloudwalk.elevator.person.form.AcsPersonQueryForm;
|
||||
import cn.cloudwalk.elevator.person.form.AcsPersonTimeDetailForm;
|
||||
import cn.cloudwalk.elevator.person.form.PersonDetailQueryForm;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddVisitorParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonEditParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam;
|
||||
import cn.cloudwalk.elevator.person.param.PersonDetailQueryParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult;
|
||||
import cn.cloudwalk.elevator.person.service.AcsPersonService;
|
||||
import cn.cloudwalk.elevator.person.service.PersonRuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping({"/elevator/person"})
|
||||
public class AcsPersonController extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private AcsPersonService acsPersonService;
|
||||
@Autowired
|
||||
private PersonRuleService personRuleService;
|
||||
|
||||
@RequestMapping({"/add"})
|
||||
public CloudwalkResult<Boolean> add(@RequestBody AcsPersonAddForm form) {
|
||||
AcsPersonAddParam param = (AcsPersonAddParam)BeanCopyUtils.copyProperties(form, AcsPersonAddParam.class);
|
||||
try {
|
||||
return this.personRuleService.add(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("从现有人员添加通行人员失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260521", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/add/visitor"})
|
||||
public CloudwalkResult<Boolean> addVisitor(@RequestBody AcsPersonAddVisitorForm form) {
|
||||
AcsPersonAddVisitorParam param =
|
||||
(AcsPersonAddVisitorParam)BeanCopyUtils.copyProperties(form, AcsPersonAddVisitorParam.class);
|
||||
try {
|
||||
return this.personRuleService.addVisitor(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("根据被访人添加访客派梯权限失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260521", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody AcsPersonEditForm form) {
|
||||
AcsPersonEditParam param = (AcsPersonEditParam)BeanCopyUtils.copyProperties(form, AcsPersonEditParam.class);
|
||||
try {
|
||||
return this.acsPersonService.edit(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("编辑通行人员信息失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260522", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody AcsPersonDeleteForm form) {
|
||||
AcsPersonDeleteParam param =
|
||||
(AcsPersonDeleteParam)BeanCopyUtils.copyProperties(form, AcsPersonDeleteParam.class);
|
||||
try {
|
||||
return this.personRuleService.delete(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("删除通行人员失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260523", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page(@RequestBody AcsPersonQueryForm form) {
|
||||
try {
|
||||
CloudwalkPageInfo pageInfo =
|
||||
new CloudwalkPageInfo(form.getPageNo().intValue(), form.getPageSize().intValue());
|
||||
AcsPersonQueryParam param =
|
||||
(AcsPersonQueryParam)BeanCopyUtils.copyProperties(form, AcsPersonQueryParam.class);
|
||||
return this.personRuleService.page(param, pageInfo, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("分页查询通行人员失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260410", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/timeDetail"})
|
||||
public CloudwalkResult<AcsPersonTimeDetailResult> timeDetail(@RequestBody AcsPersonTimeDetailForm form) {
|
||||
try {
|
||||
AcsPersonTimeDetailParam param =
|
||||
(AcsPersonTimeDetailParam)BeanCopyUtils.copyProperties(form, AcsPersonTimeDetailParam.class);
|
||||
return this.acsPersonService.timeDetail(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("查询通行人员时间详情失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260416", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/pageByApp"})
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> pageByApp(@RequestBody AcsPersonQueryForm form) {
|
||||
try {
|
||||
CloudwalkPageInfo pageInfo =
|
||||
new CloudwalkPageInfo(form.getPageNo().intValue(), form.getPageSize().intValue());
|
||||
AcsPersonQueryByAppParam param =
|
||||
(AcsPersonQueryByAppParam)BeanCopyUtils.copyProperties(form, AcsPersonQueryByAppParam.class);
|
||||
return this.acsPersonService.pageByApp(param, pageInfo, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("分页查询应用通行人员失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260417", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping({"/detail"})
|
||||
public CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>>
|
||||
personDetail(@RequestBody PersonDetailQueryForm form) {
|
||||
try {
|
||||
PersonDetailQueryParam param =
|
||||
(PersonDetailQueryParam)BeanCopyUtils.copyProperties(form, PersonDetailQueryParam.class);
|
||||
return this.personRuleService.personDetail(param, getCloudwalkContext());
|
||||
} catch (ServiceException e) {
|
||||
this.LOGGER.error("分页查询规则里通行人员失败,原因:", (Throwable)e);
|
||||
return CloudwalkResult.fail("76260410", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package cn.cloudwalk.elevator.person.dao;
|
||||
|
||||
import cn.cloudwalk.elevator.person.dto.TenantVisitorFloorPolicyDto;
|
||||
|
||||
public interface TenantVisitorFloorPolicyDao {
|
||||
|
||||
/**
|
||||
* 查询租户级启用中的 INTERSECT_ALLOWLIST 策略(building_id 为空)。
|
||||
*
|
||||
* @param businessId 机构 ID
|
||||
* @return 无配置时 null
|
||||
*/
|
||||
TenantVisitorFloorPolicyDto selectEnabledTenantDefault(String businessId);
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package cn.cloudwalk.elevator.person.dto;
|
||||
|
||||
/**
|
||||
* 租户访客楼层策略(表 tenant_visitor_floor_policy 行映射)。
|
||||
*/
|
||||
public class TenantVisitorFloorPolicyDto {
|
||||
|
||||
private String id;
|
||||
private String businessId;
|
||||
private String policyType;
|
||||
private String allowZoneIds;
|
||||
private String buildingId;
|
||||
private Integer enabled;
|
||||
private Long policyVersion;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getPolicyType() {
|
||||
return policyType;
|
||||
}
|
||||
|
||||
public void setPolicyType(String policyType) {
|
||||
this.policyType = policyType;
|
||||
}
|
||||
|
||||
public String getAllowZoneIds() {
|
||||
return allowZoneIds;
|
||||
}
|
||||
|
||||
public void setAllowZoneIds(String allowZoneIds) {
|
||||
this.allowZoneIds = allowZoneIds;
|
||||
}
|
||||
|
||||
public String getBuildingId() {
|
||||
return buildingId;
|
||||
}
|
||||
|
||||
public void setBuildingId(String buildingId) {
|
||||
this.buildingId = buildingId;
|
||||
}
|
||||
|
||||
public Integer getEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(Integer enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public Long getPolicyVersion() {
|
||||
return policyVersion;
|
||||
}
|
||||
|
||||
public void setPolicyVersion(Long policyVersion) {
|
||||
this.policyVersion = policyVersion;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonAddForm implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private List<String> personIds;
|
||||
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 List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonPropertiesParam;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonAddNewForm implements Serializable {
|
||||
private static final long serialVersionUID = -5310626681307061439L;
|
||||
private String zoneId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private AcsPersonPropertiesParam personProperties;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public AcsPersonPropertiesParam getPersonProperties() {
|
||||
return this.personProperties;
|
||||
}
|
||||
|
||||
public void setPersonProperties(AcsPersonPropertiesParam personProperties) {
|
||||
this.personProperties = personProperties;
|
||||
}
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AcsPersonAddVisitorForm implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String visitorId;
|
||||
private String personId;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private List<String> floorIds;
|
||||
|
||||
public void setVisitorId(String visitorId) {
|
||||
this.visitorId = visitorId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public void setFloorIds(List<String> floorIds) {
|
||||
this.floorIds = floorIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsPersonAddVisitorForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsPersonAddVisitorForm other = (AcsPersonAddVisitorForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(visitorId, other.visitorId) && Objects.equals(personId, other.personId)
|
||||
&& Objects.equals(begVisitorTime, other.begVisitorTime)
|
||||
&& Objects.equals(endVisitorTime, other.endVisitorTime) && Objects.equals(floorIds, other.floorIds);
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsPersonAddVisitorForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(visitorId, personId, begVisitorTime, endVisitorTime, floorIds);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsPersonAddVisitorForm(visitorId=" + getVisitorId() + ", personId=" + getPersonId()
|
||||
+ ", begVisitorTime=" + getBegVisitorTime() + ", endVisitorTime=" + getEndVisitorTime() + ", floorIds="
|
||||
+ getFloorIds() + ")";
|
||||
}
|
||||
|
||||
public String getVisitorId() {
|
||||
return this.visitorId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public List<String> getFloorIds() {
|
||||
return this.floorIds;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonDeleteForm implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private List<String> personIds;
|
||||
private String imageStoreId;
|
||||
private String personId;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
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 List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonDetailForm implements Serializable {
|
||||
private static final long serialVersionUID = 1211300452037642058L;
|
||||
private String zoneId;
|
||||
private String personId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonEditForm implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String zoneId;
|
||||
private String personId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private String imageStoreId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonFaceForm implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String deviceId;
|
||||
private String faceImage;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getFaceImage() {
|
||||
return this.faceImage;
|
||||
}
|
||||
|
||||
public void setFaceImage(String faceImage) {
|
||||
this.faceImage = faceImage;
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AcsPersonQueryForm implements Serializable {
|
||||
private static final long serialVersionUID = -8830219133147503297L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String personName;
|
||||
private List<String> organizationIds;
|
||||
private List<String> labelIds;
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public void setOrganizationIds(List<String> organizationIds) {
|
||||
this.organizationIds = organizationIds;
|
||||
}
|
||||
|
||||
public void setLabelIds(List<String> labelIds) {
|
||||
this.labelIds = labelIds;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsPersonQueryForm)) {
|
||||
return false;
|
||||
}
|
||||
AcsPersonQueryForm other = (AcsPersonQueryForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId)
|
||||
&& Objects.equals(personName, other.personName) && Objects.equals(organizationIds, other.organizationIds)
|
||||
&& Objects.equals(labelIds, other.labelIds) && Objects.equals(pageSize, other.pageSize)
|
||||
&& Objects.equals(pageNo, other.pageNo);
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsPersonQueryForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(parentId, zoneId, personName, organizationIds, labelIds, pageSize, pageNo);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsPersonQueryForm(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", personName="
|
||||
+ getPersonName() + ", organizationIds=" + getOrganizationIds() + ", labelIds=" + getLabelIds()
|
||||
+ ", pageSize=" + getPageSize() + ", pageNo=" + getPageNo() + ")";
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public List<String> getOrganizationIds() {
|
||||
return this.organizationIds;
|
||||
}
|
||||
|
||||
public List<String> getLabelIds() {
|
||||
return this.labelIds;
|
||||
}
|
||||
|
||||
private Integer pageSize = Integer.valueOf(10);
|
||||
|
||||
public Integer getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
|
||||
private Integer pageNo = Integer.valueOf(1);
|
||||
|
||||
public Integer getPageNo() {
|
||||
return this.pageNo;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonTimeDetailForm implements Serializable {
|
||||
private static final long serialVersionUID = -1135110893682603631L;
|
||||
private String imageStoreId;
|
||||
private String personId;
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package cn.cloudwalk.elevator.person.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class PersonDetailQueryForm extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = -8830219133147503297L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String ruleId;
|
||||
private String personName;
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setRuleId(String ruleId) {
|
||||
this.ruleId = ruleId;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof PersonDetailQueryForm)) {
|
||||
return false;
|
||||
}
|
||||
PersonDetailQueryForm other = (PersonDetailQueryForm)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId)
|
||||
&& Objects.equals(ruleId, other.ruleId) && Objects.equals(personName, other.personName);
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof PersonDetailQueryForm;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(parentId, zoneId, ruleId, personName);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "PersonDetailQueryForm(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", ruleId=" + getRuleId()
|
||||
+ ", personName=" + getPersonName() + ")";
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getRuleId() {
|
||||
return this.ruleId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
}
|
||||
+604
@@ -0,0 +1,604 @@
|
||||
package cn.cloudwalk.elevator.person.impl;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.biology.service.BiologyToolService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceApplicationResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceApplicationService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceImageStoreService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonDelParam;
|
||||
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.result.ImageStoreListResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult;
|
||||
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.param.PersonAddParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult;
|
||||
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.entity.CloudwalkBaseIdentify;
|
||||
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.em.AcsPassTypeEnum;
|
||||
import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.impl.AbstractAcsPassService;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleIsDefaultParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult;
|
||||
import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddNewParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonEditParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult;
|
||||
import cn.cloudwalk.elevator.person.service.AcsPersonService;
|
||||
import cn.cloudwalk.elevator.config.FeignThreadLocalUtil;
|
||||
import cn.cloudwalk.elevator.util.CollectionUtils;
|
||||
import cn.cloudwalk.elevator.util.DateUtils;
|
||||
import cn.cloudwalk.elevator.util.StringUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
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;
|
||||
|
||||
@Service
|
||||
public class AcsPersonServiceImpl extends AbstractAcsPassService implements AcsPersonService {
|
||||
private static final int ROWS_OF_PAGE = 1000;
|
||||
/** 约定 §3.2:与 {@code ninca.elevator.remote-io.pool} 默认 core 对齐,有界并行上界 */
|
||||
private static final int REMOTE_DELETE_PARALLEL = 6;
|
||||
@Autowired
|
||||
private BiologyToolService biologyToolService;
|
||||
@Autowired
|
||||
private DeviceImageStoreService deviceImageStoreService;
|
||||
@Autowired
|
||||
private ImageStorePersonService imageStorePersonService;
|
||||
@Autowired
|
||||
private DeviceApplicationService deviceApplicationService;
|
||||
@Autowired
|
||||
private PersonService personService;
|
||||
@Autowired
|
||||
private ImageStoreService imageStoreService;
|
||||
@Resource
|
||||
private AcsPassRuleService acsPassRuleService;
|
||||
@Resource
|
||||
private AcsPassRuleDao acsPassRuleDao;
|
||||
@Autowired
|
||||
@Qualifier("elevatorRemoteBoundedExecutor")
|
||||
private ThreadPoolTaskExecutor elevatorRemoteBoundedExecutor;
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<Boolean> add(AcsPersonAddParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("从现有人员添加通行人员开始,AcsPersonAddParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(param), JSONObject.toJSONString(context));
|
||||
String acsImageStoreId = getAcsImageStore(param.getZoneId(), context);
|
||||
ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam();
|
||||
imageStorePersonBindParam.setImageStoreId(acsImageStoreId);
|
||||
imageStorePersonBindParam.setPersonIds(param.getPersonIds());
|
||||
imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true));
|
||||
imageStorePersonBindParam.setExpiryBeginDate(param.getStartTime());
|
||||
imageStorePersonBindParam.setExpiryEndDate(param.getEndTime());
|
||||
this.logger.info("远程调用绑定人员图库开始,imageStorePersonBindParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context));
|
||||
CloudwalkResult<ImgStoreBatchBindPersonResult> bindResult =
|
||||
this.imageStorePersonService.batchBind(imageStorePersonBindParam, context);
|
||||
if (!bindResult.isSuccess()) {
|
||||
this.logger.error("远程调用绑定人员图库异常,原因:[{}],失败人员id:[{}]", bindResult.getMessage(),
|
||||
((ImgStoreBatchBindPersonResult)bindResult.getData()).getFailPersonIds());
|
||||
return CloudwalkResult.fail(bindResult.getCode(), bindResult.getMessage());
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
private void bindImageStorePerson(String acsImageStoreId, String personId, Long startTime, Long endTime,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam();
|
||||
imageStorePersonBindParam.setImageStoreId(acsImageStoreId);
|
||||
imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true));
|
||||
imageStorePersonBindParam.setPersonId(personId);
|
||||
imageStorePersonBindParam.setExpiryBeginDate(startTime);
|
||||
imageStorePersonBindParam.setExpiryEndDate(endTime);
|
||||
this.logger.info("图库人员关系绑定开始,imageStorePersonBindParam:[{}],context:[{}]",
|
||||
JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context));
|
||||
CloudwalkResult<Boolean> bindResult = this.imageStorePersonService.bind(imageStorePersonBindParam, context);
|
||||
if (!bindResult.isSuccess()) {
|
||||
this.logger.error("图库人员关系绑定失败,imageStoreId=[{}],personId=[{}],原因:[{}]",
|
||||
new Object[] {acsImageStoreId, personId, bindResult.getMessage()});
|
||||
throw new ServiceException(bindResult.getCode(), bindResult.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private String addPerson(AcsPersonAddNewParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
PersonAddParam personAddParam = new PersonAddParam();
|
||||
BeanCopyUtils.copyProperties(param.getPersonProperties(), personAddParam);
|
||||
CloudwalkResult<String> addPersonResult = this.personService.add(personAddParam, context);
|
||||
if (!addPersonResult.isSuccess()) {
|
||||
this.logger.info("新增人员失败,原因:[{}]", addPersonResult.getMessage());
|
||||
throw new ServiceException(addPersonResult.getCode(), addPersonResult.getMessage());
|
||||
}
|
||||
return (String)addPersonResult.getData();
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<Boolean> edit(AcsPersonEditParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
this.logger.info("编辑通行人员开始,AcsPersonEditParam=[{}], CloudwalkCallContext=[{}]", JSONObject.toJSONString(param),
|
||||
JSONObject.toJSONString(context));
|
||||
checkPersonIdByImageStore(param.getPersonId(), param.getImageStoreId(), context);
|
||||
ImageStorePersonDelParam delParam = new ImageStorePersonDelParam();
|
||||
delParam.setImageStoreId(param.getImageStoreId());
|
||||
delParam.setPersonId(param.getPersonId());
|
||||
this.logger.info("远程调用解绑图库人员开始,ImageStorePersonDelParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(delParam), JSONObject.toJSONString(context));
|
||||
CloudwalkResult<Boolean> deleteResult = this.imageStorePersonService.delete(delParam, context);
|
||||
if (!deleteResult.isSuccess()) {
|
||||
this.logger.error("图库人员更新之前先解绑失败,原因:[{}]", deleteResult.getMessage());
|
||||
return CloudwalkResult.fail("76260406", getMessage("76260406") + " " + deleteResult.getMessage());
|
||||
}
|
||||
bindImageStorePerson(param.getImageStoreId(), param.getPersonId(), param.getStartTime(), param.getEndTime(),
|
||||
context);
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<Boolean> delete(AcsPersonDeleteParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
this.logger.info("删除门禁通行人员开始,AcsPersonDeleteParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(param), JSONObject.toJSONString(context));
|
||||
List<String> personIds = param.getPersonIds();
|
||||
if (CollectionUtils.isEmpty(personIds)) {
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
if (personIds.size() == 1) {
|
||||
return deleteOnePersonFromImageStore(param.getImageStoreId(), personIds.get(0), context);
|
||||
}
|
||||
for (int i = 0; i < personIds.size(); i += REMOTE_DELETE_PARALLEL) {
|
||||
int end = Math.min(i + REMOTE_DELETE_PARALLEL, personIds.size());
|
||||
List<Callable<CloudwalkResult<Boolean>>> batch = new ArrayList<>();
|
||||
for (int j = i; j < end; j++) {
|
||||
final String personId = personIds.get(j);
|
||||
batch.add(() -> FeignThreadLocalUtil.callWithContext(context,
|
||||
() -> deleteOnePersonFromImageStore(param.getImageStoreId(), personId, context)));
|
||||
}
|
||||
List<Future<CloudwalkResult<Boolean>>> futures;
|
||||
try {
|
||||
futures = this.elevatorRemoteBoundedExecutor.getThreadPoolExecutor().invokeAll(batch);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
return CloudwalkResult.fail("76260407", getMessage("76260407") + " " + e.getMessage());
|
||||
}
|
||||
for (Future<CloudwalkResult<Boolean>> future : futures) {
|
||||
try {
|
||||
CloudwalkResult<Boolean> r = future.get();
|
||||
if (!r.isSuccess()) {
|
||||
return r;
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
return CloudwalkResult.fail("76260407", getMessage("76260407") + " " + e.getMessage());
|
||||
} catch (ExecutionException e) {
|
||||
Throwable c = e.getCause();
|
||||
if (c instanceof ServiceException) {
|
||||
ServiceException se = (ServiceException)c;
|
||||
return CloudwalkResult.fail(se.getCode() != null ? se.getCode() : "76260407",
|
||||
getMessage("76260407") + " " + se.getMessage());
|
||||
}
|
||||
return CloudwalkResult.fail("76260407",
|
||||
getMessage("76260407") + " " + (c != null ? c.getMessage() : e.getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
private CloudwalkResult<Boolean> deleteOnePersonFromImageStore(String imageStoreId, String personId,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStorePersonDelParam imageStorePersonDelParam = new ImageStorePersonDelParam();
|
||||
imageStorePersonDelParam.setPersonId(personId);
|
||||
imageStorePersonDelParam.setImageStoreId(imageStoreId);
|
||||
CloudwalkResult<Boolean> imageStorePersonDeleteResult =
|
||||
this.imageStorePersonService.delete(imageStorePersonDelParam, context);
|
||||
if (!imageStorePersonDeleteResult.isSuccess()) {
|
||||
return CloudwalkResult.fail("76260407",
|
||||
getMessage("76260407") + " " + imageStorePersonDeleteResult.getMessage());
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
private List<DeviceApplicationResult>
|
||||
sortedDeviceAppList(CloudwalkResult<List<DeviceApplicationResult>> deviceAppResult) {
|
||||
List<DeviceApplicationResult> deviceAppList = (List<DeviceApplicationResult>)deviceAppResult.getData();
|
||||
List<DeviceApplicationResult> sortedDeviceAppList = new ArrayList<>();
|
||||
List<DeviceApplicationResult> acsAppList = (List<DeviceApplicationResult>)deviceAppList.stream()
|
||||
.filter(s -> "elevator-app".equals(s.getServiceCode())).collect(Collectors.toList());
|
||||
List<DeviceApplicationResult> otherAppList = (List<DeviceApplicationResult>)deviceAppList.stream()
|
||||
.filter(s -> !"elevator-app".equals(s.getServiceCode())).collect(Collectors.toList());
|
||||
sortedDeviceAppList.addAll(acsAppList);
|
||||
sortedDeviceAppList.addAll(otherAppList);
|
||||
return sortedDeviceAppList;
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page(AcsPersonQueryParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("分页查询通行人员开始,AcsPersonQueryParam=[{}], CloudwalkPageInfo=[{}], CloudwalkCallContext=[{}]",
|
||||
new Object[] {JSONObject.toJSONString(param), JSONObject.toJSONString(pageInfo),
|
||||
JSONObject.toJSONString(context)});
|
||||
List<AcsPersonResult> result = new ArrayList<>();
|
||||
List<String> personIds = null;
|
||||
List<AcsPassRuleResult> ruleResults = getRuleListByZoneId(param.getZoneId(), context);
|
||||
if (CollectionUtils.isEmpty(ruleResults)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
List<String> imageStoreIds =
|
||||
(List<String>)ruleResults.stream().map(AcsPassRuleResult::getImageStoreId).collect(Collectors.toList());
|
||||
if (StringUtils.isNotBlank(param.getImageStoreId()) && !imageStoreIds.contains(param.getImageStoreId())) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
Map<String, AcsPassRuleResult> ruleMap = (Map<String, AcsPassRuleResult>)ruleResults.stream()
|
||||
.collect(Collectors.toMap(AcsPassRuleResult::getImageStoreId, r -> r));
|
||||
if (!StringUtils.isEmpty(param.getPersonName())) {
|
||||
personIds = getPersonIdsByName(param.getPersonName(), context);
|
||||
if (CollectionUtils.isEmpty(personIds)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
}
|
||||
CloudwalkPageAble<ImageStorePersonResult> pageResult =
|
||||
getImageStorePerson(param, pageInfo, context, personIds, imageStoreIds);
|
||||
if (!CollectionUtils.isEmpty(pageResult.getDatas())) {
|
||||
covertPageResult(result, pageResult.getDatas(), ruleMap, context);
|
||||
}
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, pageResult.getTotalRows()));
|
||||
}
|
||||
|
||||
private List<ImageStoreListResult> getImageStoreIdsByAppAndDevice(String applicationId, String deviceId,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ApplicationImageStoreQueryParam queryParam = new ApplicationImageStoreQueryParam();
|
||||
queryParam.setApplicationId(applicationId);
|
||||
List<DeviceImageStoreResult> deviceImageStore = getDeviceImageStore(deviceId, context);
|
||||
if (deviceImageStore.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<String> imageStoreIdByDevice = (List<String>)deviceImageStore.stream()
|
||||
.map(DeviceImageStoreResult::getImageStoreId).collect(Collectors.toList());
|
||||
ImageStoreQueryParam imageStoreQueryParam = new ImageStoreQueryParam();
|
||||
imageStoreQueryParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
imageStoreQueryParam.setApplicationId(applicationId);
|
||||
imageStoreQueryParam.setIds(imageStoreIdByDevice);
|
||||
CloudwalkResult<List<ImageStoreListResult>> imageStoreResult =
|
||||
this.imageStoreService.list(imageStoreQueryParam, context);
|
||||
return (List<ImageStoreListResult>)imageStoreResult.getData();
|
||||
}
|
||||
|
||||
private CloudwalkPageAble<ImageStorePersonResult> getImageStorePerson(AcsPersonQueryParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context, List<String> personIds, List<String> imageStoreIds)
|
||||
throws ServiceException {
|
||||
CloudwalkPageAble<ImageStorePersonResult> results = new CloudwalkPageAble();
|
||||
ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam();
|
||||
imageStorePersonQueryParam.setImageStoreId(param.getImageStoreId());
|
||||
if (StringUtils.isEmpty(param.getImageStoreId())) {
|
||||
imageStorePersonQueryParam.setImageStoreIds(imageStoreIds);
|
||||
}
|
||||
imageStorePersonQueryParam.setPersonIds(personIds);
|
||||
imageStorePersonQueryParam.setOrganizationIds(param.getOrganizationIds());
|
||||
imageStorePersonQueryParam.setLabelIds(param.getLabelIds());
|
||||
imageStorePersonQueryParam.setCurrentPage(pageInfo.getCurrentPage());
|
||||
imageStorePersonQueryParam.setRowsOfPage(pageInfo.getPageSize());
|
||||
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;
|
||||
}
|
||||
|
||||
public CloudwalkResult<AcsPersonTimeDetailResult> timeDetail(AcsPersonTimeDetailParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("查询通行人员时间详情开始,AcsPersonTimeDetailParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(param), JSONObject.toJSONString(context));
|
||||
AcsPersonTimeDetailResult result = new AcsPersonTimeDetailResult();
|
||||
ImageStorePersonResult imageStorePersonResult = getImageStorePersonResult(param, context);
|
||||
AcsPassRuleResult rule = getRuleByImageStore(param.getImageStoreId(), context);
|
||||
result.setBeginDate(imageStorePersonResult.getExpiryBeginDate());
|
||||
result.setEndDate(imageStorePersonResult.getExpiryEndDate());
|
||||
result.setPassType(AcsPassTypeEnum.LONG_TIME.getCode());
|
||||
if (imageStorePersonResult.getExpiryBeginDate() != null || imageStorePersonResult.getExpiryEndDate() != null) {
|
||||
result.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(imageStorePersonResult.getValidDateCron())) {
|
||||
BeanCopyUtils.copyProperties(rule, result);
|
||||
result.setPassableTimeName(rule.getPassableTimeName());
|
||||
List<AcsPassTimeCycleParam> timeCycleParams =
|
||||
JSONObject.parseArray(rule.getValidDateJson(), AcsPassTimeCycleParam.class);
|
||||
result.setPassableCycle(timeCycleParams);
|
||||
result.setPassType(AcsPassTypeEnum.PASS_TIME.getCode());
|
||||
}
|
||||
ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam();
|
||||
imageStorePersonQueryParam.setPersonId(param.getPersonId());
|
||||
imageStorePersonQueryParam.setRowsOfPage(1000);
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> imageStorePersonPageResult =
|
||||
this.imageStorePersonService.page(imageStorePersonQueryParam, context);
|
||||
CloudwalkPageAble<ImageStorePersonResult> imageStorePage = imageStorePersonPageResult.getData();
|
||||
ImageStorePersonResult imageStoreResult = imageStorePage.getDatas().iterator().next();
|
||||
result.setComparePicture(imageStoreResult.getComparePicture());
|
||||
result.setPersonName(imageStoreResult.getName());
|
||||
result.setPersonId(imageStoreResult.getPersonId());
|
||||
return CloudwalkResult.success(result);
|
||||
}
|
||||
|
||||
private AcsPassRuleResult getRuleByImageStore(String imageStoreId, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
AcsPassRuleQueryParam ruleQueryParam = new AcsPassRuleQueryParam();
|
||||
ruleQueryParam.setImageStoreId(imageStoreId);
|
||||
CloudwalkResult<List<AcsPassRuleResult>> results = this.acsPassRuleService.list(ruleQueryParam, context);
|
||||
return ((List<AcsPassRuleResult>)results.getData()).get(0);
|
||||
}
|
||||
|
||||
private ImageStorePersonResult getImageStorePersonResult(AcsPersonTimeDetailParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam();
|
||||
imageStorePersonQueryParam.setImageStoreId(param.getImageStoreId());
|
||||
imageStorePersonQueryParam.setPersonId(param.getPersonId());
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> pageResult =
|
||||
this.imageStorePersonService.page(imageStorePersonQueryParam, context);
|
||||
if (!pageResult.isSuccess() || CollectionUtils.isEmpty(((CloudwalkPageAble)pageResult.getData()).getDatas())) {
|
||||
this.logger.error("远程调用查询通行人员失败,原因:" + pageResult.getMessage());
|
||||
throw new ServiceException("远程调用查询通行人员失败");
|
||||
}
|
||||
List<ImageStorePersonResult> list =
|
||||
(List<ImageStorePersonResult>)((CloudwalkPageAble)pageResult.getData()).getDatas();
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
private List<String> mergeTime(List<ImageStorePersonResult> imageStorePersonList) {
|
||||
List<String> passIntervals = new ArrayList<>();
|
||||
List<ImageStorePersonResult> personLongTerm = (List<ImageStorePersonResult>)imageStorePersonList.stream()
|
||||
.filter(s -> (s.getExpiryBeginDate() == null && s.getExpiryEndDate() == null)).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(personLongTerm)) {
|
||||
passIntervals.add("长期");
|
||||
} else {
|
||||
Collections.sort(imageStorePersonList,
|
||||
(t1, t2) -> t1.getExpiryBeginDate().compareTo(t2.getExpiryEndDate()));
|
||||
for (int i = 0; i < imageStorePersonList.size() - 1; i++) {
|
||||
int j = i + 1;
|
||||
if (((ImageStorePersonResult)imageStorePersonList.get(i)).getExpiryEndDate()
|
||||
.longValue() >= ((ImageStorePersonResult)imageStorePersonList.get(j)).getExpiryBeginDate()
|
||||
.longValue()) {
|
||||
if (((ImageStorePersonResult)imageStorePersonList.get(i)).getExpiryEndDate()
|
||||
.longValue() >= ((ImageStorePersonResult)imageStorePersonList.get(j)).getExpiryEndDate()
|
||||
.longValue()) {
|
||||
imageStorePersonList.set(j, imageStorePersonList.get(i));
|
||||
} else {
|
||||
((ImageStorePersonResult)imageStorePersonList.get(j)).setExpiryBeginDate(
|
||||
((ImageStorePersonResult)imageStorePersonList.get(i)).getExpiryBeginDate());
|
||||
}
|
||||
imageStorePersonList.set(i, (ImageStorePersonResult)null);
|
||||
}
|
||||
}
|
||||
List<ImageStorePersonResult> personTimeMergeList = (List<ImageStorePersonResult>)imageStorePersonList
|
||||
.stream().filter(s -> (s != null)).collect(Collectors.toList());
|
||||
for (ImageStorePersonResult personTimeMerge : personTimeMergeList) {
|
||||
String beginDate = DateUtils.parseDate(new Date(personTimeMerge.getExpiryBeginDate().longValue()),
|
||||
"yyyy-MM-dd HH:mm:ss");
|
||||
String endDate = DateUtils.parseDate(new Date(personTimeMerge.getExpiryEndDate().longValue()),
|
||||
"yyyy-MM-dd HH:mm:ss");
|
||||
passIntervals.add(beginDate + " 至 " + endDate);
|
||||
}
|
||||
}
|
||||
return passIntervals;
|
||||
}
|
||||
|
||||
private void covertPageResult(List<AcsPersonResult> result, Collection<ImageStorePersonResult> datas,
|
||||
Map<String, AcsPassRuleResult> ruleMap, CloudwalkCallContext context) throws ServiceException {
|
||||
List<String> personIds =
|
||||
(List<String>)datas.stream().map(ImageStorePersonResult::getPersonId).collect(Collectors.toList());
|
||||
Map<String, PersonResult> personIcCardMap = getPersonIcCardByIds(personIds, context);
|
||||
for (ImageStorePersonResult data : datas) {
|
||||
AcsPassRuleResult rule = null;
|
||||
AcsPersonResult acsPersonResult = new AcsPersonResult();
|
||||
if (ruleMap != null && ruleMap.get(data.getImageStoreId()) != null) {
|
||||
rule = ruleMap.get(data.getImageStoreId());
|
||||
acsPersonResult.setRuleName(rule.getRuleName());
|
||||
acsPersonResult.setRuleId(rule.getId());
|
||||
}
|
||||
BeanCopyUtils.copyProperties(data, acsPersonResult);
|
||||
acsPersonResult.setPersonName(data.getName());
|
||||
acsPersonResult.setStartTime(data.getExpiryBeginDate());
|
||||
acsPersonResult.setEndTime(data.getExpiryEndDate());
|
||||
acsPersonResult.setPassType(AcsPassTypeEnum.LONG_TIME.getCode());
|
||||
if (data.getExpiryBeginDate() != null || data.getExpiryEndDate() != null) {
|
||||
acsPersonResult.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode());
|
||||
}
|
||||
if (personIcCardMap != null && personIcCardMap.get(data.getPersonId()) != null) {
|
||||
acsPersonResult.setIcCardNo(((PersonResult)personIcCardMap.get(data.getPersonId())).getIcCardNo());
|
||||
}
|
||||
result.add(acsPersonResult);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, PersonResult> getPersonIcCardByIds(List<String> personIds, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
Map<String, PersonResult> personIcCardMap = null;
|
||||
PersonQueryParam param = new PersonQueryParam();
|
||||
param.setIds(personIds);
|
||||
CloudwalkResult<List<PersonResult>> personResult = this.personService.list(param, context);
|
||||
List<PersonResult> personList = (List<PersonResult>)personResult.getData();
|
||||
if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) {
|
||||
personIcCardMap = (Map<String, PersonResult>)personList.stream()
|
||||
.collect(Collectors.toMap(CloudwalkBaseIdentify::getId, pr -> pr));
|
||||
}
|
||||
return personIcCardMap;
|
||||
}
|
||||
|
||||
private List<String> getPersonIdsByName(String personName, CloudwalkCallContext context) throws ServiceException {
|
||||
List<String> personIdsByName = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(personName)) {
|
||||
PersonQueryParam personQueryParam = new PersonQueryParam();
|
||||
personQueryParam.setName(personName);
|
||||
CloudwalkResult<List<PersonResult>> personResult = this.personService.list(personQueryParam, context);
|
||||
List<PersonResult> personList = (List<PersonResult>)personResult.getData();
|
||||
if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) {
|
||||
personIdsByName =
|
||||
(List<String>)personList.stream().map(CloudwalkBaseIdentify::getId).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
return personIdsByName;
|
||||
}
|
||||
|
||||
private List<AcsPassRuleResult> getRuleListByZoneId(String zoneId, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
AcsPassRuleQueryParam param = new AcsPassRuleQueryParam();
|
||||
param.setZoneId(zoneId);
|
||||
CloudwalkResult<List<AcsPassRuleResult>> ruleResult = this.acsPassRuleService.list(param, context);
|
||||
if (!ruleResult.isSuccess()) {
|
||||
this.logger.error("查询通行规则失败,原因:[{}]", ruleResult.getMessage());
|
||||
throw new ServiceException("76260508", ruleResult.getMessage());
|
||||
}
|
||||
return (List<AcsPassRuleResult>)ruleResult.getData();
|
||||
}
|
||||
|
||||
private String getAcsImageStore(String zoneId, CloudwalkCallContext context) throws ServiceException {
|
||||
AcsPassRuleIsDefaultParam param = new AcsPassRuleIsDefaultParam();
|
||||
param.setZoneId(zoneId);
|
||||
CloudwalkResult<String> imageStore = this.acsPassRuleService.getIsDefaultByZoneId(param, context);
|
||||
if (imageStore.isSuccess()) {
|
||||
if (imageStore.getData() != null) {
|
||||
return (String)imageStore.getData();
|
||||
}
|
||||
throw new ServiceException("默认规则绑定的图库不存在");
|
||||
}
|
||||
throw new ServiceException(imageStore.getCode(), imageStore.getMessage());
|
||||
}
|
||||
|
||||
private void checkPersonIdByImageStore(String personId, String acsImageStoreId, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam();
|
||||
imageStorePersonQueryParam.setPersonId(personId);
|
||||
imageStorePersonQueryParam.setImageStoreId(acsImageStoreId);
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> imageStorePersonResult =
|
||||
this.imageStorePersonService.page(imageStorePersonQueryParam, context);
|
||||
if (imageStorePersonResult.isSuccess()) {
|
||||
if (imageStorePersonResult.getData() == null
|
||||
|| CollectionUtils.isEmpty(((CloudwalkPageAble)imageStorePersonResult.getData()).getDatas())) {
|
||||
throw new ServiceException("该人员未绑定门禁图库,人员id为:" + personId);
|
||||
}
|
||||
} else {
|
||||
throw new ServiceException(imageStorePersonResult.getCode(), imageStorePersonResult.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private List<DeviceImageStoreResult> getDeviceImageStore(String deviceId, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
DeviceImageStoreQueryParam deviceImageStoreQueryParam = new DeviceImageStoreQueryParam();
|
||||
deviceImageStoreQueryParam.setDeviceId(deviceId);
|
||||
CloudwalkResult<List<DeviceImageStoreResult>> imageStoreResult =
|
||||
this.deviceImageStoreService.list(deviceImageStoreQueryParam, context);
|
||||
if (imageStoreResult.isSuccess()) {
|
||||
if (CollectionUtils.isNotEmpty((Collection)imageStoreResult.getData())) {
|
||||
return (List<DeviceImageStoreResult>)imageStoreResult.getData();
|
||||
}
|
||||
throw new ServiceException("该设备未绑定图库");
|
||||
}
|
||||
throw new ServiceException(imageStoreResult.getCode(), imageStoreResult.getMessage());
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> pageByApp(AcsPersonQueryByAppParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException {
|
||||
List<String> personIds = null;
|
||||
List<AcsPersonResult> result = new ArrayList<>();
|
||||
List<ImageStoreListResult> imageStoreResult =
|
||||
getImageStoreIdsByAppAndDevice(param.getApplicationId(), param.getDeviceId(), context);
|
||||
List<String> imageStoreIds =
|
||||
(List<String>)imageStoreResult.stream().map(ImageStoreListResult::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(imageStoreIds)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
if (!StringUtils.isEmpty(param.getPersonName())) {
|
||||
personIds = getPersonIdsByName(param.getPersonName(), context);
|
||||
if (CollectionUtils.isEmpty(personIds)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
}
|
||||
CloudwalkPageAble<ImageStorePersonResult> pageResult =
|
||||
getAppImageStorePerson(imageStoreIds, personIds, pageInfo, context);
|
||||
if (!CollectionUtils.isEmpty(pageResult.getDatas())) {
|
||||
covertPageResult(result, pageResult.getDatas(), (Map<String, AcsPassRuleResult>)null, context);
|
||||
}
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, pageResult.getTotalRows()));
|
||||
}
|
||||
|
||||
private CloudwalkPageAble<ImageStorePersonResult> getAppImageStorePerson(List<String> imageStoreIds,
|
||||
List<String> personIds, CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStorePersonQueryParam param = new ImageStorePersonQueryParam();
|
||||
param.setImageStoreIds(imageStoreIds);
|
||||
param.setPersonIds(personIds);
|
||||
param.setCurrentPage(pageInfo.getCurrentPage());
|
||||
param.setRowsOfPage(pageInfo.getPageSize());
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> pageResult =
|
||||
this.imageStorePersonService.page(param, context);
|
||||
if (!pageResult.isSuccess()) {
|
||||
this.logger.error("远程调用查询图库人员失败,原因:[{}]", pageResult.getMessage());
|
||||
throw new ServiceException(pageResult.getCode(), pageResult.getMessage());
|
||||
}
|
||||
return (CloudwalkPageAble<ImageStorePersonResult>)pageResult.getData();
|
||||
}
|
||||
|
||||
private List<AcsPassRuleResultDto> getRuleByImageStoreIds(List<String> imageStoreIds, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
try {
|
||||
AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto();
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setImageStoreIds(imageStoreIds);
|
||||
return this.acsPassRuleDao.list(dto);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("查询通行规则失败");
|
||||
throw new ServiceException("76260508", getMessage("76260508"));
|
||||
}
|
||||
}
|
||||
|
||||
private List<ImageStorePersonResult> getPersonImageStore(String personId, List<String> imageStoreIds,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
ImageStorePersonQueryParam param = new ImageStorePersonQueryParam();
|
||||
param.setImageStoreIds(imageStoreIds);
|
||||
param.setPersonId(personId);
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> imageStorePersonResult =
|
||||
this.imageStorePersonService.page(param, context);
|
||||
if (!imageStorePersonResult.isSuccess()) {
|
||||
throw new ServiceException(imageStorePersonResult.getCode(), imageStorePersonResult.getMessage());
|
||||
}
|
||||
return (List<ImageStorePersonResult>)((CloudwalkPageAble)imageStorePersonResult.getData()).getDatas();
|
||||
}
|
||||
}
|
||||
+611
@@ -0,0 +1,611 @@
|
||||
package cn.cloudwalk.elevator.person.impl;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam;
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult;
|
||||
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.entity.CloudwalkBaseIdentify;
|
||||
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.AcsElevatorDeviceResultDTO;
|
||||
import cn.cloudwalk.elevator.em.AcsPassTypeEnum;
|
||||
import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto;
|
||||
import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto;
|
||||
import cn.cloudwalk.elevator.passrule.impl.AbstractAcsPassService;
|
||||
import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult;
|
||||
import cn.cloudwalk.elevator.person.dao.TenantVisitorFloorPolicyDao;
|
||||
import cn.cloudwalk.elevator.person.dto.TenantVisitorFloorPolicyDto;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddVisitorParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonEditParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam;
|
||||
import cn.cloudwalk.elevator.person.param.PersonDetailQueryParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult;
|
||||
import cn.cloudwalk.elevator.person.service.PersonRuleService;
|
||||
import cn.cloudwalk.elevator.util.CollectionUtils;
|
||||
import cn.cloudwalk.elevator.util.StringUtils;
|
||||
import cn.cloudwalk.elevator.zone.param.ZoneQueryParam;
|
||||
import cn.cloudwalk.elevator.zone.result.ZoneResult;
|
||||
import cn.cloudwalk.elevator.zone.service.ZoneService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
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 PersonRuleServiceImpl extends AbstractAcsPassService implements PersonRuleService {
|
||||
@Resource
|
||||
private ImageRuleRefDao imageRuleRefDao;
|
||||
@Resource
|
||||
private DeviceImageStoreDao deviceImageStoreDao;
|
||||
@Autowired
|
||||
private ImageStorePersonService imageStorePersonService;
|
||||
@Autowired
|
||||
private PersonService personService;
|
||||
@Resource
|
||||
private AcsElevatorDeviceDao acsElevatorDeviceDao;
|
||||
@Resource
|
||||
private ZoneService zoneService;
|
||||
@Resource
|
||||
private TenantVisitorFloorPolicyDao tenantVisitorFloorPolicyDao;
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
|
||||
public CloudwalkResult<Boolean> add(AcsPersonAddParam param, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("从现有人员添加通行人员开始,AcsPersonAddParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(param), JSONObject.toJSONString(context));
|
||||
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"));
|
||||
}
|
||||
ImageRuleRefResultDto defaultRule = this.imageRuleRefDao.getDefaultByZoneId(param.getZoneId());
|
||||
if (ObjectUtils.isEmpty(defaultRule)) {
|
||||
ImageRuleRefAddDto dto = new ImageRuleRefAddDto();
|
||||
dto.setId(genUUID());
|
||||
dto.setBusinessId(context.getCompany().getCompanyId());
|
||||
dto.setName("默认规则");
|
||||
dto.setZoneId(param.getZoneId());
|
||||
dto.setZoneName(param.getZoneName());
|
||||
dto.setIsDefault(Integer.valueOf(1));
|
||||
dto.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
dto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
this.imageRuleRefDao.insert(dto);
|
||||
defaultRule = this.imageRuleRefDao.getDefaultByZoneId(param.getZoneId());
|
||||
}
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
ImageStorePersonQueryParam queryParam = new ImageStorePersonQueryParam();
|
||||
queryParam.setImageStoreId(imageStoreId);
|
||||
queryParam.setPersonIds(param.getPersonIds());
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> personPage =
|
||||
this.imageStorePersonService.page(queryParam, context);
|
||||
List<String> personPageIds = new ArrayList<>();
|
||||
CloudwalkPageAble<ImageStorePersonResult> personPageData = personPage.getData();
|
||||
if (personPageData != null && !CollectionUtils.isEmpty(personPageData.getDatas())) {
|
||||
for (ImageStorePersonResult imgPerson : personPageData.getDatas()) {
|
||||
personPageIds.add(imgPerson.getPersonId());
|
||||
}
|
||||
}
|
||||
List<String> bindPersonIds = new ArrayList<>();
|
||||
for (String personId : param.getPersonIds()) {
|
||||
if (!personPageIds.contains(personId)) {
|
||||
bindPersonIds.add(personId);
|
||||
}
|
||||
ImageRuleRefResultDto del = this.imageRuleRefDao.getDelByPersonIdAndZoneId(personId, param.getZoneId());
|
||||
if (ObjectUtils.isEmpty(del)) {
|
||||
ImageRuleRefAddDto addDto = new ImageRuleRefAddDto();
|
||||
addDto.setId(genUUID());
|
||||
addDto.setBusinessId(context.getCompany().getCompanyId());
|
||||
addDto.setPersonId(personId);
|
||||
addDto.setParentRule(defaultRule.getId());
|
||||
addDto.setName(defaultRule.getName());
|
||||
addDto.setZoneId(param.getZoneId());
|
||||
addDto.setZoneName(defaultRule.getZoneName());
|
||||
addDto.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
addDto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
addDto.setPersonDelete(Integer.valueOf(0));
|
||||
this.imageRuleRefDao.insert(addDto);
|
||||
}
|
||||
}
|
||||
this.imageRuleRefDao.deleteByPersonIdsIsDel(param.getPersonIds(), param.getZoneId());
|
||||
if (!CollectionUtils.isEmpty(bindPersonIds)) {
|
||||
ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam();
|
||||
imageStorePersonBindParam.setImageStoreId(imageStoreId);
|
||||
imageStorePersonBindParam.setPersonIds(bindPersonIds);
|
||||
imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true));
|
||||
this.logger.info("远程调用绑定人员图库开始,imageStorePersonBindParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context));
|
||||
CloudwalkResult<ImgStoreBatchBindPersonResult> bindResult =
|
||||
this.imageStorePersonService.batchBind(imageStorePersonBindParam, context);
|
||||
if (!bindResult.isSuccess()) {
|
||||
this.logger.error("远程调用绑定人员图库异常,原因:[{}],失败人员id:[{}]", bindResult.getMessage(), bindPersonIds);
|
||||
return CloudwalkResult.fail(bindResult.getCode(), bindResult.getMessage());
|
||||
}
|
||||
}
|
||||
UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam();
|
||||
refParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
refParam.setPersonIds(param.getPersonIds());
|
||||
refParam.setImageStoreId(imageStoreId);
|
||||
this.imageStorePersonService.updateGroupPersonRef(refParam, context);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("添加通行人员失败,原因:[{}]", (Throwable)e);
|
||||
throw new ServiceException("76260521", getMessage("76260521"));
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
@CloudwalkParamsValidate
|
||||
public CloudwalkResult<Boolean> addVisitor(AcsPersonAddVisitorParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
this.logger.info("根据被访人添加访客派梯权限开始,AcsPersonAddVisitorParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(param), JSONObject.toJSONString(context));
|
||||
try {
|
||||
boolean callerProvidedFloors = !CollectionUtils.isEmpty(param.getFloorIds());
|
||||
if (!callerProvidedFloors) {
|
||||
PersonDetailParam detailParam = new PersonDetailParam();
|
||||
detailParam.setId(param.getPersonId());
|
||||
detailParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
CloudwalkResult<PersonResult> detail = this.personService.detail(detailParam, context);
|
||||
if (detail == null || !detail.isSuccess()) {
|
||||
String code = detail != null ? detail.getCode() : "76260531";
|
||||
String msg = detail != null ? detail.getMessage() : getMessage("76260531");
|
||||
return CloudwalkResult.fail(code, msg);
|
||||
}
|
||||
PersonResult personResult = (PersonResult)detail.getData();
|
||||
if (personResult == null) {
|
||||
return CloudwalkResult.fail("76260531", getMessage("76260531"));
|
||||
}
|
||||
List<String> hostFloors = personResult.getFloorList();
|
||||
if (CollectionUtils.isEmpty(hostFloors)) {
|
||||
return CloudwalkResult.fail("76260531", getMessage("76260531"));
|
||||
}
|
||||
List<String> effectiveFloors = hostFloors;
|
||||
TenantVisitorFloorPolicyDto policy =
|
||||
this.tenantVisitorFloorPolicyDao.selectEnabledTenantDefault(context.getCompany().getCompanyId());
|
||||
if (policy != null && policy.getEnabled() != null && policy.getEnabled().intValue() == 1) {
|
||||
List<String> allow = parseAllowZoneIds(policy.getAllowZoneIds());
|
||||
if (!CollectionUtils.isEmpty(allow)) {
|
||||
Set<String> allowSet = new HashSet<>(allow);
|
||||
List<String> intersected = intersectPreserveHostOrder(hostFloors, allowSet);
|
||||
if (intersected.isEmpty()) {
|
||||
return CloudwalkResult.fail("76260532", getMessage("76260532"));
|
||||
}
|
||||
effectiveFloors = intersected;
|
||||
this.logger.info(
|
||||
"租户访客楼层策略求交 businessId={} personId={} visitorId={} policyId={} policyVersion={} effectiveSize={}",
|
||||
context.getCompany().getCompanyId(), param.getPersonId(), param.getVisitorId(),
|
||||
policy.getId(), policy.getPolicyVersion(), Integer.valueOf(intersected.size()));
|
||||
}
|
||||
}
|
||||
param.setFloorIds(effectiveFloors);
|
||||
}
|
||||
if (CollectionUtils.isEmpty(param.getFloorIds())) {
|
||||
return CloudwalkResult.fail("76260531", getMessage("76260531"));
|
||||
}
|
||||
ZoneQueryParam zoneQueryParam = new ZoneQueryParam();
|
||||
zoneQueryParam.setId(param.getFloorIds().get(0));
|
||||
zoneQueryParam.setRowsOfPage(10);
|
||||
zoneQueryParam.setCurrentPage(1);
|
||||
CloudwalkResult<CloudwalkPageAble<ZoneResult>> zonePage = this.zoneService.page(zoneQueryParam, context);
|
||||
List<ZoneResult> zoneResults = (List<ZoneResult>)((CloudwalkPageAble)zonePage.getData()).getDatas();
|
||||
String imageStoreId =
|
||||
this.deviceImageStoreDao.getByBuildingId(((ZoneResult)zoneResults.get(0)).getParentId());
|
||||
List<ImageRuleRefAddDto> insertList = new ArrayList<>();
|
||||
for (String floorId : param.getFloorIds()) {
|
||||
ImageRuleRefResultDto defaultRule = this.imageRuleRefDao.getDefaultByZoneId(floorId);
|
||||
ImageRuleRefAddDto addDto = new ImageRuleRefAddDto();
|
||||
addDto.setId(genUUID());
|
||||
addDto.setBusinessId(context.getCompany().getCompanyId());
|
||||
addDto.setPersonId(param.getVisitorId());
|
||||
addDto.setParentRule(defaultRule.getId());
|
||||
addDto.setName(defaultRule.getName());
|
||||
addDto.setZoneId(defaultRule.getZoneId());
|
||||
addDto.setZoneName(defaultRule.getZoneName());
|
||||
addDto.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
addDto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
addDto.setPersonDelete(Integer.valueOf(0));
|
||||
insertList.add(addDto);
|
||||
}
|
||||
this.logger.info("访客添加派梯权限开始,数据为=[{}]", JSONObject.toJSONString(insertList));
|
||||
if (!CollectionUtils.isEmpty(insertList)) {
|
||||
this.imageRuleRefDao.insertList(insertList);
|
||||
}
|
||||
ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam();
|
||||
imageStorePersonBindParam.setImageStoreId(imageStoreId);
|
||||
imageStorePersonBindParam.setPersonIds(Collections.singletonList(param.getVisitorId()));
|
||||
imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true));
|
||||
imageStorePersonBindParam.setExpiryBeginDate(param.getBegVisitorTime());
|
||||
imageStorePersonBindParam.setExpiryEndDate(param.getEndVisitorTime());
|
||||
this.logger.info("远程调用绑定人员图库开始,imageStorePersonBindParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context));
|
||||
CloudwalkResult<ImgStoreBatchBindPersonResult> bindResult =
|
||||
this.imageStorePersonService.batchBind(imageStorePersonBindParam, context);
|
||||
if (!bindResult.isSuccess()) {
|
||||
this.logger.error("远程调用绑定人员图库异常,原因:[{}],失败人员id:[{}]", bindResult.getMessage(), param.getVisitorId());
|
||||
return CloudwalkResult.fail(bindResult.getCode(), bindResult.getMessage());
|
||||
}
|
||||
UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam();
|
||||
refParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
refParam.setPersonIds(Collections.singletonList(param.getVisitorId()));
|
||||
refParam.setImageStoreId(imageStoreId);
|
||||
this.imageStorePersonService.updateGroupPersonRef(refParam, context);
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
this.logger.error("根据被访人添加访客派梯权限失败,原因:[{}]", e);
|
||||
throw new ServiceException("76260530", getMessage("76260530"));
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析 allow_zone_ids JSON;无效或空则返回空列表(等同未配置有效策略)。
|
||||
*/
|
||||
private List<String> parseAllowZoneIds(String json) {
|
||||
if (StringUtils.isBlank(json)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
try {
|
||||
List<String> list = JSON.parseArray(json, String.class);
|
||||
if (list == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return list.stream().filter(Objects::nonNull).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
||||
} catch (Exception e) {
|
||||
this.logger.warn("allow_zone_ids JSON 无效,按无策略处理: {}", e.getMessage());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
private static List<String> intersectPreserveHostOrder(List<String> hostFloors, Set<String> allowSet) {
|
||||
return hostFloors.stream().filter(allowSet::contains).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public CloudwalkResult<Boolean> edit(AcsPersonEditParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
return CloudwalkResult.fail("76260998", "人员规则编辑接口未实现");
|
||||
}
|
||||
|
||||
public CloudwalkResult<Boolean> delete(AcsPersonDeleteParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
this.logger.info("从现有人员删除通行人员开始,AcsPersonDeleteParam=[{}], CloudwalkCallContext=[{}]",
|
||||
JSONObject.toJSONString(param), JSONObject.toJSONString(context));
|
||||
try {
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
for (String personId : param.getPersonIds()) {
|
||||
ImageRuleRefResultDto rule =
|
||||
this.imageRuleRefDao.getByPersonIdAndZoneId(Collections.singletonList(personId), param.getZoneId());
|
||||
if (!ObjectUtils.isEmpty(rule)) {
|
||||
this.imageRuleRefDao.deleteByPersonId(personId, param.getZoneId());
|
||||
continue;
|
||||
}
|
||||
ImageRuleRefAddDto addDto = new ImageRuleRefAddDto();
|
||||
addDto.setId(genUUID());
|
||||
addDto.setBusinessId(context.getCompany().getCompanyId());
|
||||
addDto.setPersonId(personId);
|
||||
addDto.setZoneId(param.getZoneId());
|
||||
addDto.setPersonDelete(Integer.valueOf(1));
|
||||
addDto.setCreateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
addDto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis()));
|
||||
this.imageRuleRefDao.insert(addDto);
|
||||
}
|
||||
UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam();
|
||||
refParam.setBusinessId(context.getCompany().getCompanyId());
|
||||
refParam.setPersonIds(param.getPersonIds());
|
||||
refParam.setImageStoreId(imageStoreId);
|
||||
this.imageStorePersonService.updateGroupPersonRef(refParam, context);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("删除通行人员失败,原因:[{}]", (Throwable)e);
|
||||
throw new ServiceException("76260523", getMessage("76260523"));
|
||||
}
|
||||
return CloudwalkResult.success(Boolean.valueOf(true));
|
||||
}
|
||||
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page(AcsPersonQueryParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException {
|
||||
this.logger.info("分页查询通行人员开始,AcsPersonQueryParam=[{}], CloudwalkPageInfo=[{}], CloudwalkCallContext=[{}]",
|
||||
new Object[] {JSONObject.toJSONString(param), JSONObject.toJSONString(pageInfo),
|
||||
JSONObject.toJSONString(context)});
|
||||
try {
|
||||
List<AcsPersonResult> result = new ArrayList<>();
|
||||
List<String> personIds = null;
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
if (ObjectUtils.isEmpty(imageStoreId)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
param.setImageStoreId(imageStoreId);
|
||||
List<String> parentRuleList = this.imageRuleRefDao.listRuleByZoneIdExtDefault(param.getZoneId());
|
||||
List<String> personIdList = this.imageRuleRefDao.countPersonIdByZoneId(param.getZoneId());
|
||||
if (CollectionUtils.isEmpty(parentRuleList) && CollectionUtils.isEmpty(personIdList)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
param.setPersonIds(personIdList);
|
||||
if (!CollectionUtils.isEmpty(parentRuleList)) {
|
||||
List<String> includeLabels = new ArrayList<>();
|
||||
List<String> includeOrganizations = new ArrayList<>();
|
||||
List<ImageRuleRefResultDto> child = this.imageRuleRefDao.listByParentRule(parentRuleList);
|
||||
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());
|
||||
}
|
||||
}
|
||||
} else if (CollectionUtils.isEmpty(personIdList)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
List<String> elevatorIncludeLabels = new ArrayList<>();
|
||||
List<String> elevatorOrganizations = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(param.getLabelIds())) {
|
||||
for (String labelId : param.getLabelIds()) {
|
||||
if (!includeLabels.contains(labelId)) {
|
||||
elevatorIncludeLabels.add(labelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(param.getOrganizationIds())) {
|
||||
for (String orgId : param.getOrganizationIds()) {
|
||||
if (!includeOrganizations.contains(orgId)) {
|
||||
elevatorOrganizations.add(orgId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(elevatorIncludeLabels)) {
|
||||
param.setElevatorLabelIds(elevatorIncludeLabels);
|
||||
}
|
||||
param.setLabelIds(includeLabels);
|
||||
if (!CollectionUtils.isEmpty(elevatorOrganizations)) {
|
||||
param.setElevatorOrganizationIds(elevatorOrganizations);
|
||||
}
|
||||
param.setOrganizationIds(includeOrganizations);
|
||||
List<String> delPersonIds = this.imageRuleRefDao.listPersonDelByZoneId(param.getZoneId());
|
||||
param.setDelPersonIds(delPersonIds);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(param.getElevatorLabelIds())
|
||||
|| !CollectionUtils.isEmpty(param.getElevatorOrganizationIds())) {
|
||||
param.setIsElevator(Integer.valueOf(0));
|
||||
} else if (!CollectionUtils.isEmpty(param.getLabelIds())
|
||||
&& !CollectionUtils.isEmpty(param.getOrganizationIds())) {
|
||||
param.setIsElevator(Integer.valueOf(3));
|
||||
param.setElevatorLabelIds(param.getLabelIds());
|
||||
param.setElevatorOrganizationIds(param.getOrganizationIds());
|
||||
} else if (!CollectionUtils.isEmpty(param.getOrganizationIds())) {
|
||||
param.setIsElevator(Integer.valueOf(1));
|
||||
param.setElevatorOrganizationIds(param.getOrganizationIds());
|
||||
} else if (!CollectionUtils.isEmpty(param.getLabelIds())) {
|
||||
param.setIsElevator(Integer.valueOf(2));
|
||||
param.setElevatorLabelIds(param.getLabelIds());
|
||||
}
|
||||
if (!StringUtils.isEmpty(param.getPersonName())) {
|
||||
personIds = getPersonIdsByName(param, context);
|
||||
if (!CollectionUtils.isEmpty(param.getDelPersonIds()) && !CollectionUtils.isEmpty(personIds)) {
|
||||
List<String> newPersonIds = new ArrayList<>();
|
||||
for (int i = 0; i < personIds.size(); i++) {
|
||||
if (!param.getDelPersonIds().contains(personIds.get(i))) {
|
||||
newPersonIds.add(personIds.get(i));
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(newPersonIds)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
personIds.clear();
|
||||
personIds.addAll(newPersonIds);
|
||||
}
|
||||
if (CollectionUtils.isEmpty(personIds)) {
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L));
|
||||
}
|
||||
}
|
||||
CloudwalkPageAble<ImageStorePersonResult> pageResult =
|
||||
getImageStorePerson(param, pageInfo, context, imageStoreId, personIds);
|
||||
if (!CollectionUtils.isEmpty(pageResult.getDatas())) {
|
||||
covertPageResult(result, pageResult.getDatas(), context);
|
||||
}
|
||||
return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, pageResult.getTotalRows()));
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("分页查询通行人员失败", (Throwable)e);
|
||||
throw new ServiceException("76260528", getMessage("76260528"));
|
||||
}
|
||||
}
|
||||
|
||||
public CloudwalkResult<AcsPersonTimeDetailResult> timeDetail(AcsPersonTimeDetailParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
return CloudwalkResult.fail("76260998", "人员时段详情接口未实现");
|
||||
}
|
||||
|
||||
public CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> pageByApp(AcsPersonQueryByAppParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException {
|
||||
return CloudwalkResult.fail("76260998", "应用端人员分页接口未实现");
|
||||
}
|
||||
|
||||
public CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>> personDetail(PersonDetailQueryParam param,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId());
|
||||
List<ImageRuleRefResultDto> resultDtos =
|
||||
this.imageRuleRefDao.listByParentRule(Collections.singletonList(param.getRuleId()));
|
||||
try {
|
||||
List<String> delPersonIds = this.imageRuleRefDao.listPersonDelByZoneId(param.getZoneId());
|
||||
if (CollectionUtils.isEmpty(resultDtos)) {
|
||||
return CloudwalkResult.success(null);
|
||||
}
|
||||
List<String> personIds = new ArrayList<>();
|
||||
List<String> labelIds = new ArrayList<>();
|
||||
List<String> orgIds = new ArrayList<>();
|
||||
for (ImageRuleRefResultDto dto : resultDtos) {
|
||||
if (!ObjectUtils.isEmpty(dto.getPersonId())) {
|
||||
personIds.add(dto.getPersonId());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(dto.getIncludeLabels())) {
|
||||
labelIds.add(dto.getIncludeLabels());
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(dto.getIncludeOrganizations())) {
|
||||
orgIds.add(dto.getIncludeOrganizations());
|
||||
}
|
||||
}
|
||||
ImageStorePersonQueryParam queryParam = new ImageStorePersonQueryParam();
|
||||
queryParam.setImageStoreId(imageStoreId);
|
||||
queryParam.setName(param.getPersonName());
|
||||
queryParam.setPersonIds(personIds);
|
||||
queryParam.setLabelIds(labelIds);
|
||||
queryParam.setOrganizationIds(orgIds);
|
||||
queryParam.setDelPersonIds(delPersonIds);
|
||||
queryParam.setIsElevator(Integer.valueOf(0));
|
||||
queryParam.setRowsOfPage(param.getRowsOfPage());
|
||||
queryParam.setCurrentPage(param.getCurrentPage());
|
||||
return this.imageStorePersonService.page(queryParam, context);
|
||||
} catch (DataAccessException e) {
|
||||
this.logger.error("分页查询通行人员失败", (Throwable)e);
|
||||
throw new ServiceException("76260528", getMessage("76260528"));
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getPersonIdsByName(AcsPersonQueryParam param, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
List<String> personIdsByName = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(param.getPersonName())) {
|
||||
PersonQueryParam personQueryParam = new PersonQueryParam();
|
||||
personQueryParam.setName(param.getPersonName());
|
||||
personQueryParam.setIds(param.getPersonIds());
|
||||
personQueryParam.setLabelIds(param.getElevatorLabelIds());
|
||||
personQueryParam.setOrganizationIds(param.getElevatorOrganizationIds());
|
||||
personQueryParam.setIsElevator(param.getIsElevator());
|
||||
CloudwalkResult<List<PersonResult>> personResult = this.personService.list(personQueryParam, context);
|
||||
List<PersonResult> personList = (List<PersonResult>)personResult.getData();
|
||||
if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) {
|
||||
List<PersonResult> newPersonList = new ArrayList<>();
|
||||
for (PersonResult result : personList) {
|
||||
if (param.getPersonIds().contains(result.getId())) {
|
||||
newPersonList.add(result);
|
||||
continue;
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(result.getOrganizationIds())) {
|
||||
for (String orgId : result.getOrganizationIds()) {
|
||||
if (!CollectionUtils.isEmpty(param.getOrganizationIds())
|
||||
&& param.getOrganizationIds().contains(orgId))
|
||||
newPersonList.add(result);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(result.getLabelIds())) {
|
||||
for (String labelId : result.getLabelIds()) {
|
||||
if (!CollectionUtils.isEmpty(param.getLabelIds())
|
||||
&& param.getLabelIds().contains(labelId)) {
|
||||
newPersonList.add(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(newPersonList)) {
|
||||
personIdsByName = (List<String>)newPersonList.stream().map(CloudwalkBaseIdentify::getId)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
return personIdsByName;
|
||||
}
|
||||
|
||||
private CloudwalkPageAble<ImageStorePersonResult> getImageStorePerson(AcsPersonQueryParam param,
|
||||
CloudwalkPageInfo pageInfo, CloudwalkCallContext context, String imageStoreId, List<String> personIds)
|
||||
throws ServiceException {
|
||||
CloudwalkPageAble<ImageStorePersonResult> results = new CloudwalkPageAble();
|
||||
ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam();
|
||||
imageStorePersonQueryParam.setImageStoreId(imageStoreId);
|
||||
if (!CollectionUtils.isEmpty(personIds)) {
|
||||
imageStorePersonQueryParam.setPersonIds(personIds);
|
||||
imageStorePersonQueryParam.setIsElevator(Integer.valueOf(4));
|
||||
} else {
|
||||
imageStorePersonQueryParam.setPersonIds(param.getPersonIds());
|
||||
imageStorePersonQueryParam.setOrganizationIds(param.getElevatorOrganizationIds());
|
||||
imageStorePersonQueryParam.setLabelIds(param.getElevatorLabelIds());
|
||||
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 void covertPageResult(List<AcsPersonResult> result, Collection<ImageStorePersonResult> datas,
|
||||
CloudwalkCallContext context) throws ServiceException {
|
||||
List<String> personIds =
|
||||
(List<String>)datas.stream().map(ImageStorePersonResult::getPersonId).collect(Collectors.toList());
|
||||
Map<String, PersonResult> personIcCardMap = getPersonIcCardByIds(personIds, context);
|
||||
for (ImageStorePersonResult data : datas) {
|
||||
AcsPassRuleResult rule = null;
|
||||
AcsPersonResult acsPersonResult = new AcsPersonResult();
|
||||
BeanCopyUtils.copyProperties(data, acsPersonResult);
|
||||
acsPersonResult.setPersonName(data.getName());
|
||||
acsPersonResult.setStartTime(data.getExpiryBeginDate());
|
||||
acsPersonResult.setEndTime(data.getExpiryEndDate());
|
||||
acsPersonResult.setPassType(AcsPassTypeEnum.LONG_TIME.getCode());
|
||||
if (data.getExpiryBeginDate() != null || data.getExpiryEndDate() != null) {
|
||||
acsPersonResult.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode());
|
||||
}
|
||||
if (personIcCardMap != null && personIcCardMap.get(data.getPersonId()) != null) {
|
||||
acsPersonResult.setIcCardNo(((PersonResult)personIcCardMap.get(data.getPersonId())).getIcCardNo());
|
||||
}
|
||||
result.add(acsPersonResult);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, PersonResult> getPersonIcCardByIds(List<String> personIds, CloudwalkCallContext context)
|
||||
throws ServiceException {
|
||||
Map<String, PersonResult> personIcCardMap = null;
|
||||
PersonQueryParam param = new PersonQueryParam();
|
||||
param.setIds(personIds);
|
||||
CloudwalkResult<List<PersonResult>> personResult = this.personService.list(param, context);
|
||||
List<PersonResult> personList = (List<PersonResult>)personResult.getData();
|
||||
if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) {
|
||||
personIcCardMap = (Map<String, PersonResult>)personList.stream()
|
||||
.collect(Collectors.toMap(CloudwalkBaseIdentify::getId, pr -> pr));
|
||||
}
|
||||
return personIcCardMap;
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package cn.cloudwalk.elevator.person.impl;
|
||||
|
||||
import cn.cloudwalk.elevator.person.dao.TenantVisitorFloorPolicyDao;
|
||||
import cn.cloudwalk.elevator.person.dto.TenantVisitorFloorPolicyDto;
|
||||
import cn.cloudwalk.elevator.person.mapper.TenantVisitorFloorPolicyMapper;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class TenantVisitorFloorPolicyDaoImpl implements TenantVisitorFloorPolicyDao {
|
||||
|
||||
@Resource
|
||||
private TenantVisitorFloorPolicyMapper tenantVisitorFloorPolicyMapper;
|
||||
|
||||
@Override
|
||||
public TenantVisitorFloorPolicyDto selectEnabledTenantDefault(String businessId) {
|
||||
return this.tenantVisitorFloorPolicyMapper.selectEnabledTenantDefault(businessId);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package cn.cloudwalk.elevator.person.mapper;
|
||||
|
||||
import cn.cloudwalk.elevator.person.dto.TenantVisitorFloorPolicyDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TenantVisitorFloorPolicyMapper {
|
||||
|
||||
/**
|
||||
* 租户级默认策略:building_id 为空,启用,INTERSECT_ALLOWLIST。
|
||||
*/
|
||||
TenantVisitorFloorPolicyDto selectEnabledTenantDefault(@Param("businessId") String businessId);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="cn.cloudwalk.elevator.person.mapper.TenantVisitorFloorPolicyMapper">
|
||||
|
||||
<select id="selectEnabledTenantDefault" resultType="cn.cloudwalk.elevator.person.dto.TenantVisitorFloorPolicyDto">
|
||||
SELECT id,
|
||||
business_id AS businessId,
|
||||
policy_type AS policyType,
|
||||
allow_zone_ids AS allowZoneIds,
|
||||
building_id AS buildingId,
|
||||
enabled AS enabled,
|
||||
policy_version AS policyVersion
|
||||
FROM tenant_visitor_floor_policy
|
||||
WHERE business_id = #{businessId,jdbcType=VARCHAR}
|
||||
AND enabled = 1
|
||||
AND policy_type = 'INTERSECT_ALLOWLIST'
|
||||
AND (building_id IS NULL OR building_id = '')
|
||||
ORDER BY updated_at DESC, policy_version DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 人员与人员-规则服务:人员增删、与区域/父级人员关系、及与设备侧同步相关的编排。
|
||||
*/
|
||||
package cn.cloudwalk.elevator.person;
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class AcsPersonAddNewParam implements Serializable {
|
||||
private static final long serialVersionUID = -943980110684030345L;
|
||||
private String zoneId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
@Valid
|
||||
@NotNull(message = "76260408")
|
||||
private AcsPersonPropertiesParam personProperties;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public AcsPersonPropertiesParam getPersonProperties() {
|
||||
return this.personProperties;
|
||||
}
|
||||
|
||||
public void setPersonProperties(AcsPersonPropertiesParam personProperties) {
|
||||
this.personProperties = personProperties;
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class AcsPersonAddParam implements Serializable {
|
||||
private static final long serialVersionUID = 1742648191193141962L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
@NotEmpty(message = "76260405")
|
||||
private List<String> personIds;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getZoneName() {
|
||||
return this.zoneName;
|
||||
}
|
||||
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
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 List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AcsPersonAddVisitorParam implements Serializable {
|
||||
private static final long serialVersionUID = 7916140658162290825L;
|
||||
private String visitorId;
|
||||
private String personId;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private List<String> floorIds;
|
||||
|
||||
public void setVisitorId(String visitorId) {
|
||||
this.visitorId = visitorId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public void setFloorIds(List<String> floorIds) {
|
||||
this.floorIds = floorIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsPersonAddVisitorParam)) {
|
||||
return false;
|
||||
}
|
||||
AcsPersonAddVisitorParam other = (AcsPersonAddVisitorParam)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(visitorId, other.visitorId) && Objects.equals(personId, other.personId)
|
||||
&& Objects.equals(begVisitorTime, other.begVisitorTime)
|
||||
&& Objects.equals(endVisitorTime, other.endVisitorTime) && Objects.equals(floorIds, other.floorIds);
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsPersonAddVisitorParam;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(visitorId, personId, begVisitorTime, endVisitorTime, floorIds);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsPersonAddVisitorParam(visitorId=" + getVisitorId() + ", personId=" + getPersonId()
|
||||
+ ", begVisitorTime=" + getBegVisitorTime() + ", endVisitorTime=" + getEndVisitorTime() + ", floorIds="
|
||||
+ getFloorIds() + ")";
|
||||
}
|
||||
|
||||
public String getVisitorId() {
|
||||
return this.visitorId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public List<String> getFloorIds() {
|
||||
return this.floorIds;
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonCheckTimeParam implements Serializable {
|
||||
private static final long serialVersionUID = -4963269689428542769L;
|
||||
private String personId;
|
||||
private List<String> imageStoreIds;
|
||||
private Long time;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public List<String> getImageStoreIds() {
|
||||
return this.imageStoreIds;
|
||||
}
|
||||
|
||||
public void setImageStoreIds(List<String> imageStoreIds) {
|
||||
this.imageStoreIds = imageStoreIds;
|
||||
}
|
||||
|
||||
public Long getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
public void setTime(Long time) {
|
||||
this.time = time;
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
public class AcsPersonDeleteParam implements Serializable {
|
||||
private static final long serialVersionUID = 1742648191193141962L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
@NotEmpty(message = "76260405")
|
||||
private List<String> personIds;
|
||||
@NotBlank(message = "76260418")
|
||||
private String imageStoreId;
|
||||
private String personId;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
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 List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPersonDetailParam implements Serializable {
|
||||
private static final long serialVersionUID = -4991936524378444365L;
|
||||
private String zoneId;
|
||||
@NotBlank(message = "76260405")
|
||||
private String personId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPersonEditParam implements Serializable {
|
||||
private static final long serialVersionUID = 1742648191193141962L;
|
||||
private String zoneId;
|
||||
@NotBlank(message = "76260405")
|
||||
private String personId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
@NotBlank(message = "76260418")
|
||||
private String imageStoreId;
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
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 getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPersonFaceParam implements Serializable {
|
||||
private static final long serialVersionUID = 1742648191193141962L;
|
||||
@NotBlank(message = "76260402")
|
||||
private String deviceId;
|
||||
@NotBlank(message = "76260403")
|
||||
private String faceImage;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getFaceImage() {
|
||||
return this.faceImage;
|
||||
}
|
||||
|
||||
public void setFaceImage(String faceImage) {
|
||||
this.faceImage = faceImage;
|
||||
}
|
||||
}
|
||||
+487
@@ -0,0 +1,487 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPersonPropertiesParam implements Serializable {
|
||||
private static final long serialVersionUID = -448990843685123843L;
|
||||
private String name;
|
||||
private String userName;
|
||||
private String personCode;
|
||||
private String phone;
|
||||
private String email;
|
||||
private List<String> organizationIds;
|
||||
private List<String> labelIds;
|
||||
private Long expiryBeginDate;
|
||||
private Long expiryEndDate;
|
||||
@NotBlank(message = "76260412")
|
||||
private String comparePicture;
|
||||
private String ext1;
|
||||
private String ext2;
|
||||
private String ext3;
|
||||
private String ext4;
|
||||
private String ext5;
|
||||
private String ext6;
|
||||
private String ext7;
|
||||
private String ext8;
|
||||
private String ext9;
|
||||
private String ext10;
|
||||
private String ext11;
|
||||
private String ext12;
|
||||
private String ext13;
|
||||
private String ext14;
|
||||
private String ext15;
|
||||
private String ext16;
|
||||
private String ext17;
|
||||
private String ext18;
|
||||
private String ext19;
|
||||
private String ext20;
|
||||
private String ext21;
|
||||
private String ext22;
|
||||
private String ext23;
|
||||
private String ext24;
|
||||
private String ext25;
|
||||
private String ext26;
|
||||
private String ext27;
|
||||
private String ext28;
|
||||
private String ext29;
|
||||
private String ext30;
|
||||
private String ext31;
|
||||
private String ext32;
|
||||
private String ext33;
|
||||
private String ext34;
|
||||
private String ext35;
|
||||
private String ext36;
|
||||
private String ext37;
|
||||
private String ext38;
|
||||
private String ext39;
|
||||
private String ext40;
|
||||
private Integer createSysAccount;
|
||||
private String welcome;
|
||||
private String showPicture;
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return this.userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getPersonCode() {
|
||||
return this.personCode;
|
||||
}
|
||||
|
||||
public void setPersonCode(String personCode) {
|
||||
this.personCode = personCode;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return this.phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public List<String> getOrganizationIds() {
|
||||
return this.organizationIds;
|
||||
}
|
||||
|
||||
public void setOrganizationIds(List<String> organizationIds) {
|
||||
this.organizationIds = organizationIds;
|
||||
}
|
||||
|
||||
public List<String> getLabelIds() {
|
||||
return this.labelIds;
|
||||
}
|
||||
|
||||
public void setLabelIds(List<String> labelIds) {
|
||||
this.labelIds = labelIds;
|
||||
}
|
||||
|
||||
public Long getExpiryBeginDate() {
|
||||
return this.expiryBeginDate;
|
||||
}
|
||||
|
||||
public void setExpiryBeginDate(Long expiryBeginDate) {
|
||||
this.expiryBeginDate = expiryBeginDate;
|
||||
}
|
||||
|
||||
public Long getExpiryEndDate() {
|
||||
return this.expiryEndDate;
|
||||
}
|
||||
|
||||
public void setExpiryEndDate(Long expiryEndDate) {
|
||||
this.expiryEndDate = expiryEndDate;
|
||||
}
|
||||
|
||||
public String getComparePicture() {
|
||||
return this.comparePicture;
|
||||
}
|
||||
|
||||
public void setComparePicture(String comparePicture) {
|
||||
this.comparePicture = comparePicture;
|
||||
}
|
||||
|
||||
public String getExt1() {
|
||||
return this.ext1;
|
||||
}
|
||||
|
||||
public void setExt1(String ext1) {
|
||||
this.ext1 = ext1;
|
||||
}
|
||||
|
||||
public String getExt2() {
|
||||
return this.ext2;
|
||||
}
|
||||
|
||||
public void setExt2(String ext2) {
|
||||
this.ext2 = ext2;
|
||||
}
|
||||
|
||||
public String getExt3() {
|
||||
return this.ext3;
|
||||
}
|
||||
|
||||
public void setExt3(String ext3) {
|
||||
this.ext3 = ext3;
|
||||
}
|
||||
|
||||
public String getExt4() {
|
||||
return this.ext4;
|
||||
}
|
||||
|
||||
public void setExt4(String ext4) {
|
||||
this.ext4 = ext4;
|
||||
}
|
||||
|
||||
public String getExt5() {
|
||||
return this.ext5;
|
||||
}
|
||||
|
||||
public void setExt5(String ext5) {
|
||||
this.ext5 = ext5;
|
||||
}
|
||||
|
||||
public String getExt6() {
|
||||
return this.ext6;
|
||||
}
|
||||
|
||||
public void setExt6(String ext6) {
|
||||
this.ext6 = ext6;
|
||||
}
|
||||
|
||||
public String getExt7() {
|
||||
return this.ext7;
|
||||
}
|
||||
|
||||
public void setExt7(String ext7) {
|
||||
this.ext7 = ext7;
|
||||
}
|
||||
|
||||
public String getExt8() {
|
||||
return this.ext8;
|
||||
}
|
||||
|
||||
public void setExt8(String ext8) {
|
||||
this.ext8 = ext8;
|
||||
}
|
||||
|
||||
public String getExt9() {
|
||||
return this.ext9;
|
||||
}
|
||||
|
||||
public void setExt9(String ext9) {
|
||||
this.ext9 = ext9;
|
||||
}
|
||||
|
||||
public String getExt10() {
|
||||
return this.ext10;
|
||||
}
|
||||
|
||||
public void setExt10(String ext10) {
|
||||
this.ext10 = ext10;
|
||||
}
|
||||
|
||||
public String getExt11() {
|
||||
return this.ext11;
|
||||
}
|
||||
|
||||
public void setExt11(String ext11) {
|
||||
this.ext11 = ext11;
|
||||
}
|
||||
|
||||
public String getExt12() {
|
||||
return this.ext12;
|
||||
}
|
||||
|
||||
public void setExt12(String ext12) {
|
||||
this.ext12 = ext12;
|
||||
}
|
||||
|
||||
public String getExt13() {
|
||||
return this.ext13;
|
||||
}
|
||||
|
||||
public void setExt13(String ext13) {
|
||||
this.ext13 = ext13;
|
||||
}
|
||||
|
||||
public String getExt14() {
|
||||
return this.ext14;
|
||||
}
|
||||
|
||||
public void setExt14(String ext14) {
|
||||
this.ext14 = ext14;
|
||||
}
|
||||
|
||||
public String getExt15() {
|
||||
return this.ext15;
|
||||
}
|
||||
|
||||
public void setExt15(String ext15) {
|
||||
this.ext15 = ext15;
|
||||
}
|
||||
|
||||
public String getExt16() {
|
||||
return this.ext16;
|
||||
}
|
||||
|
||||
public void setExt16(String ext16) {
|
||||
this.ext16 = ext16;
|
||||
}
|
||||
|
||||
public String getExt17() {
|
||||
return this.ext17;
|
||||
}
|
||||
|
||||
public void setExt17(String ext17) {
|
||||
this.ext17 = ext17;
|
||||
}
|
||||
|
||||
public String getExt18() {
|
||||
return this.ext18;
|
||||
}
|
||||
|
||||
public void setExt18(String ext18) {
|
||||
this.ext18 = ext18;
|
||||
}
|
||||
|
||||
public String getExt19() {
|
||||
return this.ext19;
|
||||
}
|
||||
|
||||
public void setExt19(String ext19) {
|
||||
this.ext19 = ext19;
|
||||
}
|
||||
|
||||
public String getExt20() {
|
||||
return this.ext20;
|
||||
}
|
||||
|
||||
public void setExt20(String ext20) {
|
||||
this.ext20 = ext20;
|
||||
}
|
||||
|
||||
public String getExt21() {
|
||||
return this.ext21;
|
||||
}
|
||||
|
||||
public void setExt21(String ext21) {
|
||||
this.ext21 = ext21;
|
||||
}
|
||||
|
||||
public String getExt22() {
|
||||
return this.ext22;
|
||||
}
|
||||
|
||||
public void setExt22(String ext22) {
|
||||
this.ext22 = ext22;
|
||||
}
|
||||
|
||||
public String getExt23() {
|
||||
return this.ext23;
|
||||
}
|
||||
|
||||
public void setExt23(String ext23) {
|
||||
this.ext23 = ext23;
|
||||
}
|
||||
|
||||
public String getExt24() {
|
||||
return this.ext24;
|
||||
}
|
||||
|
||||
public void setExt24(String ext24) {
|
||||
this.ext24 = ext24;
|
||||
}
|
||||
|
||||
public String getExt25() {
|
||||
return this.ext25;
|
||||
}
|
||||
|
||||
public void setExt25(String ext25) {
|
||||
this.ext25 = ext25;
|
||||
}
|
||||
|
||||
public String getExt26() {
|
||||
return this.ext26;
|
||||
}
|
||||
|
||||
public void setExt26(String ext26) {
|
||||
this.ext26 = ext26;
|
||||
}
|
||||
|
||||
public String getExt27() {
|
||||
return this.ext27;
|
||||
}
|
||||
|
||||
public void setExt27(String ext27) {
|
||||
this.ext27 = ext27;
|
||||
}
|
||||
|
||||
public String getExt28() {
|
||||
return this.ext28;
|
||||
}
|
||||
|
||||
public void setExt28(String ext28) {
|
||||
this.ext28 = ext28;
|
||||
}
|
||||
|
||||
public String getExt29() {
|
||||
return this.ext29;
|
||||
}
|
||||
|
||||
public void setExt29(String ext29) {
|
||||
this.ext29 = ext29;
|
||||
}
|
||||
|
||||
public String getExt30() {
|
||||
return this.ext30;
|
||||
}
|
||||
|
||||
public void setExt30(String ext30) {
|
||||
this.ext30 = ext30;
|
||||
}
|
||||
|
||||
public String getExt31() {
|
||||
return this.ext31;
|
||||
}
|
||||
|
||||
public void setExt31(String ext31) {
|
||||
this.ext31 = ext31;
|
||||
}
|
||||
|
||||
public String getExt32() {
|
||||
return this.ext32;
|
||||
}
|
||||
|
||||
public void setExt32(String ext32) {
|
||||
this.ext32 = ext32;
|
||||
}
|
||||
|
||||
public String getExt33() {
|
||||
return this.ext33;
|
||||
}
|
||||
|
||||
public void setExt33(String ext33) {
|
||||
this.ext33 = ext33;
|
||||
}
|
||||
|
||||
public String getExt34() {
|
||||
return this.ext34;
|
||||
}
|
||||
|
||||
public void setExt34(String ext34) {
|
||||
this.ext34 = ext34;
|
||||
}
|
||||
|
||||
public String getExt35() {
|
||||
return this.ext35;
|
||||
}
|
||||
|
||||
public void setExt35(String ext35) {
|
||||
this.ext35 = ext35;
|
||||
}
|
||||
|
||||
public String getExt36() {
|
||||
return this.ext36;
|
||||
}
|
||||
|
||||
public void setExt36(String ext36) {
|
||||
this.ext36 = ext36;
|
||||
}
|
||||
|
||||
public String getExt37() {
|
||||
return this.ext37;
|
||||
}
|
||||
|
||||
public void setExt37(String ext37) {
|
||||
this.ext37 = ext37;
|
||||
}
|
||||
|
||||
public String getExt38() {
|
||||
return this.ext38;
|
||||
}
|
||||
|
||||
public void setExt38(String ext38) {
|
||||
this.ext38 = ext38;
|
||||
}
|
||||
|
||||
public String getExt39() {
|
||||
return this.ext39;
|
||||
}
|
||||
|
||||
public void setExt39(String ext39) {
|
||||
this.ext39 = ext39;
|
||||
}
|
||||
|
||||
public String getExt40() {
|
||||
return this.ext40;
|
||||
}
|
||||
|
||||
public void setExt40(String ext40) {
|
||||
this.ext40 = ext40;
|
||||
}
|
||||
|
||||
public Integer getCreateSysAccount() {
|
||||
return this.createSysAccount;
|
||||
}
|
||||
|
||||
public void setCreateSysAccount(Integer createSysAccount) {
|
||||
this.createSysAccount = createSysAccount;
|
||||
}
|
||||
|
||||
public String getWelcome() {
|
||||
return this.welcome;
|
||||
}
|
||||
|
||||
public void setWelcome(String welcome) {
|
||||
this.welcome = welcome;
|
||||
}
|
||||
|
||||
public String getShowPicture() {
|
||||
return this.showPicture;
|
||||
}
|
||||
|
||||
public void setShowPicture(String showPicture) {
|
||||
this.showPicture = showPicture;
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPersonQueryByAppParam implements Serializable {
|
||||
private static final long serialVersionUID = -4823559329166668237L;
|
||||
@NotBlank(message = "76260402")
|
||||
private String deviceId;
|
||||
@NotBlank(message = "76260415")
|
||||
private String applicationId;
|
||||
private String personName;
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return this.applicationId;
|
||||
}
|
||||
|
||||
public void setApplicationId(String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
}
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AcsPersonQueryParam implements Serializable {
|
||||
private static final long serialVersionUID = -3343979289939890513L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String personName;
|
||||
private String imageStoreId;
|
||||
private List<String> organizationIds;
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
private List<String> labelIds;
|
||||
private List<String> personIds;
|
||||
private Integer isElevator;
|
||||
private List<String> delPersonIds;
|
||||
private List<String> elevatorLabelIds;
|
||||
private List<String> elevatorOrganizationIds;
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public void setOrganizationIds(List<String> organizationIds) {
|
||||
this.organizationIds = organizationIds;
|
||||
}
|
||||
|
||||
public void setLabelIds(List<String> labelIds) {
|
||||
this.labelIds = labelIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public void setIsElevator(Integer isElevator) {
|
||||
this.isElevator = isElevator;
|
||||
}
|
||||
|
||||
public void setDelPersonIds(List<String> delPersonIds) {
|
||||
this.delPersonIds = delPersonIds;
|
||||
}
|
||||
|
||||
public void setElevatorLabelIds(List<String> elevatorLabelIds) {
|
||||
this.elevatorLabelIds = elevatorLabelIds;
|
||||
}
|
||||
|
||||
public void setElevatorOrganizationIds(List<String> elevatorOrganizationIds) {
|
||||
this.elevatorOrganizationIds = elevatorOrganizationIds;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof AcsPersonQueryParam)) {
|
||||
return false;
|
||||
}
|
||||
AcsPersonQueryParam other = (AcsPersonQueryParam)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId)
|
||||
&& Objects.equals(personName, other.personName) && Objects.equals(imageStoreId, other.imageStoreId)
|
||||
&& Objects.equals(organizationIds, other.organizationIds) && Objects.equals(labelIds, other.labelIds)
|
||||
&& Objects.equals(personIds, other.personIds) && Objects.equals(isElevator, other.isElevator)
|
||||
&& Objects.equals(delPersonIds, other.delPersonIds)
|
||||
&& Objects.equals(elevatorLabelIds, other.elevatorLabelIds)
|
||||
&& Objects.equals(elevatorOrganizationIds, other.elevatorOrganizationIds);
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof AcsPersonQueryParam;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(parentId, zoneId, personName, imageStoreId, organizationIds, labelIds, personIds,
|
||||
isElevator, delPersonIds, elevatorLabelIds, elevatorOrganizationIds);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AcsPersonQueryParam(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", personName="
|
||||
+ getPersonName() + ", imageStoreId=" + getImageStoreId() + ", organizationIds=" + getOrganizationIds()
|
||||
+ ", labelIds=" + getLabelIds() + ", personIds=" + getPersonIds() + ", isElevator=" + getIsElevator()
|
||||
+ ", delPersonIds=" + getDelPersonIds() + ", elevatorLabelIds=" + getElevatorLabelIds()
|
||||
+ ", elevatorOrganizationIds=" + getElevatorOrganizationIds() + ")";
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public List<String> getOrganizationIds() {
|
||||
return this.organizationIds;
|
||||
}
|
||||
|
||||
public List<String> getLabelIds() {
|
||||
return this.labelIds;
|
||||
}
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public Integer getIsElevator() {
|
||||
return this.isElevator;
|
||||
}
|
||||
|
||||
public List<String> getDelPersonIds() {
|
||||
return this.delPersonIds;
|
||||
}
|
||||
|
||||
public List<String> getElevatorLabelIds() {
|
||||
return this.elevatorLabelIds;
|
||||
}
|
||||
|
||||
public List<String> getElevatorOrganizationIds() {
|
||||
return this.elevatorOrganizationIds;
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import java.io.Serializable;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
public class AcsPersonTimeDetailParam implements Serializable {
|
||||
private static final long serialVersionUID = 9094521665731451301L;
|
||||
private String imageStoreId;
|
||||
@NotBlank(message = "76260405")
|
||||
private String personId;
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package cn.cloudwalk.elevator.person.param;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class PersonDetailQueryParam extends CloudwalkBasePageForm implements Serializable {
|
||||
private static final long serialVersionUID = -8830219133147503297L;
|
||||
private String parentId;
|
||||
private String zoneId;
|
||||
private String ruleId;
|
||||
private String personName;
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setRuleId(String ruleId) {
|
||||
this.ruleId = ruleId;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof PersonDetailQueryParam)) {
|
||||
return false;
|
||||
}
|
||||
PersonDetailQueryParam other = (PersonDetailQueryParam)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(parentId, other.parentId) && Objects.equals(zoneId, other.zoneId)
|
||||
&& Objects.equals(ruleId, other.ruleId) && Objects.equals(personName, other.personName);
|
||||
}
|
||||
|
||||
protected boolean canEqual(Object other) {
|
||||
return other instanceof PersonDetailQueryParam;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hash(parentId, zoneId, ruleId, personName);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "PersonDetailQueryParam(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", ruleId="
|
||||
+ getRuleId() + ", personName=" + getPersonName() + ")";
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public String getZoneId() {
|
||||
return this.zoneId;
|
||||
}
|
||||
|
||||
public String getRuleId() {
|
||||
return this.ruleId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsAppResult implements Serializable {
|
||||
private static final long serialVersionUID = 2531683869129123657L;
|
||||
private String applicationId;
|
||||
private String applicationName;
|
||||
private List<String> passIntervals;
|
||||
|
||||
public String getApplicationId() {
|
||||
return this.applicationId;
|
||||
}
|
||||
|
||||
public void setApplicationId(String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
}
|
||||
|
||||
public String getApplicationName() {
|
||||
return this.applicationName;
|
||||
}
|
||||
|
||||
public void setApplicationName(String applicationName) {
|
||||
this.applicationName = applicationName;
|
||||
}
|
||||
|
||||
public List<String> getPassIntervals() {
|
||||
return this.passIntervals;
|
||||
}
|
||||
|
||||
public void setPassIntervals(List<String> passIntervals) {
|
||||
this.passIntervals = passIntervals;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsImageStoreStatisticsResult implements Serializable {
|
||||
private static final long serialVersionUID = 2509672603592424330L;
|
||||
private String imageStoreId;
|
||||
private String imageStoreName;
|
||||
private Integer personNum;
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getImageStoreName() {
|
||||
return this.imageStoreName;
|
||||
}
|
||||
|
||||
public void setImageStoreName(String imageStoreName) {
|
||||
this.imageStoreName = imageStoreName;
|
||||
}
|
||||
|
||||
public Integer getPersonNum() {
|
||||
return this.personNum;
|
||||
}
|
||||
|
||||
public void setPersonNum(Integer personNum) {
|
||||
this.personNum = personNum;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsImagestorePersonStatisticsResult implements Serializable {
|
||||
private static final long serialVersionUID = 8443213995134853671L;
|
||||
private List<AppImageStoreStatisticsResult> appImageStores;
|
||||
|
||||
public List<AppImageStoreStatisticsResult> getAppImageStores() {
|
||||
return this.appImageStores;
|
||||
}
|
||||
|
||||
public void setAppImageStores(List<AppImageStoreStatisticsResult> appImageStores) {
|
||||
this.appImageStores = appImageStores;
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonDetailResult implements Serializable {
|
||||
private static final long serialVersionUID = 6635686175965530739L;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private String comparePicture;
|
||||
private List<AcsAppResult> apps;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getComparePicture() {
|
||||
return this.comparePicture;
|
||||
}
|
||||
|
||||
public void setComparePicture(String comparePicture) {
|
||||
this.comparePicture = comparePicture;
|
||||
}
|
||||
|
||||
public List<AcsAppResult> getApps() {
|
||||
return this.apps;
|
||||
}
|
||||
|
||||
public void setApps(List<AcsAppResult> apps) {
|
||||
this.apps = apps;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonFaceResult implements Serializable {
|
||||
private static final long serialVersionUID = 4874996308674266909L;
|
||||
private List<String> personIds;
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
}
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import cn.cloudwalk.elevator.annontation.DavinciPic;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AcsPersonResult implements Serializable {
|
||||
private static final long serialVersionUID = 2503821740888865432L;
|
||||
private String imageStoreId;
|
||||
private String personId;
|
||||
private String imageId;
|
||||
private String personName;
|
||||
@DavinciPic
|
||||
private String comparePicture;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private Integer gender;
|
||||
private Integer age;
|
||||
private Long groupTime;
|
||||
private Integer status;
|
||||
private String errorMessage;
|
||||
private String passableTimeName;
|
||||
private String icCardNo;
|
||||
private Integer passType;
|
||||
private String ruleName;
|
||||
private String ruleId;
|
||||
|
||||
public String getImageStoreId() {
|
||||
return this.imageStoreId;
|
||||
}
|
||||
|
||||
public void setImageStoreId(String imageStoreId) {
|
||||
this.imageStoreId = imageStoreId;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getImageId() {
|
||||
return this.imageId;
|
||||
}
|
||||
|
||||
public void setImageId(String imageId) {
|
||||
this.imageId = imageId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getComparePicture() {
|
||||
return this.comparePicture;
|
||||
}
|
||||
|
||||
public void setComparePicture(String comparePicture) {
|
||||
this.comparePicture = comparePicture;
|
||||
}
|
||||
|
||||
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 getGender() {
|
||||
return this.gender;
|
||||
}
|
||||
|
||||
public void setGender(Integer gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return this.age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Long getGroupTime() {
|
||||
return this.groupTime;
|
||||
}
|
||||
|
||||
public void setGroupTime(Long groupTime) {
|
||||
this.groupTime = groupTime;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public String getIcCardNo() {
|
||||
return this.icCardNo;
|
||||
}
|
||||
|
||||
public void setIcCardNo(String icCardNo) {
|
||||
this.icCardNo = icCardNo;
|
||||
}
|
||||
|
||||
public Integer getPassType() {
|
||||
return this.passType;
|
||||
}
|
||||
|
||||
public void setPassType(Integer passType) {
|
||||
this.passType = passType;
|
||||
}
|
||||
|
||||
public String getRuleId() {
|
||||
return this.ruleId;
|
||||
}
|
||||
|
||||
public void setRuleId(String ruleId) {
|
||||
this.ruleId = ruleId;
|
||||
}
|
||||
|
||||
public String getRuleName() {
|
||||
return this.ruleName;
|
||||
}
|
||||
|
||||
public void setRuleName(String ruleName) {
|
||||
this.ruleName = ruleName;
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import cn.cloudwalk.elevator.annontation.DavinciPic;
|
||||
import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AcsPersonTimeDetailResult implements Serializable {
|
||||
private static final long serialVersionUID = -7081148493292998146L;
|
||||
private String personId;
|
||||
private String personName;
|
||||
@DavinciPic
|
||||
private String comparePicture;
|
||||
private String passableTimeName;
|
||||
private List<AcsPassTimeCycleParam> passableCycle;
|
||||
private Long beginDate;
|
||||
private Long endDate;
|
||||
private Integer passType;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getComparePicture() {
|
||||
return this.comparePicture;
|
||||
}
|
||||
|
||||
public void setComparePicture(String comparePicture) {
|
||||
this.comparePicture = comparePicture;
|
||||
}
|
||||
|
||||
public String getPassableTimeName() {
|
||||
return this.passableTimeName;
|
||||
}
|
||||
|
||||
public void setPassableTimeName(String passableTimeName) {
|
||||
this.passableTimeName = passableTimeName;
|
||||
}
|
||||
|
||||
public List<AcsPassTimeCycleParam> getPassableCycle() {
|
||||
return this.passableCycle;
|
||||
}
|
||||
|
||||
public void setPassableCycle(List<AcsPassTimeCycleParam> passableCycle) {
|
||||
this.passableCycle = passableCycle;
|
||||
}
|
||||
|
||||
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 Integer getPassType() {
|
||||
return this.passType;
|
||||
}
|
||||
|
||||
public void setPassType(Integer passType) {
|
||||
this.passType = passType;
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package cn.cloudwalk.elevator.person.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class AppImageStoreStatisticsResult implements Serializable {
|
||||
private static final long serialVersionUID = 4038169574154456396L;
|
||||
private String applicationId;
|
||||
private String applicationName;
|
||||
private String serviceCode;
|
||||
private Integer personNum;
|
||||
private List<AcsImageStoreStatisticsResult> imageStores;
|
||||
|
||||
public String getApplicationId() {
|
||||
return this.applicationId;
|
||||
}
|
||||
|
||||
public void setApplicationId(String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
}
|
||||
|
||||
public String getApplicationName() {
|
||||
return this.applicationName;
|
||||
}
|
||||
|
||||
public void setApplicationName(String applicationName) {
|
||||
this.applicationName = applicationName;
|
||||
}
|
||||
|
||||
public String getServiceCode() {
|
||||
return this.serviceCode;
|
||||
}
|
||||
|
||||
public void setServiceCode(String serviceCode) {
|
||||
this.serviceCode = serviceCode;
|
||||
}
|
||||
|
||||
public Integer getPersonNum() {
|
||||
return this.personNum;
|
||||
}
|
||||
|
||||
public void setPersonNum(Integer personNum) {
|
||||
this.personNum = personNum;
|
||||
}
|
||||
|
||||
public List<AcsImageStoreStatisticsResult> getImageStores() {
|
||||
return this.imageStores;
|
||||
}
|
||||
|
||||
public void setImageStores(List<AcsImageStoreStatisticsResult> imageStores) {
|
||||
this.imageStores = imageStores;
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package cn.cloudwalk.elevator.person.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.person.param.AcsPersonAddParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonEditParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult;
|
||||
|
||||
public interface AcsPersonService {
|
||||
CloudwalkResult<Boolean> add(AcsPersonAddParam paramAcsPersonAddParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> edit(AcsPersonEditParam paramAcsPersonEditParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> delete(AcsPersonDeleteParam paramAcsPersonDeleteParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page(AcsPersonQueryParam paramAcsPersonQueryParam,
|
||||
CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
|
||||
CloudwalkResult<AcsPersonTimeDetailResult> timeDetail(AcsPersonTimeDetailParam paramAcsPersonTimeDetailParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> pageByApp(
|
||||
AcsPersonQueryByAppParam paramAcsPersonQueryByAppParam, CloudwalkPageInfo paramCloudwalkPageInfo,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package cn.cloudwalk.elevator.person.service;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult;
|
||||
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.person.param.AcsPersonAddParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonAddVisitorParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonEditParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam;
|
||||
import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam;
|
||||
import cn.cloudwalk.elevator.person.param.PersonDetailQueryParam;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonResult;
|
||||
import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult;
|
||||
|
||||
public interface PersonRuleService {
|
||||
CloudwalkResult<Boolean> add(AcsPersonAddParam paramAcsPersonAddParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> addVisitor(AcsPersonAddVisitorParam paramAcsPersonAddVisitorParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> edit(AcsPersonEditParam paramAcsPersonEditParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<Boolean> delete(AcsPersonDeleteParam paramAcsPersonDeleteParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page(AcsPersonQueryParam paramAcsPersonQueryParam,
|
||||
CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
|
||||
CloudwalkResult<AcsPersonTimeDetailResult> timeDetail(AcsPersonTimeDetailParam paramAcsPersonTimeDetailParam,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> pageByApp(
|
||||
AcsPersonQueryByAppParam paramAcsPersonQueryByAppParam, CloudwalkPageInfo paramCloudwalkPageInfo,
|
||||
CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
|
||||
|
||||
CloudwalkResult<CloudwalkPageAble<ImageStorePersonResult>>
|
||||
personDetail(PersonDetailQueryParam paramPersonDetailQueryParam, CloudwalkCallContext paramCloudwalkCallContext)
|
||||
throws ServiceException;
|
||||
}
|
||||
Reference in New Issue
Block a user