feat(mcp): 新增清机记录查询工具 hardware.cleanlog.list.query
对齐老系统 /hardwareCleanLog/listByPage,修正 5 处老接口坑(设计文档 doc/hardware-cleanlog-mcp-design.md §5):agentId 传了仍叠加行级 ACL、 富化/图片按页批量消除 N+1、时间过滤明确落 modify_time、status=1 硬过滤 口径保持、type!=0 时 beforeCleanPics 恒空保持。 - 实体/Mapper 从 publicbeanandmap 逐字段复制(25+13 列全核对) - PermissionService 新增 applyHardwareCleanLogRowFilter(镜像 applyHardwareRowFilter 同一 getByIsAgent 变体) - 分页 selectCount+LIMIT 物理分页,rows 上限 100 截断+notice - 图片 type=0 行内 picurl,type!=0 按页 IN 批量查 hardware_clean_pic 按 order_no 拼 OSS URL - 入参校验抛 ToolCallException(INVALID_ARGUMENT) - seed-dev.sql 补 hardware/ops-query scope 绑定;reference 文档登记 #45 测试:新增 6 个单测,全量 482 tests 全绿
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
package me.iiv.agent.entity.m0;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/** 设备清理日志(m0.hardware_clean_log),逐字段复制自老系统 publicbeanandmap beans/b0/HardwareCleanLog。 */
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("hardware_clean_log")
|
||||
public class HardwareCleanLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Long createId;
|
||||
private Date createTime;
|
||||
private Long modifyId;
|
||||
/** 记录修改时间(即清机时间,老接口 startCreateTime/endCreateTime 实际落此列) */
|
||||
private Date modifyTime;
|
||||
private Integer softDelete;
|
||||
private String snCode;
|
||||
/** 操作人id */
|
||||
private Long userId;
|
||||
/** 身份类型 0:代理;1:物业;2:保洁 */
|
||||
private Integer userRoleType;
|
||||
/** 任务id */
|
||||
private Long assignmentId;
|
||||
/** 清理卷数 */
|
||||
private Integer cleanRfidCount;
|
||||
private String memo;
|
||||
/** 状态(老接口恒过滤 status=1) */
|
||||
private Integer status;
|
||||
/** 清机方式 0:大清洁;1:小清洁 */
|
||||
private Integer type;
|
||||
/** 清理前图片(type=0 大清洁时行内直存) */
|
||||
private String beforeCleanPicurl;
|
||||
/** 清理后图片(type=0 大清洁时行内直存) */
|
||||
private String afterCleanPicurl;
|
||||
private Long agentId;
|
||||
private Long propertyId;
|
||||
private Long districtId;
|
||||
/** 清机时清理天数 */
|
||||
private Integer cleanRfidDays;
|
||||
/** 位置 */
|
||||
private String positions;
|
||||
/** 工单编号 */
|
||||
private String workNo;
|
||||
private Long maintenanceAgentId;
|
||||
private String maintenanceAgentName;
|
||||
private Long maintenancePropertyId;
|
||||
private String maintenancePropertyName;
|
||||
/** 供电方式 0:电源 1:电池 */
|
||||
private Integer poweredType;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package me.iiv.agent.entity.m0;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/** 清机图片(m0.hardware_clean_pic),逐字段复制自老系统 publicbeanandmap beans/b0/HardwareCleanPic。 */
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@TableName("hardware_clean_pic")
|
||||
public class HardwareCleanPic implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Long createId;
|
||||
private Date createTime;
|
||||
private Long modifyId;
|
||||
private Date modifyTime;
|
||||
private Integer softDelete;
|
||||
/** 清洁记录id */
|
||||
private Long hardwareCleanId;
|
||||
/** 图片状态 */
|
||||
private Integer state;
|
||||
private String fileName;
|
||||
/** 排序 */
|
||||
private Integer orderNo;
|
||||
private String ossbucketname;
|
||||
private String ossfolder;
|
||||
/** 文件类型(0:图片;1:语音) */
|
||||
private Integer type;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package me.iiv.agent.mapper.m0;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanLog;
|
||||
|
||||
public interface HardwareCleanLogMapper extends BaseMapper<HardwareCleanLog> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package me.iiv.agent.mapper.m0;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanPic;
|
||||
|
||||
public interface HardwareCleanPicMapper extends BaseMapper<HardwareCleanPic> {
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
package me.iiv.agent.mcp.tool;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanLog;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanPic;
|
||||
import me.iiv.agent.entity.m0.User;
|
||||
import me.iiv.agent.mapper.m0.HardwareCleanLogMapper;
|
||||
import me.iiv.agent.mapper.m0.HardwareCleanPicMapper;
|
||||
import me.iiv.agent.mapper.m0.UserMapper;
|
||||
import me.iiv.agent.mcp.McpErrorCode;
|
||||
import me.iiv.agent.mcp.ToolCallException;
|
||||
import me.iiv.agent.mcp.ToolObject;
|
||||
import me.iiv.agent.mcp.XqTool;
|
||||
import me.iiv.agent.permission.PermissionService;
|
||||
import me.iiv.agent.security.AuthContextHolder;
|
||||
import org.springframework.ai.tool.annotation.Tool;
|
||||
import org.springframework.ai.tool.annotation.ToolParam;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.time.format.ResolverStyle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 清机记录查询工具,仿老系统 HardwareCleanLogController /listByPage。
|
||||
* 修正老接口坑(设计文档 doc/hardware-cleanlog-mcp-design.md §5):
|
||||
* agentId 传了仍叠加行级 ACL(老接口会绕过);富化/图片按页批量(老接口逐条 N+1);
|
||||
* type=0 用行内 picurl,type≠0 批量查 hardware_clean_pic(type=0 图片行,按 order_no 拼 OSS URL)。
|
||||
*/
|
||||
@Component
|
||||
public class HardwareCleanLogTools implements ToolObject {
|
||||
|
||||
private static final int DEFAULT_ROWS = 20;
|
||||
private static final int MAX_ROWS = 100;
|
||||
|
||||
/** 老接口 Redis 字典 key(HardwareCleanLogController /listByPage :99-104,Properyt 为老拼写) */
|
||||
private static final String NAME_AGENT_PREFIX = "name:Agent:";
|
||||
private static final String NAME_PROPERTY_PREFIX = "name:Properyt:";
|
||||
private static final String NAME_DISTRICT_PREFIX = "name:District:";
|
||||
|
||||
private static final DateTimeFormatter TIME_FORMAT =
|
||||
DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss").withResolverStyle(ResolverStyle.STRICT);
|
||||
|
||||
final HardwareCleanLogMapper hardwareCleanLogMapper;
|
||||
final HardwareCleanPicMapper hardwareCleanPicMapper;
|
||||
final UserMapper userMapper;
|
||||
final PermissionService permissionService;
|
||||
final StringRedisTemplate redisTemplate;
|
||||
|
||||
public HardwareCleanLogTools(HardwareCleanLogMapper hardwareCleanLogMapper,
|
||||
HardwareCleanPicMapper hardwareCleanPicMapper,
|
||||
UserMapper userMapper,
|
||||
PermissionService permissionService,
|
||||
StringRedisTemplate redisTemplate) {
|
||||
this.hardwareCleanLogMapper = hardwareCleanLogMapper;
|
||||
this.hardwareCleanPicMapper = hardwareCleanPicMapper;
|
||||
this.userMapper = userMapper;
|
||||
this.permissionService = permissionService;
|
||||
this.redisTemplate = redisTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询清机记录。硬过滤 soft_delete=0 + status=1(仅返回有效清机记录),固定 id DESC,
|
||||
* selectCount + LIMIT 物理分页(项目未注册 MP 分页拦截器,禁用 selectPage)。
|
||||
* 名称富化走 Redis multiGet、user 按页批量 IN、图片按页批量查,无 N+1。
|
||||
*/
|
||||
@XqTool(category = "hardware", kind = "read")
|
||||
@Tool(name = "hardware.cleanlog.list.query", description = "清机记录分页查询,对应老系统 /hardwareCleanLog/listByPage。"
|
||||
+ "仅返回有效清机记录(soft_delete=0 且 status=1),固定按 id 倒序。"
|
||||
+ "支持 districtId/propertyId/agentId/userId 精确匹配,snCode 模糊匹配,"
|
||||
+ "type(0=大清洁 1=小清洁)/userRoleType(0=代理 1=物业 2=保洁)精确匹配,"
|
||||
+ "startTime/endTime 按记录修改时间(即清机时间,modify_time)过滤,minCleanRfidCount/maxCleanRfidCount 清理卷数范围。"
|
||||
+ "传了 agentId 也仍然叠加当前身份的行级数据权限(修正老接口绕过 ACL 的 bug),无权数据返回空。"
|
||||
+ "page 默认 1,rows 默认 20、上限 100(超出截断为 100 并在 notice 提示)。"
|
||||
+ "每行返回清机记录全字段 + agentName/propertyName/districtName/userName 富化(Redis/按页批量)"
|
||||
+ "+ userRoleTypeText/typeText/poweredTypeText 中文文案 + beforeCleanPics/afterCleanPics 图片 URL 列表"
|
||||
+ "(type=0 大清洁取行内图片字段;type≠0 从清机图片表按 order_no 拼 OSS URL,归入 afterCleanPics,beforeCleanPics 恒空)。")
|
||||
public Map<String, Object> hardwareCleanLogListQuery(
|
||||
@ToolParam(required = false, description = "站点 id,正整数,精确匹配") Long districtId,
|
||||
@ToolParam(required = false, description = "物业 id,正整数,精确匹配") Long propertyId,
|
||||
@ToolParam(required = false, description = "代理 id,正整数,精确匹配;传了也仍叠加行级数据权限") Long agentId,
|
||||
@ToolParam(required = false, description = "sn码,模糊匹配") String snCode,
|
||||
@ToolParam(required = false, description = "操作人 id,正整数,精确匹配") Long userId,
|
||||
@ToolParam(required = false, description = "清机方式:0=大清洁 1=小清洁") Integer type,
|
||||
@ToolParam(required = false, description = "操作人身份:0=代理 1=物业 2=保洁") Integer userRoleType,
|
||||
@ToolParam(required = false, description = "开始时间,yyyy-MM-dd HH:mm:ss,按记录修改时间(即清机时间)过滤,含") String startTime,
|
||||
@ToolParam(required = false, description = "结束时间,yyyy-MM-dd HH:mm:ss,按记录修改时间(即清机时间)过滤,含") String endTime,
|
||||
@ToolParam(required = false, description = "清理卷数下限,非负整数,含") Integer minCleanRfidCount,
|
||||
@ToolParam(required = false, description = "清理卷数上限,非负整数,含") Integer maxCleanRfidCount,
|
||||
@ToolParam(required = false, description = "页码,从 1 开始,默认 1") Integer page,
|
||||
@ToolParam(required = false, description = "每页条数,默认 20,上限 100(超出截断为 100)") Integer rows) {
|
||||
validatePositive(districtId, "districtId");
|
||||
validatePositive(propertyId, "propertyId");
|
||||
validatePositive(agentId, "agentId");
|
||||
validatePositive(userId, "userId");
|
||||
validateEnum(type, "type", 0, 1);
|
||||
validateEnum(userRoleType, "userRoleType", 0, 1, 2);
|
||||
LocalDateTime start = parseTime(startTime, "startTime");
|
||||
LocalDateTime end = parseTime(endTime, "endTime");
|
||||
if (start != null && end != null && start.isAfter(end)) {
|
||||
throw invalid("startTime 不能晚于 endTime");
|
||||
}
|
||||
validateCountRange(minCleanRfidCount, "minCleanRfidCount");
|
||||
validateCountRange(maxCleanRfidCount, "maxCleanRfidCount");
|
||||
if (minCleanRfidCount != null && maxCleanRfidCount != null
|
||||
&& minCleanRfidCount > maxCleanRfidCount) {
|
||||
throw invalid("minCleanRfidCount 不能大于 maxCleanRfidCount");
|
||||
}
|
||||
|
||||
User user = AuthContextHolder.get().getUser();
|
||||
int pageNo = page == null || page < 1 ? 1 : page;
|
||||
boolean truncated = rows != null && rows > MAX_ROWS;
|
||||
int pageSize = rows == null || rows < 1 ? DEFAULT_ROWS : Math.min(rows, MAX_ROWS);
|
||||
|
||||
LambdaQueryWrapper<HardwareCleanLog> wrapper = new LambdaQueryWrapper<HardwareCleanLog>()
|
||||
.eq(HardwareCleanLog::getSoftDelete, 0)
|
||||
.eq(HardwareCleanLog::getStatus, 1);
|
||||
if (districtId != null) {
|
||||
wrapper.eq(HardwareCleanLog::getDistrictId, districtId);
|
||||
}
|
||||
if (propertyId != null) {
|
||||
wrapper.eq(HardwareCleanLog::getPropertyId, propertyId);
|
||||
}
|
||||
if (agentId != null) {
|
||||
wrapper.eq(HardwareCleanLog::getAgentId, agentId);
|
||||
}
|
||||
if (StringUtils.hasText(snCode)) {
|
||||
wrapper.like(HardwareCleanLog::getSnCode, snCode);
|
||||
}
|
||||
if (userId != null) {
|
||||
wrapper.eq(HardwareCleanLog::getUserId, userId);
|
||||
}
|
||||
if (type != null) {
|
||||
wrapper.eq(HardwareCleanLog::getType, type);
|
||||
}
|
||||
if (userRoleType != null) {
|
||||
wrapper.eq(HardwareCleanLog::getUserRoleType, userRoleType);
|
||||
}
|
||||
if (start != null) {
|
||||
wrapper.ge(HardwareCleanLog::getModifyTime, startTime.trim());
|
||||
}
|
||||
if (end != null) {
|
||||
wrapper.le(HardwareCleanLog::getModifyTime, endTime.trim());
|
||||
}
|
||||
if (minCleanRfidCount != null) {
|
||||
wrapper.ge(HardwareCleanLog::getCleanRfidCount, minCleanRfidCount);
|
||||
}
|
||||
if (maxCleanRfidCount != null) {
|
||||
wrapper.le(HardwareCleanLog::getCleanRfidCount, maxCleanRfidCount);
|
||||
}
|
||||
permissionService.applyHardwareCleanLogRowFilter(wrapper, user);
|
||||
|
||||
Long total = hardwareCleanLogMapper.selectCount(wrapper);
|
||||
wrapper.orderByDesc(HardwareCleanLog::getId)
|
||||
.last("LIMIT " + (long) (pageNo - 1) * pageSize + "," + pageSize);
|
||||
List<HardwareCleanLog> list = hardwareCleanLogMapper.selectList(wrapper);
|
||||
|
||||
Enrichment enrichment = enrich(list);
|
||||
Map<Long, List<String>> afterCleanPicsById = afterCleanPics(list);
|
||||
List<Map<String, Object>> records = new ArrayList<>();
|
||||
for (HardwareCleanLog log : list) {
|
||||
records.add(toRecord(log, enrichment, afterCleanPicsById));
|
||||
}
|
||||
|
||||
Map<String, Object> result = new LinkedHashMap<>();
|
||||
result.put("total", total);
|
||||
result.put("page", pageNo);
|
||||
result.put("rows", pageSize);
|
||||
if (truncated) {
|
||||
result.put("notice", "rows 超过上限 100,已截断为 100");
|
||||
}
|
||||
result.put("records", records);
|
||||
return result;
|
||||
}
|
||||
|
||||
/** 批量富化上下文:Redis 名称 multiGet + 本页 user 批量 IN(修老接口 :99-106 逐条 N+1)。 */
|
||||
private Enrichment enrich(List<HardwareCleanLog> list) {
|
||||
Enrichment enrichment = new Enrichment();
|
||||
if (list.isEmpty()) {
|
||||
return enrichment;
|
||||
}
|
||||
enrichment.agentNames = redisNames(list, HardwareCleanLog::getAgentId, NAME_AGENT_PREFIX);
|
||||
enrichment.propertyNames = redisNames(list, HardwareCleanLog::getPropertyId, NAME_PROPERTY_PREFIX);
|
||||
enrichment.districtNames = redisNames(list, HardwareCleanLog::getDistrictId, NAME_DISTRICT_PREFIX);
|
||||
List<Long> userIds = list.stream().map(HardwareCleanLog::getUserId)
|
||||
.filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
if (!userIds.isEmpty()) {
|
||||
enrichment.userNames = userMapper.selectBatchIds(userIds).stream()
|
||||
.collect(Collectors.toMap(User::getId, User::getName, (a, b) -> a));
|
||||
}
|
||||
return enrichment;
|
||||
}
|
||||
|
||||
private Map<Long, String> redisNames(List<HardwareCleanLog> list,
|
||||
Function<HardwareCleanLog, Long> idGetter, String prefix) {
|
||||
List<Long> ids = list.stream().map(idGetter)
|
||||
.filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
if (ids.isEmpty()) {
|
||||
return Map.of();
|
||||
}
|
||||
List<String> keys = ids.stream().map(id -> prefix + id).collect(Collectors.toList());
|
||||
List<String> values = redisTemplate.opsForValue().multiGet(keys);
|
||||
Map<Long, String> names = new LinkedHashMap<>();
|
||||
for (int i = 0; i < ids.size(); i++) {
|
||||
names.put(ids.get(i), values == null || i >= values.size() ? null : values.get(i));
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
/**
|
||||
* type≠0 行的清理后图片:按页 hardware_clean_id IN 批量查 hardware_clean_pic
|
||||
* (soft_delete=0 且 type=0 图片行),按 order_no 排序拼 OSS URL
|
||||
* (老接口 :113-121 逐条查询的批量修正)。type=0 行不查图片表,用行内 picurl。
|
||||
*/
|
||||
private Map<Long, List<String>> afterCleanPics(List<HardwareCleanLog> list) {
|
||||
List<Long> ids = list.stream()
|
||||
.filter(log -> log.getType() == null || log.getType() != 0)
|
||||
.map(HardwareCleanLog::getId)
|
||||
.filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
if (ids.isEmpty()) {
|
||||
return Map.of();
|
||||
}
|
||||
List<HardwareCleanPic> pics = hardwareCleanPicMapper.selectList(new LambdaQueryWrapper<HardwareCleanPic>()
|
||||
.eq(HardwareCleanPic::getSoftDelete, 0)
|
||||
.eq(HardwareCleanPic::getType, 0)
|
||||
.in(HardwareCleanPic::getHardwareCleanId, ids)
|
||||
.orderByAsc(HardwareCleanPic::getHardwareCleanId)
|
||||
.orderByAsc(HardwareCleanPic::getOrderNo));
|
||||
Map<Long, List<String>> urlsByCleanId = new LinkedHashMap<>();
|
||||
for (HardwareCleanPic pic : pics) {
|
||||
urlsByCleanId.computeIfAbsent(pic.getHardwareCleanId(), ignored -> new ArrayList<>())
|
||||
.add(ossUrl(pic));
|
||||
}
|
||||
return urlsByCleanId;
|
||||
}
|
||||
|
||||
/** 老接口 :118 同款 OSS URL 拼接:http://{bucket}.oss-cn-beijing.aliyuncs.com/{folder}{fileName} */
|
||||
private static String ossUrl(HardwareCleanPic pic) {
|
||||
return "http://" + pic.getOssbucketname() + ".oss-cn-beijing.aliyuncs.com/"
|
||||
+ pic.getOssfolder() + pic.getFileName();
|
||||
}
|
||||
|
||||
private Map<String, Object> toRecord(HardwareCleanLog log, Enrichment enrichment,
|
||||
Map<Long, List<String>> afterCleanPicsById) {
|
||||
List<String> beforeCleanPics = new ArrayList<>();
|
||||
List<String> afterCleanPics = new ArrayList<>();
|
||||
if (log.getType() != null && log.getType() == 0) {
|
||||
if (StringUtils.hasText(log.getBeforeCleanPicurl())) {
|
||||
beforeCleanPics.add(log.getBeforeCleanPicurl());
|
||||
}
|
||||
if (StringUtils.hasText(log.getAfterCleanPicurl())) {
|
||||
afterCleanPics.add(log.getAfterCleanPicurl());
|
||||
}
|
||||
} else {
|
||||
afterCleanPics.addAll(afterCleanPicsById.getOrDefault(log.getId(), List.of()));
|
||||
}
|
||||
|
||||
Map<String, Object> record = new LinkedHashMap<>();
|
||||
record.put("id", log.getId());
|
||||
record.put("snCode", log.getSnCode());
|
||||
record.put("userId", log.getUserId());
|
||||
record.put("userName", mapGet(enrichment.userNames, log.getUserId()));
|
||||
record.put("userRoleType", log.getUserRoleType());
|
||||
record.put("userRoleTypeText", userRoleTypeText(log.getUserRoleType()));
|
||||
record.put("type", log.getType());
|
||||
record.put("typeText", typeText(log.getType()));
|
||||
record.put("cleanRfidCount", log.getCleanRfidCount());
|
||||
record.put("cleanRfidDays", log.getCleanRfidDays());
|
||||
record.put("memo", log.getMemo());
|
||||
record.put("agentId", log.getAgentId());
|
||||
record.put("agentName", mapGet(enrichment.agentNames, log.getAgentId()));
|
||||
record.put("propertyId", log.getPropertyId());
|
||||
record.put("propertyName", mapGet(enrichment.propertyNames, log.getPropertyId()));
|
||||
record.put("districtId", log.getDistrictId());
|
||||
record.put("districtName", mapGet(enrichment.districtNames, log.getDistrictId()));
|
||||
record.put("positions", log.getPositions());
|
||||
record.put("workNo", log.getWorkNo());
|
||||
record.put("assignmentId", log.getAssignmentId());
|
||||
record.put("maintenanceAgentId", log.getMaintenanceAgentId());
|
||||
record.put("maintenanceAgentName", log.getMaintenanceAgentName());
|
||||
record.put("maintenancePropertyId", log.getMaintenancePropertyId());
|
||||
record.put("maintenancePropertyName", log.getMaintenancePropertyName());
|
||||
record.put("poweredType", log.getPoweredType());
|
||||
record.put("poweredTypeText", poweredTypeText(log.getPoweredType()));
|
||||
record.put("createTime", format(log.getCreateTime()));
|
||||
record.put("modifyTime", format(log.getModifyTime()));
|
||||
record.put("beforeCleanPics", beforeCleanPics);
|
||||
record.put("afterCleanPics", afterCleanPics);
|
||||
return record;
|
||||
}
|
||||
|
||||
private static final class Enrichment {
|
||||
Map<Long, String> agentNames = Map.of();
|
||||
Map<Long, String> propertyNames = Map.of();
|
||||
Map<Long, String> districtNames = Map.of();
|
||||
Map<Long, String> userNames = Map.of();
|
||||
}
|
||||
|
||||
private static <K, V> V mapGet(Map<K, V> map, K key) {
|
||||
return key == null ? null : map.get(key);
|
||||
}
|
||||
|
||||
private static String format(Date value) {
|
||||
return value == null ? null : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(value);
|
||||
}
|
||||
|
||||
private static String userRoleTypeText(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return switch (value) {
|
||||
case 0 -> "代理";
|
||||
case 1 -> "物业";
|
||||
case 2 -> "保洁";
|
||||
default -> "未知(" + value + ")";
|
||||
};
|
||||
}
|
||||
|
||||
private static String typeText(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return switch (value) {
|
||||
case 0 -> "大清洁";
|
||||
case 1 -> "小清洁";
|
||||
default -> "未知(" + value + ")";
|
||||
};
|
||||
}
|
||||
|
||||
private static String poweredTypeText(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return switch (value) {
|
||||
case 0 -> "电源";
|
||||
case 1 -> "电池";
|
||||
default -> "未知(" + value + ")";
|
||||
};
|
||||
}
|
||||
|
||||
private static void validatePositive(Long value, String name) {
|
||||
if (value != null && value < 1) {
|
||||
throw invalid(name + " 必须为正整数");
|
||||
}
|
||||
}
|
||||
|
||||
private static void validateEnum(Integer value, String name, int... allowed) {
|
||||
if (value == null) {
|
||||
return;
|
||||
}
|
||||
for (int candidate : allowed) {
|
||||
if (value == candidate) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
String options = Arrays.stream(allowed).mapToObj(String::valueOf)
|
||||
.collect(Collectors.joining("、"));
|
||||
throw invalid(name + " 仅支持 " + options);
|
||||
}
|
||||
|
||||
private static void validateCountRange(Integer value, String name) {
|
||||
if (value != null && value < 0) {
|
||||
throw invalid(name + " 必须为非负整数");
|
||||
}
|
||||
}
|
||||
|
||||
private static LocalDateTime parseTime(String value, String name) {
|
||||
if (!StringUtils.hasText(value)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return LocalDateTime.parse(value.trim(), TIME_FORMAT);
|
||||
} catch (DateTimeParseException e) {
|
||||
throw invalid(name + " 格式非法,要求 yyyy-MM-dd HH:mm:ss: " + value);
|
||||
}
|
||||
}
|
||||
|
||||
/** 入参类错误透出具体文案给调用方(对齐 position.detail/traffic 等新工具风格),便于 LLM 自愈 */
|
||||
private static ToolCallException invalid(String message) {
|
||||
return new ToolCallException(McpErrorCode.INVALID_ARGUMENT, message);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import me.iiv.agent.entity.m0.Authority;
|
||||
import me.iiv.agent.entity.m0.BatteryFaultLog;
|
||||
import me.iiv.agent.entity.m0.DeviceLifeCycle;
|
||||
import me.iiv.agent.entity.m0.DistrictDistrictStrategy;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanLog;
|
||||
import me.iiv.agent.entity.m0.HardwareView;
|
||||
import me.iiv.agent.entity.m0.Properyt;
|
||||
import me.iiv.agent.entity.m0.ToiletAirquality;
|
||||
@@ -885,6 +886,29 @@ public class PermissionService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清机记录(m0 hardware_clean_log)行权限:逐行镜像 applyHardwareRowFilter——
|
||||
* 老列表 /hardwareCleanLog/listByPage 用的就是同一 getByIsAgent 20250611 变体
|
||||
* (propertyFlag=true, className="property_id",HardwareCleanLogController.java:77),
|
||||
* 落到 hardware_clean_log 的 agent_id / property_id 字段上,语义 1:1 对齐。
|
||||
*/
|
||||
public void applyHardwareCleanLogRowFilter(LambdaQueryWrapper<HardwareCleanLog> wrapper, User user) {
|
||||
RowScope scope = resolveRowScope(user);
|
||||
if (scope.headquarters) {
|
||||
return;
|
||||
}
|
||||
if (scope.salesPropertyIds != null) {
|
||||
wrapper.in(HardwareCleanLog::getPropertyId, scope.salesPropertyIds);
|
||||
return;
|
||||
}
|
||||
if (!scope.managedPropertyIds.isEmpty()) {
|
||||
wrapper.and(w -> w.in(HardwareCleanLog::getAgentId, scope.ids)
|
||||
.or().in(HardwareCleanLog::getPropertyId, scope.managedPropertyIds));
|
||||
} else {
|
||||
wrapper.in(HardwareCleanLog::getAgentId, scope.ids);
|
||||
}
|
||||
}
|
||||
|
||||
/** 电池故障日志行权限:与出纸机列表复用同一代理/物业可见范围。 */
|
||||
public void applyBatteryFaultLogRowFilter(LambdaQueryWrapper<BatteryFaultLog> wrapper, User user) {
|
||||
RowScope scope = resolveRowScope(user);
|
||||
|
||||
+314
@@ -0,0 +1,314 @@
|
||||
package me.iiv.agent.mcp.tool;
|
||||
|
||||
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanLog;
|
||||
import me.iiv.agent.entity.m0.HardwareCleanPic;
|
||||
import me.iiv.agent.entity.m0.User;
|
||||
import me.iiv.agent.mapper.m0.HardwareCleanLogMapper;
|
||||
import me.iiv.agent.mapper.m0.HardwareCleanPicMapper;
|
||||
import me.iiv.agent.mapper.m0.UserMapper;
|
||||
import me.iiv.agent.mcp.McpErrorCode;
|
||||
import me.iiv.agent.mcp.ToolCallException;
|
||||
import me.iiv.agent.permission.PermissionService;
|
||||
import me.iiv.agent.security.AuthContext;
|
||||
import me.iiv.agent.security.AuthContextHolder;
|
||||
import org.apache.ibatis.builder.MapperBuilderAssistant;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.data.redis.core.ValueOperations;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyList;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class HardwareCleanLogToolsTest {
|
||||
|
||||
@Mock
|
||||
HardwareCleanLogMapper cleanLogMapper;
|
||||
@Mock
|
||||
HardwareCleanPicMapper cleanPicMapper;
|
||||
@Mock
|
||||
UserMapper userMapper;
|
||||
@Mock
|
||||
PermissionService permissionService;
|
||||
@Mock
|
||||
StringRedisTemplate redisTemplate;
|
||||
|
||||
HardwareCleanLogTools tools;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""),
|
||||
HardwareCleanLog.class);
|
||||
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""),
|
||||
HardwareCleanPic.class);
|
||||
tools = new HardwareCleanLogTools(cleanLogMapper, cleanPicMapper, userMapper,
|
||||
permissionService, redisTemplate);
|
||||
User user = new User();
|
||||
user.setId(7L);
|
||||
AuthContextHolder.set(new AuthContext(null, user));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
AuthContextHolder.clear();
|
||||
}
|
||||
|
||||
private ValueOperations<String, String> stubRedisNames() {
|
||||
ValueOperations<String, String> valueOperations = mock(ValueOperations.class);
|
||||
when(redisTemplate.opsForValue()).thenReturn(valueOperations);
|
||||
when(valueOperations.multiGet(anyList())).thenAnswer(invocation -> {
|
||||
List<String> keys = invocation.getArgument(0);
|
||||
return keys.stream().map(key -> switch (key) {
|
||||
case "name:Agent:12" -> "测试代理";
|
||||
case "name:Properyt:11" -> "测试物业";
|
||||
case "name:District:5" -> "测试站点";
|
||||
default -> null;
|
||||
}).collect(Collectors.toList());
|
||||
});
|
||||
return valueOperations;
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
void listBuildsFiltersAppliesAclAndTruncatesRows() {
|
||||
HardwareCleanLog log = new HardwareCleanLog();
|
||||
log.setId(9L);
|
||||
log.setSnCode("D2AB001");
|
||||
log.setUserId(8L);
|
||||
log.setUserRoleType(2);
|
||||
log.setType(0);
|
||||
log.setCleanRfidCount(3);
|
||||
log.setCleanRfidDays(7);
|
||||
log.setMemo("大清洁");
|
||||
log.setAgentId(12L);
|
||||
log.setPropertyId(11L);
|
||||
log.setDistrictId(5L);
|
||||
log.setPositions("3F 男卫");
|
||||
log.setWorkNo("WO001");
|
||||
log.setAssignmentId(66L);
|
||||
log.setMaintenanceAgentId(21L);
|
||||
log.setMaintenanceAgentName("运维代理");
|
||||
log.setMaintenancePropertyId(22L);
|
||||
log.setMaintenancePropertyName("运维物业");
|
||||
log.setPoweredType(1);
|
||||
log.setBeforeCleanPicurl("http://before.jpg");
|
||||
log.setAfterCleanPicurl("http://after.jpg");
|
||||
log.setCreateTime(Date.from(Instant.parse("2026-10-30T02:00:00Z")));
|
||||
log.setModifyTime(Date.from(Instant.parse("2026-10-31T02:00:00Z")));
|
||||
when(cleanLogMapper.selectCount(any())).thenReturn(1L);
|
||||
when(cleanLogMapper.selectList(any())).thenReturn(List.of(log));
|
||||
|
||||
stubRedisNames();
|
||||
User operator = new User();
|
||||
operator.setId(8L);
|
||||
operator.setName("保洁员");
|
||||
when(userMapper.selectBatchIds(any())).thenReturn(List.of(operator));
|
||||
|
||||
Map<String, Object> result = tools.hardwareCleanLogListQuery(
|
||||
5L, 11L, 12L, "D2AB", 8L, 0, 2,
|
||||
"2026-10-01 00:00:00", "2026-11-01 00:00:00", 1, 10, 1, 500);
|
||||
|
||||
assertEquals(1, result.get("page"));
|
||||
assertEquals(100, result.get("rows"));
|
||||
assertEquals("rows 超过上限 100,已截断为 100", result.get("notice"));
|
||||
|
||||
// 过滤拼装与老接口一一对应(时间落 modify_time),status=1 硬过滤
|
||||
ArgumentCaptor<LambdaQueryWrapper<HardwareCleanLog>> captor =
|
||||
ArgumentCaptor.forClass(LambdaQueryWrapper.class);
|
||||
verify(cleanLogMapper).selectList(captor.capture());
|
||||
String sql = captor.getValue().getSqlSegment();
|
||||
assertTrue(sql.contains("soft_delete ="));
|
||||
assertTrue(sql.contains("status ="));
|
||||
assertTrue(sql.contains("district_id ="));
|
||||
assertTrue(sql.contains("property_id ="));
|
||||
assertTrue(sql.contains("agent_id ="));
|
||||
assertTrue(sql.contains("sn_code LIKE"));
|
||||
assertTrue(sql.contains("user_id ="));
|
||||
assertTrue(sql.contains("type ="));
|
||||
assertTrue(sql.contains("user_role_type ="));
|
||||
assertTrue(sql.contains("modify_time >="));
|
||||
assertTrue(sql.contains("modify_time <="));
|
||||
assertTrue(sql.contains("clean_rfid_count >="));
|
||||
assertTrue(sql.contains("clean_rfid_count <="));
|
||||
assertTrue(sql.contains("ORDER BY id DESC"));
|
||||
// agentId 传了仍叠加行级 ACL(修老接口 HardwareCleanLogController.java:73 绕过 bug)
|
||||
verify(permissionService).applyHardwareCleanLogRowFilter(any(), any());
|
||||
|
||||
Map<String, Object> record = ((List<Map<String, Object>>) result.get("records")).get(0);
|
||||
assertEquals("测试代理", record.get("agentName"));
|
||||
assertEquals("测试物业", record.get("propertyName"));
|
||||
assertEquals("测试站点", record.get("districtName"));
|
||||
assertEquals("保洁员", record.get("userName"));
|
||||
assertEquals("保洁", record.get("userRoleTypeText"));
|
||||
assertEquals("大清洁", record.get("typeText"));
|
||||
assertEquals("电池", record.get("poweredTypeText"));
|
||||
assertEquals("2026-10-31 10:00:00", record.get("modifyTime"));
|
||||
|
||||
// type=0 大清洁:行内 picurl,不查图片表
|
||||
assertEquals(List.of("http://before.jpg"), record.get("beforeCleanPics"));
|
||||
assertEquals(List.of("http://after.jpg"), record.get("afterCleanPics"));
|
||||
verify(cleanPicMapper, never()).selectList(any());
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
void smallCleanBatchLoadsPicsOrderedByOrderNo() {
|
||||
HardwareCleanLog log = new HardwareCleanLog();
|
||||
log.setId(9L);
|
||||
log.setType(1);
|
||||
when(cleanLogMapper.selectCount(any())).thenReturn(1L);
|
||||
when(cleanLogMapper.selectList(any())).thenReturn(List.of(log));
|
||||
|
||||
HardwareCleanPic second = new HardwareCleanPic();
|
||||
second.setHardwareCleanId(9L);
|
||||
second.setOrderNo(2);
|
||||
second.setOssbucketname("bucket");
|
||||
second.setOssfolder("clean/");
|
||||
second.setFileName("b.jpg");
|
||||
HardwareCleanPic first = new HardwareCleanPic();
|
||||
first.setHardwareCleanId(9L);
|
||||
first.setOrderNo(1);
|
||||
first.setOssbucketname("bucket");
|
||||
first.setOssfolder("clean/");
|
||||
first.setFileName("a.jpg");
|
||||
when(cleanPicMapper.selectList(any())).thenReturn(List.of(first, second));
|
||||
|
||||
Map<String, Object> result = tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, null, null, null, null, 1, 20);
|
||||
|
||||
// 图片按页 IN 批量查:图片行 type=0、按 order_no 排序
|
||||
ArgumentCaptor<LambdaQueryWrapper<HardwareCleanPic>> picCaptor =
|
||||
ArgumentCaptor.forClass(LambdaQueryWrapper.class);
|
||||
verify(cleanPicMapper).selectList(picCaptor.capture());
|
||||
String picSql = picCaptor.getValue().getSqlSegment();
|
||||
assertTrue(picSql.contains("soft_delete ="));
|
||||
assertTrue(picSql.contains("type ="));
|
||||
assertTrue(picSql.contains("hardware_clean_id IN"));
|
||||
assertTrue(picSql.contains("ORDER BY hardware_clean_id ASC,order_no ASC"));
|
||||
|
||||
Map<String, Object> record = ((List<Map<String, Object>>) result.get("records")).get(0);
|
||||
// type≠0:before 恒空(老系统如此),图片按 order_no 归入 after
|
||||
assertEquals(List.of(), record.get("beforeCleanPics"));
|
||||
assertEquals(List.of(
|
||||
"http://bucket.oss-cn-beijing.aliyuncs.com/clean/a.jpg",
|
||||
"http://bucket.oss-cn-beijing.aliyuncs.com/clean/b.jpg"), record.get("afterCleanPics"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void rejectsInvalidParamsBeforeQuerying() {
|
||||
// 非正 id
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
0L, null, null, null, null, null, null, null, null, null, null, 1, 20));
|
||||
// 枚举越界
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, 2, null, null, null, null, null, 1, 20));
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, 3, null, null, null, null, 1, 20));
|
||||
// 时间格式非法
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, "2026/11/01", null, null, null, 1, 20));
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, null, "2026-11-01", null, null, 1, 20));
|
||||
// startTime 晚于 endTime
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null,
|
||||
"2026-11-02 00:00:00", "2026-11-01 00:00:00", null, null, 1, 20));
|
||||
// 卷数范围非法
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, null, null, -1, null, 1, 20));
|
||||
assertThrows(ToolCallException.class, () -> tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, null, null, 10, 5, 1, 20));
|
||||
|
||||
ToolCallException exception = assertThrows(ToolCallException.class,
|
||||
() -> tools.hardwareCleanLogListQuery(
|
||||
0L, null, null, null, null, null, null, null, null, null, null, 1, 20));
|
||||
assertEquals(McpErrorCode.INVALID_ARGUMENT, exception.getCode());
|
||||
assertTrue(exception.getRawMessage().contains("districtId"));
|
||||
verifyNoInteractions(cleanLogMapper, cleanPicMapper, userMapper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
void emptyPageSkipsEnrichment() {
|
||||
when(cleanLogMapper.selectCount(any())).thenReturn(0L);
|
||||
when(cleanLogMapper.selectList(any())).thenReturn(List.of());
|
||||
|
||||
Map<String, Object> result = tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, null, null, null, null, null, null);
|
||||
|
||||
assertEquals(0L, result.get("total"));
|
||||
assertEquals(1, result.get("page"));
|
||||
assertEquals(20, result.get("rows"));
|
||||
assertEquals(List.of(), result.get("records"));
|
||||
assertNull(result.get("notice"));
|
||||
verify(permissionService).applyHardwareCleanLogRowFilter(any(), any());
|
||||
verifyNoInteractions(cleanPicMapper, userMapper, redisTemplate);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
void missingNamesStayNullAndUserNameFallsBackToNull() {
|
||||
HardwareCleanLog log = new HardwareCleanLog();
|
||||
log.setId(9L);
|
||||
log.setType(0);
|
||||
log.setUserId(8L);
|
||||
log.setAgentId(12L);
|
||||
when(cleanLogMapper.selectCount(any())).thenReturn(1L);
|
||||
when(cleanLogMapper.selectList(any())).thenReturn(List.of(log));
|
||||
|
||||
stubRedisNames();
|
||||
when(userMapper.selectBatchIds(any())).thenReturn(List.of());
|
||||
|
||||
Map<String, Object> result = tools.hardwareCleanLogListQuery(
|
||||
null, null, null, null, null, null, null, null, null, null, null, 1, 20);
|
||||
|
||||
Map<String, Object> record = ((List<Map<String, Object>>) result.get("records")).get(0);
|
||||
assertEquals("测试代理", record.get("agentName"));
|
||||
assertNull(record.get("propertyName"));
|
||||
assertNull(record.get("userName"));
|
||||
assertNull(record.get("userRoleTypeText"));
|
||||
assertEquals(List.of(), record.get("beforeCleanPics"));
|
||||
assertEquals(List.of(), record.get("afterCleanPics"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void springAiPublishesReviewedSchema() {
|
||||
var callbacks = org.springframework.ai.tool.method.MethodToolCallbackProvider.builder()
|
||||
.toolObjects(tools).build().getToolCallbacks();
|
||||
Map<String, String> schemas = Arrays.stream(callbacks).collect(Collectors.toMap(
|
||||
callback -> callback.getToolDefinition().name(),
|
||||
callback -> callback.getToolDefinition().inputSchema()));
|
||||
|
||||
assertEquals(1, schemas.size());
|
||||
assertTrue(schemas.containsKey("hardware.cleanlog.list.query"));
|
||||
String schema = schemas.get("hardware.cleanlog.list.query");
|
||||
assertTrue(schema.contains("startTime"));
|
||||
assertTrue(schema.contains("userRoleType"));
|
||||
assertTrue(schema.contains("minCleanRfidCount"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user