Merge remote-tracking branch 'origin/master'
# Conflicts: # ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CodePrefixConstants.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/SisLibDeviceRef.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/bo/SisLibDeviceImgRefBo.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/bo/SisLibDeviceRefBo.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/bo/SisPersonLibImgBo.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/vo/SisLibDeviceImgRefVo.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/vo/SisLibDeviceRefVo.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisLibDeviceRefService.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisLibDeviceRefServiceImpl.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisPersonLibImgServiceImpl.java # ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisPersonLibServiceImpl.java
This commit is contained in:
28
pom.xml
28
pom.xml
@@ -69,24 +69,38 @@
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<id>localhost</id>
|
||||
<properties>
|
||||
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||
<profiles.active>dev</profiles.active>
|
||||
<nacos.server>127.0.0.1:8848</nacos.server>
|
||||
<logstash.address>127.0.0.1:4560</logstash.address>
|
||||
<!-- <nacos.server>47.109.37.87:8848</nacos.server>-->
|
||||
<!-- <logstash.address>47.109.37.87:4560</logstash.address>-->
|
||||
<nacos.discovery.group>DEFAULT_GROUP</nacos.discovery.group>
|
||||
<nacos.config.group>DEFAULT_GROUP</nacos.config.group>
|
||||
<nacos.username>nacos</nacos.username>
|
||||
<nacos.password>nacos</nacos.password>
|
||||
</properties>
|
||||
<activation>
|
||||
<!-- 默认环境 -->
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<properties>
|
||||
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||
<profiles.active>dev</profiles.active>
|
||||
<!-- <nacos.server>127.0.0.1:8848</nacos.server>-->
|
||||
<!-- <logstash.address>127.0.0.1:4560</logstash.address>-->
|
||||
<nacos.server>47.109.37.87:8848</nacos.server>
|
||||
<logstash.address>47.109.37.87:4560</logstash.address>
|
||||
<nacos.discovery.group>DEFAULT_GROUP</nacos.discovery.group>
|
||||
<nacos.config.group>DEFAULT_GROUP</nacos.config.group>
|
||||
<nacos.username>nacos</nacos.username>
|
||||
<nacos.password>nacos</nacos.password>
|
||||
<!-- <logstash.address>127.0.0.1:4560</logstash.address>-->
|
||||
</properties>
|
||||
<activation>
|
||||
<!-- 默认环境 -->
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
|
@@ -0,0 +1,31 @@
|
||||
package org.dromara.common.core.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TreeNode<T> implements TreeEntity<TreeNode<T>, T> {
|
||||
// 层级
|
||||
private Integer level;
|
||||
// 编码
|
||||
private T code;
|
||||
// 父编码
|
||||
private T ParentCode;
|
||||
// 标签
|
||||
private String label;
|
||||
// 子节点
|
||||
private List<TreeNode<T>> children;
|
||||
|
||||
@Override
|
||||
public T getId() {
|
||||
return getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getParentId() {
|
||||
return getParentCode();
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -21,7 +21,7 @@ public class TreeUtils {
|
||||
* @param rootCode 根节点编码
|
||||
* @return 构建树状
|
||||
*/
|
||||
public static <T extends TreeEntity<T, ?>> List<T> getTreeList(List<T> entityList, Object rootCode) {
|
||||
public static <T extends TreeEntity<T, ?>> List<T> build(List<T> entityList, Object rootCode) {
|
||||
if (CollectionUtil.isEmpty(entityList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
@@ -1,26 +1,31 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.TreeNode;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
import org.dromara.property.domain.bo.TbCommunityBo;
|
||||
import org.dromara.property.service.ITbCommunityService;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.property.domain.bo.TbCommunityBo;
|
||||
import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
import org.dromara.property.service.ITbCommunityService;
|
||||
import org.dromara.system.api.model.LoginUser;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小区
|
||||
@@ -46,6 +51,25 @@ public class TbCommunityController extends BaseController {
|
||||
return tbCommunityService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载社区树结构
|
||||
* 1: 加载社区
|
||||
* 2:加载到建筑
|
||||
* 3:加载到单元
|
||||
* 4:加载到楼层
|
||||
* 5:加载到房间
|
||||
*
|
||||
* @return 树结构数据
|
||||
*/
|
||||
@GetMapping("/tree/{level}")
|
||||
public List<TreeNode<String>> tree(@PathVariable("level") Integer level) {
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
Assert.notNull(loginUser, "获取账户信息失败!");
|
||||
Assert.notEmpty(loginUser.getTenantId(), "获取租户信息失败");
|
||||
return tbCommunityService.tree(level, loginUser.getTenantId());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出小区列表
|
||||
*/
|
||||
|
@@ -44,10 +44,10 @@ public class CleanOrder extends TenantEntity {
|
||||
*/
|
||||
private Long cleanId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
// /**
|
||||
// * 名称
|
||||
// */
|
||||
// private String name;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
@@ -78,11 +78,11 @@ public class CleanOrder extends TenantEntity {
|
||||
* 单位id
|
||||
*/
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 申请单位
|
||||
*/
|
||||
private String unit;
|
||||
//
|
||||
// /**
|
||||
// * 申请单位
|
||||
// */
|
||||
// private String unit;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
|
@@ -35,7 +35,7 @@ public class TbFloor extends TenantEntity {
|
||||
/**
|
||||
* 楼层编码
|
||||
*/
|
||||
private Long floorCode;
|
||||
private String floorCode;
|
||||
|
||||
/**
|
||||
* 楼层数名称
|
||||
|
@@ -42,15 +42,4 @@ public class TdFactory extends TenantEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ public class CleanBo extends BaseEntity {
|
||||
/**
|
||||
* 劳务id
|
||||
*/
|
||||
@NotBlank(message = "劳务id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotBlank(message = "劳务id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
|
@@ -44,19 +44,18 @@ public class CleanOrderBo extends BaseEntity {
|
||||
/**
|
||||
* 保洁id
|
||||
*/
|
||||
@NotNull(message = "保洁id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotNull(message = "保洁id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private List<Long> cleanIds;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String name;
|
||||
// /**
|
||||
// * 名称
|
||||
// */
|
||||
// @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// private String name;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long prices;
|
||||
|
||||
/**
|
||||
@@ -88,11 +87,11 @@ public class CleanOrderBo extends BaseEntity {
|
||||
@NotNull(message = "单位id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 申请单位
|
||||
*/
|
||||
@NotBlank(message = "申请单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String unit;
|
||||
// /**
|
||||
// * 申请单位
|
||||
// */
|
||||
// @NotBlank(message = "申请单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// private String unit;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
|
@@ -36,7 +36,7 @@ public class TbFloorBo extends BaseEntity {
|
||||
* 楼层编码
|
||||
*/
|
||||
@NotNull(message = "楼层编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long floorCode;
|
||||
private String floorCode;
|
||||
|
||||
/**
|
||||
* 楼层数名称
|
||||
|
@@ -43,16 +43,5 @@ public class TdFactoryBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@NotNull(message = "数据状态:1有效,0无效不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -55,11 +55,11 @@ public class CleanOrderVo implements Serializable {
|
||||
@ExcelProperty(value = "保洁")
|
||||
private List<String> clean;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ExcelProperty(value = "名称")
|
||||
private String name;
|
||||
// /**
|
||||
// * 名称
|
||||
// */
|
||||
// @ExcelProperty(value = "名称")
|
||||
// private String name;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
@@ -74,6 +74,7 @@ public class CleanOrderVo implements Serializable {
|
||||
private Long sumPeices;
|
||||
|
||||
/**
|
||||
*
|
||||
* 支付状态
|
||||
*/
|
||||
@ExcelProperty(value = "支付状态")
|
||||
@@ -97,11 +98,11 @@ public class CleanOrderVo implements Serializable {
|
||||
@ExcelProperty(value = "单位id")
|
||||
private Long unitId;
|
||||
|
||||
/**
|
||||
* 申请单位
|
||||
*/
|
||||
@ExcelProperty(value = "申请单位")
|
||||
private String unit;
|
||||
// /**
|
||||
// * 申请单位
|
||||
// */
|
||||
// @ExcelProperty(value = "申请单位")
|
||||
// private String unit;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
|
@@ -0,0 +1,29 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CommunityTreeVo<T> {
|
||||
|
||||
|
||||
@Data
|
||||
public static class BuildingTreeVo<T> {
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class FloorTreeVo<T> {
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class UnitTreeVo<T> {
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class RoomTreeVo {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -44,7 +44,7 @@ public class TbFloorVo implements Serializable {
|
||||
* 楼层编码
|
||||
*/
|
||||
@ExcelProperty(value = "楼层编码")
|
||||
private Long floorCode;
|
||||
private String floorCode;
|
||||
|
||||
/**
|
||||
* 楼层数名称
|
||||
|
@@ -52,17 +52,5 @@ public class TdFactoryVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@ExcelProperty(value = "数据状态:1有效,0无效")
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,10 +1,9 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbBuilding;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
import org.dromara.property.domain.bo.TbBuildingBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.bo.TbBuildingBo;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -66,4 +65,11 @@ public interface ITbBuildingService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 加载当前租户下的所有建筑
|
||||
* @param tenantId 租户编码
|
||||
* @return 返回建筑列表
|
||||
*/
|
||||
List<TbBuildingVo> queryByTenantId(String tenantId);
|
||||
}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbCommunity;
|
||||
import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
import org.dromara.property.domain.bo.TbCommunityBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.core.domain.TreeNode;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.bo.TbCommunityBo;
|
||||
import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -25,6 +25,14 @@ public interface ITbCommunityService {
|
||||
*/
|
||||
TbCommunityVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询小区列表
|
||||
*
|
||||
* @param tenantId 租户编码
|
||||
* @return 小区
|
||||
*/
|
||||
List<TbCommunityVo> queryByTenantId(String tenantId);
|
||||
|
||||
/**
|
||||
* 分页查询小区列表
|
||||
*
|
||||
@@ -66,4 +74,12 @@ public interface ITbCommunityService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 加载社区树结构
|
||||
* @param level 加载等级
|
||||
* @return 树结构
|
||||
*/
|
||||
List<TreeNode<String>> tree(Integer level,String tenantId);
|
||||
|
||||
}
|
||||
|
@@ -66,4 +66,6 @@ public interface ITbFloorService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
List<TbFloorVo> queryByTenantId(String tenantId);
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.domain.vo.TbFloorVo;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.property.domain.bo.TbRoomBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -66,4 +67,6 @@ public interface ITbRoomService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
List<TbRoomVo> queryByTenantId(String tenantId);
|
||||
}
|
||||
|
@@ -1,10 +1,9 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.domain.bo.TbUnitBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.bo.TbUnitBo;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -66,4 +65,7 @@ public interface ITbUnitService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
List<TbUnitVo> queryByTenantId(String tenantId);
|
||||
|
||||
}
|
||||
|
@@ -77,6 +77,7 @@ public class CleanOrderServiceImpl implements ICleanOrderService {
|
||||
LambdaQueryWrapper<CleanOrder> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CleanOrder> buildQueryWrapper(CleanOrderBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CleanOrder> lqw = Wrappers.lambdaQuery();
|
||||
@@ -85,15 +86,15 @@ public class CleanOrderServiceImpl implements ICleanOrderService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getArea()), CleanOrder::getArea, bo.getArea());
|
||||
|
||||
// lqw.eq(bo.getCleanIds() != null, CleanOrder::getCleanId, bo.getCleanIds());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), CleanOrder::getName, bo.getName());
|
||||
// lqw.like(StringUtils.isNotBlank(bo.getName()), CleanOrder::getName, bo.getName());
|
||||
lqw.eq(bo.getPrices() != null, CleanOrder::getPrices, bo.getPrices());
|
||||
lqw.eq(bo.getSumPeices() != null, CleanOrder::getSumPeices, bo.getSumPeices());
|
||||
lqw.eq(bo.getPayState() != null, CleanOrder::getPayState, bo.getPayState());
|
||||
lqw.eq(bo.getStarTime() != null, CleanOrder::getStarTime, bo.getStarTime());
|
||||
lqw.eq(bo.getEndTime() != null, CleanOrder::getEndTime, bo.getEndTime());
|
||||
lqw.eq(bo.getUnitId() != null, CleanOrder::getUnitId, bo.getUnitId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CleanOrder::getState, bo.getState());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CleanOrder::getUnit, bo.getUnit());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CleanOrder::getState, bo.getState());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CleanOrder::getUnit, bo.getUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPersion()), CleanOrder::getPersion, bo.getPersion());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), CleanOrder::getPhone, bo.getPhone());
|
||||
|
||||
@@ -115,13 +116,23 @@ public class CleanOrderServiceImpl implements ICleanOrderService {
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
ArrayList<CleanserverOrder> cleanserverOrders = new ArrayList<>();
|
||||
for (Long cleanId : bo.getCleanIds()) {
|
||||
LambdaQueryWrapper<CleanserverOrder> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 查询cleanserver_order表中的所有记录
|
||||
List<CleanserverOrder> cleanserverOrderList = cleanserverOrderMapper.selectList(queryWrapper);
|
||||
//判断是否有cleanserver表中的数据
|
||||
if (!cleanserverOrderList.isEmpty()) {
|
||||
// 循环插入cleanserver_order表
|
||||
for (CleanserverOrder order : cleanserverOrderList) {
|
||||
Long cleanId = order.getCleanServerId();
|
||||
CleanserverOrder cleanserverOrder = new CleanserverOrder();
|
||||
cleanserverOrder.setCleanServerId(cleanId);
|
||||
cleanserverOrder.setOrderId(add.getId());
|
||||
CleanserverOrder convert = MapstructUtils.convert(cleanserverOrder, CleanserverOrder.class);
|
||||
cleanserverOrders.add(convert);
|
||||
// CleanserverOrder convert = MapstructUtils.convert(cleanserverOrder, CleanserverOrder.class);
|
||||
cleanserverOrders.add(cleanserverOrder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cleanserverOrderMapper.insert(cleanserverOrders);
|
||||
|
||||
}
|
||||
|
@@ -156,6 +156,6 @@ public class SysCityAreaServiceImpl implements ISysCityAreaService {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<CityAreaTreeVo> vo = SysCityAreaCovert.INSTANCE.entity2Vo(cityAreas);
|
||||
return TreeUtils.getTreeList(vo, "0");
|
||||
return TreeUtils.build(vo, "0");
|
||||
}
|
||||
}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.TbBuilding;
|
||||
import org.dromara.property.domain.bo.TbBuildingBo;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
import org.dromara.property.domain.TbBuilding;
|
||||
import org.dromara.property.mapper.TbBuildingMapper;
|
||||
import org.dromara.property.service.ITbBuildingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 建筑Service业务层处理
|
||||
@@ -155,4 +155,11 @@ public class TbBuildingServiceImpl implements ITbBuildingService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbBuildingVo> queryByTenantId(String tenantId) {
|
||||
LambdaQueryWrapper<TbBuilding> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbBuilding::getTenantId, tenantId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
@@ -1,24 +1,27 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbCommunityBo;
|
||||
import org.dromara.property.domain.vo.TbCommunityVo;
|
||||
import org.dromara.common.core.domain.TreeNode;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.core.utils.TreeUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.TbCommunity;
|
||||
import org.dromara.property.domain.bo.TbCommunityBo;
|
||||
import org.dromara.property.domain.vo.*;
|
||||
import org.dromara.property.mapper.TbCommunityMapper;
|
||||
import org.dromara.property.service.ITbCommunityService;
|
||||
import org.dromara.property.service.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 小区Service业务层处理
|
||||
@@ -32,6 +35,100 @@ import java.util.Collection;
|
||||
public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
|
||||
private final TbCommunityMapper baseMapper;
|
||||
private final ITbBuildingService buildingService;
|
||||
private final ITbUnitService unitService;
|
||||
private final ITbFloorService floorService;
|
||||
private final ITbRoomService roomService;
|
||||
|
||||
@Override
|
||||
public List<TreeNode<String>> tree(Integer level, String tenantId) {
|
||||
// 默认加载社区树
|
||||
List<TbCommunityVo> tbCommunityVos = queryByTenantId(tenantId);
|
||||
if (tbCommunityVos == null || tbCommunityVos.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<TreeNode<String>> community = new ArrayList<>(tbCommunityVos.stream().map(item -> {
|
||||
TreeNode<String> node = new TreeNode<>();
|
||||
node.setChildren(new ArrayList<>());
|
||||
node.setCode(item.getCommunityCode());
|
||||
node.setLabel(item.getCommunityName());
|
||||
node.setParentCode("");
|
||||
node.setLevel(1);
|
||||
return node;
|
||||
}).toList());
|
||||
if (level == 1) {
|
||||
return community;
|
||||
}
|
||||
if (level >= 2) {
|
||||
List<TbBuildingVo> vos = buildingService.queryByTenantId(tenantId);
|
||||
if (vos != null && !vos.isEmpty()) {
|
||||
List<TreeNode<String>> list = vos.stream().map(item -> {
|
||||
TreeNode<String> node = new TreeNode<>();
|
||||
node.setChildren(new ArrayList<>());
|
||||
node.setCode(item.getBuildingCode());
|
||||
node.setLabel(item.getBuildingName());
|
||||
node.setParentCode(item.getCommunityCode());
|
||||
node.setLevel(2);
|
||||
return node;
|
||||
}).toList();
|
||||
community.addAll(list);
|
||||
}
|
||||
}
|
||||
if (level >= 3) {
|
||||
List<TbUnitVo> vos = unitService.queryByTenantId(tenantId);
|
||||
if (vos != null && !vos.isEmpty()) {
|
||||
List<TreeNode<String>> list = vos.stream().map(item -> {
|
||||
TreeNode<String> node = new TreeNode<>();
|
||||
node.setChildren(new ArrayList<>());
|
||||
node.setCode(item.getUnitCode());
|
||||
node.setLabel(item.getUnitName());
|
||||
node.setParentCode(item.getBuildingCode());
|
||||
node.setLevel(3);
|
||||
return node;
|
||||
}).toList();
|
||||
community.addAll(list);
|
||||
}
|
||||
}
|
||||
if (level >= 4) {
|
||||
List<TbFloorVo> vos = floorService.queryByTenantId(tenantId);
|
||||
if (vos != null && !vos.isEmpty()) {
|
||||
List<TreeNode<String>> list = vos.stream().map(item -> {
|
||||
TreeNode<String> node = new TreeNode<>();
|
||||
node.setChildren(new ArrayList<>());
|
||||
node.setCode(item.getFloorCode());
|
||||
node.setLabel(item.getFloorName());
|
||||
node.setParentCode(item.getUnitCode());
|
||||
node.setLevel(4);
|
||||
return node;
|
||||
}).toList();
|
||||
community.addAll(list);
|
||||
}
|
||||
}
|
||||
|
||||
if (level >= 5) {
|
||||
List<TbRoomVo> vos = roomService.queryByTenantId(tenantId);
|
||||
if (vos != null && !vos.isEmpty()) {
|
||||
List<TreeNode<String>> list = vos.stream().map(item -> {
|
||||
TreeNode<String> node = new TreeNode<>();
|
||||
node.setChildren(new ArrayList<>());
|
||||
node.setCode(item.getRoomCode());
|
||||
node.setLabel(item.getRoomNumber());
|
||||
node.setParentCode(item.getFloorCode());
|
||||
node.setLevel(5);
|
||||
return node;
|
||||
}).toList();
|
||||
community.addAll(list);
|
||||
}
|
||||
}
|
||||
return TreeUtils.build(community, "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbCommunityVo> queryByTenantId(String tenantId) {
|
||||
LambdaQueryWrapper<TbCommunity> queryWrapper = Wrappers.lambdaQuery();
|
||||
queryWrapper.eq(TbCommunity::getTenantId, tenantId);
|
||||
return baseMapper.selectVoList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询小区
|
||||
@@ -143,4 +240,5 @@ public class TbCommunityServiceImpl implements ITbCommunityService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.TbFloor;
|
||||
import org.dromara.property.domain.bo.TbFloorBo;
|
||||
import org.dromara.property.domain.vo.TbFloorVo;
|
||||
import org.dromara.property.domain.TbFloor;
|
||||
import org.dromara.property.mapper.TbFloorMapper;
|
||||
import org.dromara.property.service.ITbFloorService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 楼层Service业务层处理
|
||||
@@ -135,4 +135,11 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbFloorVo> queryByTenantId(String tenantId) {
|
||||
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbFloor::getTenantId, tenantId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.domain.bo.TbRoomBo;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.dromara.property.service.ITbRoomService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 房间信息Service业务层处理
|
||||
@@ -137,4 +137,11 @@ public class TbRoomServiceImpl implements ITbRoomService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbRoomVo> queryByTenantId(String tenantId) {
|
||||
LambdaQueryWrapper<TbRoom> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbRoom::getTenantId, tenantId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
@@ -1,24 +1,24 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import org.dromara.property.domain.bo.TbUnitBo;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.domain.TbUnit;
|
||||
import org.dromara.property.mapper.TbUnitMapper;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 单元Service业务层处理
|
||||
@@ -134,4 +134,11 @@ public class TbUnitServiceImpl implements ITbUnitService {
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbUnitVo> queryByTenantId(String tenantId) {
|
||||
LambdaQueryWrapper<TbUnit> queryWrapper = Wrappers.lambdaQuery();
|
||||
queryWrapper.eq(TbUnit::getTenantId, tenantId);
|
||||
return baseMapper.selectVoList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,6 @@ public class TdFactoryServiceImpl implements ITdFactoryService {
|
||||
lqw.orderByAsc(TdFactory::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactoryNo()), TdFactory::getFactoryNo, bo.getFactoryNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFactoryName()), TdFactory::getFactoryName, bo.getFactoryName());
|
||||
lqw.eq(bo.getDataState() != null, TdFactory::getDataState, bo.getDataState());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), TdFactory::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
@@ -46,6 +46,12 @@ public class SisAccessControlDeviceController extends BaseController {
|
||||
return sisAccessControlDeviceService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/list/{factoryNo}")
|
||||
public R<List<SisAccessControlDeviceVo>> queryListByFactoryNo(@PathVariable("factoryNo") String factoryNo) {
|
||||
return R.ok(sisAccessControlDeviceService.queryListByFactoryNo(factoryNo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出门禁设备列表
|
||||
*/
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package org.dromara.sis.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -55,12 +56,12 @@ public class SisAccessControl extends TenantEntity {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long accessPort;
|
||||
private Integer accessPort;
|
||||
|
||||
/**
|
||||
* 门禁设备类型
|
||||
*/
|
||||
private Long accessType;
|
||||
private Integer accessType;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -70,7 +71,7 @@ public class SisAccessControl extends TenantEntity {
|
||||
/**
|
||||
* 控制卡类型:1-系统,2-E8
|
||||
*/
|
||||
private Long controlType;
|
||||
private Integer controlType;
|
||||
|
||||
/**
|
||||
* 控制卡类型编码
|
||||
@@ -82,15 +83,5 @@ public class SisAccessControl extends TenantEntity {
|
||||
*/
|
||||
private String outCode;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ public class SisAccessControlDevice extends TenantEntity {
|
||||
/**
|
||||
* 设备端口
|
||||
*/
|
||||
private Long eqpPort;
|
||||
private Integer eqpPort;
|
||||
|
||||
/**
|
||||
* 设备账号
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package org.dromara.sis.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -55,7 +56,7 @@ public class SisDeviceManage extends BaseEntity {
|
||||
/**
|
||||
* 设备在线状态 0:离线 1:在线 2:未知
|
||||
*/
|
||||
private Long deviceStatus;
|
||||
private Integer deviceStatus;
|
||||
|
||||
/**
|
||||
* 父级设备id
|
||||
@@ -70,7 +71,7 @@ public class SisDeviceManage extends BaseEntity {
|
||||
/**
|
||||
* 录像机端口
|
||||
*/
|
||||
private Long vcrPort;
|
||||
private Integer vcrPort;
|
||||
|
||||
/**
|
||||
* 门禁id
|
||||
|
@@ -35,12 +35,12 @@ public class SisDevicePoint extends TenantEntity {
|
||||
/**
|
||||
* 视频协议 1:onvif 2:rtsp
|
||||
*/
|
||||
private Long video;
|
||||
private Integer video;
|
||||
|
||||
/**
|
||||
* 传输协议(AIBOX 需要,一体机不需要) 1: tcp 2:udp
|
||||
*/
|
||||
private Long transportType;
|
||||
private Integer transportType;
|
||||
|
||||
/**
|
||||
* 点位名称
|
||||
@@ -60,7 +60,7 @@ public class SisDevicePoint extends TenantEntity {
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
private Long port;
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* 通道相机账号
|
||||
@@ -75,7 +75,7 @@ public class SisDevicePoint extends TenantEntity {
|
||||
/**
|
||||
* onvif 设备码流添加方式:1:主码流 2:自定义码流
|
||||
*/
|
||||
private Long videoType;
|
||||
private Integer videoType;
|
||||
|
||||
/**
|
||||
* 码流 id:当选择自定义码流时,该字段必填,
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package org.dromara.sis.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -11,7 +12,7 @@ import java.io.Serial;
|
||||
* 系统库与设备库的关联对象 tb_lib_device_ref
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-24
|
||||
* @since 2025-06-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -42,10 +43,15 @@ public class SisLibDeviceRef extends TenantEntity {
|
||||
*/
|
||||
private Long eqpLibId;
|
||||
|
||||
/**
|
||||
* 设备上的库类型
|
||||
*/
|
||||
private Integer eqpLibType;
|
||||
|
||||
/**
|
||||
* 第三方设备库添加状态 1: 成功,2:失败
|
||||
*/
|
||||
private Long eqpLibState;
|
||||
private Integer eqpLibState;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package org.dromara.sis.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -45,12 +46,10 @@ public class SisPersonLib extends TenantEntity {
|
||||
/**
|
||||
* 库类型,1:人员库,2:工服库
|
||||
*/
|
||||
private Long libType;
|
||||
private Integer libType;
|
||||
|
||||
/**
|
||||
* 库的业务类型 1: 门禁库,2: 黑名单库
|
||||
*/
|
||||
private Long busiType;
|
||||
|
||||
|
||||
private Integer busiType;
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ public class SisPersonLibImg extends TenantEntity {
|
||||
/**
|
||||
* 性别 1:男 2:女 99:未说明
|
||||
*/
|
||||
private Long sex;
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
@@ -66,7 +66,7 @@ public class SisPersonLibImg extends TenantEntity {
|
||||
/**
|
||||
* 证件类型 1:身份证 2:护照3:行驶证 99:其它
|
||||
*/
|
||||
private Long certificateType;
|
||||
private Integer certificateType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package org.dromara.sis.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -43,15 +43,5 @@ public class TdFactory extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -46,12 +46,12 @@ public class TdMeter extends BaseEntity {
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
private Long meterType;
|
||||
private Integer meterType;
|
||||
|
||||
/**
|
||||
* 表用途(1-分表,2-总表,3-公摊表)
|
||||
*/
|
||||
private Long meterPurpose;
|
||||
private Integer meterPurpose;
|
||||
|
||||
/**
|
||||
* 分摊类型
|
||||
@@ -61,12 +61,12 @@ public class TdMeter extends BaseEntity {
|
||||
* 4-按房源数量
|
||||
* 5-按固定比例
|
||||
*/
|
||||
private Long shareType;
|
||||
private Integer shareType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
private Long payType;
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 当前表显示读数
|
||||
@@ -91,12 +91,12 @@ public class TdMeter extends BaseEntity {
|
||||
/**
|
||||
* 通信状态
|
||||
*/
|
||||
private Long communicationState;
|
||||
private Integer communicationState;
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
private Long runningState;
|
||||
private Integer runningState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@@ -30,27 +30,27 @@ public class TdMeterConfig extends BaseEntity {
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
private Long meterType;
|
||||
private Integer meterType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
private Long payType;
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 欠费是否断电/水/气(0-是,1-否)
|
||||
*/
|
||||
private Long arrearsOutage;
|
||||
private Integer arrearsOutage;
|
||||
|
||||
/**
|
||||
* 后付费模式下是否自动断电/水/气(0-是,1-否)
|
||||
*/
|
||||
private Long autoOutage;
|
||||
private Integer autoOutage;
|
||||
|
||||
/**
|
||||
* 当auto_outage=0的时候生效,逾期多少天自动断水/电/气
|
||||
*/
|
||||
private Long overdueDay;
|
||||
private Integer overdueDay;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package org.dromara.sis.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
|
@@ -0,0 +1,21 @@
|
||||
package org.dromara.sis.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 门禁控制设备和库关联的对象
|
||||
*
|
||||
* @author lxj
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AccessControlLibDeviceBo extends SisAccessControlDeviceBo {
|
||||
|
||||
private Integer eqpLibId;
|
||||
|
||||
private Integer eqpLibType;
|
||||
|
||||
private Long libId;
|
||||
|
||||
}
|
@@ -60,7 +60,7 @@ public class SisAccessControlBo extends BaseEntity {
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long accessPort;
|
||||
private Integer accessPort;
|
||||
|
||||
/**
|
||||
* 门禁设备类型
|
||||
@@ -96,17 +96,6 @@ public class SisAccessControlBo extends BaseEntity {
|
||||
@NotBlank(message = "组织编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@NotNull(message = "数据状态:1有效,0无效不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
/**
|
||||
* 绑定设备Id
|
||||
*/
|
||||
|
@@ -41,12 +41,12 @@ public class SisAccessControlDeviceBo extends BaseEntity {
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private Long eqpType;
|
||||
private Integer eqpType;
|
||||
|
||||
/**
|
||||
* 接入类型(1: 平台接入,2:设备接入)
|
||||
*/
|
||||
private Long accessType;
|
||||
private Integer accessType;
|
||||
|
||||
/**
|
||||
* 设备ip
|
||||
@@ -58,7 +58,7 @@ public class SisAccessControlDeviceBo extends BaseEntity {
|
||||
* 设备端口
|
||||
*/
|
||||
@NotNull(message = "设备端口不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long eqpPort;
|
||||
private Integer eqpPort;
|
||||
|
||||
/**
|
||||
* 设备账号
|
||||
|
@@ -48,18 +48,13 @@ public class SisDeviceManageBo extends BaseEntity {
|
||||
* 设备端口
|
||||
*/
|
||||
@NotNull(message = "设备端口不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long devicePort;
|
||||
private Integer devicePort;
|
||||
|
||||
/**
|
||||
* 设备
|
||||
*/
|
||||
private String deviceMac;
|
||||
|
||||
/**
|
||||
* 设备在线状态 0:离线 1:在线 2:未知
|
||||
*/
|
||||
private Long deviceStatus;
|
||||
|
||||
/**
|
||||
* 父级设备id
|
||||
*/
|
||||
|
@@ -36,14 +36,14 @@ public class SisDevicePointBo extends BaseEntity {
|
||||
* 视频协议 1:onvif 2:
|
||||
rtsp
|
||||
*/
|
||||
private Long video;
|
||||
private Integer video;
|
||||
|
||||
/**
|
||||
* 传输协议(AIBOX 需要,一
|
||||
体机不需要) 1: tcp 2:
|
||||
udp
|
||||
*/
|
||||
private Long transportType;
|
||||
private Integer transportType;
|
||||
|
||||
/**
|
||||
* 点位名称
|
||||
@@ -64,7 +64,7 @@ rtsp 时,该字段必填)
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
private Long port;
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* 通道相机账号
|
||||
@@ -81,7 +81,7 @@ rtsp 时,该字段必填)
|
||||
式:1:主码流 2:自定
|
||||
义码流
|
||||
*/
|
||||
private Long videoType;
|
||||
private Integer videoType;
|
||||
|
||||
/**
|
||||
* 码流 id:当选择自定义码
|
||||
@@ -89,22 +89,6 @@ rtsp 时,该字段必填)
|
||||
获取设备码流信息接口返
|
||||
回的码流 id
|
||||
*/
|
||||
private Long videoId;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
private Integer videoId;
|
||||
|
||||
}
|
||||
|
@@ -61,15 +61,4 @@ public class SisLibDeviceImgRefBo extends BaseEntity {
|
||||
*/
|
||||
private String eqpLibImgUrl;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package org.dromara.sis.domain.bo;
|
||||
|
||||
import org.dromara.sis.domain.SisLibDeviceRef;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.sis.domain.SisLibDeviceRef;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
@@ -48,15 +48,6 @@ public class SisLibDeviceRefBo extends BaseEntity {
|
||||
* 第三方设备库添加状态 1: 成功,2:失败
|
||||
*/
|
||||
@NotNull(message = "第三方设备库添加状态 1: 成功,2:失败不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long eqpLibState;
|
||||
private Integer eqpLibState;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
}
|
||||
|
@@ -12,6 +12,8 @@ import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.sis.domain.SisPersonLib;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人像库业务对象 tb_person_lib
|
||||
*
|
||||
@@ -37,6 +39,12 @@ public class SisPersonLibBo extends BaseEntity {
|
||||
@NotBlank(message = "人员库名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String libName;
|
||||
|
||||
/**
|
||||
* 设备编码,需要同步创建到设备中
|
||||
*/
|
||||
@NotNull(message = "人像设备不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private List<Long> eqpIds;
|
||||
|
||||
/**
|
||||
* 人员库描述
|
||||
*/
|
||||
@@ -45,7 +53,7 @@ public class SisPersonLibBo extends BaseEntity {
|
||||
/**
|
||||
* 库类型,1:人员库,2:工服库
|
||||
*/
|
||||
private Long libType;
|
||||
private Integer libType;
|
||||
|
||||
/**
|
||||
* 库类型名称
|
||||
@@ -56,7 +64,7 @@ public class SisPersonLibBo extends BaseEntity {
|
||||
/**
|
||||
* 库的业务类型 1: 门禁库,2: 黑名单库
|
||||
*/
|
||||
private Long busiType = 1L;
|
||||
private Integer busiType = 1;
|
||||
|
||||
/**
|
||||
* 门禁设备id
|
||||
|
@@ -13,7 +13,7 @@ import jakarta.validation.constraints.*;
|
||||
* 人像信息业务对象 tb_person_lib_img
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-24
|
||||
* @since 2025-06-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -52,7 +52,7 @@ public class SisPersonLibImgBo extends BaseEntity {
|
||||
/**
|
||||
* 性别 1:男2:女 99:未说明
|
||||
*/
|
||||
private Long sex;
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
@@ -67,7 +67,7 @@ public class SisPersonLibImgBo extends BaseEntity {
|
||||
/**
|
||||
* 证件类型、1:身份证 2:护照、3:行驶证 99:其它
|
||||
*/
|
||||
private Long certificateType;
|
||||
private Integer certificateType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
@@ -79,25 +79,4 @@ public class SisPersonLibImgBo extends BaseEntity {
|
||||
*/
|
||||
private String birthDate;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
/**
|
||||
* 是否同步到E8
|
||||
*/
|
||||
private Boolean isSyncE8;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -43,12 +43,4 @@ public class TdFactoryBo extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@NotNull(message = "数据状态:1有效,0无效不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long dataState;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -49,12 +49,12 @@ public class TdMeterBo extends BaseEntity {
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
private Long meterType;
|
||||
private Integer meterType;
|
||||
|
||||
/**
|
||||
* 表用途(1-分表,2-总表,3-公摊表)
|
||||
*/
|
||||
private Long meterPurpose;
|
||||
private Integer meterPurpose;
|
||||
|
||||
/**
|
||||
* 分摊类型
|
||||
@@ -64,17 +64,17 @@ public class TdMeterBo extends BaseEntity {
|
||||
* 4-按房源数量
|
||||
* 5-按固定比例
|
||||
*/
|
||||
private Long shareType;
|
||||
private Integer shareType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
private Long payType;
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 最大表显读数(超过归0)
|
||||
*/
|
||||
private Long maxDisplay;
|
||||
private Integer maxDisplay;
|
||||
|
||||
/**
|
||||
* 计费倍率
|
||||
|
@@ -29,31 +29,31 @@ public class TdMeterConfigBo extends BaseEntity {
|
||||
/**
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
private Long meterType;
|
||||
private Integer meterType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
@NotNull(message = "付费类型(1-先付费,2-后付费)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long payType;
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 欠费是否断电/水/气(0-是,1-否)
|
||||
*/
|
||||
@NotNull(message = "欠费是否断电/水/气(0-是,1-否)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long arrearsOutage;
|
||||
private Integer arrearsOutage;
|
||||
|
||||
/**
|
||||
* 后付费模式下是否自动断电/水/气(0-是,1-否)
|
||||
*/
|
||||
@NotNull(message = "后付费模式下是否自动断电/水/气(0-是,1-否)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long autoOutage;
|
||||
private Integer autoOutage;
|
||||
|
||||
/**
|
||||
* 当auto_outage=0的时候生效,逾期多少天自动断水/电/气
|
||||
*/
|
||||
@NotNull(message = "当auto_outage=0的时候生效,逾期多少天自动断水/电/气不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long overdueDay;
|
||||
private Integer overdueDay;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@@ -76,7 +76,7 @@ public class SisAccessControlDeviceVo implements Serializable {
|
||||
* 设备端口
|
||||
*/
|
||||
@ExcelProperty(value = "设备端口")
|
||||
private Long eqpPort;
|
||||
private Integer eqpPort;
|
||||
|
||||
/**
|
||||
* 设备账号
|
||||
@@ -90,23 +90,5 @@ public class SisAccessControlDeviceVo implements Serializable {
|
||||
@ExcelProperty(value = "设备密码")
|
||||
private String eqpPwd;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -68,13 +68,13 @@ public class SisAccessControlVo implements Serializable {
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long accessPort;
|
||||
private Integer accessPort;
|
||||
|
||||
/**
|
||||
* 门禁设备类型
|
||||
*/
|
||||
@ExcelProperty(value = "门禁设备类型")
|
||||
private Long accessType;
|
||||
private Integer accessType;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -86,7 +86,7 @@ public class SisAccessControlVo implements Serializable {
|
||||
* 控制卡类型:1-系统,2-E8
|
||||
*/
|
||||
@ExcelProperty(value = "控制卡类型:1-系统,2-E8")
|
||||
private Long controlType;
|
||||
private Integer controlType;
|
||||
|
||||
/**
|
||||
* 控制卡类型编码
|
||||
@@ -100,23 +100,4 @@ public class SisAccessControlVo implements Serializable {
|
||||
@ExcelProperty(value = "外部编码")
|
||||
private String outCode;
|
||||
|
||||
/**
|
||||
* 组织编码
|
||||
*/
|
||||
@ExcelProperty(value = "组织编码")
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@ExcelProperty(value = "数据状态:1有效,0无效")
|
||||
private Long dataState;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ public class SisDeviceManageVo implements Serializable {
|
||||
* 设备端口
|
||||
*/
|
||||
@ExcelProperty(value = "设备端口")
|
||||
private Long devicePort;
|
||||
private Integer devicePort;
|
||||
|
||||
/**
|
||||
* 设备
|
||||
@@ -61,12 +61,6 @@ public class SisDeviceManageVo implements Serializable {
|
||||
@ExcelProperty(value = "设备")
|
||||
private String deviceMac;
|
||||
|
||||
/**
|
||||
* 设备在线状态 0:离线 1:在线 2:未知
|
||||
*/
|
||||
@ExcelProperty(value = "设备在线状态 0:离线 1:在线 2:未知")
|
||||
private Long deviceStatus;
|
||||
|
||||
/**
|
||||
* 父级设备id
|
||||
*/
|
||||
@@ -83,7 +77,7 @@ public class SisDeviceManageVo implements Serializable {
|
||||
* 录像机端口
|
||||
*/
|
||||
@ExcelProperty(value = "录像机端口")
|
||||
private Long vcrPort;
|
||||
private Integer vcrPort;
|
||||
|
||||
/**
|
||||
* 门禁id
|
||||
|
@@ -43,7 +43,7 @@ public class SisDevicePointVo implements Serializable {
|
||||
* rtsp
|
||||
*/
|
||||
@ExcelProperty(value = "视频协议")
|
||||
private Long video;
|
||||
private Integer video;
|
||||
|
||||
/**
|
||||
* 传输协议(AIBOX 需要,一
|
||||
@@ -51,7 +51,7 @@ public class SisDevicePointVo implements Serializable {
|
||||
* udp
|
||||
*/
|
||||
@ExcelProperty(value = "传输协议")
|
||||
private Long transportType;
|
||||
private Integer transportType;
|
||||
|
||||
/**
|
||||
* 点位名称
|
||||
@@ -77,7 +77,7 @@ public class SisDevicePointVo implements Serializable {
|
||||
* 端口
|
||||
*/
|
||||
@ExcelProperty(value = "端口")
|
||||
private Long port;
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* 通道相机账号
|
||||
@@ -97,7 +97,7 @@ public class SisDevicePointVo implements Serializable {
|
||||
* 义码流
|
||||
*/
|
||||
@ExcelProperty(value = "码流")
|
||||
private Long videoType;
|
||||
private Integer videoType;
|
||||
|
||||
/**
|
||||
* 码流 id:当选择自定义码
|
||||
@@ -108,11 +108,4 @@ public class SisDevicePointVo implements Serializable {
|
||||
@ExcelProperty(value = "码流id")
|
||||
private Long videoId;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ import java.io.Serializable;
|
||||
* 系统图片和设备图片的关联视图对象 tb_lib_device_img_ref
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-24
|
||||
* @since 2025-06-24
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@@ -66,17 +66,4 @@ public class SisLibDeviceImgRefVo implements Serializable {
|
||||
@ExcelProperty(value = "e8图片地址")
|
||||
private String eqpLibImgUrl;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ import java.io.Serializable;
|
||||
* 系统库与设备库的关联视图对象 tb_lib_device_ref
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-24
|
||||
* @since 2025-06-24
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@@ -31,13 +31,13 @@ public class SisLibDeviceRefVo implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员库编码
|
||||
* 人员库id
|
||||
*/
|
||||
@ExcelProperty(value = "库Id")
|
||||
private Long libId;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
* 设备表id
|
||||
*/
|
||||
@ExcelProperty(value = "设备Id")
|
||||
private Long eqpId;
|
||||
@@ -48,22 +48,14 @@ public class SisLibDeviceRefVo implements Serializable {
|
||||
@ExcelProperty(value = "设备上的库id")
|
||||
private Long eqpLibId;
|
||||
|
||||
private Integer eqpLibType;
|
||||
|
||||
/**
|
||||
* 第三方设备库添加状态 1: 成功,2:失败
|
||||
*/
|
||||
@ExcelProperty(value = "第三方设备库添加状态 1: 成功,2:失败")
|
||||
private Long eqpLibState;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ public class SisPersonLibImgVo implements Serializable {
|
||||
2:女 99:未说明
|
||||
*/
|
||||
@ExcelProperty(value = "性别 1")
|
||||
private Long sex;
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
@@ -80,7 +80,7 @@ public class SisPersonLibImgVo implements Serializable {
|
||||
3:行驶证 99:其它
|
||||
*/
|
||||
@ExcelProperty(value = "证件类型")
|
||||
private Long certificateType;
|
||||
private Integer certificateType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
@@ -94,23 +94,4 @@ public class SisPersonLibImgVo implements Serializable {
|
||||
@ExcelProperty(value = "出生日期")
|
||||
private String birthDate;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,13 +1,14 @@
|
||||
package org.dromara.sis.domain.vo;
|
||||
|
||||
import org.dromara.sis.domain.SisPersonLib;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.sis.domain.SisPersonLib;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -52,31 +53,17 @@ public class SisPersonLibVo implements Serializable {
|
||||
* 库类型,1:人员库,2:工服库
|
||||
*/
|
||||
@ExcelProperty(value = "库类型,1:人员库,2:工服库")
|
||||
private Long libType;
|
||||
private Integer libType;
|
||||
|
||||
/**
|
||||
* 库的业务类型 1: 门禁库,2: 黑名单库
|
||||
*/
|
||||
@ExcelProperty(value = "库的业务类型 1: 门禁库,2: 黑名单库")
|
||||
private Long busiType;
|
||||
private Integer busiType;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
* 库关联的设备id列表
|
||||
*/
|
||||
@ExcelProperty(value = "创建人id")
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
@ExcelProperty(value = "更新人id")
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
List<Long> eqpIds;
|
||||
|
||||
}
|
||||
|
@@ -48,11 +48,4 @@ public class TdFactoryVo implements Serializable {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 数据状态:1有效,0无效
|
||||
*/
|
||||
@ExcelProperty(value = "数据状态:1有效,0无效")
|
||||
private Long dataState;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -36,32 +36,32 @@ public class TdMeterConfigVo implements Serializable {
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型(1-电表,2-水表,3-气表)")
|
||||
private Long meterType;
|
||||
private Integer meterType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
@ExcelProperty(value = "付费类型(1-先付费,2-后付费)")
|
||||
private Long payType;
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 欠费是否断电/水/气(0-是,1-否)
|
||||
*/
|
||||
@ExcelProperty(value = "欠费是否断电/水/气(0-是,1-否)")
|
||||
private Long arrearsOutage;
|
||||
private Integer arrearsOutage;
|
||||
|
||||
/**
|
||||
* 后付费模式下是否自动断电/水/气(0-是,1-否)
|
||||
*/
|
||||
@ExcelProperty(value = "后付费模式下是否自动断电/水/气", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=-是,1-否")
|
||||
private Long autoOutage;
|
||||
private Integer autoOutage;
|
||||
|
||||
/**
|
||||
* 当auto_outage=0的时候生效,逾期多少天自动断水/电/气
|
||||
*/
|
||||
@ExcelProperty(value = "当auto_outage=0的时候生效,逾期多少天自动断水/电/气")
|
||||
private Long overdueDay;
|
||||
private Integer overdueDay;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@@ -53,13 +53,13 @@ public class TdMeterVo implements Serializable {
|
||||
* 设备类型(1-电表,2-水表,3-气表)
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型(1-电表,2-水表,3-气表)")
|
||||
private Long meterType;
|
||||
private Integer meterType;
|
||||
|
||||
/**
|
||||
* 表用途(1-分表,2-总表,3-公摊表)
|
||||
*/
|
||||
@ExcelProperty(value = "表用途(1-分表,2-总表,3-公摊表)")
|
||||
private Long meterPurpose;
|
||||
private Integer meterPurpose;
|
||||
|
||||
/**
|
||||
* 分摊类型
|
||||
@@ -70,13 +70,13 @@ public class TdMeterVo implements Serializable {
|
||||
* 5-按固定比例
|
||||
*/
|
||||
@ExcelProperty(value = "分摊类型 1-不公摊 2-按分表用量 3-按租客面积 4-按房源数量 5-按固定比例")
|
||||
private Long shareType;
|
||||
private Integer shareType;
|
||||
|
||||
/**
|
||||
* 付费类型(1-先付费,2-后付费)
|
||||
*/
|
||||
@ExcelProperty(value = "付费类型(1-先付费,2-后付费)")
|
||||
private Long payType;
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 当前表显示读数
|
||||
@@ -94,13 +94,13 @@ public class TdMeterVo implements Serializable {
|
||||
* 通信状态
|
||||
*/
|
||||
@ExcelProperty(value = "通信状态")
|
||||
private Long communicationState;
|
||||
private Integer communicationState;
|
||||
|
||||
/**
|
||||
* 运行状态
|
||||
*/
|
||||
@ExcelProperty(value = "运行状态")
|
||||
private Long runningState;
|
||||
private Integer runningState;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
@@ -1,9 +1,15 @@
|
||||
package org.dromara.sis.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.sis.domain.SisLibDeviceRef;
|
||||
import org.dromara.sis.domain.bo.AccessControlLibDeviceBo;
|
||||
import org.dromara.sis.domain.vo.SisAccessControlDeviceVo;
|
||||
import org.dromara.sis.domain.vo.SisLibDeviceRefVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统库与设备库的关联Mapper接口
|
||||
*
|
||||
@@ -12,4 +18,5 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface SisLibDeviceRefMapper extends BaseMapperPlus<SisLibDeviceRef, SisLibDeviceRefVo> {
|
||||
|
||||
List<AccessControlLibDeviceBo> queryDeviceListByLibIds(@Param("ids") Collection<Long> ids);
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ public class DoorDeviceAddReq {
|
||||
/**
|
||||
* 设备端口
|
||||
*/
|
||||
private Long port;
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* 设备MAC
|
||||
@@ -56,7 +56,7 @@ public class DoorDeviceAddReq {
|
||||
* 2201:一体式门禁 2202:分体式门禁 2203:人脸门禁 2204:梯控 2207:人脸盒子终端
|
||||
* 2208:人脸盒子面板机 2209:一体式读头 2211:梯控读头 2102:电子哨兵
|
||||
*/
|
||||
private Long type;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 业务逻辑设备类
|
||||
|
@@ -182,7 +182,7 @@ public interface UnViewAiBoxApi {
|
||||
* @param libName 工服库名称
|
||||
* @return 是否添加成功
|
||||
*/
|
||||
Integer addWorkClothesLib(UvSystemInfo systemInfo, String libName);
|
||||
AddLibResult addWorkClothesLib(UvSystemInfo systemInfo, String libName);
|
||||
|
||||
/**
|
||||
* 修改工服库信息
|
||||
|
@@ -7,6 +7,7 @@ import org.dromara.sis.sdk.unview.UnViewAiBoxApi;
|
||||
import org.dromara.sis.sdk.unview.model.enums.UniViewApiEnum;
|
||||
import org.dromara.sis.sdk.unview.utils.UniViewHttp;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -29,11 +30,13 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
@Resource
|
||||
private UniViewHttp uniViewHttp;
|
||||
|
||||
@Override
|
||||
public SearchBehaviorResult searchBehavior(UvSystemInfo uvSystemInfo, SearchBehaviorParams params) {
|
||||
UniViewResult<SearchBehaviorResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.SEARCH_BEHAVIOR, params, SearchBehaviorResult.class);
|
||||
return request.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddLibResult addPersonLib(UvSystemInfo systemInfo, String libName) {
|
||||
Map<String, String> params = new HashMap<>(1);
|
||||
params.put("lib_name", libName);
|
||||
@@ -41,6 +44,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deletePersonLib(UvSystemInfo systemInfo, Integer... libIds) {
|
||||
if (libIds.length == 0) {
|
||||
log.info("libIds 不能为空");
|
||||
@@ -52,6 +56,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updatePersonLib(UvSystemInfo systemInfo, Integer libId, String LibName) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
@@ -60,6 +65,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryLibResult findPagePersonLib(UvSystemInfo systemInfo, String libName, Integer current, Integer size) {
|
||||
JSONObject params = new JSONObject();
|
||||
if (StrUtil.isNotBlank(libName)) {
|
||||
@@ -77,17 +83,19 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.getData();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AddPersonResult addPerson(UvSystemInfo uvSystemInfo, AddPersonParams addPersonParams) {
|
||||
UniViewResult<AddPersonResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.PERSON_ADD, addPersonParams, AddPersonResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BatchAddPersonResult batchAddPerson(UvSystemInfo uvSystemInfo, BatchAddPersonParams personParams) {
|
||||
UniViewResult<BatchAddPersonResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.PERSON_BATCH_ADD, personParams, BatchAddPersonResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchDeletePerson(UvSystemInfo uvSystemInfo, Integer[] personIds) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("person_id_list", personIds);
|
||||
@@ -95,24 +103,26 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updatePerson(UvSystemInfo uvSystemInfo, UpdatePersonParams params) {
|
||||
UniViewResult<String> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.PERSON_UPDATE, params, String.class);
|
||||
return request.success();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public queryPersonPageResult findPersonPage(UvSystemInfo uvSystemInfo, queryPersonPageParams params) {
|
||||
UniViewResult<queryPersonPageResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.PERSON_FIND, params, queryPersonPageResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------- 点位管理 -------------------------------------------------------------------------*/
|
||||
|
||||
@Override
|
||||
public GetPublickeyResult getPublickey(UvSystemInfo uvSystemInfo) {
|
||||
UniViewResult<GetPublickeyResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.POINT_RAS, null, GetPublickeyResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryOnvifResult getOnvif(UvSystemInfo uvSystemInfo) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("ip", uvSystemInfo.getIp());
|
||||
@@ -123,11 +133,13 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddPointResult addPoint(UvSystemInfo uvSystemInfo, PointParams req) {
|
||||
UniViewResult<AddPointResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.POINT_ADD, req, AddPointResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletePoint(UvSystemInfo uvSystemInfo, List<Integer> channelIds) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("channel_id_list", channelIds);
|
||||
@@ -135,26 +147,31 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updatePoint(UvSystemInfo uvSystemInfo, UpdatePointParams params) {
|
||||
UniViewResult<String> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.POINT_UPDATE, params, String.class);
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryPointResult queryPoint(UvSystemInfo uvSystemInfo, QueryPointParams req) {
|
||||
UniViewResult<QueryPointResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.POINT_FIND, req, QueryPointResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BatchAddPersonResult batchAddPoint(UvSystemInfo uvSystemInfo, BatchAddPointParams params) {
|
||||
UniViewResult<BatchAddPersonResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.POINT_BATCH_ADD, params, BatchAddPersonResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean pointControlTimeUpdate(UvSystemInfo uvSystemInfo, ModifyControlTime params) {
|
||||
UniViewResult<String> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.POINT_CONTROL_TIME_UPDATE, params, String.class);
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControlTime queryControlTime(UvSystemInfo uvSystemInfo, Integer channel_id, Integer algo_model) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("channel_id", channel_id);
|
||||
@@ -164,13 +181,15 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------- 工服库 ---------------------------------------------------------------------------*/
|
||||
public Integer addWorkClothesLib(UvSystemInfo uvSystemInfo, String libName) {
|
||||
@Override
|
||||
public AddLibResult addWorkClothesLib(UvSystemInfo uvSystemInfo, String libName) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_name", libName);
|
||||
UniViewResult<Integer> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.WORK_CLOTHES_LIB_ADD, params, Integer.class);
|
||||
UniViewResult<AddLibResult> request = uniViewHttp.request(uvSystemInfo, UniViewApiEnum.WORK_CLOTHES_LIB_ADD, params, AddLibResult.class);
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateWorkClothesLib(UvSystemInfo uvSystemInfo, Integer libId, String libName) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
@@ -179,6 +198,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWorkClothesLib(UvSystemInfo uvSystemInfo, Integer libId) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
@@ -186,6 +206,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryLibResult findPageWorkClothesLib(UvSystemInfo uvSystemInfo, String libName, Integer page, Integer pageSize) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_name", libName);
|
||||
@@ -196,7 +217,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------工服 ---------------------------------------------------------------------------*/
|
||||
|
||||
@Override
|
||||
public Integer addWorkClothes(UvSystemInfo uvSystemInfo, Integer libId, String imageBase64) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
@@ -205,6 +226,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BatchAddWorkClothesResult batchAddWorkClothes(UvSystemInfo uvSystemInfo, Integer libId, List<String> imageBase64s) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
@@ -213,6 +235,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.result();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWorkClothes(UvSystemInfo uvSystemInfo, Integer libId, List<Integer> workClothesIds) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
@@ -221,6 +244,7 @@ public class UnViewAiBoxApiService implements UnViewAiBoxApi {
|
||||
return request.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FindWorkClothesResult findPageWorkClothes(UvSystemInfo uvSystemInfo, Integer libId, Integer page, Integer size, Integer status) {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("lib_id", libId);
|
||||
|
@@ -106,14 +106,13 @@ public class UniViewHttp {
|
||||
if (data == null) {
|
||||
requestEntity = new HttpEntity<>(null, headers);
|
||||
}
|
||||
if (data instanceof JSONObject) {
|
||||
JSONObject obj = (JSONObject) data;
|
||||
if (data instanceof JSONObject obj) {
|
||||
requestEntity = new HttpEntity<>(obj.toJSONString(), headers);
|
||||
} else {
|
||||
requestEntity = new HttpEntity<>(JSONObject.toJSONString(data), headers);
|
||||
}
|
||||
ResponseEntity<String> exchange = restTemplate.exchange(requestUrl, api.getMethod(), requestEntity, String.class);
|
||||
int statusCode = exchange.getStatusCodeValue();
|
||||
int statusCode = exchange.getStatusCode().value();
|
||||
String body = exchange.getBody();
|
||||
|
||||
if (HttpStatus.HTTP_UNAUTHORIZED == statusCode) {
|
||||
|
@@ -1,10 +1,9 @@
|
||||
package org.dromara.sis.service;
|
||||
|
||||
import org.dromara.sis.domain.SisAccessControlDevice;
|
||||
import org.dromara.sis.domain.vo.SisAccessControlDeviceVo;
|
||||
import org.dromara.sis.domain.bo.SisAccessControlDeviceBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.domain.bo.SisAccessControlDeviceBo;
|
||||
import org.dromara.sis.domain.vo.SisAccessControlDeviceVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -66,4 +65,12 @@ public interface ISisAccessControlDeviceService {
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据factoryNo 查询设备列表
|
||||
*
|
||||
* @param factoryNo 厂商编号
|
||||
* @return 返回设备列表
|
||||
*/
|
||||
List<SisAccessControlDeviceVo> queryListByFactoryNo(String factoryNo);
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
package org.dromara.sis.service;
|
||||
|
||||
import org.dromara.sis.domain.vo.SisLibDeviceRefVo;
|
||||
import org.dromara.sis.domain.bo.SisLibDeviceRefBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.domain.SisLibDeviceRef;
|
||||
import org.dromara.sis.domain.bo.SisAccessControlDeviceBo;
|
||||
import org.dromara.sis.domain.bo.SisLibDeviceRefBo;
|
||||
import org.dromara.sis.domain.vo.SisAccessControlDeviceVo;
|
||||
import org.dromara.sis.domain.vo.SisLibDeviceRefVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -49,6 +52,14 @@ public interface ISisLibDeviceRefService {
|
||||
*/
|
||||
Boolean insertByBo(SisLibDeviceRefBo bo);
|
||||
|
||||
/**
|
||||
* 新增系统库与设备库的关联
|
||||
*
|
||||
* @param ref 系统库与设备库的关联
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insert(SisLibDeviceRef ref);
|
||||
|
||||
/**
|
||||
* 修改系统库与设备库的关联
|
||||
*
|
||||
@@ -73,4 +84,28 @@ public interface ISisLibDeviceRefService {
|
||||
* @return 设备库列表
|
||||
*/
|
||||
List<SisLibDeviceRefVo> queryListByLibId(Collection<Long> LibIds);
|
||||
|
||||
/**
|
||||
* 通过personlIB id 查询关联关系
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return 返回关联记录
|
||||
*/
|
||||
List<SisLibDeviceRefVo> queryByLibIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 通过 personLibid 列表删除关联关系
|
||||
*
|
||||
* @param ids id 列表
|
||||
* @return 返回删除数量
|
||||
*/
|
||||
Integer deleteByLibIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 通过libIds 查询控制设备列表
|
||||
*
|
||||
* @param ids libIds
|
||||
* @return 返回设备列表
|
||||
*/
|
||||
List<SisAccessControlDeviceVo> queryDeviceListByLibIds(Collection<Long> ids);
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.constant.CodePrefixConstants;
|
||||
import org.dromara.common.core.service.DictService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
@@ -143,4 +142,11 @@ public class SisAccessControlDeviceServiceImpl implements ISisAccessControlDevic
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SisAccessControlDeviceVo> queryListByFactoryNo(String factoryNo) {
|
||||
LambdaQueryWrapper<SisAccessControlDevice> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(SisAccessControlDevice::getFactoryNo, factoryNo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
@@ -92,7 +92,6 @@ public class SisAccessControlServiceImpl implements ISisAccessControlService {
|
||||
lqw.eq(bo.getControlType() != null, SisAccessControl::getControlType, bo.getControlType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getControlCode()), SisAccessControl::getControlCode, bo.getControlCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOutCode()), SisAccessControl::getOutCode, bo.getOutCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrgCode()), SisAccessControl::getOrgCode, bo.getOrgCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), SisAccessControl::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
@@ -79,7 +79,6 @@ public class SisDeviceManageServiceImpl implements ISisDeviceManageService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeviceIp()), SisDeviceManage::getDeviceIp, bo.getDeviceIp());
|
||||
lqw.eq(bo.getDevicePort() != null, SisDeviceManage::getDevicePort, bo.getDevicePort());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDeviceMac()), SisDeviceManage::getDeviceMac, bo.getDeviceMac());
|
||||
lqw.eq(bo.getDeviceStatus() != null, SisDeviceManage::getDeviceStatus, bo.getDeviceStatus());
|
||||
lqw.eq(bo.getParentId() != null, SisDeviceManage::getParentId, bo.getParentId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getVcrIp()), SisDeviceManage::getVcrIp, bo.getVcrIp());
|
||||
lqw.eq(bo.getVcrPort() != null, SisDeviceManage::getVcrPort, bo.getVcrPort());
|
||||
|
@@ -1,30 +1,32 @@
|
||||
package org.dromara.sis.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.sis.domain.bo.SisLibDeviceRefBo;
|
||||
import org.dromara.sis.domain.vo.SisLibDeviceRefVo;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.domain.SisLibDeviceRef;
|
||||
import org.dromara.sis.domain.bo.AccessControlLibDeviceBo;
|
||||
import org.dromara.sis.domain.bo.SisLibDeviceRefBo;
|
||||
import org.dromara.sis.domain.vo.SisAccessControlDeviceVo;
|
||||
import org.dromara.sis.domain.vo.SisLibDeviceRefVo;
|
||||
import org.dromara.sis.mapper.SisLibDeviceRefMapper;
|
||||
import org.dromara.sis.service.ISisLibDeviceRefService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 系统库与设备库的关联Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-24
|
||||
* @since 2025-06-24
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@@ -99,6 +101,11 @@ public class SisLibDeviceRefServiceImpl implements ISisLibDeviceRefService {
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insert(SisLibDeviceRef ref) {
|
||||
return baseMapper.insert(ref) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统库与设备库的关联
|
||||
*
|
||||
@@ -145,4 +152,23 @@ public class SisLibDeviceRefServiceImpl implements ISisLibDeviceRefService {
|
||||
lqw.in(SisLibDeviceRef::getLibId, LibIds);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SisLibDeviceRefVo> queryByLibIds(Collection<Long> ids) {
|
||||
LambdaQueryWrapper<SisLibDeviceRef> lqw = Wrappers.lambdaQuery();
|
||||
lqw.in(SisLibDeviceRef::getLibId, ids);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteByLibIds(Collection<Long> ids) {
|
||||
LambdaQueryWrapper<SisLibDeviceRef> lqw = Wrappers.lambdaQuery();
|
||||
lqw.in(SisLibDeviceRef::getLibId, ids);
|
||||
return baseMapper.delete(lqw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccessControlLibDeviceBo> queryDeviceListByLibIds(Collection<Long> ids) {
|
||||
return baseMapper.queryDeviceListByLibIds(ids);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package org.dromara.sis.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import org.dromara.common.core.constant.CodePrefixConstants;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@@ -28,7 +26,6 @@ import org.dromara.sis.mapper.SisPersonLibImgMapper;
|
||||
import org.dromara.sis.service.ISisPersonLibImgService;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -38,7 +35,7 @@ import java.util.Collection;
|
||||
* 人像信息Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-24
|
||||
* @since 2025-06-24
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package org.dromara.sis.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -11,15 +13,18 @@ import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.domain.SisLibDeviceRef;
|
||||
import org.dromara.sis.domain.SisPersonLib;
|
||||
import org.dromara.sis.domain.bo.SisLibDeviceRefBo;
|
||||
import org.dromara.sis.domain.bo.SisPersonLibBo;
|
||||
import org.dromara.sis.domain.vo.SisAccessControlDeviceVo;
|
||||
import org.dromara.sis.domain.vo.SisLibDeviceRefVo;
|
||||
import org.dromara.sis.domain.vo.SisPersonLibVo;
|
||||
import org.dromara.sis.mapper.SisPersonLibMapper;
|
||||
import org.dromara.sis.sdk.unview.UnViewAiBoxApi;
|
||||
import org.dromara.sis.sdk.unview.model.UvModel;
|
||||
import org.dromara.sis.sdk.unview.service.UnViewAiBoxApiService;
|
||||
import org.dromara.sis.service.ISisAccessControlDeviceService;
|
||||
import org.dromara.sis.service.ISisLibDeviceRefService;
|
||||
import org.dromara.sis.service.ISisPersonLibService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -39,9 +44,9 @@ import java.util.Map;
|
||||
public class SisPersonLibServiceImpl implements ISisPersonLibService {
|
||||
|
||||
private final SisPersonLibMapper baseMapper;
|
||||
private final UnViewAiBoxApiService unViewAiBoxApiService;
|
||||
private final SisLibDeviceRefServiceImpl libDeviceRefService;
|
||||
private final SisAccessControlDeviceServiceImpl accessControlDeviceService;
|
||||
private final UnViewAiBoxApi unViewAiBoxApi;
|
||||
private final ISisLibDeviceRefService sisLibDeviceRefService;
|
||||
private final ISisAccessControlDeviceService sisAccessControlDeviceService;
|
||||
|
||||
/**
|
||||
* 查询人像库
|
||||
@@ -51,7 +56,13 @@ public class SisPersonLibServiceImpl implements ISisPersonLibService {
|
||||
*/
|
||||
@Override
|
||||
public SisPersonLibVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
SisPersonLibVo sisPersonLibVo = baseMapper.selectVoById(id);
|
||||
List<SisLibDeviceRefVo> sisLibDeviceRefVos = sisLibDeviceRefService.queryByLibIds(Collections.singleton(id));
|
||||
if (CollUtil.isNotEmpty(sisLibDeviceRefVos)) {
|
||||
List<Long> list = sisLibDeviceRefVos.stream().map(SisLibDeviceRefVo::getEqpId).toList();
|
||||
sisPersonLibVo.setEqpIds(list);
|
||||
}
|
||||
return sisPersonLibVo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,43 +110,47 @@ public class SisPersonLibServiceImpl implements ISisPersonLibService {
|
||||
* @param bo 人像库
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean insertByBo(SisPersonLibBo bo) {
|
||||
SisPersonLib add = MapstructUtils.convert(bo, SisPersonLib.class);
|
||||
// 生成库编码
|
||||
add.setLibCode(CodePrefixConstants.PERSON_LIB_CODE_PREFIX + IdUtil.getSnowflakeNextIdStr());
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
|
||||
long eqp_lib_id = 0L;
|
||||
// TODO 同步到宇视人像库
|
||||
if (bo.getEqbId() != null) {
|
||||
SisAccessControlDeviceVo accessControlDevice = accessControlDeviceService.queryById(bo.getEqbId());
|
||||
|
||||
if (accessControlDevice == null) return false;
|
||||
|
||||
// 同步到宇视盒子
|
||||
UvModel.UvSystemInfo systemInfo = new UvModel.UvSystemInfo();
|
||||
systemInfo.setAccount(accessControlDevice.getEqpAccount());
|
||||
systemInfo.setPassword(accessControlDevice.getEqpPwd());
|
||||
systemInfo.setIp(accessControlDevice.getEqpIp());
|
||||
systemInfo.setPort(Math.toIntExact(accessControlDevice.getEqpPort()));
|
||||
UvModel.AddLibResult resp = unViewAiBoxApiService.addPersonLib(systemInfo, add.getLibName());
|
||||
if (resp == null) return false;
|
||||
eqp_lib_id = resp.getLib_id().longValue();
|
||||
}
|
||||
|
||||
Assert.notNull(add, "数据处理失败");
|
||||
add.setLibCode(CodePrefixConstants.PERSONLIB_CODE_PREFIX + IdUtil.getSnowflakeNextIdStr());
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
log.info("库[{}]开始写入系统,result={}", add.getLibCode(), flag);
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
//TODO 写入设备关联库
|
||||
SisLibDeviceRefBo libDeviceRefBo = new SisLibDeviceRefBo();
|
||||
libDeviceRefBo.setLibId(add.getId());
|
||||
libDeviceRefBo.setEqpId(bo.getEqbId());
|
||||
libDeviceRefBo.setEqpLibId(eqp_lib_id);
|
||||
libDeviceRefBo.setEqpLibState(1L);
|
||||
libDeviceRefService.insertByBo(libDeviceRefBo);
|
||||
|
||||
for (Long eqpId : bo.getEqpIds()) {
|
||||
// 查询设备信息
|
||||
SisAccessControlDeviceVo vo = sisAccessControlDeviceService.queryById(eqpId);
|
||||
Assert.notNull(vo, "门禁控制设备不存在,id=" + eqpId);
|
||||
log.info("准备写入门禁设备,code={}", vo.getEqpNo());
|
||||
UvModel.UvSystemInfo systemInfo = new UvModel.UvSystemInfo();
|
||||
systemInfo.setAccount(vo.getEqpAccount());
|
||||
systemInfo.setPassword(vo.getEqpPwd());
|
||||
systemInfo.setIp(vo.getEqpIp());
|
||||
systemInfo.setPort(vo.getEqpPort());
|
||||
// libType =1 人像库,否则工服库
|
||||
Integer outLibCode = null;
|
||||
if (bo.getLibType() == 1) {
|
||||
UvModel.AddLibResult addLibResult = unViewAiBoxApi.addPersonLib(systemInfo, bo.getLibName());
|
||||
outLibCode = addLibResult.getLib_id();
|
||||
} else {
|
||||
UvModel.AddLibResult addLibResult = unViewAiBoxApi.addWorkClothesLib(systemInfo, bo.getLibName());
|
||||
outLibCode = addLibResult.getLib_id();
|
||||
}
|
||||
log.info("宇视建库完成,libId = {}", outLibCode);
|
||||
Assert.notNull(outLibCode, "写入宇视盒子失败");
|
||||
SisLibDeviceRef ref = new SisLibDeviceRef();
|
||||
ref.setLibId(add.getId());
|
||||
ref.setEqpId(vo.getId());
|
||||
ref.setEqpLibId(Long.valueOf(outLibCode));
|
||||
ref.setEqpLibState(1);
|
||||
ref.setEqpLibType(bo.getLibType());
|
||||
Boolean insert = sisLibDeviceRefService.insert(ref);
|
||||
Assert.isTrue(insert, "写入库关联关系表失败!");
|
||||
log.info("同步建库完成!");
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -167,29 +182,30 @@ public class SisPersonLibServiceImpl implements ISisPersonLibService {
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
List<SisLibDeviceRefVo> list = libDeviceRefService.queryListByLibId(ids);
|
||||
if(list.isEmpty()) return false;
|
||||
|
||||
Collection<Long> refIds = list.stream().map(SisLibDeviceRefVo::getId).toList();
|
||||
Integer[] refLibIds = list.stream().map(SisLibDeviceRefVo::getEqpLibId).map(Long::intValue).toArray(Integer[]::new);
|
||||
|
||||
// 宇视鉴权信息
|
||||
// 查询关联的设备信息,先删除设备上的库
|
||||
List<AccessControlLibDeviceBo> ls = sisLibDeviceRefService.queryDeviceListByLibIds(ids);
|
||||
// 删除关联关系
|
||||
ls.forEach(item -> {
|
||||
UvModel.UvSystemInfo systemInfo = new UvModel.UvSystemInfo();
|
||||
systemInfo.setAccount("admin");
|
||||
systemInfo.setPassword("nc123456.");
|
||||
systemInfo.setIp("47.109.37.87");
|
||||
systemInfo.setPort(4001);
|
||||
|
||||
boolean unViewFlag = unViewAiBoxApiService.deletePersonLib(systemInfo, refLibIds);
|
||||
if (!unViewFlag) return false;
|
||||
|
||||
Boolean refFlag = libDeviceRefService.deleteWithValidByIds(refIds, true);
|
||||
if (!refFlag) return false;
|
||||
systemInfo.setAccount(item.getEqpAccount());
|
||||
systemInfo.setPassword(item.getEqpPwd());
|
||||
systemInfo.setIp(item.getEqpIp());
|
||||
systemInfo.setPort(item.getEqpPort());
|
||||
// 实际上这里需要根据厂商不同去不同的设备删除
|
||||
if (item.getEqpLibType() == 1) {
|
||||
Boolean b = unViewAiBoxApi.deletePersonLib(systemInfo, item.getEqpLibId());
|
||||
log.info("删除宇试人像库[{}]完成,result={}", item.getEqpLibId(), b);
|
||||
} else {
|
||||
Boolean b = unViewAiBoxApi.deleteWorkClothesLib(systemInfo, item.getEqpLibId());
|
||||
log.info("删除宇试工服库[{}]完成,result={}", item.getEqpLibId(), b);
|
||||
}
|
||||
});
|
||||
// 查询当前库是否绑定
|
||||
sisLibDeviceRefService.deleteByLibIds(ids);
|
||||
log.info("删除personLibRef关联关系完成!");
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,6 @@ public class TdFactoryServiceImpl implements ITdFactoryService {
|
||||
lqw.orderByAsc(TdFactory::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFactoryNo()), TdFactory::getFactoryNo, bo.getFactoryNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFactoryName()), TdFactory::getFactoryName, bo.getFactoryName());
|
||||
lqw.eq(bo.getDataState() != null, TdFactory::getDataState, bo.getDataState());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 10001
|
||||
port: 10002
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
|
@@ -4,4 +4,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.sis.mapper.SisLibDeviceRefMapper">
|
||||
|
||||
<select id="queryDeviceListByLibIds" resultType="org.dromara.sis.domain.bo.AccessControlLibDeviceBo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`sis_lib_device_ref` a LEFT JOIN sis_access_control_device b ON a.eqp_id = b.id
|
||||
WHERE
|
||||
a.lib_id IN
|
||||
<foreach collection="ids" item="id" open="(" close=")" index="index" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user