浏览代码

feat(增加平台字典项,增加对象与平台字典关联,增加对象类表中类型与对象平台的额字典检索): 增加平台字典项,增加对象与平台字典关联,增加对象类表中类型与对象平台的额字典检索

增加平台字典项,增加对象与平台字典关联,增加对象类表中类型与对象平台的额字典检索
zjian 19 小时之前
父节点
当前提交
1d8f516983

+ 10 - 0
snowy-plugin/snowy-plugin-coldchain/src/main/java/vip/xiaonuo/coldchain/modular/monitortarget/entity/MonitorTarget.java

@@ -145,4 +145,14 @@ public class MonitorTarget extends OrgEntity {
     @TableField(value = "target_type")
     @Schema(description = "对象类型")
     private String targetType;
+
+
+
+    /**
+     * 平台
+     */
+    @TableField(value = "platform")
+    @Schema(description = "平台")
+    private String platform;
+
 }

+ 6 - 0
snowy-plugin/snowy-plugin-coldchain/src/main/java/vip/xiaonuo/coldchain/modular/monitortarget/param/MonitorTargetAddWithRoomParam.java

@@ -101,4 +101,10 @@ public class MonitorTargetAddWithRoomParam {
     @Schema(description = "对象类型")
     private String targetType;
 
+    /**
+     * 平台
+     */
+    @Schema(description = "平台")
+    private String platform;
+
 }

+ 6 - 0
snowy-plugin/snowy-plugin-coldchain/src/main/java/vip/xiaonuo/coldchain/modular/monitortarget/param/MonitorTargetEditWithRoomParam.java

@@ -122,4 +122,10 @@ public class MonitorTargetEditWithRoomParam {
     @Schema(description = "对象类型")
     private String targetType;
 
+    /**
+     * 平台
+     */
+    @Schema(description = "平台")
+    private String platform;
+
 }

+ 12 - 0
snowy-plugin/snowy-plugin-coldchain/src/main/java/vip/xiaonuo/coldchain/modular/monitortarget/param/MonitorTargetPageParam.java

@@ -100,6 +100,18 @@ public class MonitorTargetPageParam {
     @Schema(description = "负责人")
     private String leaders;
 
+    /**
+     * 对象类型
+     */
+    @Schema(description = "对象类型")
+    private String targetType;
+
+    /**
+     * 平台
+     */
+    @Schema(description = "平台")
+    private String platform;
+
     // 计算分页偏移量
     public int getOffset() {
         return (current - 1) * size;  // 当前页 - 1 乘以每页条数

+ 6 - 0
snowy-plugin/snowy-plugin-coldchain/src/main/java/vip/xiaonuo/coldchain/modular/monitortarget/service/impl/MonitorTargetServiceImpl.java

@@ -108,6 +108,12 @@ public class MonitorTargetServiceImpl extends ServiceImpl<MonitorTargetMapper, M
         if (StrUtil.isNotBlank(monitorTargetPageParam.getLeaders())) {
             queryWrapper.lambda().like(MonitorTarget::getLeaders, monitorTargetPageParam.getLeaders());
         }
+        if (StrUtil.isNotBlank(monitorTargetPageParam.getTargetType())) {
+            queryWrapper.lambda().eq(MonitorTarget::getTargetType, monitorTargetPageParam.getTargetType());
+        }
+        if (StrUtil.isNotBlank(monitorTargetPageParam.getPlatform())) {
+            queryWrapper.lambda().eq(MonitorTarget::getPlatform, monitorTargetPageParam.getPlatform());
+        }
         if (ObjectUtil.isAllNotEmpty(monitorTargetPageParam.getSortField(), monitorTargetPageParam.getSortOrder())) {
             CommonSortOrderEnum.validate(monitorTargetPageParam.getSortOrder());
             queryWrapper.orderBy(true, monitorTargetPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()), StrUtil.toUnderlineCase(monitorTargetPageParam.getSortField()));

+ 8 - 0
snowy-web-app/src/main/resources/_sql/zhangjian_20251222_update.sql

@@ -0,0 +1,8 @@
+ALTER TABLE `coldchain`.`monitor_target`
+    ADD COLUMN `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台' AFTER `target_type`;
+INSERT INTO `coldchain`.`dev_dict` (`ID`, `PARENT_ID`, `DICT_LABEL`, `DICT_VALUE`, `CATEGORY`, `SORT_CODE`, `EXT_JSON`, `DELETE_FLAG`, `CREATE_TIME`, `CREATE_USER`, `UPDATE_TIME`, `UPDATE_USER`) VALUES ('2002922047421472770', '0', '中南平台', 'ZNPT', 'BIZ', 99, NULL, 'NOT_DELETE', '2025-12-22 10:00:03', '1543837863788879871', NULL, NULL);
+INSERT INTO `coldchain`.`dev_dict` (`ID`, `PARENT_ID`, `DICT_LABEL`, `DICT_VALUE`, `CATEGORY`, `SORT_CODE`, `EXT_JSON`, `DELETE_FLAG`, `CREATE_TIME`, `CREATE_USER`, `UPDATE_TIME`, `UPDATE_USER`) VALUES ('2002922233203974146', '2002922047421472770', '保障平台', 'BZPT', 'BIZ', 99, NULL, 'NOT_DELETE', '2025-12-22 10:00:48', '1543837863788879871', NULL, NULL);
+INSERT INTO `coldchain`.`dev_dict` (`ID`, `PARENT_ID`, `DICT_LABEL`, `DICT_VALUE`, `CATEGORY`, `SORT_CODE`, `EXT_JSON`, `DELETE_FLAG`, `CREATE_TIME`, `CREATE_USER`, `UPDATE_TIME`, `UPDATE_USER`) VALUES ('2002922410253934594', '2002922047421472770', '细胞平台', 'XBPT', 'BIZ', 99, NULL, 'NOT_DELETE', '2025-12-22 10:01:30', '1543837863788879871', NULL, NULL);
+INSERT INTO `coldchain`.`dev_dict` (`ID`, `PARENT_ID`, `DICT_LABEL`, `DICT_VALUE`, `CATEGORY`, `SORT_CODE`, `EXT_JSON`, `DELETE_FLAG`, `CREATE_TIME`, `CREATE_USER`, `UPDATE_TIME`, `UPDATE_USER`) VALUES ('2002922471234920450', '2002922047421472770', '分生平台', 'FSPT', 'BIZ', 99, NULL, 'NOT_DELETE', '2025-12-22 10:01:44', '1543837863788879871', NULL, NULL);
+INSERT INTO `coldchain`.`dev_dict` (`ID`, `PARENT_ID`, `DICT_LABEL`, `DICT_VALUE`, `CATEGORY`, `SORT_CODE`, `EXT_JSON`, `DELETE_FLAG`, `CREATE_TIME`, `CREATE_USER`, `UPDATE_TIME`, `UPDATE_USER`) VALUES ('2002922527711223810', '2002922047421472770', '资源库平台', 'ZYKPT', 'BIZ', 99, NULL, 'NOT_DELETE', '2025-12-22 10:01:58', '1543837863788879871', NULL, NULL);
+INSERT INTO `coldchain`.`dev_dict` (`ID`, `PARENT_ID`, `DICT_LABEL`, `DICT_VALUE`, `CATEGORY`, `SORT_CODE`, `EXT_JSON`, `DELETE_FLAG`, `CREATE_TIME`, `CREATE_USER`, `UPDATE_TIME`, `UPDATE_USER`) VALUES ('2002922575341740034', '2002922047421472770', '病理平台', 'BLPT', 'BIZ', 99, NULL, 'NOT_DELETE', '2025-12-22 10:02:09', '1543837863788879871', NULL, NULL);