Commit b352a552 authored by 赵啸非's avatar 赵啸非

修改前端页面与后台部分服务

parent a06f95be
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="" vcs="Git" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -29,7 +29,8 @@ CREATE TABLE `mortals_xhx_menu` ( ...@@ -29,7 +29,8 @@ CREATE TABLE `mortals_xhx_menu` (
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
`url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '连接地址', `url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '连接地址',
`parentId` bigint(20) NULL DEFAULT NULL COMMENT '父菜单ID,一级菜单的该字段值为-1', `parentId` bigint(20) NULL DEFAULT NULL COMMENT '父菜单ID,一级菜单的该字段值为-1',
`orderId` int(11) NULL DEFAULT NULL COMMENT '排序编号', `ancestors` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`orderId` int(9) NULL DEFAULT NULL COMMENT '排序编号',
`status` tinyint(2) NULL DEFAULT 1 COMMENT '菜单状态,0:禁用,1:启用,默认1', `status` tinyint(2) NULL DEFAULT 1 COMMENT '菜单状态,0:禁用,1:启用,默认1',
`linkType` tinyint(2) NULL DEFAULT 0 COMMENT '链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0', `linkType` tinyint(2) NULL DEFAULT 0 COMMENT '链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0',
`groupId` int(11) NULL DEFAULT 1 COMMENT '分组编号,使用菜单分隔符按该值分隔,默认1', `groupId` int(11) NULL DEFAULT 1 COMMENT '分组编号,使用菜单分隔符按该值分隔,默认1',
...@@ -49,16 +50,16 @@ CREATE TABLE `mortals_xhx_menu` ( ...@@ -49,16 +50,16 @@ CREATE TABLE `mortals_xhx_menu` (
-- ---------------------------- -- ----------------------------
-- Records of mortals_xhx_menu -- Records of mortals_xhx_menu
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (91, '系统管理', '', 0, 9999, 1, 0, 0, NULL, 'setting', '', '', 0, 0, 3, NULL, NULL, ''); INSERT INTO `mortals_xhx_menu` VALUES (91, '系统管理', '', 0,'', 9999, 1, 0, 0, NULL, 'setting', '', '', 0, 0, 3, NULL, NULL, '');
INSERT INTO `mortals_xhx_menu` VALUES (108, '区域信息', '/area/list', 91, 65, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (108, '区域信息', '/area/list', 91,'', 65, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9001, '主页', '/index', 90, 10, 1, 0, 1, NULL, '', NULL, NULL, 0, 0, 3, '2019-02-19 16:08:09', 1, 'admin'); INSERT INTO `mortals_xhx_menu` VALUES (9001, '主页', '/index', 90,'', 10, 1, 0, 1, NULL, '', NULL, NULL, 0, 0, 3, '2019-02-19 16:08:09', 1, 'admin');
INSERT INTO `mortals_xhx_menu` VALUES (9101, '用户信息', '/user/list', 91, 10, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9101, '用户信息', '/user/list', 91,'', 10, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9102, '角色信息', '/role/list', 91, 20, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9102, '角色信息', '/role/list', 91,'', 20, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9103, '资源信息', '/resource/list', 91, 30, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9103, '资源信息', '/resource/list', 91,'', 30, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9104, '菜单信息', '/menu/list', 91, 40, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9104, '菜单信息', '/menu/list', 91,'', 40, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9105, '参数信息', '/param/list', 91, 50, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9105, '参数信息', '/param/list', 91,'', 50, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9106, '任务信息', '/task/list', 91, 60, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9106, '任务信息', '/task/list', 91,'', 60, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (9107, '操作日志', '/oper/log/list', 91, 70, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (9107, '操作日志', '/oper/log/list', 91,'', 70, 1, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 3, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
......
-- ---------------------------- -- ----------------------------
-- 人员发现记录菜单 SQL -- 人员发现记录菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '人员发现记录', '/realtime/dataflow/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '人员发现记录', '/realtime/dataflow/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 人员发现记录资源路径 SQL -- 人员发现记录资源路径 SQL
...@@ -17,7 +17,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否预约', 'RealtimeDataflow' ...@@ -17,7 +17,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否预约', 'RealtimeDataflow'
-- ---------------------------- -- ----------------------------
-- 预约签到记录菜单 SQL -- 预约签到记录菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约签到记录', '/appointment/records/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约签到记录', '/appointment/records/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约签到记录资源路径 SQL -- 预约签到记录资源路径 SQL
...@@ -33,7 +33,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '签到方式', 'AppointmentRecord ...@@ -33,7 +33,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '签到方式', 'AppointmentRecord
-- ---------------------------- -- ----------------------------
-- 预约关怀记录菜单 SQL -- 预约关怀记录菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约关怀记录', '/care/records/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约关怀记录', '/care/records/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约关怀记录资源路径 SQL -- 预约关怀记录资源路径 SQL
...@@ -44,13 +44,13 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约关怀记录-菜单管 ...@@ -44,13 +44,13 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约关怀记录-菜单管
-- ---------------------------- -- ----------------------------
-- 预约关怀记录参数 SQL -- 预约关怀记录参数 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '排队中.排队中', '排队中.排队中', 1, 4, 0, 'processStatus', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '排队中', '排队中', 1, 4, 0, 'processStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '办理中.办理中', '办理中.办理中', 1, 4, 0, 'processStatus', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '办理中', '办理中', 1, 4, 0, 'processStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '接件结束.接件结束', '接件结束.接件结束', 1, 4, 0, 'processStatus', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '办理状态', 'CareRecords', 'processStatus', '接件结束', '接件结束', 1, 4, 0, 'processStatus', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置菜单 SQL -- 预约自动签到配置菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置', '/appointment/config/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置', '/appointment/config/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置资源路径 SQL -- 预约自动签到配置资源路径 SQL
...@@ -80,7 +80,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'Appointment ...@@ -80,7 +80,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'Appointment
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置时间段菜单 SQL -- 预约自动签到配置时间段菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置时间段', '/appointment/config/times/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到配置时间段', '/appointment/config/times/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置时间段资源路径 SQL -- 预约自动签到配置时间段资源路径 SQL
...@@ -94,7 +94,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约自动签到配置时间 ...@@ -94,7 +94,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '预约自动签到配置时间
-- ---------------------------- -- ----------------------------
-- 主动关怀配置菜单 SQL -- 主动关怀配置菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀配置', '/care/config/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀配置', '/care/config/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀配置资源路径 SQL -- 主动关怀配置资源路径 SQL
...@@ -121,12 +121,12 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig' ...@@ -121,12 +121,12 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig'
INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig', 'saturday', '1', '是', 1, 4, 0, 'saturday', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '周六是否监测', 'CareConfig', 'saturday', '1', '是', 1, 4, 0, 'saturday', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '0', '否', 1, 4, 0, 'sunday', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '0', '否', 1, 4, 0, 'sunday', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '1', '是', 1, 4, 0, 'sunday', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '周日是否监测', 'CareConfig', 'sunday', '1', '是', 1, 4, 0, 'sunday', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '办事群众.办事群众', '办事群众.办事群众', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '办事群众', '办事群众', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '管理员.管理员', '管理员.管理员', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` VALUES (null, '消息发送对象', 'CareConfig', 'msgRecipients', '管理员', '管理员', 1, 4, 0, 'msgRecipients', NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀时间段菜单 SQL -- 主动关怀时间段菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀时间段', '/care/config/times/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀时间段', '/care/config/times/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀时间段资源路径 SQL -- 主动关怀时间段资源路径 SQL
...@@ -140,7 +140,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀时间段-菜单 ...@@ -140,7 +140,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀时间段-菜单
-- ---------------------------- -- ----------------------------
-- 预约自动签到服务约束菜单 SQL -- 预约自动签到服务约束菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到服务约束', '/appointment/constraint/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '预约自动签到服务约束', '/appointment/constraint/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 预约自动签到服务约束资源路径 SQL -- 预约自动签到服务约束资源路径 SQL
...@@ -158,7 +158,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否约束 ', 'AppointmentConst ...@@ -158,7 +158,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否约束 ', 'AppointmentConst
-- ---------------------------- -- ----------------------------
-- 主动关怀服务约束菜单 SQL -- 主动关怀服务约束菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务约束', '/care/constraint/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务约束', '/care/constraint/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀服务约束资源路径 SQL -- 主动关怀服务约束资源路径 SQL
...@@ -176,7 +176,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否追踪 ', 'CareConstraint', ...@@ -176,7 +176,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否追踪 ', 'CareConstraint',
-- ---------------------------- -- ----------------------------
-- 主动关怀服务追踪菜单 SQL -- 主动关怀服务追踪菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务追踪', '/care/constraint/track/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '主动关怀服务追踪', '/care/constraint/track/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 主动关怀服务追踪资源路径 SQL -- 主动关怀服务追踪资源路径 SQL
...@@ -190,7 +190,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀服务追踪-菜 ...@@ -190,7 +190,7 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '主动关怀服务追踪-菜
-- ---------------------------- -- ----------------------------
-- 注册人员菜单 SQL -- 注册人员菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '注册人员', '/person/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '注册人员', '/person/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 注册人员资源路径 SQL -- 注册人员资源路径 SQL
...@@ -212,7 +212,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否添加到海康人脸库', ...@@ -212,7 +212,7 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '是否添加到海康人脸库',
-- ---------------------------- -- ----------------------------
-- 设备业务菜单 SQL -- 设备业务菜单 SQL
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '设备业务', '/device/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL); INSERT INTO `mortals_xhx_menu` VALUES (null, '设备业务', '/device/list', 0,'', 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ---------------------------- -- ----------------------------
-- 设备业务资源路径 SQL -- 设备业务资源路径 SQL
......
...@@ -102,7 +102,7 @@ PRIMARY KEY (`id`) ...@@ -102,7 +102,7 @@ PRIMARY KEY (`id`)
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_appointment_config_times`; DROP TABLE IF EXISTS `mortals_xhx_appointment_config_times`;
CREATE TABLE mortals_xhx_appointment_config_times( CREATE TABLE mortals_xhx_appointment_config_times(
`Id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`aotoCheckCfgId` bigint(20) COMMENT '自动签到配置id', `aotoCheckCfgId` bigint(20) COMMENT '自动签到配置id',
`serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间', `serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间',
`serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间', `serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间',
...@@ -111,7 +111,7 @@ CREATE TABLE mortals_xhx_appointment_config_times( ...@@ -111,7 +111,7 @@ CREATE TABLE mortals_xhx_appointment_config_times(
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`Id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预约自动签到配置时间段'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预约自动签到配置时间段';
-- ---------------------------- -- ----------------------------
-- 主动关怀配置表 -- 主动关怀配置表
...@@ -145,7 +145,7 @@ PRIMARY KEY (`id`) ...@@ -145,7 +145,7 @@ PRIMARY KEY (`id`)
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_care_config_times`; DROP TABLE IF EXISTS `mortals_xhx_care_config_times`;
CREATE TABLE mortals_xhx_care_config_times( CREATE TABLE mortals_xhx_care_config_times(
`Id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`careCfgId` bigint(20) COMMENT '主动关怀配置id', `careCfgId` bigint(20) COMMENT '主动关怀配置id',
`serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间', `serviceTimeStart` datetime NOT NULL COMMENT '时间段时候开始时间',
`serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间', `serviceTimeEnd` datetime NOT NULL COMMENT '时间段结束时间',
...@@ -154,7 +154,7 @@ CREATE TABLE mortals_xhx_care_config_times( ...@@ -154,7 +154,7 @@ CREATE TABLE mortals_xhx_care_config_times(
`createTime` datetime NOT NULL COMMENT '创建时间', `createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户', `updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`Id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='主动关怀时间段'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='主动关怀时间段';
-- ---------------------------- -- ----------------------------
-- 预约自动签到服务约束表 -- 预约自动签到服务约束表
......
platform-eleme
eleme
delete-solid
delete
s-tools
setting
user-solid
user
phone
phone-outline
more
more-outline
star-on
star-off
s-goods
goods
warning
warning-outline
question
info
remove
circle-plus
success
error
zoom-in
zoom-out
remove-outline
circle-plus-outline
circle-check
circle-close
s-help
help
minus
plus
check
close
picture
picture-outline
picture-outline-round
upload
upload2
download
camera-solid
camera
video-camera-solid
video-camera
message-solid
bell
s-cooperation
s-order
s-platform
s-fold
s-unfold
s-operation
s-promotion
s-home
s-release
s-ticket
s-management
s-open
s-shop
s-marketing
s-flag
s-comment
s-finance
s-claim
s-custom
s-opportunity
s-data
s-check
s-grid
menu
share
d-caret
caret-left
caret-right
caret-bottom
caret-top
bottom-left
bottom-right
back
right
bottom
top
top-left
top-right
arrow-left
arrow-right
arrow-down
arrow-up
d-arrow-left
d-arrow-right
video-pause
video-play
refresh
refresh-right
refresh-left
finished
sort
sort-up
sort-down
rank
loading
view
c-scale-to-original
date
edit
edit-outline
folder
folder-opened
folder-add
folder-remove
folder-delete
folder-checked
tickets
document-remove
document-delete
document-copy
document-checked
document
document-add
printer
paperclip
takeaway-box
search
monitor
attract
mobile
scissors
umbrella
headset
brush
mouse
coordinate
magic-stick
reading
data-line
data-board
pie-chart
data-analysis
collection-tag
film
suitcase
suitcase-1
receiving
collection
files
notebook-1
notebook-2
toilet-paper
office-building
school
table-lamp
house
no-smoking
smoking
shopping-cart-full
shopping-cart-1
shopping-cart-2
shopping-bag-1
shopping-bag-2
sold-out
sell
present
box
bank-card
money
coin
wallet
discount
price-tag
news
guide
male
female
thumb
cpu
link
connection
open
turn-off
set-up
chat-round
chat-line-round
chat-square
chat-dot-round
chat-dot-square
chat-line-square
message
postcard
position
turn-off-microphone
microphone
close-notification
bangzhu
time
odometer
crop
aim
switch-button
full-screen
copy-document
mic
stopwatch
medal-1
medal
trophy
trophy-1
first-aid-kit
discover
place
location
location-outline
location-information
add-location
delete-location
map-location
alarm-clock
timer
watch-1
watch
lock
unlock
key
service
mobile-phone
bicycle
truck
ship
basketball
football
soccer
baseball
wind-power
light-rain
lightning
heavy-rain
sunrise
sunrise-1
sunset
sunny
cloudy
partly-cloudy
cloudy-and-sunny
moon
moon-night
dish
dish-1
food
chicken
fork-spoon
knife-fork
burger
tableware
sugar
dessert
ice-cream
hot-water
water-cup
coffee-cup
cold-drink
goblet
goblet-full
goblet-square
goblet-square-full
refrigerator
grape
watermelon
cherry
apple
pear
orange
coffee
ice-tea
ice-drink
milk-tea
potato-strips
lollipop
ice-cream-square
ice-cream-round
...@@ -47,8 +47,6 @@ export default { ...@@ -47,8 +47,6 @@ export default {
this.form = Object.assign({}, this.form, res.entity); this.form = Object.assign({}, this.form, res.entity);
this.dict = Object.assign({}, this.dict, res.dict); this.dict = Object.assign({}, this.dict, res.dict);
console.log(this.form)
this.afterRender(res); this.afterRender(res);
}) })
.catch(error => { .catch(error => {
......
...@@ -103,6 +103,33 @@ const find = (list, key, val) => { ...@@ -103,6 +103,33 @@ const find = (list, key, val) => {
} }
} }
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
* @param {*} rootId 根Id 默认 0
*/
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id'
parentId = parentId || 'parentId'
children = children || 'children'
rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0
//对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data))
//循环所有项
const treeData = cloneData.filter(father => {
let branchArr = cloneData.filter(child => {
//返回每一项的子级数组
return father[id] === child[parentId]
});
branchArr.length > 0 ? father.children = branchArr : '';
//返回第一层
return father[parentId] === rootId;
});
return treeData != '' ? treeData : data;
};
export { export {
formatter, formatter,
...@@ -110,4 +137,5 @@ export { ...@@ -110,4 +137,5 @@ export {
formatterDate, formatterDate,
formatterDateOnly, formatterDateOnly,
find, find,
handleTree
}; };
...@@ -69,15 +69,15 @@ export default { ...@@ -69,15 +69,15 @@ export default {
let urlArray = this.$route.path.split('/'); let urlArray = this.$route.path.split('/');
const type = urlArray.pop(); const type = urlArray.pop();
group.unshift({ // group.unshift({
name: "政务在线考试学习系统" // name: "智慧大厅系统"
}) // })
if(types[type]) { // if(types[type]) {
group.push({ // group.push({
name: types[type] // name: types[type]
}) // })
} // }
console.log("group",group) // console.log("group",group)
return group return group
}, },
menu() { menu() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</template> </template>
<style lang="less"> <style lang="less">
@media screen and (max-width: 800px){ @media screen and (max-width: 1440px){
.layout-form{ .layout-form{
form{ form{
width: 100%!important; width: 100%!important;
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
border-bottom: 1px solid #ededed; border-bottom: 1px solid #ededed;
} }
form{ form{
width: 800px; width: 1440px;
&[loading]{ &[loading]{
pointer-events: none; pointer-events: none;
.el-button{ .el-button{
......
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-row> <el-row>
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/> <Field :span="20" label="是否启用该服务" prop="used" v-model="form.used" type="radio" :enumData="dict.used" placeholder="请选择是否启用该服务"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/> <Field :span="20" label="监测周期配置">
<Field label="是否启用该服务" prop="used" v-model="form.used" type="select" :enumData="dict.used" placeholder="请选择是否启用该服务"/> <el-checkbox
<Field label="周一是否监测" prop="monday" v-model="form.monday" type="select" :enumData="dict.monday" placeholder="请选择周一是否监测"/> true-label="1"
<Field label="周二是否监测" prop="tuesday" v-model="form.tuesday" type="select" :enumData="dict.tuesday" placeholder="请选择周二是否监测"/> false-label="0"
<Field label="周三是否监测" prop="wednesday" v-model="form.wednesday" type="select" :enumData="dict.wednesday" placeholder="请选择周三是否监测"/> v-model="form.monday"
<Field label="周四是否监测" prop="thursday" v-model="form.thursday" type="select" :enumData="dict.thursday" placeholder="请选择周四是否监测"/> >周一</el-checkbox>
<Field label="周五是否监测" prop="friday" v-model="form.friday" type="select" :enumData="dict.friday" placeholder="请选择周五是否监测"/>
<Field label="周六是否监测" prop="saturday" v-model="form.saturday" type="select" :enumData="dict.saturday" placeholder="请选择周六是否监测"/> <el-checkbox
<Field label="周日是否监测" prop="sunday" v-model="form.sunday" type="select" :enumData="dict.sunday" placeholder="请选择周日是否监测"/> true-label="1"
<Field label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/> false-label="0"
<Field label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/> v-model="form.tuesday"
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> >周二</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.wednesday"
>周三</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.thursday"
>周四</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.friday"
>周五</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.saturday"
>周六</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.sunday"
>周日</el-checkbox>
</Field>
<Field :span="20" label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/>
<Field :span="20" label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/>
<Field :span="20" label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
</el-row> </el-row>
<el-divider content-position="center">预约自动签到配置时间段信息</el-divider> <el-divider content-position="center">预约自动签到配置时间段信息</el-divider>
<br/> <br/>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
...@@ -32,14 +72,37 @@ ...@@ -32,14 +72,37 @@
<el-table :data="appointmentConfigTimesList" :row-class-name="rowAppointmentConfigTimesIndex" @selection-change="handleAppointmentConfigTimesSelectionChange" ref="appointmentConfigTimes"> <el-table :data="appointmentConfigTimesList" :row-class-name="rowAppointmentConfigTimesIndex" @selection-change="handleAppointmentConfigTimesSelectionChange" ref="appointmentConfigTimes">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="时间段时候开始时间" prop="serviceTimeStart"> <el-table-column label="开始时间" prop="serviceTimeStart">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />
<el-time-select
placeholder="起始时间"
v-model="scope.row.serviceTimeStart"
value-format="yyyy-MM-dd HH:mm:ss"
format="HH:mm"
:picker-options="{
start: '08:00',
step: '00:30',
end: '18:00'
}">
</el-time-select>
<!-- <el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时间段结束时间" prop="serviceTimeEnd"> <el-table-column label="结束时间" prop="serviceTimeEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入时间段结束时间" /> <el-time-select
placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="scope.row.serviceTimeEnd"
:picker-options="{
start: '08:00',
step: '00:30',
end: '18:00'
}">
</el-time-select>
<!-- <el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入时间段结束时间" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"> <el-table-column label="备注" prop="remark">
...@@ -47,26 +110,6 @@ ...@@ -47,26 +110,6 @@
<el-input v-model="scope.row.remark" placeholder="请输入备注" /> <el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建用户" prop="createUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.createUserId" placeholder="请输入创建用户" />
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope">
<el-input v-model="scope.row.createTime" placeholder="请输入创建时间" />
</template>
</el-table-column>
<el-table-column label="更新用户" prop="updateUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.updateUserId" placeholder="请输入更新用户" />
</template>
</el-table-column>
<el-table-column label="更新时间" prop="updateTime">
<template slot-scope="scope">
<el-input v-model="scope.row.updateTime" placeholder="请输入更新时间" />
</template>
</el-table-column>
</el-table> </el-table>
</el-form> </el-form>
...@@ -78,6 +121,7 @@ ...@@ -78,6 +121,7 @@
</template> </template>
<script> <script>
import moment from 'moment';
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
export default { export default {
...@@ -153,6 +197,10 @@ ...@@ -153,6 +197,10 @@
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.appointmentConfigTimesList) { if(data.entity.appointmentConfigTimesList) {
data.entity.appointmentConfigTimesList.map(i=>{
i.serviceTimeStart = moment(i.serviceTimeStart).format('HH:mm')
i.serviceTimeEnd = moment(i.serviceTimeEnd).format('HH:mm')
})
this.appointmentConfigTimesList = data.entity.appointmentConfigTimesList; this.appointmentConfigTimesList = data.entity.appointmentConfigTimesList;
} }
return data return data
...@@ -191,6 +239,15 @@ ...@@ -191,6 +239,15 @@
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
}, },
beforeSubmit(data) {
data.appointmentConfigTimesList.map(i=>{
const serviceTimeStart = moment(i.serviceTimeStart, 'HH:mm');
const serviceTimeEnd = moment(i.serviceTimeEnd, 'HH:mm');
i.serviceTimeStart = moment().set({hour: serviceTimeStart.hour(), minute: serviceTimeStart.minute()}).format('yyyy-MM-DD HH:mm:ss');
i.serviceTimeEnd = moment().set({hour: serviceTimeEnd.hour(), minute: serviceTimeEnd.minute()}).format('yyyy-MM-DD HH:mm:ss');
})
return data
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
...@@ -211,7 +268,7 @@ ...@@ -211,7 +268,7 @@
saturday : 0, saturday : 0,
sunday : 0, sunday : 0,
maxServicePersonNum : 0, maxServicePersonNum : 0,
alertServiceNum : null, alertServiceNum : 0,
remark : "", remark : "",
}; };
this.resetForm("form"); this.resetForm("form");
......
...@@ -68,32 +68,28 @@ ...@@ -68,32 +68,28 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter}, {label: "启用", prop: "used",formatter: this.formatter},
{label: "站点名称", prop: "siteName"}, {label: "周一", prop: "monday",formatter: this.formatter},
{label: "是否启用该服务", prop: "used",formatter: this.formatter}, {label: "周二", prop: "tuesday",formatter: this.formatter},
{label: "一是否监测", prop: "monday",formatter: this.formatter}, {label: "", prop: "wednesday",formatter: this.formatter},
{label: "二是否监测", prop: "tuesday",formatter: this.formatter}, {label: "", prop: "thursday",formatter: this.formatter},
{label: "三是否监测", prop: "wednesday",formatter: this.formatter}, {label: "", prop: "friday",formatter: this.formatter},
{label: "四是否监测", prop: "thursday",formatter: this.formatter}, {label: "", prop: "saturday",formatter: this.formatter},
{label: "五是否监测", prop: "friday",formatter: this.formatter}, {label: "", prop: "sunday",formatter: this.formatter},
{label: "周六是否监测", prop: "saturday",formatter: this.formatter}, {label: "最大人数", prop: "maxServicePersonNum"},
{label: "周日是否监测", prop: "sunday",formatter: this.formatter}, {label: "累计预警", prop: "alertServiceNum"},
{label: "单日服务最大人数设置", prop: "maxServicePersonNum",formatter: this.formatter}, {label: "创建时间", prop: "createUserTime", formatter: this.formatterDate},
{label: "配置时间段",
{label: "累计服务频次预警", prop: "alertServiceNum",formatter: this.formatter},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "预约自动签到配置时间段",
width: 120, width: 120,
prop: "subColumns", prop: "subColumns",
formatter: (row) => { formatter: (row) => {
......
<template>
<layout-form>
<el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
<el-row>
<Field :sapn="24" label="是否启用该服务" prop="used" v-model="form.used" type="select" :enumData="dict.used" placeholder="请选择是否启用该服务"/>
<el-row>
<Field :span="4" label="周一">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.monday"
></el-checkbox>
</Field>
<Field :span="4" label="周二">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.tuesday"
></el-checkbox>
</Field>
<Field :span="4" label="周三">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.tuesday"
></el-checkbox>
</Field>
<Field :span="4" label="周四">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.thursday"
></el-checkbox>
</Field>
</el-row>
<Field label="周一是否监测" prop="monday" v-model="form.monday" type="select" :enumData="dict.monday" placeholder="请选择周一是否监测"/>
<Field label="周二是否监测" prop="tuesday" v-model="form.tuesday" type="select" :enumData="dict.tuesday" placeholder="请选择周二是否监测"/>
<Field label="周三是否监测" prop="wednesday" v-model="form.wednesday" type="select" :enumData="dict.wednesday" placeholder="请选择周三是否监测"/>
<Field label="周四是否监测" prop="thursday" v-model="form.thursday" type="select" :enumData="dict.thursday" placeholder="请选择周四是否监测"/>
<Field label="周五是否监测" prop="friday" v-model="form.friday" type="select" :enumData="dict.friday" placeholder="请选择周五是否监测"/>
<Field label="周六是否监测" prop="saturday" v-model="form.saturday" type="select" :enumData="dict.saturday" placeholder="请选择周六是否监测"/>
<Field label="周日是否监测" prop="sunday" v-model="form.sunday" type="select" :enumData="dict.sunday" placeholder="请选择周日是否监测"/>
<Field label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/>
<Field label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/>
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
</el-row>
<el-divider content-position="center">预约自动签到配置时间段信息</el-divider>
<br/>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddAppointmentConfigTimes">添加</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteAppointmentConfigTimes">删除</el-button>
</el-col>
</el-row>
<el-table :data="appointmentConfigTimesList" :row-class-name="rowAppointmentConfigTimesIndex" @selection-change="handleAppointmentConfigTimesSelectionChange" ref="appointmentConfigTimes">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="备注" prop="serviceTimeStart">
<template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeStart" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="备注" prop="serviceTimeEnd">
<template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入备注" />
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template>
</el-table-column>
</el-table>
<form-buttons @submit='submitForm' :noSaveBtn="pageInfo.type === 'view'"/>
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
components: {
},
methods: {
/** 预约自动签到配置时间段序号 */
rowAppointmentConfigTimesIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 预约自动签到配置时间段添加按钮操作 */
handleAddAppointmentConfigTimes() {
let obj = {};
obj.serviceTimeStart = "";
obj.serviceTimeEnd = "";
obj.remark = "";
obj.createUserId = "";
obj.createTime = "";
obj.updateUserId = "";
obj.updateTime = "";
this.appointmentConfigTimesList.push(obj);
},
/** 预约自动签到配置时间段删除按钮操作 */
handleDeleteAppointmentConfigTimes() {
if (this.checkedAppointmentConfigTimes.length == 0) {
this.$alert("请先选择要删除的预约自动签到配置时间段数据", "提示", { confirmButtonText: "确定", });
} else {
this.appointmentConfigTimesList.splice(this.checkedAppointmentConfigTimes[0].index - 1, 1);
}
},
/** 单选框选中数据 */
handleAppointmentConfigTimesSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.appointmentConfigTimes.clearSelection();
this.$refs.appointmentConfigTimes.toggleRowSelection(selection.pop());
} else {
this.checkedAppointmentConfigTimes = selection;
}
},
// 渲染前置处理
beforeRender(data) {
if(data.entity.appointmentConfigTimesList) {
this.appointmentConfigTimesList = data.entity.appointmentConfigTimesList;
}
return data
},
},
data() {
return {
toString:[
"used",
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
],
// 子表选中数据
checkedAppointmentConfigTimes: [],
// 预约自动签到配置时间段表格数据
appointmentConfigTimesList: [],
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
}
};
</script>
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/> <Field :span="20" label="个人信息" prop="personId" v-model="form.personId" style="width:100%" type="select" :enumData="dict.personId" placeholder="请输入个人信息ID"/>
<Field label="个人信息ID" prop="personId" v-model="form.personId" placeholder="请输入个人信息ID"/> <Field :span="20" label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field label="姓名" prop="name" v-model="form.name" placeholder="请输入姓名"/> <Field :span="20" label="证件类型" prop="idCardType" v-model="form.idCardType" type="radio" :enumData="dict.idCardType" placeholder="请输入证件类型"/>
<Field label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/> <Field :span="20" label="证件号码" prop="idCardNo" v-model="form.idCardNo" placeholder="请输入证件号码"/>
<Field label="证件类型" prop="idCardType" v-model="form.idCardType" placeholder="请输入证件类型"/> <!--
<Field label="证件号码" prop="idCardNo" v-model="form.idCardNo" placeholder="请输入证件号码"/> <Field :span="20" label="累计次数" prop="accumulative" v-model="form.accumulative" placeholder="请输入累计次数"/>
<Field label="累计次数" prop="accumulative" v-model="form.accumulative" placeholder="请输入累计次数"/> <Field :span="20" label="约束时间" prop="constraintTime" v-model="form.constraintTime" type="date" />
<Field label="约束时间" prop="constraintTime" v-model="form.constraintTime" type="date" /> <Field :span="20" label="创建方式" prop="createMethod" v-model="form.createMethod" type="select" :enumData="dict.createMethod" placeholder="请选择创建方式"/>
<Field label="创建方式" prop="createMethod" v-model="form.createMethod" type="select" :enumData="dict.createMethod" placeholder="请选择创建方式"/> <Field :span="20" label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/>
<Field label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/> <Field :span="20" label="是否约束" prop="constraint" v-model="form.constraint" type="select" :enumData="dict.constraint" placeholder="请选择是否约束"/>
<Field label="是否约束 " prop="constraint" v-model="form.constraint" type="select" :enumData="dict.constraint" placeholder="请选择是否约束 "/> -->
</el-row> </el-row>
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
toString:[ toString:[
"createMethod", "createMethod",
"constraint", "constraint",
"idCardType",
"personId",
], ],
// 表单校验 // 表单校验
rules: { rules: {
...@@ -88,6 +90,11 @@ ...@@ -88,6 +90,11 @@
this.open = true; this.open = true;
}, },
beforeSubmit(data){
data.name=this.dict['personId'][data.personId];
return data;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
......
...@@ -34,6 +34,33 @@ ...@@ -34,6 +34,33 @@
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
handleConstraint(row,type) {
let _this = this
this.$confirm('取消约束后,系统将不向该群众推送此项服务,是否确认?', "系统服务", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
//todo
_this.$post("/appointment/constraint/save", {
id: row.id,
constraint: type,
})
.then((res) => {
if (res.code == 1) {
_this.$message.success("更改成功!");
_this.getData();
}
})
.catch((error) => {
this.$message.error(error.message);
});
}).then(response => {
})
}
}, },
data() { data() {
return { return {
...@@ -44,12 +71,6 @@ ...@@ -44,12 +71,6 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "个人信息ID", prop: "personId", formatter: this.formatter},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contact"}, {label: "联系方式", prop: "contact"},
...@@ -64,15 +85,43 @@ ...@@ -64,15 +85,43 @@
{label: "创建方式", prop: "createMethod",formatter: this.formatter}, {label: "创建方式", prop: "createMethod",formatter: this.formatter},
{label: "约束服务", prop: "constraint",formatter: this.formatter},
{label: "操作人员", prop: "operator"}, {label: "操作人员", prop: "operator"},
{label: "是否约束 ", prop: "constraint",formatter: this.formatter},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
<table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<span> </span>
{row.constraint === 0 ? (
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.handleConstraint(row,1);
}}
>
约束
</el-button>
) : (
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.handleConstraint(row,0);
}}
>
取消约束
</el-button>
)}
</div>
); );
} }
} }
......
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "dataDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "监测预警",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
type="danger"
@click="monitorWarn"
>监测预警</el-button
>
</LayoutTable> </LayoutTable>
<drawer-show ref="dataDrawerShow" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
...@@ -11,12 +23,13 @@ ...@@ -11,12 +23,13 @@
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import drawerShow from "./dataDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "AppointmentRecordsList", name: "AppointmentRecordsList",
components: { components: {
dialogShow dialogShow,drawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
}, },
...@@ -33,21 +46,69 @@ ...@@ -33,21 +46,69 @@
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
/** 监测预警 */
monitorWarn(row) {
this.$refs.dataDrawerShow.view(row);
},
serviceConstraint(row) {
let _this=this
this.$confirm('服务约束后,系统将停止向该群众推送此项服务,是否确认?', "系统服务", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
//todo
_this.$post("/appointment/records", { id: [row.id] })
.then((res) => {
if (res && res.code && res.code == 1) {
_this.getList();
_this.$message.success("停止服务成功");
}
})
.catch((error) => {
_this.$message.error(error.message);
});
}).then(response => {
})
}
}, },
data() { data() {
return { return {
config: { config: {
search: [ search: [
{
name: "device",
type: "select",
label: "监测设备",
},
{
name: "detectTimeStart",
type: "datetime",
label: "开始时间",
},
{
name: "detectTimeEnd",
type: "datetime",
label: "结束时间",
},
{
name: "name",
type: "text",
label: "姓名",
fuzzy: true,
},
], ],
columns: [ columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contactInfo"}, {label: "联系方式", prop: "contactInfo"},
...@@ -64,13 +125,34 @@ ...@@ -64,13 +125,34 @@
{label: "签到方式", prop: "checkInMethod",formatter: this.formatter}, {label: "签到方式", prop: "checkInMethod",formatter: this.formatter},
{label: "监测凭证", prop: "monitorCertificate"}, {label: "监测凭证", prop: "monitorCertificate",formatter: (row) => {
return row.monitorCertificate != "" ? (
<el-image
style="width: 70px; height: 70px"
src={row.monitorCertificate}
preview-src-list={[row.monitorCertificate]}
></el-image>
) : (
"--"
);
},},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.serviceConstraint(row);
}}
>
服务约束
</el-button>
</div>
); );
} }
} }
......
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-row> <el-row>
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/> <!--
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/> <Field :span="20" label="是否启用该服务" prop="used" v-model="form.used" type="radio" :enumData="dict.used" placeholder="请选择是否启用该服务"/>
<Field label="是否启用该服务" prop="used" v-model="form.used" type="select" :enumData="dict.used" placeholder="请选择是否启用该服务"/> -->
<Field label="周一是否监测" prop="monday" v-model="form.monday" type="select" :enumData="dict.monday" placeholder="请选择周一是否监测"/>
<Field label="周二是否监测" prop="tuesday" v-model="form.tuesday" type="select" :enumData="dict.tuesday" placeholder="请选择周二是否监测"/> <Field :span="20" label="启用该服务">
<Field label="周三是否监测" prop="wednesday" v-model="form.wednesday" type="select" :enumData="dict.wednesday" placeholder="请选择周三是否监测"/> <el-switch
<Field label="周四是否监测" prop="thursday" v-model="form.thursday" type="select" :enumData="dict.thursday" placeholder="请选择周四是否监测"/> v-model="form.used"
<Field label="周五是否监测" prop="friday" v-model="form.friday" type="select" :enumData="dict.friday" placeholder="请选择周五是否监测"/> active-color="#13ce66"
<Field label="周六是否监测" prop="saturday" v-model="form.saturday" type="select" :enumData="dict.saturday" placeholder="请选择周六是否监测"/> inactive-color="#ff4949"
<Field label="周日是否监测" prop="sunday" v-model="form.sunday" type="select" :enumData="dict.sunday" placeholder="请选择周日是否监测"/> active-value="1"
<Field label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/> inactive-value="0">
<Field label="服务阈值设置,单位分钟" prop="serviceThreshold" v-model="form.serviceThreshold" placeholder="请输入服务阈值设置,单位分钟"/> </el-switch>
<Field label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/> </Field>
<Field label="消息发送对象" prop="msgRecipients" v-model="form.msgRecipients" type="radio" :enumData="dict.msgRecipients" />
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
<Field :span="20" label="监测周期配置">
<el-checkbox
true-label="1"
false-label="0"
v-model="form.monday"
>周一</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.tuesday"
>周二</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.wednesday"
>周三</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.thursday"
>周四</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.friday"
>周五</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.saturday"
>周六</el-checkbox>
<el-checkbox
true-label="1"
false-label="0"
v-model="form.sunday"
>周日</el-checkbox>
</Field>
<Field :span="20" label="单日服务最大人数设置" prop="maxServicePersonNum" v-model="form.maxServicePersonNum" placeholder="请输入单日服务最大人数设置"/>
<Field :span="20" label="服务阈值设置,单位分钟" prop="serviceThreshold" v-model="form.serviceThreshold" placeholder="请输入服务阈值设置,单位分钟"/>
<Field :span="20" label="累计服务频次预警" prop="alertServiceNum" v-model="form.alertServiceNum" placeholder="请输入累计服务频次预警"/>
<Field :span="20" label="消息发送对象" prop="msgRecipients" v-model="form.msgRecipients" type="checkbox" :enumData="dict.msgRecipients" />
<Field :span="20" label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/>
</el-row> </el-row>
<el-divider content-position="center">主动关怀时间段信息</el-divider> <el-divider content-position="center">主动关怀时间段信息</el-divider>
...@@ -34,14 +81,35 @@ ...@@ -34,14 +81,35 @@
<el-table :data="careConfigTimesList" :row-class-name="rowCareConfigTimesIndex" @selection-change="handleCareConfigTimesSelectionChange" ref="careConfigTimes"> <el-table :data="careConfigTimesList" :row-class-name="rowCareConfigTimesIndex" @selection-change="handleCareConfigTimesSelectionChange" ref="careConfigTimes">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="时间段时候开始时间" prop="serviceTimeStart"> <el-table-column label="开始时间" prop="serviceTimeStart">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />
<el-time-select
placeholder="起始时间"
v-model="scope.row.serviceTimeStart"
value-format="yyyy-MM-dd HH:mm:ss"
format="HH:mm"
:picker-options="{
start: '08:00',
step: '00:30',
end: '18:00'
}">
</el-time-select>
<!-- <el-input v-model="scope.row.serviceTimeStart" placeholder="请输入时间段时候开始时间" />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时间段结束时间" prop="serviceTimeEnd"> <el-table-column label="结束时间" prop="serviceTimeEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.serviceTimeEnd" placeholder="请输入时间段结束时间" /> <el-time-select
placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="scope.row.serviceTimeEnd"
:picker-options="{
start: '08:00',
step: '00:30',
end: '18:00'
}">
</el-time-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"> <el-table-column label="备注" prop="remark">
...@@ -49,26 +117,6 @@ ...@@ -49,26 +117,6 @@
<el-input v-model="scope.row.remark" placeholder="请输入备注" /> <el-input v-model="scope.row.remark" placeholder="请输入备注" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建用户" prop="createUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.createUserId" placeholder="请输入创建用户" />
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime">
<template slot-scope="scope">
<el-input v-model="scope.row.createTime" placeholder="请输入创建时间" />
</template>
</el-table-column>
<el-table-column label="更新用户" prop="updateUserId">
<template slot-scope="scope">
<el-input v-model="scope.row.updateUserId" placeholder="请输入更新用户" />
</template>
</el-table-column>
<el-table-column label="更新时间" prop="updateTime">
<template slot-scope="scope">
<el-input v-model="scope.row.updateTime" placeholder="请输入更新时间" />
</template>
</el-table-column>
</el-table> </el-table>
</el-form> </el-form>
...@@ -82,6 +130,7 @@ ...@@ -82,6 +130,7 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import moment from "moment/moment";
export default { export default {
mixins: [form], mixins: [form],
components: { components: {
...@@ -99,6 +148,7 @@ ...@@ -99,6 +148,7 @@
title: "主动关怀配置", title: "主动关怀配置",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
toArrays: ["msgRecipients"],
toString:[ toString:[
"used", "used",
"monday", "monday",
...@@ -111,10 +161,7 @@ ...@@ -111,10 +161,7 @@
], ],
// 表单校验 // 表单校验
rules: { rules: {
msgRecipients: [
{required: true,message: "请输入消息发送对象", trigger: "blur" },
{max: 255,message: "最多只能录入255个字符",trigger: "blur",},
],
createTime: [ createTime: [
{required: true,message: "请选择创建时间" }, {required: true,message: "请选择创建时间" },
], ],
...@@ -159,6 +206,10 @@ ...@@ -159,6 +206,10 @@
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.careConfigTimesList) { if(data.entity.careConfigTimesList) {
data.entity.careConfigTimesList.map(i=>{
i.serviceTimeStart = moment(i.serviceTimeStart).format('HH:mm')
i.serviceTimeEnd = moment(i.serviceTimeEnd).format('HH:mm')
})
this.careConfigTimesList = data.entity.careConfigTimesList; this.careConfigTimesList = data.entity.careConfigTimesList;
} }
return data return data
...@@ -198,6 +249,20 @@ ...@@ -198,6 +249,20 @@
this.open = true; this.open = true;
}, },
beforeSubmit(data) {
data.careConfigTimesList.map(i=>{
const serviceTimeStart = moment(i.serviceTimeStart, 'HH:mm');
const serviceTimeEnd = moment(i.serviceTimeEnd, 'HH:mm');
i.serviceTimeStart = moment().set({hour: serviceTimeStart.hour(), minute: serviceTimeStart.minute()}).format('yyyy-MM-DD HH:mm:ss');
i.serviceTimeEnd = moment().set({hour: serviceTimeEnd.hour(), minute: serviceTimeEnd.minute()}).format('yyyy-MM-DD HH:mm:ss');
})
if (Array.isArray(data["msgRecipients"])) {
data.msgRecipients = data.msgRecipients.filter(Boolean).join();
}
return data
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
......
...@@ -68,35 +68,30 @@ ...@@ -68,35 +68,30 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter}, {label: "启用服务", prop: "used",formatter: this.formatter},
{label: "站点名称", prop: "siteName"}, {label: "周一", prop: "monday",formatter: this.formatter},
{label: "是否启用该服务", prop: "used",formatter: this.formatter}, {label: "周二", prop: "tuesday",formatter: this.formatter},
{label: "一是否监测", prop: "monday",formatter: this.formatter}, {label: "", prop: "wednesday",formatter: this.formatter},
{label: "二是否监测", prop: "tuesday",formatter: this.formatter}, {label: "", prop: "thursday",formatter: this.formatter},
{label: "三是否监测", prop: "wednesday",formatter: this.formatter}, {label: "", prop: "friday",formatter: this.formatter},
{label: "四是否监测", prop: "thursday",formatter: this.formatter}, {label: "", prop: "saturday",formatter: this.formatter},
{label: "周五是否监测", prop: "friday",formatter: this.formatter}, {label: "周日", prop: "sunday",formatter: this.formatter},
{label: "周六是否监测", prop: "saturday",formatter: this.formatter},
{label: "周日是否监测", prop: "sunday",formatter: this.formatter},
{label: "单日服务最大人数设置", prop: "maxServicePersonNum",formatter: this.formatter}, {label: "单日服务最大人数设置", prop: "maxServicePersonNum",formatter: this.formatter},
{label: "服务阈值设置,单位分钟", prop: "serviceThreshold", formatter: this.formatter}, {label: "服务阈值设置(分钟)", prop: "serviceThreshold", formatter: this.formatter},
{label: "累计服务频次预警", prop: "alertServiceNum",formatter: this.formatter}, {label: "累计服务频次预警", prop: "alertServiceNum",formatter: this.formatter},
{label: "消息发送对象", prop: "msgRecipients"}, {label: "消息发送对象", prop: "msgRecipients"},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{label: "主动关怀时间段", {label: "主动关怀时间段",
width: 120, width: 120,
prop: "subColumns", prop: "subColumns",
......
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field :span="20" label="个人信息" prop="personId" v-model="form.personId" style="width:100%" type="select" :enumData="dict.personId" placeholder="请输入个人信息ID"/>
<Field :span="20" label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field :span="20" label="证件类型" prop="idCardType" v-model="form.idCardType" type="radio" :enumData="dict.idCardType" placeholder="请输入证件类型"/>
<Field :span="20" label="证件号码" prop="idCardNo" v-model="form.idCard" placeholder="请输入证件号码"/>
<!--
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/> <Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/> <Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/>
<Field label="人员ID" prop="personId" v-model="form.personId" placeholder="请输入人员ID"/> <Field label="人员ID" prop="personId" v-model="form.personId" placeholder="请输入人员ID"/>
...@@ -14,9 +21,10 @@ ...@@ -14,9 +21,10 @@
<Field label="创建方式" prop="createWay" v-model="form.createWay" type="select" :enumData="dict.createWay" placeholder="请选择创建方式"/> <Field label="创建方式" prop="createWay" v-model="form.createWay" type="select" :enumData="dict.createWay" placeholder="请选择创建方式"/>
<Field label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/> <Field label="操作人员" prop="operator" v-model="form.operator" placeholder="请输入操作人员"/>
<Field label="是否追踪 " prop="track" v-model="form.track" type="select" :enumData="dict.track" placeholder="请选择是否追踪 "/> <Field label="是否追踪 " prop="track" v-model="form.track" type="select" :enumData="dict.track" placeholder="请选择是否追踪 "/>
-->
</el-row> </el-row>
<el-divider content-position="center">主动关怀服务追踪信息</el-divider> <!-- <el-divider content-position="center">主动关怀服务追踪信息</el-divider>
<br/> <br/>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -75,7 +83,7 @@ ...@@ -75,7 +83,7 @@
<el-input v-model="scope.row.updateUserId" placeholder="请输入更新人ID" /> <el-input v-model="scope.row.updateUserId" placeholder="请输入更新人ID" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -108,71 +116,23 @@ ...@@ -108,71 +116,23 @@
toString:[ toString:[
"createWay", "createWay",
"track", "track",
"idCardType",
"personId",
], ],
// 表单校验 // 表单校验
rules: { rules: {
name: [
{required: true,message: "请输入姓名", trigger: "blur" },
{max: 50,message: "最多只能录入50个字符",trigger: "blur",},
],
contact: [
{required: true,message: "请输入联系方式", trigger: "blur" },
{max: 50,message: "最多只能录入50个字符",trigger: "blur",},
],
idCard: [ idCard: [
{required: true,message: "请输入身份证号码", trigger: "blur" }, {required: true,message: "请输入身份证号码", trigger: "blur" },
{max: 18,message: "最多只能录入18个字符",trigger: "blur",}, {max: 18,message: "最多只能录入18个字符",trigger: "blur",},
], ],
trackingTime: [
{required: true,message: "请选择跟踪时间" },
],
createWay: [
{required: true,message: "请输入创建方式", trigger: "blur" },
],
operator: [
{required: true,message: "请输入操作人员", trigger: "blur" },
{max: 50,message: "最多只能录入50个字符",trigger: "blur",},
],
} }
}; };
}, },
methods: { methods: {
/** 主动关怀服务追踪序号 */
rowCareConstraintTrackIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 主动关怀服务追踪添加按钮操作 */
handleAddCareConstraintTrack() {
let obj = {};
obj.feedbackId = "";
obj.feedbackName = "";
obj.feedback = "";
obj.feedbackTime = "";
obj.createMethod = "";
obj.createTime = "";
obj.createUserId = "";
obj.updateTime = "";
obj.updateUserId = "";
this.careConstraintTrackList.push(obj);
},
/** 主动关怀服务追踪删除按钮操作 */
handleDeleteCareConstraintTrack() {
if (this.checkedCareConstraintTrack.length == 0) {
this.$alert("请先选择要删除的主动关怀服务追踪数据", "提示", { confirmButtonText: "确定", });
} else {
this.careConstraintTrackList.splice(this.checkedCareConstraintTrack[0].index - 1, 1);
}
},
/** 单选框选中数据 */
handleCareConstraintTrackSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.careConstraintTrack.clearSelection();
this.$refs.careConstraintTrack.toggleRowSelection(selection.pop());
} else {
this.checkedCareConstraintTrack = selection;
}
},
// 渲染前置处理 // 渲染前置处理
beforeRender(data) { beforeRender(data) {
if(data.entity.careConstraintTrackList) { if(data.entity.careConstraintTrackList) {
...@@ -215,6 +175,11 @@ ...@@ -215,6 +175,11 @@
this.open = true; this.open = true;
}, },
beforeSubmit(data){
data.name=this.dict['personId'][data.personId]
return data;
},
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
...@@ -229,6 +194,7 @@ ...@@ -229,6 +194,7 @@
name : "", name : "",
contact : "", contact : "",
idCard : "", idCard : "",
idCardType : "居民身份证",
serviceFrequency : null, serviceFrequency : null,
trackingTime : null, trackingTime : null,
createWay : null, createWay : null,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable> </LayoutTable>
<track-drawer-show ref="trackDrawerShow" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
...@@ -11,11 +11,12 @@ ...@@ -11,11 +11,12 @@
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import trackDrawerShow from "./trackDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CareConstraintList", name: "CareConstraintList",
components: { components: {
dialogShow dialogShow,trackDrawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
...@@ -51,6 +52,39 @@ ...@@ -51,6 +52,39 @@
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
handleTrack(row) {
this.$refs.trackDrawerShow.view(row);
},
cancelTrack(row) {
let _this = this
this.$confirm('取消跟踪后,系统将从0开始计算服务频次,是否确认?', "系统服务", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
//todo
_this.$post("/care/constraint/save", {
id: row.id,
serviceFrequency: 0,
track: 0,
})
.then((res) => {
if (res.code == 1) {
_this.$message.success("取消追踪成功!");
_this.getData();
}
})
.catch((error) => {
_this.$message.error(error.message);
});
}).then(response => {
})
}
}, },
data() { data() {
return { return {
...@@ -70,12 +104,6 @@ ...@@ -70,12 +104,6 @@
{type: "selection", width: 60}, {type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "人员ID", prop: "personId", formatter: this.formatter},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contact"}, {label: "联系方式", prop: "contact"},
...@@ -91,28 +119,38 @@ ...@@ -91,28 +119,38 @@
{label: "操作人员", prop: "operator"}, {label: "操作人员", prop: "operator"},
{label: "是否追踪 ", prop: "track",formatter: this.formatter}, {label: "是否追踪 ", prop: "track",formatter: this.formatter},
{label: "主动关怀服务追踪",
width: 120,
prop: "subColumns",
formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width);
}, 50);
return (
<el-popover placement="right" width={widthsize} trigger="click">
{this.renderTable(row.careConstraintTrackList)}
<el-button type="text" slot="reference">详细</el-button>
</el-popover>
);
},
},
{ {
label: "操作", label: "操作",
width: 240, width: 320,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
); <table-buttons noAdd noView row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.handleTrack(row);
}}
>
跟踪反馈
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.cancelTrack(row);
}}
>
取消跟踪
</el-button>
</div>);
} }
} }
] ]
......
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "trackDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "跟踪反馈数据",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "dataDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "监测预警",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
</LayoutTable>
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
type="danger"
@click="monitorWarn"
>监测预警</el-button
>
<drawer-show ref="dataDrawerShow" />
<track-dialog-show ref="trackdialogform" @ok="getData" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</LayoutTable>
</div> </div>
</template> </template>
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import trackdialogShow from "./trackdialogshow";
import drawerShow from "./dataDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "CareRecordsList", name: "CareRecordsList",
components: { components: {
dialogShow dialogShow,drawerShow,trackdialogShow},
},
mixins: [table], mixins: [table],
created() { created() {
}, },
...@@ -33,23 +49,68 @@ ...@@ -33,23 +49,68 @@
toView(row) { toView(row) {
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
/** 监测预警 */
monitorWarn(row) {
this.$refs.dataDrawerShow.view(row);
},
toNotice(row){
let _this=this
this.$confirm(
'负责人姓名:刘琳琳 联系电话:15244845448',
"通知负责人",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(function () {
_this.$post("/care/records/notice", { id: [row.id] })
.then((res) => {
if (res && res.code && res.code == 1) {
_this.getList();
_this.$message.success("通知成功");
}
})
.catch((error) => {
_this.$message.error(error.message);
});
});
},
/** 打开跟踪反馈 */
toTrack(row) {
this.$refs.trackdialogform.view(row);
},
}, },
data() { data() {
return { return {
config: { config: {
search: [ search: [
{
name: "detectTimeStart",
type: "datetime",
label: "开始时间",
},
{
name: "detectTimeEnd",
type: "datetime",
label: "结束时间",
},
{
name: "name",
type: "text",
label: "姓名",
fuzzy: true,
},
], ],
columns: [ columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50}, {type: "index",label: "序号",width: 50},
{label: "站点Id", prop: "siteId", formatter: this.formatter},
{label: "站点名称", prop: "siteName"},
{label: "个人信息ID", prop: "personId", formatter: this.formatter},
{label: "姓名", prop: "name"}, {label: "姓名", prop: "name"},
{label: "联系方式", prop: "contact"}, {label: "联系方式", prop: "contact"},
...@@ -64,7 +125,7 @@ ...@@ -64,7 +125,7 @@
{label: "监测设备", prop: "monitorDevice"}, {label: "监测设备", prop: "monitorDevice"},
{label: "最终等待时长,秒", prop: "waitTime", formatter: this.formatter}, {label: "最终等待时长", prop: "waitTime", formatter: this.formatter},
{label: "办理状态", prop: "processStatus"}, {label: "办理状态", prop: "processStatus"},
{ {
...@@ -72,7 +133,48 @@ ...@@ -72,7 +133,48 @@
width: 240, width: 240,
formatter: row => { formatter: row => {
return ( return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> <div>
{row.processStatus === '排队中' ? (<div>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.reCare(row);
}}
>
再次关怀
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.notice(row);
}}
>
通知负责人
</el-button>
</div>
) : (
""
)}
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-open"
onClick={() => {
this.toTrack(row);
}}
>
跟踪反馈
</el-button>
</div>
); );
} }
} }
......
<template>
<!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="站点Id" prop="siteId" v-model="form.siteId" placeholder="请输入站点Id"/>
<Field label="站点名称" prop="siteName" v-model="form.siteName" type="textarea" placeholder="请输入站点名称"/>
<Field label="个人信息ID" prop="personId" v-model="form.personId" placeholder="请输入个人信息ID"/>
<Field label="姓名" prop="name" v-model="form.name" placeholder="请输入姓名"/>
<Field label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field label="身份证号码" prop="idCard" v-model="form.idCard" placeholder="请输入身份证号码"/>
<Field label="办理业务" prop="service" v-model="form.service" placeholder="请输入办理业务"/>
<Field label="排队编号" prop="queueNo" v-model="form.queueNo" placeholder="请输入排队编号"/>
<Field label="监测时间" prop="monitorTime" v-model="form.monitorTime" type="date" />
<Field label="监测设备id" prop="monitorDeviceId" v-model="form.monitorDeviceId" placeholder="请输入监测设备id"/>
<Field label="监测设备" prop="monitorDevice" v-model="form.monitorDevice" placeholder="请输入监测设备"/>
<Field label="最终等待时长,秒" prop="waitTime" v-model="form.waitTime" placeholder="请输入最终等待时长,秒"/>
<Field label="办理状态" prop="processStatus" v-model="form.processStatus" type="select" :enumData="dict.processStatus" placeholder="请选择办理状态"/>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow";
export default {
mixins: [form],
components: {
dialogShow ,
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "预约关怀记录",
// 是否显示弹出层
open: false,
toString:[
],
// 表单校验
rules: {
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="care/records/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改预约关怀记录";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "care/records/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增预约关怀记录";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="care/records/view";
this.getData();
this.pageInfo.type="view"
this.title = "预约关怀记录详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
siteId : null,
siteName : "",
personId : null,
name : "",
contact : "",
idCard : "",
service : "",
queueNo : "",
monitorTime : null,
monitorDeviceId : null,
monitorDevice : "",
waitTime : null,
processStatus : "",
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable ref="layoutTable" :data="tableData" :config="tableConfig" notDel /> <LayoutTable notPagination ref="layoutTable" :data="tableData" :config="tableConfig" notDel />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
......
<template>
<!-- 抽屉框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="90%">
<span>抽屉 表格数据 todo</span>
</el-drawer>
</template>
<script>
export default {
name: "dataDrawerShow",
components: {
},
created() {
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "监测预警",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
],
};
},
methods: {
view(row) {
this.open=true
},
},
};
</script>
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable notAdd notDel :data="tableData" :config="tableConfig">
</LayoutTable> <el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
type="danger"
@click="monitorWarn"
>监测预警</el-button
>
</LayoutTable>
<drawer-show ref="dataDrawerShow" />
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
</template> </template>
...@@ -11,11 +21,13 @@ ...@@ -11,11 +21,13 @@
<script> <script>
/** 表单弹出框模式需引入 */ /** 表单弹出框模式需引入 */
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
import drawerShow from "./dataDrawerShow";
import table from "@/assets/mixins/table"; import table from "@/assets/mixins/table";
export default { export default {
name: "RealtimeDataflowList", name: "RealtimeDataflowList",
components: { components: {
dialogShow dialogShow,drawerShow
}, },
mixins: [table], mixins: [table],
created() { created() {
...@@ -34,11 +46,32 @@ ...@@ -34,11 +46,32 @@
this.$refs.dialogform.view(row); this.$refs.dialogform.view(row);
}, },
monitorWarn(row) {
this.$refs.dataDrawerShow.view(row);
},
}, },
data() { data() {
return { return {
config: { config: {
search: [ search: [
{
name: "device",
type: "select",
label: "监测设备",
},
{
name: "detectTimeStart",
type: "datetime",
label: "开始时间",
},
{
name: "detectTimeEnd",
type: "datetime",
label: "结束时间",
},
], ],
columns: [ columns: [
{type: "selection", width: 60}, {type: "selection", width: 60},
......
// 添加,编辑设备
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="35%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body>
<el-form <el-form ref="form" :model="form" :rules="rules" label-width="120px">
ref="form"
:model="form"
:rules="rules"
label-width="110px"
label-position="right"
>
<el-row> <el-row>
<Field <el-col :span="24" v-if="form.parentId !== 0">
:span="22" <el-form-item label="上级节点" prop="parentId">
label="ID" <treeselect
prop="id"
v-model="form.id"
v-if="pageInfo.type !== 'add'"
disabled
/>
<Field :span="22" label="名称" prop="name" v-model="form.name" />
<Field
:span="22"
label="权限类型"
prop="authType"
v-model="form.authType"
:enumData="dict.authType"
type="select"
/>
<Field
:span="22"
label="父级菜单"
prop="parentId"
v-model="form.parentId" v-model="form.parentId"
:enumData="menu" :options="menuOptions"
type="select" :normalizer="normalizer"
/> placeholder="选择上级菜单信息"
<Field :span="22" label="访问地址" prop="url" v-model="form.url" />
<Field
:span="22"
label="状态"
prop="status"
v-model="form.status"
:enumData="dict.status"
type="radio"
/> />
</el-form-item>
</el-col>
<Field <!-- <Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled />
:span="22" --> <Field label="名称" prop="name" v-model="form.name"/>
label="图标" <Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' />
placeholder="请输入图标名称" <Field label="访问地址" prop="url" v-model="form.url" />
prop="imgPath" <Field label="状态" prop="status" v-model="form.status" :enumData='dict.status' type='radio' />
v-model="form.imgPath" <Field class="radio-group-container" label="图标" prop="imgPath" :span='24'>
/> <el-radio-group v-model="form.imgPath" class='form-el-radio-group'>
<!-- <Field v-else :span="22" label="图标" prop="imgPath"> <el-radio-button style="width: 180px" label="">不需要图标</el-radio-button>
<el-radio-group v-model="form.imgPath" class="form-el-radio-group"> <el-radio-button style="width: 180px" v-for='(icon, index) in icons' :key='index' :label="icon">
<el-radio-button label="">不需要图标</el-radio-button> <i :class="'el-icon-'+icon" style="font-size: 20px"></i>
<el-radio-button {{icon}}
v-for="(icon, index) in icons"
:key="index"
:label="icon"
>
<i :class="'el-icon-' + icon"></i>
{{ icon }}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
</Field> --> </Field>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button <el-button type="primary" @click="submitForm">确 定</el-button>
type="primary"
v-if="pageInfo.type !== 'view'"
@click="submitForm"
>确 定</el-button
>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -81,55 +39,84 @@ ...@@ -81,55 +39,84 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import axios from 'axios'
export default { export default {
mixins: [form], mixins: [form],
components: { components: {
dialogShow, Treeselect,
}, },
computed: { data() {
menu() { return {
let menu = { 0: "" }; fileContent:"",
this.$store.state.userData.barList.forEach((item) => { icons: [
menu[item.id + ""] = item.name; 'info', 'error', 'success', 'warning', 'question',
}); 'tickets', 'document', 'goods', 'sold-out', 'news',
return menu; 'message', 'date', 'printer', 'time', 'bell',
'mobile-phone', 'service', 'view', 'menu', 'star-on',
'location', 'phone', 'picture', 'delete', 'search',
'edit', 'rank', 'refresh', 'share', 'setting',
'upload', 'upload2', 'download', 'loading',
],
menuOptions: [],
// 遮罩层
loading: true,
// 弹出层标题
title: "菜单信息",
// 是否显示弹出层
open: false,
id:null,
toString:[
"status",
"linkType",
"commMenu",
"menuType",
"authType",
],
// 表单校验
rules: {
}
};
}, },
created() {
axios.get('/icon.txt')
.then(response => {
this.fileContent = response.data
this.icons = this.fileContent.split('\n')
})
}, },
methods: { methods: {
afterSubmit() {
this.$store.dispatch("login");
this.$router.go(-1);
},
/** 编辑 */ /** 编辑 */
edit(row) { edit(row, menuOptions) {
this.reset(); this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = this.pageInfo.editUrl; this.urls.currUrl =this.pageInfo.editUrl;;
this.getData(); this.getData();
this.pageInfo.type = "edit"; this.menuOptions = menuOptions;
this.title = "修改菜单"; this.title = "修改菜单信息";
}, },
/** 新增 */ /** 新增 */
add(row) { async add(row, menuOptions) {
this.reset(); this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = this.pageInfo.addUrl; this.urls.currUrl = this.pageInfo.addUrl;
this.getData(); this.getData();
this.pageInfo.type = "add"; if(row.id){
this.open = true; this.id=row.id
this.title = "新增菜单"; this.form.parentId=row.id
}
this.menuOptions = menuOptions;
this.title = "新增菜单信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row, menuOptions) {
this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = this.pageInfo.viewUrl; this.urls.currUrl =this.pageInfo.viewUrl;;
this.getData(); this.getData();
this.pageInfo.type = "view"; this.menuOptions = menuOptions;
this.open = true; this.title = "菜单信息详细";
this.title = "菜单详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
...@@ -137,16 +124,46 @@ export default { ...@@ -137,16 +124,46 @@ export default {
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
if(this.id){
this.form.parentId=this.id
}
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
/** 转换菜单信息数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.id,
label: node.name,
children: node.children,
};
},
// 表单重置 // 表单重置
reset() { reset() {
// this.form={} this.form = {
name : '',
url : '',
ancestors : '',
parentId : 0,
orderId : 1,
status : 1,
linkType : 0,
groupId : 1,
groupName : '',
imgPath : '',
buttonImgPath : '',
imgCommPath : '',
commMenu : 0,
menuType : 0,
authType : 3,
};
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
...@@ -155,74 +172,42 @@ export default { ...@@ -155,74 +172,42 @@ export default {
} }
}, },
}, },
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "菜单",
// 是否显示弹出层
open: false,
toString: ["parentId", "authType", "status"],
icons: [
"info",
"error",
"success",
"warning",
"question",
"tickets",
"document",
"goods",
"sold-out",
"news",
"message",
"date",
"printer",
"time",
"bell",
"mobile-phone",
"service",
"view",
"menu",
"star-on",
"location",
"phone",
"picture",
"delete",
"search",
"edit",
"rank",
"refresh",
"share",
"setting",
"upload",
"upload2",
"download",
"loading",
"reading",
],
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
},
};
},
}; };
</script> </script>
<style lang="less"> <style lang="scss">
.el-select { .ml-row {
width: 100%; margin-bottom: 5px;
}
.el-date-editor.el-input {
width: 100%;
}
.form-el-radio-group.label {
width: 160px;
} }
.el-radio-button__inner { .el-radio-button__inner {
border: 0; // width: 82px;
height: 36px;
border-radius: 4px 0px 0px 4px;
border: 1px solid rgba(0, 0, 0, 0) !important;
border-radius: 2px !important;
background-color: rgba(0, 0, 0, 0);
font-size: 14px;
font-weight: 400;
color: #606677;
line-height: 14px;
outline: none;
box-shadow: none;
} }
</style>
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
background: rgba(0, 0, 0, 0);
border: 1px solid #3E7BFA !important;
color: #3E7BFA;
line-height: 14px;
outline: none;
box-shadow: none;
}
.ml-top-button {
border-color: #ffffff;
background: rgba(0, 0, 0, 0);
font-size: 16px;
margin: 0 10px 0 10px;
}
</style>
<template> <template>
<div class="page"> <div className="page">
<LayoutTable :data='tableData' :config='tableConfig' notPagination /> <LayoutTable notPagination ref="layoutTable" :data="tableData" :config="tableConfig"/>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData"/>
</div> </div>
</template> </template>
<script> <script>
import table from '@/assets/mixins/table'; import {handleTree} from "@/assets/utils/table";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import table from "@/assets/mixins/table";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
export default { export default {
name: "Menu",
mixins: [table], mixins: [table],
components: { dialogShow }, components: {Treeselect, dialogShow},
methods: { created() {
beforeRender(data) { this.query={"page":1,"size":-1}
this.allMenu = this.sortByGroup(this.util_copy(data.data));
// 存在查询条件,展开全部
if(Object.keys(this.$route.query).length) {
this.select = this.allMenu.filter(i=>!i.parentId).map(i=>i.id);
}
return data;
},
afterRender() {
this.showChild();
},
// 按parentId排序分组
sortByGroup(data) {
return data.filter(i=>!i.parentId).reduce((prev, item)=>{
return prev.concat([item], data.filter(i=>i.parentId == item.id));
}, [])
},
// 查看下级菜单
selectHandler({id}) {
// 如果已展开,则关闭
const index = this.select.indexOf(id);
if(index > -1) {
this.select.splice(index, 1);
}else{
this.select.push(id);
}
this.showChild();
},
showChild() {
this.tableData.data = this.allMenu.filter(item=>{
return !item.parentId || this.select.indexOf(item.parentId) > -1
});
},
// 展示菜单图标
showIcon(row, column) {
return <i class={'el-icon-'+row.imgPath}></i>
},
// 操作菜单状态
changeStatus(row, column) {
return (
<my-switch
confirm
url='/menu/save'
row={row}
onChange={this.statusChange}
value={this.tableData.data}
onInput={(data)=>{
this.tableData.data = data;
}}/>
)
}, },
afterDel(id) { methods: {
this.$store.dispatch('login'); afterRender(data) {
}, console.log(data)
statusChange() { data.data = handleTree(data.data, "id", "parentId");
this.$store.dispatch('login'); console.log("tree data:",data.data)
this.menuOptions = data.data;
this.$refs.layoutTable.showType = "treetable"
}, },
handleUp(data) { handleUp(data) {
let type = 0; let type = 0;
let url = "/menu/upOrDown"; let url = "/menu/upOrDown";
...@@ -92,7 +51,6 @@ export default { ...@@ -92,7 +51,6 @@ export default {
if (res && res.code && res.code == 1) { if (res && res.code && res.code == 1) {
this.getData() this.getData()
this.loading = false; this.loading = false;
this.$message.success("更新排序成功!"); this.$message.success("更新排序成功!");
} }
}) })
...@@ -101,54 +59,79 @@ export default { ...@@ -101,54 +59,79 @@ export default {
this.$message.error(error.message); this.$message.error(error.message);
}); });
}, },
handleAdd(row) {
this.$refs.dialogform.add(row, this.menuOptions);
},
handleRowClick(row){
console.log(row)
//if(row.children || row.children.length === 0) return ;
//this.$refs.layoutTable.toggleRowExpansion(row,true)
},
/** 重写新增方法 */ /** 重写新增方法 */
// toAdd(row) { toAdd(row) {
// this.$refs.dialogform.add(row); this.$refs.dialogform.add(row, this.menuOptions);
// }, },
// /** 重写编辑方法 */ /** 重写编辑方法 */
// toEdit(row) { toEdit(row) {
// this.$refs.dialogform.edit(row); this.loading = true;
// }, this.$post(this.pageInfo.exclude, {id: row.id})
// /** 重写查看方法 */ .then((res) => {
// toView(row) { if (res && res.code && res.code == 1) {
// this.$refs.dialogform.view(row); this.menuOptions = handleTree(res.data.data);
// }, this.$refs.dialogform.edit(row, this.menuOptions);
this.loading = false;
}
})
.catch((error) => {
this.$message.error(error.message);
});
},
/** 重写查看方法 */
toView(row) {
this.$refs.dialogform.view(row, this.menuOptions);
},
// 展示菜单图标
showIcon(row, column) {
return <i class={'el-icon-'+row.imgPath}></i>
},
// 操作菜单状态
changeStatus(row, column) {
return (
<my-switch
confirm
url='/menu/save'
row={row}
onChange={this.statusChange}
value={this.tableData.data}
onInput={(data)=>{
this.tableData.data = data;
}}/>
)
},
statusChange() {
this.$store.dispatch('login');
},
}, },
data() { data() {
return { return {
allMenu: [], // 经过分组排序的表格数据
select: [], // 当前展开的树节点
query: {
'size': -1
},
config: { config: {
search: [ /** 树表是否默认展开 */
{ expand: false,
name: 'name', showType: "treetable",
type: 'text', search: [],
label: '菜单名称',
},
],
columns: [ columns: [
{ type: "selection",reserveSelection:true, width: 60 },
{ type: "index", label: "序号",align:"center", width: 50 },
{ {
type: 'selection',
width: 60, width: 60,
formatter: row => {
const icon = this.select.indexOf(row.id) === -1 ? 'right' : 'down';
return (
!row.parentId
? <div onClick={()=>{this.selectHandler(row)}}>
<i class={'el-icon-arrow-'+icon}></i>
</div>
: ''
)
}
}, },
{ {
prop: 'id', prop: 'id',
label: 'ID', label: 'ID',
width: 60, width: 120,
}, },
{ {
prop: 'name', prop: 'name',
...@@ -158,8 +141,8 @@ export default { ...@@ -158,8 +141,8 @@ export default {
{ {
prop: 'imgPath', prop: 'imgPath',
label: '图标', label: '图标',
width: 120, width: 50,
// formatter: this.showIcon, formatter: this.showIcon,
}, },
{ {
prop: 'authType', prop: 'authType',
...@@ -180,11 +163,28 @@ export default { ...@@ -180,11 +163,28 @@ export default {
width: 100, width: 100,
formatter: this.changeStatus, formatter: this.changeStatus,
}, },
// {label: "菜单名称", prop: "name"},
// {label: "连接地址", prop: "url"},
// {label: "当前节点父id路径,“,”分割,服务端生成", prop: "ancestors"},
// {label: "父菜单ID,一级菜单的该字段值为-1", prop: "parentId", formatter: this.formatterString},
// {label: "排序编号", prop: "orderId"},
// {label: "菜单状态,0:禁用,1:启用,默认1", prop: "status"},
// {label: "链接方式,0:普通,1:弹出,2:脚本", prop: "linkType"},
// {label: "分组编号,使用菜单分隔符按该值分隔,默认1", prop: "groupId", formatter: this.formatterString},
// {label: "", prop: "groupName"},
// {label: "主菜单图标,主菜单图标的css样式名", prop: "imgPath"},
// {label: "按钮图标,按钮图标的css样式名", prop: "buttonImgPath"},
// {label: "常用菜单图标,常用菜单图标的css样式名", prop: "imgCommPath"},
// {label: "是否常用菜单,0:非常用,1:常用,默认0", prop: "commMenu"},
// {label: "菜单类型,0:主菜单,1:非主菜单", prop: "menuType"},
// {label: "权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3", prop: "authType"},
// {label: "创建用户名称", prop: "createUserName"},
{ {
label: '操作', label: "操作",
formatter: (row)=> { width: 280,
formatter: row => {
return ( return (
<div> <div>
<el-link <el-link
style="margin-right:5px;margin-left:5px" style="margin-right:5px;margin-left:5px"
...@@ -203,17 +203,31 @@ export default { ...@@ -203,17 +203,31 @@ export default {
></el-link> ></el-link>
<table-buttons noView row={row} onEdit={this.toEdit} onDel={this.toDel} /> <el-button
size="mini"
type="text"
icon="el-icon-edit-outline"
onClick={() => {
this.handleAdd(row);
}}
>
新增
</el-button>
<table-buttons
noAdd
noView
row={row}
onEdit={this.toEdit}
onView={this.toView}
onDel={this.toDel}
/>
</div> </div>
) );
}, }
},
],
},
} }
]
} }
} };
}
};
</script> </script>
<template> <template>
<layout-form> <layout-form >
<el-form <el-form
:model="form" :model="form"
:loading="loading" :loading="loading"
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
label-width='100px' label-width='100px'
ref="form" ref="form"
> >
<el-row> <el-row :span='20'>
<Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled /> <Field label="ID" prop="id" v-model="form.id" v-if='pageInfo.type !== "add"' disabled />
<Field label="名称" prop="name" v-model="form.name"/> <Field label="名称" prop="name" v-model="form.name"/>
<Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' /> <Field label="权限类型" prop="authType" v-model="form.authType" :enumData='dict.authType' type='select' />
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-radio-group v-model="form.imgPath" class='form-el-radio-group'> <el-radio-group v-model="form.imgPath" class='form-el-radio-group'>
<el-radio-button label="">不需要图标</el-radio-button> <el-radio-button label="">不需要图标</el-radio-button>
<el-radio-button v-for='(icon, index) in icons' :key='index' :label="icon"> <el-radio-button v-for='(icon, index) in icons' :key='index' :label="icon">
<i :class="'el-icon-'+icon"></i> <i :class="'el-icon-'+icon" style="font-size: 20px"></i>
{{icon}} {{icon}}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<script> <script>
import form from '@/assets/mixins/form'; import form from '@/assets/mixins/form';
import axios from 'axios'
export default { export default {
mixins: [form], mixins: [form],
methods: { methods: {
...@@ -41,6 +41,15 @@ export default { ...@@ -41,6 +41,15 @@ export default {
this.$router.go(-1); this.$router.go(-1);
}, },
}, },
created() {
axios.get('/icon.txt')
.then(response => {
this.fileContent = response.data
this.icons = this.fileContent.split('\n')
//this.lines.map(i=>console.log(i))
})
},
computed: { computed: {
menu() { menu() {
let menu = {'0': ''}; let menu = {'0': ''};
...@@ -50,8 +59,17 @@ export default { ...@@ -50,8 +59,17 @@ export default {
return menu; return menu;
} }
}, },
// mounted() {
// axios.get('/icon.txt')
// .then(response => {
// this.fileContent = response.data
// this.lines = this.fileContent.split('\n')
// this.lines.map(i=>console.log(i))
// })
// },
data() { data() {
return { return {
fileContent:"",
toString: ['parentId', 'authType', 'status'], toString: ['parentId', 'authType', 'status'],
icons: [ icons: [
'info', 'error', 'success', 'warning', 'question', 'info', 'error', 'success', 'warning', 'question',
......
/**
* 文件:MenuDao.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.dao; package com.mortals.xhx.base.system.menu.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import java.util.List;
/** /**
* <p>Title: 菜单信息</p> * 菜单信息Dao
* <p>Description: MenuDao DAO接口 </p> * 菜单信息 DAO接口
* <p>Copyright: Copyright &reg; </p> *
* <p>Company: </p> * @author zxfei
* @author * @date 2023-04-10
* @version 1.0.0 */
*/
public interface MenuDao extends ICRUDDao<MenuEntity,Long> { public interface MenuDao extends ICRUDDao<MenuEntity,Long>{
/**
* 查询子节点
*
* @param
* @return
*/
List<MenuEntity> selectChildrenMenuById(String menuId);
} }
/**
* 文件:MenuDaoImpl.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.dao.ibatis; package com.mortals.xhx.base.system.menu.dao.ibatis;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.base.system.menu.dao.MenuDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.base.system.menu.dao.MenuDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/** /**
* <p>Title: 菜单信息</p> * 菜单信息DaoImpl DAO接口
* <p>Description: MenuDaoImpl DAO接口 </p> *
* <p>Copyright: Copyright &reg; </p> * @author zxfei
* <p>Company: </p> * @date 2023-04-10
* @author */
* @version 1.0.0
*/
@Repository("menuDao") @Repository("menuDao")
public class MenuDaoImpl extends BaseCRUDDaoMybatis<MenuEntity,Long> implements MenuDao { public class MenuDaoImpl extends BaseCRUDDaoMybatis<MenuEntity,Long> implements MenuDao {
@Override
public List<MenuEntity> selectChildrenMenuById(String menuId) {
return getSqlSession().selectList(getSqlId("selectChildrenMenuById"), menuId);
}
} }
/**
* 文件:MenuEntity.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.model; package com.mortals.xhx.base.system.menu.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.base.system.menu.model.vo.MenuVo;
/** /**
* <p>Title: 菜单信息</p> * 菜单信息实体对象
* <p>Description: MenuEntity </p> *
* <p>Copyright: Copyright &reg; </p> * @author zxfei
* <p>Company: </p> * @date 2023-04-10
* @author */
* @version 1.0.0
*/
public class MenuEntity extends BaseEntityLong{
private static final long serialVersionUID = 1547777703328L;
/** 菜单名称 */ public class MenuEntity extends MenuVo {
private String name; private static final long serialVersionUID = 1L;
/** 连接地址 */ /**
* 菜单名称
*/
private String name;
/**
* 连接地址
*/
private String url; private String url;
/**
/** 父菜单ID,一级菜单的该字段值为-1 */ * 当前节点父id路径,“,”分割,服务端生成
*/
private String ancestors;
/**
* 父菜单ID,一级菜单的该字段值为-1
*/
private Long parentId; private Long parentId;
/**
/** 排序编号 */ * 排序编号
*/
private Integer orderId; private Integer orderId;
/**
/** 菜单状态,0:禁用,1:启用,默认1 */ * 菜单状态,0:禁用,1:启用,默认1
*/
private Integer status; private Integer status;
/**
/** 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */ * 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
*/
private Integer linkType; private Integer linkType;
/**
/** 分组编号,使用菜单分隔符按该值分隔,默认1 */ * 分组编号,使用菜单分隔符按该值分隔,默认1
private Integer groupId; */
private Long groupId;
/** 分组名称 */ /**
private Integer groupName; *
*/
/** 主菜单图标,主菜单图标的css样式名 */ private String groupName;
/**
* 主菜单图标,主菜单图标的css样式名
*/
private String imgPath; private String imgPath;
/**
/** 按钮图标,按钮图标的css样式名 */ * 按钮图标,按钮图标的css样式名
*/
private String buttonImgPath; private String buttonImgPath;
/**
/** 常用菜单图标,常用菜单图标的css样式名 */ * 常用菜单图标,常用菜单图标的css样式名
*/
private String imgCommPath; private String imgCommPath;
/**
/** 是否常用菜单,0:非常用,1:常用,默认0 */ * 是否常用菜单,0:非常用,1:常用,默认0
*/
private Integer commMenu; private Integer commMenu;
/**
/** 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 */ * 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
*/
private Integer menuType; private Integer menuType;
/**
/** 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 */ * 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
*/
private Integer authType; private Integer authType;
/**
/** 创建时间 */ * 创建用户名称
private Date createTime; */
/** 创建用户 */
private String createUser;
/** 创建用户名称 */
private String createUserName; private String createUserName;
private Integer type;
private List<MenuEntity> childList = new ArrayList<MenuEntity>();
public MenuEntity() {
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public MenuEntity(){}
/** /**
* 获取 菜单名称 * 获取 菜单名称
* @return name * @return String
*/ */
public String getName() { public String getName(){
return this.name; return name;
} }
/** /**
* 设置 菜单名称 * 设置 菜单名称
* @param name * @param name
*/ */
public void setName(String name) { public void setName(String name){
this.name = name; this.name = name;
} }
/** /**
* 获取 连接地址 * 获取 连接地址
* @return url * @return String
*/ */
public String getUrl() { public String getUrl(){
return this.url; return url;
} }
/** /**
* 设置 连接地址 * 设置 连接地址
* @param url * @param url
*/ */
public void setUrl(String url) { public void setUrl(String url){
this.url = url; this.url = url;
} }
/**
* 获取 当前节点父id路径,“,”分割,服务端生成
* @return String
*/
public String getAncestors(){
return ancestors;
}
/**
* 设置 当前节点父id路径,“,”分割,服务端生成
* @param ancestors
*/
public void setAncestors(String ancestors){
this.ancestors = ancestors;
}
/** /**
* 获取 父菜单ID,一级菜单的该字段值为-1 * 获取 父菜单ID,一级菜单的该字段值为-1
* @return parentId * @return Long
*/ */
public Long getParentId() { public Long getParentId(){
return this.parentId; return parentId;
} }
/** /**
* 设置 父菜单ID,一级菜单的该字段值为-1 * 设置 父菜单ID,一级菜单的该字段值为-1
* @param parentId * @param parentId
*/ */
public void setParentId(Long parentId) { public void setParentId(Long parentId){
this.parentId = parentId; this.parentId = parentId;
} }
/** /**
* 获取 排序编号 * 获取 排序编号
* @return orderId * @return Integer
*/ */
public Integer getOrderId() { public Integer getOrderId(){
return this.orderId; return orderId;
} }
/** /**
* 设置 排序编号 * 设置 排序编号
* @param orderId * @param orderId
*/ */
public void setOrderId(Integer orderId) { public void setOrderId(Integer orderId){
this.orderId = orderId; this.orderId = orderId;
} }
/** /**
* 获取 菜单状态,0:禁用,1:启用,默认1 * 获取 菜单状态,0:禁用,1:启用,默认1
* @return status * @return Integer
*/ */
public Integer getStatus() { public Integer getStatus(){
return this.status; return status;
} }
/** /**
* 设置 菜单状态,0:禁用,1:启用,默认1 * 设置 菜单状态,0:禁用,1:启用,默认1
* @param status * @param status
*/ */
public void setStatus(Integer status) { public void setStatus(Integer status){
this.status = status; this.status = status;
} }
/** /**
* 获取 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 * 获取 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @return linkType * @return Integer
*/ */
public Integer getLinkType() { public Integer getLinkType(){
return this.linkType; return linkType;
} }
/** /**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 * 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkType * @param linkType
*/ */
public void setLinkType(Integer linkType) { public void setLinkType(Integer linkType){
this.linkType = linkType; this.linkType = linkType;
} }
/** /**
* 获取 分组编号,使用菜单分隔符按该值分隔,默认1 * 获取 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupId * @return Long
*/ */
public Integer getGroupId() { public Long getGroupId(){
return this.groupId; return groupId;
} }
/** /**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1 * 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupId * @param groupId
*/ */
public void setGroupId(Integer groupId) { public void setGroupId(Long groupId){
this.groupId = groupId; this.groupId = groupId;
} }
/**
* 获取
public Integer getGroupName() { * @return String
*/
public String getGroupName(){
return groupName; return groupName;
} }
/**
public void setGroupName(Integer groupName) { * 设置
* @param groupName
*/
public void setGroupName(String groupName){
this.groupName = groupName; this.groupName = groupName;
} }
/** /**
* 获取 主菜单图标,主菜单图标的css样式名 * 获取 主菜单图标,主菜单图标的css样式名
* @return imgPath * @return String
*/ */
public String getImgPath() { public String getImgPath(){
return this.imgPath; return imgPath;
} }
/** /**
* 设置 主菜单图标,主菜单图标的css样式名 * 设置 主菜单图标,主菜单图标的css样式名
* @param imgPath * @param imgPath
*/ */
public void setImgPath(String imgPath) { public void setImgPath(String imgPath){
this.imgPath = imgPath; this.imgPath = imgPath;
} }
/** /**
* 获取 按钮图标,按钮图标的css样式名 * 获取 按钮图标,按钮图标的css样式名
* @return buttonImgPath * @return String
*/ */
public String getButtonImgPath() { public String getButtonImgPath(){
return this.buttonImgPath; return buttonImgPath;
} }
/** /**
* 设置 按钮图标,按钮图标的css样式名 * 设置 按钮图标,按钮图标的css样式名
* @param buttonImgPath * @param buttonImgPath
*/ */
public void setButtonImgPath(String buttonImgPath) { public void setButtonImgPath(String buttonImgPath){
this.buttonImgPath = buttonImgPath; this.buttonImgPath = buttonImgPath;
} }
/** /**
* 获取 常用菜单图标,常用菜单图标的css样式名 * 获取 常用菜单图标,常用菜单图标的css样式名
* @return imgCommPath * @return String
*/ */
public String getImgCommPath() { public String getImgCommPath(){
return this.imgCommPath; return imgCommPath;
} }
/** /**
* 设置 常用菜单图标,常用菜单图标的css样式名 * 设置 常用菜单图标,常用菜单图标的css样式名
* @param imgCommPath * @param imgCommPath
*/ */
public void setImgCommPath(String imgCommPath) { public void setImgCommPath(String imgCommPath){
this.imgCommPath = imgCommPath; this.imgCommPath = imgCommPath;
} }
/** /**
* 获取 是否常用菜单,0:非常用,1:常用,默认0 * 获取 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenu * @return Integer
*/ */
public Integer getCommMenu() { public Integer getCommMenu(){
return this.commMenu; return commMenu;
} }
/** /**
* 设置 是否常用菜单,0:非常用,1:常用,默认0 * 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenu * @param commMenu
*/ */
public void setCommMenu(Integer commMenu) { public void setCommMenu(Integer commMenu){
this.commMenu = commMenu; this.commMenu = commMenu;
} }
/** /**
* 获取 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 * 获取 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @return menuType * @return Integer
*/ */
public Integer getMenuType() { public Integer getMenuType(){
return this.menuType; return menuType;
} }
/** /**
* 设置 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 * 设置 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuType * @param menuType
*/ */
public void setMenuType(Integer menuType) { public void setMenuType(Integer menuType){
this.menuType = menuType; this.menuType = menuType;
} }
/** /**
* 获取 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 * 获取 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @return authType * @return Integer
*/ */
public Integer getAuthType() { public Integer getAuthType(){
return this.authType; return authType;
} }
/** /**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 * 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authType * @param authType
*/ */
public void setAuthType(Integer authType) { public void setAuthType(Integer authType){
this.authType = authType; this.authType = authType;
} }
/**
* 获取 创建时间
* @return createTime
*/
@Override
public Date getCreateTime() {
return this.createTime;
}
/**
* 设置 创建时间
* @param createTime
*/
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取 创建用户
* @return createUser
*/
@Override
public String getCreateUser() {
return this.createUser;
}
/**
* 设置 创建用户
* @param createUser
*/
@Override
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
/** /**
* 获取 创建用户名称 * 获取 创建用户名称
* @return createUserName * @return String
*/ */
@Override public String getCreateUserName(){
public String getCreateUserName() { return createUserName;
return this.createUserName;
} }
/** /**
* 设置 创建用户名称 * 设置 创建用户名称
* @param createUserName * @param createUserName
*/ */
@Override public void setCreateUserName(String createUserName){
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName; this.createUserName = createUserName;
} }
public List<MenuEntity> getChildList() {
return childList;
}
public void setChildList(List<MenuEntity> childList) {
this.childList = childList;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == null) { if (obj == null) return false;
return false;
}
if (obj instanceof MenuEntity) { if (obj instanceof MenuEntity) {
MenuEntity tmp = (MenuEntity) obj; MenuEntity tmp = (MenuEntity) obj;
if (this.getId().longValue() == tmp.getId().longValue()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
} }
@Override public String toString(){
public String toString() {
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append("id:").append(getId()) sb.append(",name:").append(getName());
.append(",name:").append(getName()) sb.append(",url:").append(getUrl());
.append(",url:").append(getUrl()) sb.append(",ancestors:").append(getAncestors());
.append(",parentId:").append(getParentId()) sb.append(",parentId:").append(getParentId());
.append(",orderId:").append(getOrderId()) sb.append(",orderId:").append(getOrderId());
.append(",status:").append(getStatus()) sb.append(",status:").append(getStatus());
.append(",linkType:").append(getLinkType()) sb.append(",linkType:").append(getLinkType());
.append(",groupId:").append(getGroupId()) sb.append(",groupId:").append(getGroupId());
.append(",groupName:").append(getGroupName()) sb.append(",groupName:").append(getGroupName());
.append(",imgPath:").append(getImgPath()) sb.append(",imgPath:").append(getImgPath());
.append(",buttonImgPath:").append(getButtonImgPath()) sb.append(",buttonImgPath:").append(getButtonImgPath());
.append(",imgCommPath:").append(getImgCommPath()) sb.append(",imgCommPath:").append(getImgCommPath());
.append(",commMenu:").append(getCommMenu()) sb.append(",commMenu:").append(getCommMenu());
.append(",menuType:").append(getMenuType()) sb.append(",menuType:").append(getMenuType());
.append(",authType:").append(getAuthType()) sb.append(",authType:").append(getAuthType());
.append(",createTime:").append(getCreateTime()) sb.append(",createUserName:").append(getCreateUserName());
.append(",createUser:").append(getCreateUser())
.append(",createUserName:").append(getCreateUserName());
return sb.toString(); return sb.toString();
} }
@Override public void initAttrValue(){
public void initAttrValue() {
this.name = null; this.name = "";
this.url = null;
this.parentId = null; this.url = "";
this.orderId = 0;
this.ancestors = "";
this.parentId = 0L;
this.orderId = 1;
this.status = 1; this.status = 1;
this.linkType = 0; this.linkType = 0;
this.groupId = 1;
this.imgPath = null; this.groupId = 1L;
this.buttonImgPath = null;
this.imgCommPath = null; this.groupName = "";
this.imgPath = "";
this.buttonImgPath = "";
this.imgCommPath = "";
this.commMenu = 0; this.commMenu = 0;
this.menuType = 0; this.menuType = 0;
this.authType = 3; this.authType = 3;
this.createTime = null;
this.createUser = null;
this.createUserName = null;
} }
} }
\ No newline at end of file
/**
* 文件:MenuQuery.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.model; package com.mortals.xhx.base.system.menu.model;
import java.util.List; import java.util.List;
/** /**
* <p>Title: 菜单信息</p> * 菜单信息查询对象
* <p>Description: MenuQuery </p> *
* <p>Copyright: Copyright &reg; </p> * @author zxfei
* <p>Company: </p> * @date 2023-04-10
* @author */
* @version 1.0.0 public class MenuQuery extends MenuEntity {
*/
public class MenuQuery extends MenuEntity{
private static final long serialVersionUID = 1547777703329L;
/** 开始 菜单ID,主键,自增长 */ /** 开始 菜单ID,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -27,15 +17,27 @@ public class MenuQuery extends MenuEntity{ ...@@ -27,15 +17,27 @@ public class MenuQuery extends MenuEntity{
/** 增加 菜单ID,主键,自增长 */ /** 增加 菜单ID,主键,自增长 */
private Long idIncrement; private Long idIncrement;
/** 菜单ID,主键,自增长 */ /** 菜单ID,主键,自增长列表 */
private List<Long> idList; private List <Long> idList;
/** 菜单ID,主键,自增长排除列表 */
private List <Long> idNotList;
/** 菜单名称 */ /** 菜单名称 */
private List<String> nameList; private List<String> nameList;
/** 菜单名称排除列表 */
private List <String> nameNotList;
/** 连接地址 */ /** 连接地址 */
private List<String> urlList; private List<String> urlList;
/** 连接地址排除列表 */
private List <String> urlNotList;
/** 当前节点父id路径,“,”分割,服务端生成 */
private List<String> ancestorsList;
/** 当前节点父id路径,“,”分割,服务端生成排除列表 */
private List <String> ancestorsNotList;
/** 开始 父菜单ID,一级菜单的该字段值为-1 */ /** 开始 父菜单ID,一级菜单的该字段值为-1 */
private Long parentIdStart; private Long parentIdStart;
...@@ -45,8 +47,11 @@ public class MenuQuery extends MenuEntity{ ...@@ -45,8 +47,11 @@ public class MenuQuery extends MenuEntity{
/** 增加 父菜单ID,一级菜单的该字段值为-1 */ /** 增加 父菜单ID,一级菜单的该字段值为-1 */
private Long parentIdIncrement; private Long parentIdIncrement;
/** 父菜单ID,一级菜单的该字段值为-1 */ /** 父菜单ID,一级菜单的该字段值为-1列表 */
private List<Long> parentIdList; private List <Long> parentIdList;
/** 父菜单ID,一级菜单的该字段值为-1排除列表 */
private List <Long> parentIdNotList;
/** 开始 排序编号 */ /** 开始 排序编号 */
private Integer orderIdStart; private Integer orderIdStart;
...@@ -57,8 +62,11 @@ public class MenuQuery extends MenuEntity{ ...@@ -57,8 +62,11 @@ public class MenuQuery extends MenuEntity{
/** 增加 排序编号 */ /** 增加 排序编号 */
private Integer orderIdIncrement; private Integer orderIdIncrement;
/** 排序编号 */ /** 排序编号列表 */
private List<Integer> orderIdList; private List <Integer> orderIdList;
/** 排序编号排除列表 */
private List <Integer> orderIdNotList;
/** 开始 菜单状态,0:禁用,1:启用,默认1 */ /** 开始 菜单状态,0:禁用,1:启用,默认1 */
private Integer statusStart; private Integer statusStart;
...@@ -69,8 +77,11 @@ public class MenuQuery extends MenuEntity{ ...@@ -69,8 +77,11 @@ public class MenuQuery extends MenuEntity{
/** 增加 菜单状态,0:禁用,1:启用,默认1 */ /** 增加 菜单状态,0:禁用,1:启用,默认1 */
private Integer statusIncrement; private Integer statusIncrement;
/** 菜单状态,0:禁用,1:启用,默认1 */ /** 菜单状态,0:禁用,1:启用,默认1列表 */
private List<Integer> statusList; private List <Integer> statusList;
/** 菜单状态,0:禁用,1:启用,默认1排除列表 */
private List <Integer> statusNotList;
/** 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */ /** 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */
private Integer linkTypeStart; private Integer linkTypeStart;
...@@ -81,33 +92,47 @@ public class MenuQuery extends MenuEntity{ ...@@ -81,33 +92,47 @@ public class MenuQuery extends MenuEntity{
/** 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */ /** 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */
private Integer linkTypeIncrement; private Integer linkTypeIncrement;
/** 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */ /** 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0列表 */
private List<Integer> linkTypeList; private List <Integer> linkTypeList;
/** 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0排除列表 */
private List <Integer> linkTypeNotList;
/** 开始 分组编号,使用菜单分隔符按该值分隔,默认1 */ /** 开始 分组编号,使用菜单分隔符按该值分隔,默认1 */
private Integer groupIdStart; private Long groupIdStart;
/** 结束 分组编号,使用菜单分隔符按该值分隔,默认1 */ /** 结束 分组编号,使用菜单分隔符按该值分隔,默认1 */
private Integer groupIdEnd; private Long groupIdEnd;
/** 增加 分组编号,使用菜单分隔符按该值分隔,默认1 */ /** 增加 分组编号,使用菜单分隔符按该值分隔,默认1 */
private Integer groupIdIncrement; private Long groupIdIncrement;
/** 分组编号,使用菜单分隔符按该值分隔,默认1 */ /** 分组编号,使用菜单分隔符按该值分隔,默认1列表 */
private List<Integer> groupIdList; private List <Long> groupIdList;
/** 分组名称 */ /** 分组编号,使用菜单分隔符按该值分隔,默认1排除列表 */
private List <Long> groupIdNotList;
/** */
private List<String> groupNameList; private List<String> groupNameList;
/** 排除列表 */
private List <String> groupNameNotList;
/** 主菜单图标,主菜单图标的css样式名 */ /** 主菜单图标,主菜单图标的css样式名 */
private List<String> imgPathList; private List<String> imgPathList;
/** 主菜单图标,主菜单图标的css样式名排除列表 */
private List <String> imgPathNotList;
/** 按钮图标,按钮图标的css样式名 */ /** 按钮图标,按钮图标的css样式名 */
private List<String> buttonImgPathList; private List<String> buttonImgPathList;
/** 按钮图标,按钮图标的css样式名排除列表 */
private List <String> buttonImgPathNotList;
/** 常用菜单图标,常用菜单图标的css样式名 */ /** 常用菜单图标,常用菜单图标的css样式名 */
private List<String> imgCommPathList; private List<String> imgCommPathList;
/** 常用菜单图标,常用菜单图标的css样式名排除列表 */
private List <String> imgCommPathNotList;
/** 开始 是否常用菜单,0:非常用,1:常用,默认0 */ /** 开始 是否常用菜单,0:非常用,1:常用,默认0 */
private Integer commMenuStart; private Integer commMenuStart;
...@@ -117,8 +142,11 @@ public class MenuQuery extends MenuEntity{ ...@@ -117,8 +142,11 @@ public class MenuQuery extends MenuEntity{
/** 增加 是否常用菜单,0:非常用,1:常用,默认0 */ /** 增加 是否常用菜单,0:非常用,1:常用,默认0 */
private Integer commMenuIncrement; private Integer commMenuIncrement;
/** 是否常用菜单,0:非常用,1:常用,默认0 */ /** 是否常用菜单,0:非常用,1:常用,默认0列表 */
private List<Integer> commMenuList; private List <Integer> commMenuList;
/** 是否常用菜单,0:非常用,1:常用,默认0排除列表 */
private List <Integer> commMenuNotList;
/** 开始 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 */ /** 开始 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 */
private Integer menuTypeStart; private Integer menuTypeStart;
...@@ -129,8 +157,11 @@ public class MenuQuery extends MenuEntity{ ...@@ -129,8 +157,11 @@ public class MenuQuery extends MenuEntity{
/** 增加 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 */ /** 增加 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 */
private Integer menuTypeIncrement; private Integer menuTypeIncrement;
/** 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 */ /** 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0列表 */
private List<Integer> menuTypeList; private List <Integer> menuTypeList;
/** 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0排除列表 */
private List <Integer> menuTypeNotList;
/** 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 */ /** 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 */
private Integer authTypeStart; private Integer authTypeStart;
...@@ -141,8 +172,11 @@ public class MenuQuery extends MenuEntity{ ...@@ -141,8 +172,11 @@ public class MenuQuery extends MenuEntity{
/** 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 */ /** 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 */
private Integer authTypeIncrement; private Integer authTypeIncrement;
/** 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 */ /** 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3列表 */
private List<Integer> authTypeList; private List <Integer> authTypeList;
/** 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3排除列表 */
private List <Integer> authTypeNotList;
/** 开始 创建时间 */ /** 开始 创建时间 */
private String createTimeStart; private String createTimeStart;
...@@ -159,15 +193,25 @@ public class MenuQuery extends MenuEntity{ ...@@ -159,15 +193,25 @@ public class MenuQuery extends MenuEntity{
/** 增加 创建用户 */ /** 增加 创建用户 */
private Long createUserIdIncrement; private Long createUserIdIncrement;
/** 创建用户 */ /** 创建用户列表 */
private List<Long> createUserIdList; private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 创建用户名称 */ /** 创建用户名称 */
private List<String> createUserNameList; private List<String> createUserNameList;
/** 创建用户名称排除列表 */
private List <String> createUserNameNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<MenuQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<MenuQuery> andConditionList;
public MenuQuery(){}
public MenuQuery(){
}
/** /**
* 获取 开始 菜单ID,主键,自增长 * 获取 开始 菜单ID,主键,自增长
* @return idStart * @return idStart
...@@ -186,7 +230,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -186,7 +230,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 菜单ID,主键,自增长 * 获取 结束 菜单ID,主键,自增长
* @return idEnd * @return $idEnd
*/ */
public Long getIdEnd(){ public Long getIdEnd(){
return this.idEnd; return this.idEnd;
...@@ -232,6 +276,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -232,6 +276,23 @@ public class MenuQuery extends MenuEntity{
this.idList = idList; this.idList = idList;
} }
/**
* 获取 菜单ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 菜单ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/** /**
* 获取 菜单名称 * 获取 菜单名称
* @return nameList * @return nameList
...@@ -248,6 +309,22 @@ public class MenuQuery extends MenuEntity{ ...@@ -248,6 +309,22 @@ public class MenuQuery extends MenuEntity{
this.nameList = nameList; this.nameList = nameList;
} }
/**
* 获取 菜单名称
* @return nameNotList
*/
public List<String> getNameNotList(){
return this.nameNotList;
}
/**
* 设置 菜单名称
* @param nameNotList
*/
public void setNameNotList(List<String> nameNotList){
this.nameNotList = nameNotList;
}
/** /**
* 获取 连接地址 * 获取 连接地址
* @return urlList * @return urlList
...@@ -264,6 +341,54 @@ public class MenuQuery extends MenuEntity{ ...@@ -264,6 +341,54 @@ public class MenuQuery extends MenuEntity{
this.urlList = urlList; this.urlList = urlList;
} }
/**
* 获取 连接地址
* @return urlNotList
*/
public List<String> getUrlNotList(){
return this.urlNotList;
}
/**
* 设置 连接地址
* @param urlNotList
*/
public void setUrlNotList(List<String> urlNotList){
this.urlNotList = urlNotList;
}
/**
* 获取 当前节点父id路径,“,”分割,服务端生成
* @return ancestorsList
*/
public List<String> getAncestorsList(){
return this.ancestorsList;
}
/**
* 设置 当前节点父id路径,“,”分割,服务端生成
* @param ancestorsList
*/
public void setAncestorsList(List<String> ancestorsList){
this.ancestorsList = ancestorsList;
}
/**
* 获取 当前节点父id路径,“,”分割,服务端生成
* @return ancestorsNotList
*/
public List<String> getAncestorsNotList(){
return this.ancestorsNotList;
}
/**
* 设置 当前节点父id路径,“,”分割,服务端生成
* @param ancestorsNotList
*/
public void setAncestorsNotList(List<String> ancestorsNotList){
this.ancestorsNotList = ancestorsNotList;
}
/** /**
* 获取 开始 父菜单ID,一级菜单的该字段值为-1 * 获取 开始 父菜单ID,一级菜单的该字段值为-1
* @return parentIdStart * @return parentIdStart
...@@ -282,7 +407,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -282,7 +407,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 父菜单ID,一级菜单的该字段值为-1 * 获取 结束 父菜单ID,一级菜单的该字段值为-1
* @return parentIdEnd * @return $parentIdEnd
*/ */
public Long getParentIdEnd(){ public Long getParentIdEnd(){
return this.parentIdEnd; return this.parentIdEnd;
...@@ -328,6 +453,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -328,6 +453,23 @@ public class MenuQuery extends MenuEntity{
this.parentIdList = parentIdList; this.parentIdList = parentIdList;
} }
/**
* 获取 父菜单ID,一级菜单的该字段值为-1
* @return parentIdNotList
*/
public List<Long> getParentIdNotList(){
return this.parentIdNotList;
}
/**
* 设置 父菜单ID,一级菜单的该字段值为-1
* @param parentIdNotList
*/
public void setParentIdNotList(List<Long> parentIdNotList){
this.parentIdNotList = parentIdNotList;
}
/** /**
* 获取 开始 排序编号 * 获取 开始 排序编号
* @return orderIdStart * @return orderIdStart
...@@ -346,7 +488,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -346,7 +488,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 排序编号 * 获取 结束 排序编号
* @return orderIdEnd * @return $orderIdEnd
*/ */
public Integer getOrderIdEnd(){ public Integer getOrderIdEnd(){
return this.orderIdEnd; return this.orderIdEnd;
...@@ -392,6 +534,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -392,6 +534,23 @@ public class MenuQuery extends MenuEntity{
this.orderIdList = orderIdList; this.orderIdList = orderIdList;
} }
/**
* 获取 排序编号
* @return orderIdNotList
*/
public List<Integer> getOrderIdNotList(){
return this.orderIdNotList;
}
/**
* 设置 排序编号
* @param orderIdNotList
*/
public void setOrderIdNotList(List<Integer> orderIdNotList){
this.orderIdNotList = orderIdNotList;
}
/** /**
* 获取 开始 菜单状态,0:禁用,1:启用,默认1 * 获取 开始 菜单状态,0:禁用,1:启用,默认1
* @return statusStart * @return statusStart
...@@ -410,7 +569,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -410,7 +569,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 菜单状态,0:禁用,1:启用,默认1 * 获取 结束 菜单状态,0:禁用,1:启用,默认1
* @return statusEnd * @return $statusEnd
*/ */
public Integer getStatusEnd(){ public Integer getStatusEnd(){
return this.statusEnd; return this.statusEnd;
...@@ -456,6 +615,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -456,6 +615,23 @@ public class MenuQuery extends MenuEntity{
this.statusList = statusList; this.statusList = statusList;
} }
/**
* 获取 菜单状态,0:禁用,1:启用,默认1
* @return statusNotList
*/
public List<Integer> getStatusNotList(){
return this.statusNotList;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param statusNotList
*/
public void setStatusNotList(List<Integer> statusNotList){
this.statusNotList = statusNotList;
}
/** /**
* 获取 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 * 获取 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @return linkTypeStart * @return linkTypeStart
...@@ -474,7 +650,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -474,7 +650,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 * 获取 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @return linkTypeEnd * @return $linkTypeEnd
*/ */
public Integer getLinkTypeEnd(){ public Integer getLinkTypeEnd(){
return this.linkTypeEnd; return this.linkTypeEnd;
...@@ -520,11 +696,28 @@ public class MenuQuery extends MenuEntity{ ...@@ -520,11 +696,28 @@ public class MenuQuery extends MenuEntity{
this.linkTypeList = linkTypeList; this.linkTypeList = linkTypeList;
} }
/**
* 获取 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @return linkTypeNotList
*/
public List<Integer> getLinkTypeNotList(){
return this.linkTypeNotList;
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkTypeNotList
*/
public void setLinkTypeNotList(List<Integer> linkTypeNotList){
this.linkTypeNotList = linkTypeNotList;
}
/** /**
* 获取 开始 分组编号,使用菜单分隔符按该值分隔,默认1 * 获取 开始 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdStart * @return groupIdStart
*/ */
public Integer getGroupIdStart(){ public Long getGroupIdStart(){
return this.groupIdStart; return this.groupIdStart;
} }
...@@ -532,15 +725,15 @@ public class MenuQuery extends MenuEntity{ ...@@ -532,15 +725,15 @@ public class MenuQuery extends MenuEntity{
* 设置 开始 分组编号,使用菜单分隔符按该值分隔,默认1 * 设置 开始 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdStart * @param groupIdStart
*/ */
public void setGroupIdStart(Integer groupIdStart){ public void setGroupIdStart(Long groupIdStart){
this.groupIdStart = groupIdStart; this.groupIdStart = groupIdStart;
} }
/** /**
* 获取 结束 分组编号,使用菜单分隔符按该值分隔,默认1 * 获取 结束 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdEnd * @return $groupIdEnd
*/ */
public Integer getGroupIdEnd(){ public Long getGroupIdEnd(){
return this.groupIdEnd; return this.groupIdEnd;
} }
...@@ -548,7 +741,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -548,7 +741,7 @@ public class MenuQuery extends MenuEntity{
* 设置 结束 分组编号,使用菜单分隔符按该值分隔,默认1 * 设置 结束 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdEnd * @param groupIdEnd
*/ */
public void setGroupIdEnd(Integer groupIdEnd){ public void setGroupIdEnd(Long groupIdEnd){
this.groupIdEnd = groupIdEnd; this.groupIdEnd = groupIdEnd;
} }
...@@ -556,7 +749,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -556,7 +749,7 @@ public class MenuQuery extends MenuEntity{
* 获取 增加 分组编号,使用菜单分隔符按该值分隔,默认1 * 获取 增加 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdIncrement * @return groupIdIncrement
*/ */
public Integer getGroupIdIncrement(){ public Long getGroupIdIncrement(){
return this.groupIdIncrement; return this.groupIdIncrement;
} }
...@@ -564,7 +757,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -564,7 +757,7 @@ public class MenuQuery extends MenuEntity{
* 设置 增加 分组编号,使用菜单分隔符按该值分隔,默认1 * 设置 增加 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdIncrement * @param groupIdIncrement
*/ */
public void setGroupIdIncrement(Integer groupIdIncrement){ public void setGroupIdIncrement(Long groupIdIncrement){
this.groupIdIncrement = groupIdIncrement; this.groupIdIncrement = groupIdIncrement;
} }
...@@ -572,7 +765,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -572,7 +765,7 @@ public class MenuQuery extends MenuEntity{
* 获取 分组编号,使用菜单分隔符按该值分隔,默认1 * 获取 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdList * @return groupIdList
*/ */
public List<Integer> getGroupIdList(){ public List<Long> getGroupIdList(){
return this.groupIdList; return this.groupIdList;
} }
...@@ -580,12 +773,29 @@ public class MenuQuery extends MenuEntity{ ...@@ -580,12 +773,29 @@ public class MenuQuery extends MenuEntity{
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1 * 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdList * @param groupIdList
*/ */
public void setGroupIdList(List<Integer> groupIdList){ public void setGroupIdList(List<Long> groupIdList){
this.groupIdList = groupIdList; this.groupIdList = groupIdList;
} }
/** /**
* 获取 分组名称 * 获取 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdNotList
*/
public List<Long> getGroupIdNotList(){
return this.groupIdNotList;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdNotList
*/
public void setGroupIdNotList(List<Long> groupIdNotList){
this.groupIdNotList = groupIdNotList;
}
/**
* 获取
* @return groupNameList * @return groupNameList
*/ */
public List<String> getGroupNameList(){ public List<String> getGroupNameList(){
...@@ -593,13 +803,29 @@ public class MenuQuery extends MenuEntity{ ...@@ -593,13 +803,29 @@ public class MenuQuery extends MenuEntity{
} }
/** /**
* 设置 分组名称 * 设置
* @param groupNameList * @param groupNameList
*/ */
public void setGroupNameList(List<String> groupNameList){ public void setGroupNameList(List<String> groupNameList){
this.groupNameList = groupNameList; this.groupNameList = groupNameList;
} }
/**
* 获取
* @return groupNameNotList
*/
public List<String> getGroupNameNotList(){
return this.groupNameNotList;
}
/**
* 设置
* @param groupNameNotList
*/
public void setGroupNameNotList(List<String> groupNameNotList){
this.groupNameNotList = groupNameNotList;
}
/** /**
* 获取 主菜单图标,主菜单图标的css样式名 * 获取 主菜单图标,主菜单图标的css样式名
* @return imgPathList * @return imgPathList
...@@ -616,6 +842,22 @@ public class MenuQuery extends MenuEntity{ ...@@ -616,6 +842,22 @@ public class MenuQuery extends MenuEntity{
this.imgPathList = imgPathList; this.imgPathList = imgPathList;
} }
/**
* 获取 主菜单图标,主菜单图标的css样式名
* @return imgPathNotList
*/
public List<String> getImgPathNotList(){
return this.imgPathNotList;
}
/**
* 设置 主菜单图标,主菜单图标的css样式名
* @param imgPathNotList
*/
public void setImgPathNotList(List<String> imgPathNotList){
this.imgPathNotList = imgPathNotList;
}
/** /**
* 获取 按钮图标,按钮图标的css样式名 * 获取 按钮图标,按钮图标的css样式名
* @return buttonImgPathList * @return buttonImgPathList
...@@ -632,6 +874,22 @@ public class MenuQuery extends MenuEntity{ ...@@ -632,6 +874,22 @@ public class MenuQuery extends MenuEntity{
this.buttonImgPathList = buttonImgPathList; this.buttonImgPathList = buttonImgPathList;
} }
/**
* 获取 按钮图标,按钮图标的css样式名
* @return buttonImgPathNotList
*/
public List<String> getButtonImgPathNotList(){
return this.buttonImgPathNotList;
}
/**
* 设置 按钮图标,按钮图标的css样式名
* @param buttonImgPathNotList
*/
public void setButtonImgPathNotList(List<String> buttonImgPathNotList){
this.buttonImgPathNotList = buttonImgPathNotList;
}
/** /**
* 获取 常用菜单图标,常用菜单图标的css样式名 * 获取 常用菜单图标,常用菜单图标的css样式名
* @return imgCommPathList * @return imgCommPathList
...@@ -648,6 +906,22 @@ public class MenuQuery extends MenuEntity{ ...@@ -648,6 +906,22 @@ public class MenuQuery extends MenuEntity{
this.imgCommPathList = imgCommPathList; this.imgCommPathList = imgCommPathList;
} }
/**
* 获取 常用菜单图标,常用菜单图标的css样式名
* @return imgCommPathNotList
*/
public List<String> getImgCommPathNotList(){
return this.imgCommPathNotList;
}
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* @param imgCommPathNotList
*/
public void setImgCommPathNotList(List<String> imgCommPathNotList){
this.imgCommPathNotList = imgCommPathNotList;
}
/** /**
* 获取 开始 是否常用菜单,0:非常用,1:常用,默认0 * 获取 开始 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenuStart * @return commMenuStart
...@@ -666,7 +940,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -666,7 +940,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 是否常用菜单,0:非常用,1:常用,默认0 * 获取 结束 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenuEnd * @return $commMenuEnd
*/ */
public Integer getCommMenuEnd(){ public Integer getCommMenuEnd(){
return this.commMenuEnd; return this.commMenuEnd;
...@@ -712,6 +986,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -712,6 +986,23 @@ public class MenuQuery extends MenuEntity{
this.commMenuList = commMenuList; this.commMenuList = commMenuList;
} }
/**
* 获取 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenuNotList
*/
public List<Integer> getCommMenuNotList(){
return this.commMenuNotList;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuNotList
*/
public void setCommMenuNotList(List<Integer> commMenuNotList){
this.commMenuNotList = commMenuNotList;
}
/** /**
* 获取 开始 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 * 获取 开始 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @return menuTypeStart * @return menuTypeStart
...@@ -730,7 +1021,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -730,7 +1021,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0 * 获取 结束 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @return menuTypeEnd * @return $menuTypeEnd
*/ */
public Integer getMenuTypeEnd(){ public Integer getMenuTypeEnd(){
return this.menuTypeEnd; return this.menuTypeEnd;
...@@ -776,6 +1067,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -776,6 +1067,23 @@ public class MenuQuery extends MenuEntity{
this.menuTypeList = menuTypeList; this.menuTypeList = menuTypeList;
} }
/**
* 获取 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @return menuTypeNotList
*/
public List<Integer> getMenuTypeNotList(){
return this.menuTypeNotList;
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuTypeNotList
*/
public void setMenuTypeNotList(List<Integer> menuTypeNotList){
this.menuTypeNotList = menuTypeNotList;
}
/** /**
* 获取 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 * 获取 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @return authTypeStart * @return authTypeStart
...@@ -794,7 +1102,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -794,7 +1102,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3 * 获取 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @return authTypeEnd * @return $authTypeEnd
*/ */
public Integer getAuthTypeEnd(){ public Integer getAuthTypeEnd(){
return this.authTypeEnd; return this.authTypeEnd;
...@@ -840,6 +1148,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -840,6 +1148,23 @@ public class MenuQuery extends MenuEntity{
this.authTypeList = authTypeList; this.authTypeList = authTypeList;
} }
/**
* 获取 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @return authTypeNotList
*/
public List<Integer> getAuthTypeNotList(){
return this.authTypeNotList;
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authTypeNotList
*/
public void setAuthTypeNotList(List<Integer> authTypeNotList){
this.authTypeNotList = authTypeNotList;
}
/** /**
* 获取 开始 创建时间 * 获取 开始 创建时间
* @return createTimeStart * @return createTimeStart
...@@ -890,7 +1215,7 @@ public class MenuQuery extends MenuEntity{ ...@@ -890,7 +1215,7 @@ public class MenuQuery extends MenuEntity{
/** /**
* 获取 结束 创建用户 * 获取 结束 创建用户
* @return createUserIdEnd * @return $createUserIdEnd
*/ */
public Long getCreateUserIdEnd(){ public Long getCreateUserIdEnd(){
return this.createUserIdEnd; return this.createUserIdEnd;
...@@ -936,6 +1261,23 @@ public class MenuQuery extends MenuEntity{ ...@@ -936,6 +1261,23 @@ public class MenuQuery extends MenuEntity{
this.createUserIdList = createUserIdList; this.createUserIdList = createUserIdList;
} }
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/** /**
* 获取 创建用户名称 * 获取 创建用户名称
* @return createUserNameList * @return createUserNameList
...@@ -952,5 +1294,745 @@ public class MenuQuery extends MenuEntity{ ...@@ -952,5 +1294,745 @@ public class MenuQuery extends MenuEntity{
this.createUserNameList = createUserNameList; this.createUserNameList = createUserNameList;
} }
/**
* 获取 创建用户名称
* @return createUserNameNotList
*/
public List<String> getCreateUserNameNotList(){
return this.createUserNameNotList;
}
/**
* 设置 创建用户名称
* @param createUserNameNotList
*/
public void setCreateUserNameNotList(List<String> createUserNameNotList){
this.createUserNameNotList = createUserNameNotList;
}
/**
* 设置 菜单ID,主键,自增长
* @param id
*/
public MenuQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 菜单ID,主键,自增长
* @param idStart
*/
public MenuQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 菜单ID,主键,自增长
* @param idEnd
*/
public MenuQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 菜单ID,主键,自增长
* @param idIncrement
*/
public MenuQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 菜单ID,主键,自增长
* @param idList
*/
public MenuQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 菜单ID,主键,自增长
* @param idNotList
*/
public MenuQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 菜单名称
* @param name
*/
public MenuQuery name(String name){
setName(name);
return this;
}
/**
* 设置 菜单名称
* @param nameList
*/
public MenuQuery nameList(List<String> nameList){
this.nameList = nameList;
return this;
}
/**
* 设置 连接地址
* @param url
*/
public MenuQuery url(String url){
setUrl(url);
return this;
}
/**
* 设置 连接地址
* @param urlList
*/
public MenuQuery urlList(List<String> urlList){
this.urlList = urlList;
return this;
}
/**
* 设置 当前节点父id路径,“,”分割,服务端生成
* @param ancestors
*/
public MenuQuery ancestors(String ancestors){
setAncestors(ancestors);
return this;
}
/**
* 设置 当前节点父id路径,“,”分割,服务端生成
* @param ancestorsList
*/
public MenuQuery ancestorsList(List<String> ancestorsList){
this.ancestorsList = ancestorsList;
return this;
}
/**
* 设置 父菜单ID,一级菜单的该字段值为-1
* @param parentId
*/
public MenuQuery parentId(Long parentId){
setParentId(parentId);
return this;
}
/**
* 设置 开始 父菜单ID,一级菜单的该字段值为-1
* @param parentIdStart
*/
public MenuQuery parentIdStart(Long parentIdStart){
this.parentIdStart = parentIdStart;
return this;
}
/**
* 设置 结束 父菜单ID,一级菜单的该字段值为-1
* @param parentIdEnd
*/
public MenuQuery parentIdEnd(Long parentIdEnd){
this.parentIdEnd = parentIdEnd;
return this;
}
/**
* 设置 增加 父菜单ID,一级菜单的该字段值为-1
* @param parentIdIncrement
*/
public MenuQuery parentIdIncrement(Long parentIdIncrement){
this.parentIdIncrement = parentIdIncrement;
return this;
}
/**
* 设置 父菜单ID,一级菜单的该字段值为-1
* @param parentIdList
*/
public MenuQuery parentIdList(List<Long> parentIdList){
this.parentIdList = parentIdList;
return this;
}
/**
* 设置 父菜单ID,一级菜单的该字段值为-1
* @param parentIdNotList
*/
public MenuQuery parentIdNotList(List<Long> parentIdNotList){
this.parentIdNotList = parentIdNotList;
return this;
}
/**
* 设置 排序编号
* @param orderId
*/
public MenuQuery orderId(Integer orderId){
setOrderId(orderId);
return this;
}
/**
* 设置 开始 排序编号
* @param orderIdStart
*/
public MenuQuery orderIdStart(Integer orderIdStart){
this.orderIdStart = orderIdStart;
return this;
}
/**
* 设置 结束 排序编号
* @param orderIdEnd
*/
public MenuQuery orderIdEnd(Integer orderIdEnd){
this.orderIdEnd = orderIdEnd;
return this;
}
/**
* 设置 增加 排序编号
* @param orderIdIncrement
*/
public MenuQuery orderIdIncrement(Integer orderIdIncrement){
this.orderIdIncrement = orderIdIncrement;
return this;
}
/**
* 设置 排序编号
* @param orderIdList
*/
public MenuQuery orderIdList(List<Integer> orderIdList){
this.orderIdList = orderIdList;
return this;
}
/**
* 设置 排序编号
* @param orderIdNotList
*/
public MenuQuery orderIdNotList(List<Integer> orderIdNotList){
this.orderIdNotList = orderIdNotList;
return this;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param status
*/
public MenuQuery status(Integer status){
setStatus(status);
return this;
}
/**
* 设置 开始 菜单状态,0:禁用,1:启用,默认1
* @param statusStart
*/
public MenuQuery statusStart(Integer statusStart){
this.statusStart = statusStart;
return this;
}
/**
* 设置 结束 菜单状态,0:禁用,1:启用,默认1
* @param statusEnd
*/
public MenuQuery statusEnd(Integer statusEnd){
this.statusEnd = statusEnd;
return this;
}
/**
* 设置 增加 菜单状态,0:禁用,1:启用,默认1
* @param statusIncrement
*/
public MenuQuery statusIncrement(Integer statusIncrement){
this.statusIncrement = statusIncrement;
return this;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param statusList
*/
public MenuQuery statusList(List<Integer> statusList){
this.statusList = statusList;
return this;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param statusNotList
*/
public MenuQuery statusNotList(List<Integer> statusNotList){
this.statusNotList = statusNotList;
return this;
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkType
*/
public MenuQuery linkType(Integer linkType){
setLinkType(linkType);
return this;
}
/**
* 设置 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkTypeStart
*/
public MenuQuery linkTypeStart(Integer linkTypeStart){
this.linkTypeStart = linkTypeStart;
return this;
}
/**
* 设置 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkTypeEnd
*/
public MenuQuery linkTypeEnd(Integer linkTypeEnd){
this.linkTypeEnd = linkTypeEnd;
return this;
}
/**
* 设置 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkTypeIncrement
*/
public MenuQuery linkTypeIncrement(Integer linkTypeIncrement){
this.linkTypeIncrement = linkTypeIncrement;
return this;
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkTypeList
*/
public MenuQuery linkTypeList(List<Integer> linkTypeList){
this.linkTypeList = linkTypeList;
return this;
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* @param linkTypeNotList
*/
public MenuQuery linkTypeNotList(List<Integer> linkTypeNotList){
this.linkTypeNotList = linkTypeNotList;
return this;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupId
*/
public MenuQuery groupId(Long groupId){
setGroupId(groupId);
return this;
}
/**
* 设置 开始 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdStart
*/
public MenuQuery groupIdStart(Long groupIdStart){
this.groupIdStart = groupIdStart;
return this;
}
/**
* 设置 结束 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdEnd
*/
public MenuQuery groupIdEnd(Long groupIdEnd){
this.groupIdEnd = groupIdEnd;
return this;
}
/**
* 设置 增加 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdIncrement
*/
public MenuQuery groupIdIncrement(Long groupIdIncrement){
this.groupIdIncrement = groupIdIncrement;
return this;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdList
*/
public MenuQuery groupIdList(List<Long> groupIdList){
this.groupIdList = groupIdList;
return this;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdNotList
*/
public MenuQuery groupIdNotList(List<Long> groupIdNotList){
this.groupIdNotList = groupIdNotList;
return this;
}
/**
* 设置
* @param groupName
*/
public MenuQuery groupName(String groupName){
setGroupName(groupName);
return this;
}
/**
* 设置
* @param groupNameList
*/
public MenuQuery groupNameList(List<String> groupNameList){
this.groupNameList = groupNameList;
return this;
}
/**
* 设置 主菜单图标,主菜单图标的css样式名
* @param imgPath
*/
public MenuQuery imgPath(String imgPath){
setImgPath(imgPath);
return this;
}
/**
* 设置 主菜单图标,主菜单图标的css样式名
* @param imgPathList
*/
public MenuQuery imgPathList(List<String> imgPathList){
this.imgPathList = imgPathList;
return this;
}
/**
* 设置 按钮图标,按钮图标的css样式名
* @param buttonImgPath
*/
public MenuQuery buttonImgPath(String buttonImgPath){
setButtonImgPath(buttonImgPath);
return this;
}
/**
* 设置 按钮图标,按钮图标的css样式名
* @param buttonImgPathList
*/
public MenuQuery buttonImgPathList(List<String> buttonImgPathList){
this.buttonImgPathList = buttonImgPathList;
return this;
}
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* @param imgCommPath
*/
public MenuQuery imgCommPath(String imgCommPath){
setImgCommPath(imgCommPath);
return this;
}
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* @param imgCommPathList
*/
public MenuQuery imgCommPathList(List<String> imgCommPathList){
this.imgCommPathList = imgCommPathList;
return this;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenu
*/
public MenuQuery commMenu(Integer commMenu){
setCommMenu(commMenu);
return this;
}
/**
* 设置 开始 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuStart
*/
public MenuQuery commMenuStart(Integer commMenuStart){
this.commMenuStart = commMenuStart;
return this;
}
/**
* 设置 结束 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuEnd
*/
public MenuQuery commMenuEnd(Integer commMenuEnd){
this.commMenuEnd = commMenuEnd;
return this;
}
/**
* 设置 增加 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuIncrement
*/
public MenuQuery commMenuIncrement(Integer commMenuIncrement){
this.commMenuIncrement = commMenuIncrement;
return this;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuList
*/
public MenuQuery commMenuList(List<Integer> commMenuList){
this.commMenuList = commMenuList;
return this;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuNotList
*/
public MenuQuery commMenuNotList(List<Integer> commMenuNotList){
this.commMenuNotList = commMenuNotList;
return this;
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuType
*/
public MenuQuery menuType(Integer menuType){
setMenuType(menuType);
return this;
}
/**
* 设置 开始 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuTypeStart
*/
public MenuQuery menuTypeStart(Integer menuTypeStart){
this.menuTypeStart = menuTypeStart;
return this;
}
/**
* 设置 结束 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuTypeEnd
*/
public MenuQuery menuTypeEnd(Integer menuTypeEnd){
this.menuTypeEnd = menuTypeEnd;
return this;
}
/**
* 设置 增加 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuTypeIncrement
*/
public MenuQuery menuTypeIncrement(Integer menuTypeIncrement){
this.menuTypeIncrement = menuTypeIncrement;
return this;
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuTypeList
*/
public MenuQuery menuTypeList(List<Integer> menuTypeList){
this.menuTypeList = menuTypeList;
return this;
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单(功能操作组),默认0
* @param menuTypeNotList
*/
public MenuQuery menuTypeNotList(List<Integer> menuTypeNotList){
this.menuTypeNotList = menuTypeNotList;
return this;
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authType
*/
public MenuQuery authType(Integer authType){
setAuthType(authType);
return this;
}
/**
* 设置 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authTypeStart
*/
public MenuQuery authTypeStart(Integer authTypeStart){
this.authTypeStart = authTypeStart;
return this;
}
/**
* 设置 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authTypeEnd
*/
public MenuQuery authTypeEnd(Integer authTypeEnd){
this.authTypeEnd = authTypeEnd;
return this;
}
/**
* 设置 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authTypeIncrement
*/
public MenuQuery authTypeIncrement(Integer authTypeIncrement){
this.authTypeIncrement = authTypeIncrement;
return this;
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authTypeList
*/
public MenuQuery authTypeList(List<Integer> authTypeList){
this.authTypeList = authTypeList;
return this;
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
* @param authTypeNotList
*/
public MenuQuery authTypeNotList(List<Integer> authTypeNotList){
this.authTypeNotList = authTypeNotList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public MenuQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public MenuQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public MenuQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public MenuQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public MenuQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public MenuQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 创建用户名称
* @param createUserName
*/
public MenuQuery createUserName(String createUserName){
setCreateUserName(createUserName);
return this;
}
/**
* 设置 创建用户名称
* @param createUserNameList
*/
public MenuQuery createUserNameList(List<String> createUserNameList){
this.createUserNameList = createUserNameList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<MenuQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<MenuQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<MenuQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<MenuQuery> andConditionList){
this.andConditionList = andConditionList;
}
} }
\ No newline at end of file
package com.mortals.xhx.base.system.menu.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
import java.util.stream.Collectors;
/**
* 菜单信息前端映射树结构实体类
*
* @author zxfei
* @date 2023-04-10
*/
@Data
public class MenuTreeSelect implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 节点ID
*/
private Long id;
/**
* 节点名称
*/
private String label;
/**
* 子节点
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<MenuTreeSelect> children;
public MenuTreeSelect(MenuEntity entity) {
this.id = entity.getId();
this.label = entity.getName();
this.children = entity.getChildList().stream().map(MenuTreeSelect::new).collect(Collectors.toList());
}
}
\ No newline at end of file
package com.mortals.xhx.base.system.menu.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 菜单信息视图对象
*
* @author zxfei
* @date 2023-04-10
*/
@Data
public class MenuVo extends BaseEntityLong {
/** 子菜单信息 */
private List<MenuEntity> childList = new ArrayList<>();
private Integer type;
}
\ No newline at end of file
/**
* 文件:MenuService.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.service; package com.mortals.xhx.base.system.menu.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
/** /**
* <p>Title: 菜单信息</p> * MenuService
* <p>Description: MenuService service接口 </p> * <p>
* <p>Copyright: Copyright &reg; </p> * 菜单信息 service接口
* <p>Company: </p> *
* @author * @author zxfei
* @version 1.0.0 * @date 2023-04-10
*/ */
public interface MenuService extends ICRUDService<MenuEntity, Long> {
public interface MenuService extends ICRUDService<MenuEntity,Long> {
/** /**
* 获取所有可用菜单 * 获取所有可用菜单
* *
...@@ -56,8 +50,47 @@ public interface MenuService extends ICRUDService<MenuEntity,Long> { ...@@ -56,8 +50,47 @@ public interface MenuService extends ICRUDService<MenuEntity,Long> {
/** /**
* 更新排列顺序 * 更新排列顺序
*
* @param id * @param id
* @param type * @param type
*/ */
void upOrDown(Long id, Integer type); void upOrDown(Long id, Integer type);
/**
* 是否存在菜单信息节点
*
* @param menuId 菜单信息ID
* @return 结果
*/
boolean hasChildByMenuId(Long menuId);
/**
* 查询菜单信息数据
*
* @param menu 菜单信息
* @return 菜单信息集合
*/
List<MenuEntity> selectMenuList(MenuEntity menu);
/**
* 构建前端所需要下拉树结构
*
* @param menuList 菜单信息列表
* @return 下拉树结构列表
*/
List<MenuTreeSelect> buildMenuTreeSelect(List<MenuEntity> menuList);
/**
* 根据父id查询子节点
*
* @param parentId
* @param context
* @return
*/
List<MenuTreeSelect> getListByParentId(Long parentId, Context context);
Set<Long> getPathSetById(Long id, Context context);
} }
\ No newline at end of file
/**
* 文件:MenuServiceImpl.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.service.impl; package com.mortals.xhx.base.system.menu.service.impl;
import com.mortals.framework.common.code.YesNo; import com.mortals.framework.common.code.YesNo;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.IUser; import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.YesNoEnum;
import org.springframework.stereotype.Service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.common.code.SatusEnum;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.base.system.menu.dao.MenuDao; import com.mortals.xhx.base.system.menu.dao.MenuDao;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuQuery; import com.mortals.xhx.base.system.menu.model.MenuQuery;
import com.mortals.xhx.base.system.menu.service.MenuService; import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import com.mortals.xhx.common.code.YesNoEnum; import org.springframework.util.ObjectUtils;
import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* <p>Title: 菜单信息</p> * MenuService
* <p>Description: MenuServiceImpl service接口 </p> * 菜单信息 service实现
* <p>Copyright: Copyright &reg; </p> *
* <p>Company: </p> * @author zxfei
* * @date 2023-04-10
* @author */
* @version 1.0.0
*/
@Service("menuService") @Service("menuService")
public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity, Long> implements MenuService { public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity, Long> implements MenuService {
...@@ -168,16 +157,203 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity ...@@ -168,16 +157,203 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
} }
@Override @Override
protected void saveBefore(MenuEntity entity, Context context) throws AppException { protected void saveBefore(MenuEntity entity, Context context) throws AppException {
MenuQuery query = new MenuQuery(); MenuQuery query = new MenuQuery();
query.setParentId(entity.getParentId()); query.setParentId(entity.getParentId());
Comparator<Integer> comparator = Comparator.comparing(Integer::intValue); Comparator<Integer> comparator = Comparator.comparing(Integer::intValue);
Optional<Integer> maxOptional = this.find(query).stream().map(MenuEntity::getOrderId).filter(f->f!=9999).max(comparator); Optional<Integer> maxOptional = this.find(query).stream().map(item->{
if(ObjectUtils.isEmpty(item.getOrderId())) return 1;
return item.getOrderId();
}).filter(f->f!=9999).max(comparator);
maxOptional.ifPresent(e -> { maxOptional.ifPresent(e -> {
e=e+1; e=e+1;
entity.setOrderId(e); entity.setOrderId(e);
}); });
MenuEntity parentMenuEntity = this.get(entity.getParentId());
if (!ObjectUtils.isEmpty(parentMenuEntity) && SatusEnum.DISENABLE.getValue() == parentMenuEntity.getStatus()) {
throw new AppException("菜单信息停用,不允许新增");
}
if (!ObjectUtils.isEmpty(parentMenuEntity)) {
entity.setAncestors(parentMenuEntity.getAncestors() + "," + entity.getParentId());
}
super.saveBefore(entity, context); super.saveBefore(entity, context);
} }
@Override
protected void updateBefore(MenuEntity entity, Context context) throws AppException {
MenuEntity newParentEntity = this.get(entity.getParentId());
MenuEntity oldEntity = this.get(entity.getId());
if (!ObjectUtils.isEmpty(newParentEntity) && !ObjectUtils.isEmpty(oldEntity)) {
String newAncestors = newParentEntity.getAncestors() + "," + newParentEntity.getId();
String oldAncestors = oldEntity.getAncestors();
entity.setAncestors(newAncestors);
updateMenuChildren(entity.getId(), newAncestors, oldAncestors, context);
}
super.updateBefore(entity, context);
}
@Override
protected void updateAfter(MenuEntity entity, Context context) throws AppException {
if (SatusEnum.ENABLE.getValue() == entity.getStatus()) {
entity= this.get(entity.getId());
updateParentMenuStatus(entity, context);
}
super.updateAfter(entity, context);
}
/**
* 修改该菜单信息的父级菜单信息状态
*
* @param menu 当前菜单信息
*/
private void updateParentMenuStatus(MenuEntity menu, Context context) {
MenuEntity menuEntity = this.get(menu.getParentId());
if(!ObjectUtils.isEmpty(menuEntity)){
menuEntity.setStatus(SatusEnum.ENABLE.getValue());
menuEntity.setUpdateTime(new Date());
menuEntity.setUpdateUser(context.getUser().getLoginName());
MenuEntity condition = new MenuEntity();
condition.setId(menuEntity.getId());
this.updateBatch(menuEntity, condition, context);
}
}
/**
* 修改子元素关系
*
* @param menuId 被修改的菜单信息ID
* @param newAncestors 新的父ID集合
* @param oldAncestors 旧的父ID集合
*/
public void updateMenuChildren(Long menuId, String newAncestors, String oldAncestors, Context context) {
List<MenuEntity> children = getDao().selectChildrenMenuById(menuId.toString());
for (MenuEntity child : children) {
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
}
if (children.size() > 0) {
this.updateAfter(children, context);
}
}
@Override
protected void removeBefore(Long[] ids, Context context) throws AppException {
//有子节点 禁止删除
if (hasChildByMenuId(ids[0])) {
throw new AppException("存在下级菜单信息,不允许删除");
}
super.removeBefore(ids, context);
}
@Override
public boolean hasChildByMenuId(Long menuId) {
List<MenuEntity> list = this.find(new MenuQuery().parentId(menuId));
return list.size() > 0 ? true : false;
}
@Override
public List<MenuEntity> selectMenuList(MenuEntity menu) {
return this.find(new MenuQuery());
}
@Override
public List<MenuTreeSelect> buildMenuTreeSelect(List<MenuEntity> list) {
List<MenuEntity> returnList = new ArrayList<>();
List<Long> tempList = list.stream().map(MenuEntity::getId).collect(Collectors.toList());
for (Iterator<MenuEntity> iterator = list.iterator(); iterator.hasNext(); ) {
MenuEntity menuEntity = iterator.next();
if (!tempList.contains(menuEntity.getParentId())) {
recursionFn(list, menuEntity);
returnList.add(menuEntity);
}
}
if (returnList.isEmpty()) {
returnList = list;
}
return returnList.stream().map(MenuTreeSelect::new).collect(Collectors.toList());
}
/**
* 递归列表
*/
private void recursionFn(List<MenuEntity> list, MenuEntity t) {
// 得到子节点列表
List<MenuEntity> childList = getChildList(list, t);
t.setChildList(childList);
for (MenuEntity tChild : childList) {
if (hasChild(list, tChild)) {
recursionFn(list, tChild);
}
}
}
/**
* 判断是否有子节点
*/
private boolean hasChild(List<MenuEntity> list, MenuEntity t) {
return getChildList(list, t).size() > 0 ? true : false;
}
/**
* 得到子节点列表
*/
private List<MenuEntity> getChildList(List<MenuEntity> list, MenuEntity t) {
return list.stream().map(item->{
if (!ObjectUtils.isEmpty(item.getParentId()) && item.getParentId() == t.getId()) {
return item;
}
return null;
}).filter(f->f!=null).collect(Collectors.toList());
}
@Override
public List<MenuTreeSelect> getListByParentId(Long parentId, Context context) {
if (ObjectUtils.isEmpty(parentId)) {
parentId = 0L;
}
//只做一层
List<MenuTreeSelect> collect = this.find(new MenuQuery().parentId(parentId), context).stream().map(item -> new MenuTreeSelect(item)
).collect(Collectors.toList());
if ("0".equals(parentId)) {
return collect;
}
return collect;
}
@Override
public Set<Long> getPathSetById(Long id, Context context) {
Set<Long> idSet = new HashSet<>();
//idSet.add(id);
MenuEntity menuEntity = this.get(id, context);
if(!ObjectUtils.isEmpty(menuEntity)){
return extracted(context, idSet, menuEntity);
}
return idSet;
}
private Set<Long> extracted(Context context, Set<Long> idSet, MenuEntity menuEntity) {
MenuEntity parentMenu = this.get(menuEntity.getParentId(), context);
if(!ObjectUtils.isEmpty(parentMenu)){
idSet.add(parentMenu.getId());
return extracted(context,idSet,parentMenu);
}
return idSet;
}
} }
\ No newline at end of file
package com.mortals.xhx.base.system.menu.web; package com.mortals.xhx.base.system.menu.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.base.system.menu.model.MenuQuery; import com.mortals.xhx.base.system.menu.model.MenuQuery;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.base.system.menu.model.MenuEntity; import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.service.MenuService; import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.common.code.DataSatus; import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import com.mortals.xhx.common.code.MenuAuthType; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.xhx.common.code.MenuComm; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.MenuLinkType;
import com.mortals.xhx.common.code.MenuType;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import static com.mortals.framework.ap.SysConstains.*;
/** /**
* 菜单信息 *
* * 菜单信息
* @author: zxfei *
* @date: 2021/11/30 10:02 * @author zxfei
*/ * @date 2023-04-10
*/
@RestController @RestController
@RequestMapping("menu") @RequestMapping("menu")
public class MenuController extends BaseCRUDJsonBodyMappingController<MenuService, MenuEntity, Long> { public class MenuController extends BaseCRUDJsonBodyMappingController<MenuService,MenuEntity,Long> {
public MenuController() { @Autowired
super.setModuleDesc("菜单信息"); private ParamService paramService;
}
@Override @Override
...@@ -65,7 +60,7 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic ...@@ -65,7 +60,7 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
* 改变状态 * 改变状态
*/ */
@RequestMapping(value = "change/status") @RequestMapping(value = "change/status")
public String changeStatus(@RequestBody MenuEntity query) { public String changeStatus(@RequestBody com.mortals.xhx.base.system.menu.model.MenuEntity query) {
JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
Context context = getContext(); Context context = getContext();
try { try {
...@@ -110,4 +105,88 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic ...@@ -110,4 +105,88 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
} }
return ret.toJSONString(); return ret.toJSONString();
} }
@PostMapping("list/exclude")
public String excludeList(@RequestBody MenuEntity query) {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
try {
//查询所有菜单 排除当前菜单路径
Set<Long> idSet = new HashSet<>();
idSet.add(query.getId());
//Set<Long> idSets = this.service.getPathSetById(query.getId(), getContext());
List<MenuEntity> collect = this.service.find(new MenuQuery()).stream().map(item -> {
if(idSet.contains(item.getId())) return null;
//if(idSets.contains(item.getId())) return null;
//ArrayUtils.contains()
// if(ObjectUtils.isEmpty(item.getAncestors())){
// return null;
// }
// if (item.getId().intValue() == id || ArrayUtils.contains(StringUtils.split(item.getAncestors(), ","), id + "")) {
// return null;
// }
return item;
}).filter(f -> f != null).collect(Collectors.toList());
model.put("data", collect);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/**
* 获取站点下拉树列表
*/
@PostMapping("treeselect")
public String treeselect(MenuEntity query) {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
try {
List<MenuEntity> list = this.service.find(new MenuQuery());
List<MenuTreeSelect> treeSelects = this.service.buildMenuTreeSelect(list);
model.put("result", treeSelects);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/**
* 根据parentId查询子信息
*/
@GetMapping(value = "getListByParentId")
public String getListByParentId(Long parentId) {
JSONObject ret = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = "查询" + this.getModuleDesc()+"子节点";
try {
List<MenuTreeSelect> treeList = this.service.getListByParentId(parentId, getContext());
model.put(RESULT_KEY,treeList);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_DATA, model);
recordSysLog(request, busiDesc+"【成功】");
} catch (Exception e) {
log.error("根据parentId查询子信息错误", e);
this.doException(request, busiDesc, model, e);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, e.getMessage());
}
return ret.toJSONString();
}
} }
\ No newline at end of file
/**
* 文件:MenuForm.java
* 版本:1.0.0
* 日期:
* Copyright &reg;
* All right reserved.
*/
package com.mortals.xhx.base.system.menu.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuQuery;
/**
* <p>Title: 菜单信息</p>
* <p>Description: MenuForm </p>
* <p>Copyright: Copyright &reg; </p>
* <p>Company: </p>
* @author
* @version 1.0.0
*/
public class MenuForm extends BaseCRUDFormLong<MenuEntity> {
private MenuEntity entity = new MenuEntity();
private MenuQuery query = new MenuQuery();
public MenuForm(){
}
@Override
public MenuEntity getEntity() {
return entity;
}
public void setEntity(MenuEntity entity) {
this.entity = entity;
}
@Override
public MenuQuery getQuery() {
return query;
}
public void setQuery(MenuQuery query) {
this.query = query;
}
}
\ No newline at end of file
...@@ -4,24 +4,23 @@ import java.util.LinkedHashMap; ...@@ -4,24 +4,23 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
/** /**
* 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)枚举类 * 证件类型()枚举类
* *
* @author zxfei * @author zxfei
*/ */
public enum ProjectTypeEnum { public enum IdCardTypeEnum {
法律法规(0, "法律法规"), 身份证("居民身份证", "居民身份证"),
业务知识(1, "业务知识"), 军官证("军官证", "军官证"),
行业知识(2, "行业知识"), ;
通用知识(3, "通用知识"); private String value;
private Integer value;
private String desc; private String desc;
ProjectTypeEnum(Integer value, String desc) { IdCardTypeEnum(String value, String desc) {
this.value = value; this.value = value;
this.desc = desc; this.desc = desc;
} }
public Integer getValue() { public String getValue() {
return this.value; return this.value;
} }
...@@ -29,10 +28,10 @@ public enum ProjectTypeEnum { ...@@ -29,10 +28,10 @@ public enum ProjectTypeEnum {
return this.desc; return this.desc;
} }
public static ProjectTypeEnum getByValue(Integer value) { public static IdCardTypeEnum getByValue(String value) {
for (ProjectTypeEnum projectTypeEnum : ProjectTypeEnum.values()) { for (IdCardTypeEnum processStatusEnum : IdCardTypeEnum.values()) {
if (projectTypeEnum.getValue() == value) { if (processStatusEnum.getValue() == value) {
return projectTypeEnum; return processStatusEnum;
} }
} }
return null; return null;
...@@ -44,12 +43,12 @@ public enum ProjectTypeEnum { ...@@ -44,12 +43,12 @@ public enum ProjectTypeEnum {
* @param eItem 不包含项 * @param eItem 不包含项
* @return * @return
*/ */
public static Map<String, String> getEnumMap(Integer... eItem) { public static Map<String, String> getEnumMap(String... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>(); Map<String, String> resultMap = new LinkedHashMap<>();
for (ProjectTypeEnum item : ProjectTypeEnum.values()) { for (IdCardTypeEnum item : IdCardTypeEnum.values()) {
try { try {
boolean hasE = false; boolean hasE = false;
for (Integer e : eItem) { for (String e : eItem) {
if (item.getValue() == e) { if (item.getValue() == e) {
hasE = true; hasE = true;
break; break;
......
package com.mortals.xhx.common.code;
/**
* @author karlhoo
*/
public enum OneThingRespCodeEnum {
/** 接收成功 */
SUCCESS(200, "成功"),
/** 执行失败 */
FAILED(400,"执行失败"),
;
private final Integer value;
private final String label;
OneThingRespCodeEnum(Integer value, String label) {
this.value = value;
this.label = label;
}
public int getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum OneThingTypeEnum {
UNSUBMIT(1, "资料上传"),
SUBMIT(2, "确认提交");
private int value;
private String desc;
private OneThingTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static OneThingTypeEnum getByValue(int value) {
OneThingTypeEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
OneThingTypeEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
OneThingTypeEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
OneThingTypeEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum PublishStatusEnum implements IBaseEnum{
PRODUCT_PENDING(0, "待发布"),
PRODUCT_AUDITING(1, "审核中"),
PRODUCT_SUCESS(2, "审核通过"),
PRODUCT_REJECT(3, "审核拒绝");
private int value;
private String desc;
PublishStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static PublishStatusEnum getByValue(int value) {
for (PublishStatusEnum YesNoEnum : PublishStatusEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (PublishStatusEnum item : PublishStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code; package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
public enum OneThingStatusEnum implements IBaseEnum{ /**
* 状态
BOM_EDIT(401, "修订中"), * @author
BOM_AUDIT(402, "审核中"), *
BOM_PUBLISH(403, "已发布"); */
public enum SatusEnum {
DISENABLE(0, "禁用"),
ENABLE(1, "启用");
private int value; private int value;
private String desc; private String desc;
OneThingStatusEnum(int value, String desc) {
SatusEnum(int value, String desc) {
this.value = value; this.value = value;
this.desc = desc; this.desc = desc;
} }
@Override
public int getValue() { public int getValue() {
return this.value; return this.value;
} }
...@@ -28,10 +30,10 @@ public enum OneThingStatusEnum implements IBaseEnum{ ...@@ -28,10 +30,10 @@ public enum OneThingStatusEnum implements IBaseEnum{
return desc; return desc;
} }
public static OneThingStatusEnum getByValue(int value) { public static SatusEnum getByValue(int value) {
for (OneThingStatusEnum YesNoEnum : OneThingStatusEnum.values()) { for (SatusEnum examStatus : SatusEnum.values()) {
if (YesNoEnum.getValue() == value) { if (examStatus.getValue() == value) {
return YesNoEnum; return examStatus;
} }
} }
return null; return null;
...@@ -42,8 +44,9 @@ public enum OneThingStatusEnum implements IBaseEnum{ ...@@ -42,8 +44,9 @@ public enum OneThingStatusEnum implements IBaseEnum{
* @return * @return
*/ */
public static Map<String,String> getEnumMap(int... eItem) { public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>(); Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (OneThingStatusEnum item : OneThingStatusEnum.values()) { for (SatusEnum item : SatusEnum.values()) {
try{ try{
boolean hasE = false; boolean hasE = false;
for (int e : eItem){ for (int e : eItem){
...@@ -60,5 +63,4 @@ public enum OneThingStatusEnum implements IBaseEnum{ ...@@ -60,5 +63,4 @@ public enum OneThingStatusEnum implements IBaseEnum{
} }
return resultMap; return resultMap;
} }
} }
...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel; ...@@ -8,11 +8,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.appointment.model.vo.AppointmentConfigTimesVo; import com.mortals.xhx.module.appointment.model.vo.AppointmentConfigTimesVo;
/** /**
* 预约自动签到配置时间段实体对象 * 预约自动签到配置时间段实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-11
*/ */
public class AppointmentConfigTimesEntity extends AppointmentConfigTimesVo { public class AppointmentConfigTimesEntity extends AppointmentConfigTimesVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -4,26 +4,26 @@ import java.util.Date; ...@@ -4,26 +4,26 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity; import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity;
/** /**
* 预约自动签到配置时间段查询对象 * 预约自动签到配置时间段查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-11
*/ */
public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity { public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
private Long IdStart; private Long idStart;
/** 结束 序号,主键,自增长 */ /** 结束 序号,主键,自增长 */
private Long IdEnd; private Long idEnd;
/** 增加 序号,主键,自增长 */ /** 增加 序号,主键,自增长 */
private Long IdIncrement; private Long idIncrement;
/** 序号,主键,自增长列表 */ /** 序号,主键,自增长列表 */
private List <Long> IdList; private List <Long> idList;
/** 序号,主键,自增长排除列表 */ /** 序号,主键,自增长排除列表 */
private List <Long> IdNotList; private List <Long> idNotList;
/** 开始 自动签到配置id */ /** 开始 自动签到配置id */
private Long aotoCheckCfgIdStart; private Long aotoCheckCfgIdStart;
...@@ -109,82 +109,82 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity { ...@@ -109,82 +109,82 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity {
/** /**
* 获取 开始 序号,主键,自增长 * 获取 开始 序号,主键,自增长
* @return IdStart * @return idStart
*/ */
public Long getIdStart(){ public Long getIdStart(){
return this.IdStart; return this.idStart;
} }
/** /**
* 设置 开始 序号,主键,自增长 * 设置 开始 序号,主键,自增长
* @param IdStart * @param idStart
*/ */
public void setIdStart(Long IdStart){ public void setIdStart(Long idStart){
this.IdStart = IdStart; this.idStart = idStart;
} }
/** /**
* 获取 结束 序号,主键,自增长 * 获取 结束 序号,主键,自增长
* @return $IdEnd * @return $idEnd
*/ */
public Long getIdEnd(){ public Long getIdEnd(){
return this.IdEnd; return this.idEnd;
} }
/** /**
* 设置 结束 序号,主键,自增长 * 设置 结束 序号,主键,自增长
* @param IdEnd * @param idEnd
*/ */
public void setIdEnd(Long IdEnd){ public void setIdEnd(Long idEnd){
this.IdEnd = IdEnd; this.idEnd = idEnd;
} }
/** /**
* 获取 增加 序号,主键,自增长 * 获取 增加 序号,主键,自增长
* @return IdIncrement * @return idIncrement
*/ */
public Long getIdIncrement(){ public Long getIdIncrement(){
return this.IdIncrement; return this.idIncrement;
} }
/** /**
* 设置 增加 序号,主键,自增长 * 设置 增加 序号,主键,自增长
* @param IdIncrement * @param idIncrement
*/ */
public void setIdIncrement(Long IdIncrement){ public void setIdIncrement(Long idIncrement){
this.IdIncrement = IdIncrement; this.idIncrement = idIncrement;
} }
/** /**
* 获取 序号,主键,自增长 * 获取 序号,主键,自增长
* @return IdList * @return idList
*/ */
public List<Long> getIdList(){ public List<Long> getIdList(){
return this.IdList; return this.idList;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdList * @param idList
*/ */
public void setIdList(List<Long> IdList){ public void setIdList(List<Long> idList){
this.IdList = IdList; this.idList = idList;
} }
/** /**
* 获取 序号,主键,自增长 * 获取 序号,主键,自增长
* @return IdNotList * @return idNotList
*/ */
public List<Long> getIdNotList(){ public List<Long> getIdNotList(){
return this.IdNotList; return this.idNotList;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdNotList * @param idNotList
*/ */
public void setIdNotList(List<Long> IdNotList){ public void setIdNotList(List<Long> idNotList){
this.IdNotList = IdNotList; this.idNotList = idNotList;
} }
...@@ -593,55 +593,55 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity { ...@@ -593,55 +593,55 @@ public class AppointmentConfigTimesQuery extends AppointmentConfigTimesEntity {
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param Id * @param id
*/ */
public AppointmentConfigTimesQuery Id(Long Id){ public AppointmentConfigTimesQuery id(Long id){
setId(Id); setId(id);
return this; return this;
} }
/** /**
* 设置 开始 序号,主键,自增长 * 设置 开始 序号,主键,自增长
* @param IdStart * @param idStart
*/ */
public AppointmentConfigTimesQuery IdStart(Long IdStart){ public AppointmentConfigTimesQuery idStart(Long idStart){
this.IdStart = IdStart; this.idStart = idStart;
return this; return this;
} }
/** /**
* 设置 结束 序号,主键,自增长 * 设置 结束 序号,主键,自增长
* @param IdEnd * @param idEnd
*/ */
public AppointmentConfigTimesQuery IdEnd(Long IdEnd){ public AppointmentConfigTimesQuery idEnd(Long idEnd){
this.IdEnd = IdEnd; this.idEnd = idEnd;
return this; return this;
} }
/** /**
* 设置 增加 序号,主键,自增长 * 设置 增加 序号,主键,自增长
* @param IdIncrement * @param idIncrement
*/ */
public AppointmentConfigTimesQuery IdIncrement(Long IdIncrement){ public AppointmentConfigTimesQuery idIncrement(Long idIncrement){
this.IdIncrement = IdIncrement; this.idIncrement = idIncrement;
return this; return this;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdList * @param idList
*/ */
public AppointmentConfigTimesQuery IdList(List<Long> IdList){ public AppointmentConfigTimesQuery idList(List<Long> idList){
this.IdList = IdList; this.idList = idList;
return this; return this;
} }
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param IdNotList * @param idNotList
*/ */
public AppointmentConfigTimesQuery IdNotList(List<Long> IdNotList){ public AppointmentConfigTimesQuery idNotList(List<Long> idNotList){
this.IdNotList = IdNotList; this.idNotList = idNotList;
return this; return this;
} }
......
...@@ -296,7 +296,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo { ...@@ -296,7 +296,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo {
this.contact = ""; this.contact = "";
this.idCardType = ""; this.idCardType = "居民身份证";
this.idCardNo = ""; this.idCardNo = "";
...@@ -304,7 +304,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo { ...@@ -304,7 +304,7 @@ public class AppointmentConstraintEntity extends AppointmentConstraintVo {
this.constraintTime = null; this.constraintTime = null;
this.createMethod = null; this.createMethod = 1;
this.operator = ""; this.operator = "";
......
package com.mortals.xhx.module.appointment.service; package com.mortals.xhx.module.appointment.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity; import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
/** /**
* AppointmentConstraintService * AppointmentConstraintService
* *
...@@ -11,4 +15,7 @@ import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity; ...@@ -11,4 +15,7 @@ import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
*/ */
public interface AppointmentConstraintService extends ICRUDService<AppointmentConstraintEntity,Long>{ public interface AppointmentConstraintService extends ICRUDService<AppointmentConstraintEntity,Long>{
Rest<String> constraintService(AppointmentConstraintEntity appointmentConstraintEntity, Context context);
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.service; package com.mortals.xhx.module.appointment.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity; import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
import org.springframework.web.bind.annotation.RequestBody;
/** /**
* AppointmentRecordsService * AppointmentRecordsService
* *
...@@ -11,4 +15,12 @@ import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity; ...@@ -11,4 +15,12 @@ import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
*/ */
public interface AppointmentRecordsService extends ICRUDService<AppointmentRecordsEntity,Long>{ public interface AppointmentRecordsService extends ICRUDService<AppointmentRecordsEntity,Long>{
/**
* 停止群众预约推送服务
* @param appointmentRecordsEntity
* @param context
* @return
*/
Rest<String> stopService(AppointmentRecordsEntity appointmentRecordsEntity, Context context);
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.service.impl; package com.mortals.xhx.module.appointment.service.impl;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.person.model.PersonEntity;
import com.mortals.xhx.module.person.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -6,14 +11,38 @@ import com.mortals.framework.model.Context; ...@@ -6,14 +11,38 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.appointment.dao.AppointmentConstraintDao; import com.mortals.xhx.module.appointment.dao.AppointmentConstraintDao;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity; import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.appointment.service.AppointmentConstraintService; import com.mortals.xhx.module.appointment.service.AppointmentConstraintService;
import org.springframework.util.ObjectUtils;
/** /**
* AppointmentConstraintService * AppointmentConstraintService
* 预约自动签到服务约束 service实现 * 预约自动签到服务约束 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-09
*/ */
@Service("appointmentConstraintService") @Service("appointmentConstraintService")
public class AppointmentConstraintServiceImpl extends AbstractCRUDServiceImpl<AppointmentConstraintDao, AppointmentConstraintEntity, Long> implements AppointmentConstraintService { public class AppointmentConstraintServiceImpl extends AbstractCRUDServiceImpl<AppointmentConstraintDao, AppointmentConstraintEntity, Long> implements AppointmentConstraintService {
@Autowired
private PersonService personService;
@Override
protected void saveBefore(AppointmentConstraintEntity entity, Context context) throws AppException {
entity.setOperator(context.getUser()==null?"":context.getUser().getRealName());
super.saveBefore(entity, context);
}
@Override
protected void updateBefore(AppointmentConstraintEntity entity, Context context) throws AppException {
entity.setOperator(context.getUser()==null?"":context.getUser().getRealName());
super.updateBefore(entity, context);
}
@Override
public Rest<String> constraintService(AppointmentConstraintEntity appointmentConstraintEntity, Context context) {
//取消或者开启约束服务
return Rest.ok("修改成功");
}
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.service.impl; package com.mortals.xhx.module.appointment.service.impl;
import com.mortals.framework.common.Rest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -16,4 +17,9 @@ import com.mortals.xhx.module.appointment.service.AppointmentRecordsService; ...@@ -16,4 +17,9 @@ import com.mortals.xhx.module.appointment.service.AppointmentRecordsService;
@Service("appointmentRecordsService") @Service("appointmentRecordsService")
public class AppointmentRecordsServiceImpl extends AbstractCRUDServiceImpl<AppointmentRecordsDao, AppointmentRecordsEntity, Long> implements AppointmentRecordsService { public class AppointmentRecordsServiceImpl extends AbstractCRUDServiceImpl<AppointmentRecordsDao, AppointmentRecordsEntity, Long> implements AppointmentRecordsService {
@Override
public Rest<String> stopService(AppointmentRecordsEntity appointmentRecordsEntity, Context context) {
//todo 停止群众推送服务
return Rest.ok("服务停止成功");
}
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.web; package com.mortals.xhx.module.appointment.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -54,4 +58,7 @@ public class AppointmentConfigController extends BaseCRUDJsonBodyMappingControll ...@@ -54,4 +58,7 @@ public class AppointmentConfigController extends BaseCRUDJsonBodyMappingControll
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.web; package com.mortals.xhx.module.appointment.web;
import cn.hutool.core.util.StrUtil;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.IdCardTypeEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
import com.mortals.xhx.module.person.model.PersonQuery;
import com.mortals.xhx.module.person.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity; import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.appointment.service.AppointmentConstraintService; import com.mortals.xhx.module.appointment.service.AppointmentConstraintService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays; import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
/** /**
* * 预约自动签到服务约束
* 预约自动签到服务约束 *
* * @author zxfei
* @author zxfei * @date 2023-04-09
* @date 2023-04-09 */
*/
@RestController @RestController
@RequestMapping("appointment/constraint") @RequestMapping("appointment/constraint")
public class AppointmentConstraintController extends BaseCRUDJsonBodyMappingController<AppointmentConstraintService,AppointmentConstraintEntity,Long> { public class AppointmentConstraintController extends BaseCRUDJsonBodyMappingController<AppointmentConstraintService, AppointmentConstraintEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private PersonService personService;
@Autowired
private UserService userService;
public AppointmentConstraintController(){ public AppointmentConstraintController() {
super.setModuleDesc( "预约自动签到服务约束"); super.setModuleDesc("预约自动签到服务约束");
} }
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "createMethod", paramService.getParamBySecondOrganize("AppointmentConstraint","createMethod")); this.addDict(model, "createMethod", paramService.getParamBySecondOrganize("AppointmentConstraint", "createMethod"));
this.addDict(model, "constraint", paramService.getParamBySecondOrganize("AppointmentConstraint","constraint")); this.addDict(model, "idCardType", IdCardTypeEnum.getEnumMap());
this.addDict(model, "constraint", paramService.getParamBySecondOrganize("AppointmentConstraint", "constraint"));
Map<String, String> personCollect = personService.find(new PersonQuery()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n));
this.addDict(model, "personId", personCollect);
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "operator", collect);
this.addDict(model, "createUserId", collect);
super.init(model, context); super.init(model, context);
} }
/**
* 约束开关
*/
@PostMapping(value = "constraint")
public String constraintService(@RequestBody AppointmentConstraintEntity appointmentConstraintEntity) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "停止服务";
try {
Rest<String> rest = this.service.constraintService(appointmentConstraintEntity, getContext());
if (YesNoEnum.YES.getValue() == rest.getCode()) {
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
} else {
throw new AppException(rest.getMsg());
}
} catch (Exception e) {
log.error(busiDesc, e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
@Override
protected int doListAfter(AppointmentConstraintEntity query, Map<String, Object> model, Context context) throws AppException {
List<AppointmentConstraintEntity> list = (List<AppointmentConstraintEntity>) model.get(KEY_RESULT_DATA);
list.forEach(item -> {
String maskedIdNumber = StrUtil.hide(item.getIdCardNo(), 4, item.getIdCardNo().length() - 4);
item.setIdCardNo(maskedIdNumber);
});
return super.doListAfter(query, model, context);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.appointment.web; package com.mortals.xhx.module.appointment.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.EnabledEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.device.model.DeviceEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -47,4 +52,31 @@ public class AppointmentRecordsController extends BaseCRUDJsonBodyMappingControl ...@@ -47,4 +52,31 @@ public class AppointmentRecordsController extends BaseCRUDJsonBodyMappingControl
} }
/**
* 群众停止服务
*/
@PostMapping(value = "stopService")
public String stopService(@RequestBody AppointmentRecordsEntity appointmentRecordsEntity) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "停止服务";
try {
Rest<String> rest = this.service.stopService(appointmentRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else {
throw new AppException(rest.getMsg());
}
} catch (Exception e) {
log.error(busiDesc, e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
} }
\ No newline at end of file
...@@ -370,7 +370,7 @@ public class CareConfigEntity extends CareConfigVo { ...@@ -370,7 +370,7 @@ public class CareConfigEntity extends CareConfigVo {
this.serviceThreshold = 0L; this.serviceThreshold = 0L;
this.alertServiceNum = null; this.alertServiceNum = 0;
this.msgRecipients = ""; this.msgRecipients = "";
......
...@@ -290,11 +290,11 @@ public class CareConstraintEntity extends CareConstraintVo { ...@@ -290,11 +290,11 @@ public class CareConstraintEntity extends CareConstraintVo {
this.idCard = ""; this.idCard = "";
this.serviceFrequency = null; this.serviceFrequency = 0L;
this.trackingTime = null; this.trackingTime = null;
this.createWay = null; this.createWay = 1;
this.operator = ""; this.operator = "";
......
package com.mortals.xhx.module.care.service; package com.mortals.xhx.module.care.service;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.care.model.CareRecordsEntity; import com.mortals.xhx.module.care.model.CareRecordsEntity;
import org.springframework.web.bind.annotation.RequestBody;
/** /**
* CareRecordsService * CareRecordsService
* *
...@@ -11,4 +15,9 @@ import com.mortals.xhx.module.care.model.CareRecordsEntity; ...@@ -11,4 +15,9 @@ import com.mortals.xhx.module.care.model.CareRecordsEntity;
*/ */
public interface CareRecordsService extends ICRUDService<CareRecordsEntity,Long>{ public interface CareRecordsService extends ICRUDService<CareRecordsEntity,Long>{
Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context);
Rest<String> toCare(CareRecordsEntity careRecordsEntity, Context context);
} }
\ No newline at end of file
...@@ -27,6 +27,19 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst ...@@ -27,6 +27,19 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Autowired @Autowired
private CareConstraintTrackService careConstraintTrackService; private CareConstraintTrackService careConstraintTrackService;
@Override
protected void saveBefore(CareConstraintEntity entity, Context context) throws AppException {
entity.setOperator(context.getUser()==null?"":context.getUser().getRealName());
super.saveBefore(entity, context);
}
@Override
protected void updateBefore(CareConstraintEntity entity, Context context) throws AppException {
entity.setOperator(context.getUser()==null?"":context.getUser().getRealName());
super.updateBefore(entity, context);
}
@Override @Override
protected void saveAfter(CareConstraintEntity entity, Context context) throws AppException { protected void saveAfter(CareConstraintEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getCareConstraintTrackList())){ if(!ObjectUtils.isEmpty(entity.getCareConstraintTrackList())){
......
package com.mortals.xhx.module.care.service.impl; package com.mortals.xhx.module.care.service.impl;
import com.mortals.framework.common.Rest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -16,4 +17,15 @@ import com.mortals.xhx.module.care.service.CareRecordsService; ...@@ -16,4 +17,15 @@ import com.mortals.xhx.module.care.service.CareRecordsService;
@Service("careRecordsService") @Service("careRecordsService")
public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsDao, CareRecordsEntity, Long> implements CareRecordsService { public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsDao, CareRecordsEntity, Long> implements CareRecordsService {
@Override
public Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context) {
//todo 通知负责人
return Rest.ok("通知负责人成功");
}
@Override
public Rest<String> toCare(CareRecordsEntity careRecordsEntity, Context context) {
//todo 短信通知群众
return Rest.ok("通知群众成功");
}
} }
\ No newline at end of file
package com.mortals.xhx.module.care.web; package com.mortals.xhx.module.care.web;
import cn.hutool.core.util.StrUtil;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.IdCardTypeEnum;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.person.model.PersonQuery;
import com.mortals.xhx.module.person.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -35,6 +43,10 @@ public class CareConstraintController extends BaseCRUDJsonBodyMappingController< ...@@ -35,6 +43,10 @@ public class CareConstraintController extends BaseCRUDJsonBodyMappingController<
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private PersonService personService;
@Autowired
private UserService userService;
public CareConstraintController(){ public CareConstraintController(){
super.setModuleDesc( "主动关怀服务约束"); super.setModuleDesc( "主动关怀服务约束");
...@@ -44,8 +56,29 @@ public class CareConstraintController extends BaseCRUDJsonBodyMappingController< ...@@ -44,8 +56,29 @@ public class CareConstraintController extends BaseCRUDJsonBodyMappingController<
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "createWay", paramService.getParamBySecondOrganize("CareConstraint","createWay")); this.addDict(model, "createWay", paramService.getParamBySecondOrganize("CareConstraint","createWay"));
this.addDict(model, "track", paramService.getParamBySecondOrganize("CareConstraint","track")); this.addDict(model, "track", paramService.getParamBySecondOrganize("CareConstraint","track"));
this.addDict(model, "idCardType", IdCardTypeEnum.getEnumMap());
Map<String, String> personCollect = personService.find(new PersonQuery()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n));
this.addDict(model, "personId", personCollect);
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "operator", collect);
this.addDict(model, "createUserId", collect);
super.init(model, context); super.init(model, context);
} }
@Override
protected int doListAfter(CareConstraintEntity query, Map<String, Object> model, Context context) throws AppException {
List<CareConstraintEntity> list = (List<CareConstraintEntity>) model.get(KEY_RESULT_DATA);
list.forEach(item -> {
String maskedIdNumber = StrUtil.hide(item.getIdCard(), 4, item.getIdCard().length() - 4);
item.setIdCard(maskedIdNumber);
});
return super.doListAfter(query, model, context);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.care.web; package com.mortals.xhx.module.care.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -47,4 +51,59 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car ...@@ -47,4 +51,59 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
} }
/**
* 通知负责人
*/
@PostMapping(value = "notice")
public String notice(@RequestBody CareRecordsEntity careRecordsEntity) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "通知负责人";
try {
Rest<String> rest = this.service.notice(careRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else {
throw new AppException(rest.getMsg());
}
} catch (Exception e) {
log.error(busiDesc, e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
/**
* 手动关怀
*/
@PostMapping(value = "toCare")
public String toCare(@RequestBody CareRecordsEntity careRecordsEntity) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "toCare";
try {
Rest<String> rest = this.service.notice(careRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else {
throw new AppException(rest.getMsg());
}
} catch (Exception e) {
log.error(busiDesc, e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
} }
\ No newline at end of file
package com.mortals.xhx.module.person.service; package com.mortals.xhx.module.person.service;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.person.model.PersonEntity; import com.mortals.xhx.module.person.model.PersonEntity;
/** /**
...@@ -9,6 +10,6 @@ import com.mortals.xhx.module.person.model.PersonEntity; ...@@ -9,6 +10,6 @@ import com.mortals.xhx.module.person.model.PersonEntity;
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-09
*/ */
public interface PersonService extends ICRUDService<PersonEntity,Long>{ public interface PersonService extends ICRUDCacheService<PersonEntity,Long>{
} }
\ No newline at end of file
package com.mortals.xhx.module.person.service.impl; package com.mortals.xhx.module.person.service.impl;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -14,6 +15,10 @@ import com.mortals.xhx.module.person.service.PersonService; ...@@ -14,6 +15,10 @@ import com.mortals.xhx.module.person.service.PersonService;
* @date 2023-04-09 * @date 2023-04-09
*/ */
@Service("personService") @Service("personService")
public class PersonServiceImpl extends AbstractCRUDServiceImpl<PersonDao, PersonEntity, Long> implements PersonService { public class PersonServiceImpl extends AbstractCRUDCacheServiceImpl<PersonDao, PersonEntity, Long> implements PersonService {
@Override
protected String getExtKey(PersonEntity data) {
return data.getIdCard();
}
} }
\ No newline at end of file
...@@ -17,8 +17,8 @@ spring: ...@@ -17,8 +17,8 @@ spring:
serialization: serialization:
WRITE_DATES_AS_TIMESTAMPS: true WRITE_DATES_AS_TIMESTAMPS: true
default-property-inclusion: NON_NULL default-property-inclusion: NON_NULL
# time-zone: GMT+8 time-zone: GMT+8
# date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
dao: dao:
exceptiontranslation: exceptiontranslation:
enabled: false enabled: false
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.base.system.menu.dao.ibatis.MenuDaoImpl"> <mapper namespace="com.mortals.xhx.base.system.menu.dao.ibatis.MenuDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
<resultMap type="MenuEntity" id="MenuEntity-Map"> <resultMap type="MenuEntity" id="MenuEntity-Map">
<result property="id" column="id" /> <id property="id" column="id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="url" column="url" /> <result property="url" column="url" />
<result property="ancestors" column="ancestors" />
<result property="parentId" column="parentId" /> <result property="parentId" column="parentId" />
<result property="orderId" column="orderId" /> <result property="orderId" column="orderId" />
<result property="status" column="status" /> <result property="status" column="status" />
...@@ -23,97 +24,91 @@ ...@@ -23,97 +24,91 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="createUserName" column="createUserName" /> <result property="createUserName" column="createUserName" />
</resultMap>
</resultMap>
<!-- 表所有列 --> <!-- 表所有列 -->
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('name') or colPickMode == 1 and data.containsKey('name')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('name') or colPickMode == 1 and data.containsKey('name')))">
a.name as name, a.name,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('url') or colPickMode == 1 and data.containsKey('url')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('url') or colPickMode == 1 and data.containsKey('url')))">
a.url as url, a.url,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ancestors') or colPickMode == 1 and data.containsKey('ancestors')))">
a.ancestors,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('parentId') or colPickMode == 1 and data.containsKey('parentId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('parentId') or colPickMode == 1 and data.containsKey('parentId')))">
a.parentId as parentId, a.parentId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('orderId') or colPickMode == 1 and data.containsKey('orderId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('orderId') or colPickMode == 1 and data.containsKey('orderId')))">
a.orderId as orderId, a.orderId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))">
a.status as status, a.status,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('linkType') or colPickMode == 1 and data.containsKey('linkType')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('linkType') or colPickMode == 1 and data.containsKey('linkType')))">
a.linkType as linkType, a.linkType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupId') or colPickMode == 1 and data.containsKey('groupId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupId') or colPickMode == 1 and data.containsKey('groupId')))">
a.groupId as groupId, a.groupId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupName') or colPickMode == 1 and data.containsKey('groupName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupName') or colPickMode == 1 and data.containsKey('groupName')))">
a.groupName as groupName, a.groupName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('imgPath') or colPickMode == 1 and data.containsKey('imgPath')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('imgPath') or colPickMode == 1 and data.containsKey('imgPath')))">
a.imgPath as imgPath, a.imgPath,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('buttonImgPath') or colPickMode == 1 and data.containsKey('buttonImgPath')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('buttonImgPath') or colPickMode == 1 and data.containsKey('buttonImgPath')))">
a.buttonImgPath as buttonImgPath, a.buttonImgPath,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('imgCommPath') or colPickMode == 1 and data.containsKey('imgCommPath')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('imgCommPath') or colPickMode == 1 and data.containsKey('imgCommPath')))">
a.imgCommPath as imgCommPath, a.imgCommPath,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('commMenu') or colPickMode == 1 and data.containsKey('commMenu')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('commMenu') or colPickMode == 1 and data.containsKey('commMenu')))">
a.commMenu as commMenu, a.commMenu,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('menuType') or colPickMode == 1 and data.containsKey('menuType')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('menuType') or colPickMode == 1 and data.containsKey('menuType')))">
a.menuType as menuType, a.menuType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('authType') or colPickMode == 1 and data.containsKey('authType')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('authType') or colPickMode == 1 and data.containsKey('authType')))">
a.authType as authType, a.authType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserName') or colPickMode == 1 and data.containsKey('createUserName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserName') or colPickMode == 1 and data.containsKey('createUserName')))">
a.createUserName as createUserName, a.createUserName,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MenuEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MenuEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_menu insert into mortals_xhx_menu
(name,url,parentId,orderId,status, (name,url,ancestors,parentId,orderId,status,linkType,groupId,groupName,imgPath,buttonImgPath,imgCommPath,commMenu,menuType,authType,createTime,createUserId,createUserName)
linkType,groupId,groupName,imgPath,buttonImgPath, VALUES
imgCommPath,commMenu,menuType,authType,createTime, (#{name},#{url},#{ancestors},#{parentId},#{orderId},#{status},#{linkType},#{groupId},#{groupName},#{imgPath},#{buttonImgPath},#{imgCommPath},#{commMenu},#{menuType},#{authType},#{createTime},#{createUserId},#{createUserName})
createUserId,createUserName
)VALUES(#{name},#{url},#{parentId},#{orderId},#{status},
#{linkType},#{groupId},#{groupName},#{imgPath},#{buttonImgPath},
#{imgCommPath},#{commMenu},#{menuType},#{authType},#{createTime},
#{createUserId},#{createUserName})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_menu insert into mortals_xhx_menu
(name,url,parentId,orderId,status, (name,url,ancestors,parentId,orderId,status,linkType,groupId,groupName,imgPath,buttonImgPath,imgCommPath,commMenu,menuType,authType,createTime,createUserId,createUserName)
linkType,groupId,groupName,imgPath,buttonImgPath,
imgCommPath,commMenu,menuType,authType,createTime,
createUserId,createUserName
)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.url},#{item.parentId},#{item.orderId},#{item.status}, (#{item.name},#{item.url},#{item.ancestors},#{item.parentId},#{item.orderId},#{item.status},#{item.linkType},#{item.groupId},#{item.groupName},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.commMenu},#{item.menuType},#{item.authType},#{item.createTime},#{item.createUserId},#{item.createUserName})
#{item.linkType},#{item.groupId},#{item.groupName},#{item.imgPath},#{item.buttonImgPath},
#{item.imgCommPath},#{item.commMenu},#{item.menuType},#{item.authType},#{item.createTime},
#{item.createUserId},#{item.createUserName})
</foreach> </foreach>
</insert> </insert>
<!-- 根据ParamDto更新 --> <!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto"> <update id="update" parameterType="paramDto">
update mortals_xhx_menu as a update mortals_xhx_menu as a
...@@ -125,6 +120,9 @@ ...@@ -125,6 +120,9 @@
<if test="(colPickMode==0 and data.containsKey('url')) or (colPickMode==1 and !data.containsKey('url'))"> <if test="(colPickMode==0 and data.containsKey('url')) or (colPickMode==1 and !data.containsKey('url'))">
a.url=#{data.url}, a.url=#{data.url},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('ancestors')) or (colPickMode==1 and !data.containsKey('ancestors'))">
a.ancestors=#{data.ancestors},
</if>
<if test="(colPickMode==0 and data.containsKey('parentId')) or (colPickMode==1 and !data.containsKey('parentId'))"> <if test="(colPickMode==0 and data.containsKey('parentId')) or (colPickMode==1 and !data.containsKey('parentId'))">
a.parentId=#{data.parentId}, a.parentId=#{data.parentId},
</if> </if>
...@@ -205,7 +203,187 @@ ...@@ -205,7 +203,187 @@
</trim> </trim>
</trim> </trim>
</update> </update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_menu as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="name=(case" suffix="ELSE name end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('name')) or (colPickMode==1 and !item.containsKey('name'))">
when a.id=#{item.id} then #{item.name}
</if>
</foreach>
</trim>
<trim prefix="url=(case" suffix="ELSE url end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('url')) or (colPickMode==1 and !item.containsKey('url'))">
when a.id=#{item.id} then #{item.url}
</if>
</foreach>
</trim>
<trim prefix="ancestors=(case" suffix="ELSE ancestors end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('ancestors')) or (colPickMode==1 and !item.containsKey('ancestors'))">
when a.id=#{item.id} then #{item.ancestors}
</if>
</foreach>
</trim>
<trim prefix="parentId=(case" suffix="ELSE parentId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('parentId')) or (colPickMode==1 and !item.containsKey('parentId'))">
when a.id=#{item.id} then #{item.parentId}
</when>
<when test="(colPickMode==0 and item.containsKey('parentIdIncrement')) or (colPickMode==1 and !item.containsKey('parentIdIncrement'))">
when a.id=#{item.id} then ifnull(a.parentId,0) + #{item.parentIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="orderId=(case" suffix="ELSE orderId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('orderId')) or (colPickMode==1 and !item.containsKey('orderId'))">
when a.id=#{item.id} then #{item.orderId}
</when>
<when test="(colPickMode==0 and item.containsKey('orderIdIncrement')) or (colPickMode==1 and !item.containsKey('orderIdIncrement'))">
when a.id=#{item.id} then ifnull(a.orderId,0) + #{item.orderIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="status=(case" suffix="ELSE status end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('status')) or (colPickMode==1 and !item.containsKey('status'))">
when a.id=#{item.id} then #{item.status}
</when>
<when test="(colPickMode==0 and item.containsKey('statusIncrement')) or (colPickMode==1 and !item.containsKey('statusIncrement'))">
when a.id=#{item.id} then ifnull(a.status,0) + #{item.statusIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="linkType=(case" suffix="ELSE linkType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('linkType')) or (colPickMode==1 and !item.containsKey('linkType'))">
when a.id=#{item.id} then #{item.linkType}
</when>
<when test="(colPickMode==0 and item.containsKey('linkTypeIncrement')) or (colPickMode==1 and !item.containsKey('linkTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.linkType,0) + #{item.linkTypeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="groupId=(case" suffix="ELSE groupId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('groupId')) or (colPickMode==1 and !item.containsKey('groupId'))">
when a.id=#{item.id} then #{item.groupId}
</when>
<when test="(colPickMode==0 and item.containsKey('groupIdIncrement')) or (colPickMode==1 and !item.containsKey('groupIdIncrement'))">
when a.id=#{item.id} then ifnull(a.groupId,0) + #{item.groupIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="groupName=(case" suffix="ELSE groupName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('groupName')) or (colPickMode==1 and !item.containsKey('groupName'))">
when a.id=#{item.id} then #{item.groupName}
</if>
</foreach>
</trim>
<trim prefix="imgPath=(case" suffix="ELSE imgPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('imgPath')) or (colPickMode==1 and !item.containsKey('imgPath'))">
when a.id=#{item.id} then #{item.imgPath}
</if>
</foreach>
</trim>
<trim prefix="buttonImgPath=(case" suffix="ELSE buttonImgPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('buttonImgPath')) or (colPickMode==1 and !item.containsKey('buttonImgPath'))">
when a.id=#{item.id} then #{item.buttonImgPath}
</if>
</foreach>
</trim>
<trim prefix="imgCommPath=(case" suffix="ELSE imgCommPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('imgCommPath')) or (colPickMode==1 and !item.containsKey('imgCommPath'))">
when a.id=#{item.id} then #{item.imgCommPath}
</if>
</foreach>
</trim>
<trim prefix="commMenu=(case" suffix="ELSE commMenu end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('commMenu')) or (colPickMode==1 and !item.containsKey('commMenu'))">
when a.id=#{item.id} then #{item.commMenu}
</when>
<when test="(colPickMode==0 and item.containsKey('commMenuIncrement')) or (colPickMode==1 and !item.containsKey('commMenuIncrement'))">
when a.id=#{item.id} then ifnull(a.commMenu,0) + #{item.commMenuIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="menuType=(case" suffix="ELSE menuType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('menuType')) or (colPickMode==1 and !item.containsKey('menuType'))">
when a.id=#{item.id} then #{item.menuType}
</when>
<when test="(colPickMode==0 and item.containsKey('menuTypeIncrement')) or (colPickMode==1 and !item.containsKey('menuTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.menuType,0) + #{item.menuTypeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="authType=(case" suffix="ELSE authType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('authType')) or (colPickMode==1 and !item.containsKey('authType'))">
when a.id=#{item.id} then #{item.authType}
</when>
<when test="(colPickMode==0 and item.containsKey('authTypeIncrement')) or (colPickMode==1 and !item.containsKey('authTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.authType,0) + #{item.authTypeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createUserName=(case" suffix="ELSE createUserName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createUserName')) or (colPickMode==1 and !item.containsKey('createUserName'))">
when a.id=#{item.id} then #{item.createUserName}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 --> <!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="MenuEntity-Map"> <select id="getByKey" parameterType="paramDto" resultMap="MenuEntity-Map">
select <include refid="_columns"/> select <include refid="_columns"/>
...@@ -223,6 +401,21 @@ ...@@ -223,6 +401,21 @@
#{item} #{item}
</foreach> </foreach>
</delete> </delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_menu where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_menu where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 --> <!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto"> <delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_menu as a delete a.* from mortals_xhx_menu as a
...@@ -245,6 +438,13 @@ ...@@ -245,6 +438,13 @@
</trim> </trim>
<include refid="_orderCols_"/> <include refid="_orderCols_"/>
</select> </select>
<!-- 获取子节点 -->
<select id="selectChildrenMenuById" parameterType="String" resultMap="MenuEntity-Map">
select * from mortals_xhx_menu as a where find_in_set(#{menuId}, ancestors)
</select>
<!-- 获取 --> <!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int"> <select id="getListCount" parameterType="paramDto" resultType="int">
select count(1) select count(1)
...@@ -256,327 +456,500 @@ ...@@ -256,327 +456,500 @@
</trim> </trim>
</trim> </trim>
</select> </select>
<!-- 条件映射 --> <!-- 条件映射 -->
<sql id="_condition_"> <sql id="_condition_">
<if test="condition != null and !condition.isEmpty()"> <if test="condition != null and !condition.isEmpty()">
<if test="condition.containsKey('id')"> <!-- 条件映射-普通条件 -->
<if test="condition.id != null"> <include refid="_condition_param_">
and a.id=#{condition.id} <property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if> </if>
</if> </if>
<if test="condition.containsKey('id')"> <if test="conditionParamRef.containsKey('id')">
<if test="condition.id != null "> <if test="conditionParamRef.id != null ">
and a.id = #{condition.id} ${_conditionType_} a.id = #{${_conditionParam_}.id}
</if> </if>
<if test="condition.id == null"> <if test="conditionParamRef.id == null">
and a.id is null ${_conditionType_} a.id is null
</if> </if>
</if> </if>
<if test="condition.containsKey('idList')"> <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
and a.id in ${_conditionType_} a.id in
<foreach collection="condition.idList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('idStart') and condition.idStart != null"> <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
<![CDATA[ and a.id >= #{condition.idStart} ]]> ${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('idEnd') and condition.idEnd != null"> <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
<![CDATA[ and a.id <= #{condition.idEnd} ]]> ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if> </if>
<if test="condition.containsKey('name')"> <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
<if test="condition.name != null and condition.name != ''"> ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
and a.name like #{condition.name}
</if> </if>
<if test="condition.name == null">
and a.name is null
<if test="conditionParamRef.containsKey('name')">
<if test="conditionParamRef.name != null and conditionParamRef.name != ''">
${_conditionType_} a.name like #{${_conditionParam_}.name}
</if> </if>
<if test="conditionParamRef.name == null">
${_conditionType_} a.name is null
</if> </if>
<if test="condition.containsKey('nameList')"> </if>
and a.name in <if test="conditionParamRef.containsKey('nameList') and conditionParamRef.nameList.size() > 0">
<foreach collection="condition.nameList" open="(" close=")" index="index" item="item" separator=","> ${_conditionType_} a.name in
<foreach collection="conditionParamRef.nameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('url')"> <if test="conditionParamRef.containsKey('nameNotList') and conditionParamRef.nameNotList.size() > 0">
<if test="condition.url != null and condition.url != ''"> ${_conditionType_} a.name not in
and a.url like #{condition.url} <foreach collection="conditionParamRef.nameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('url')">
<if test="conditionParamRef.url != null and conditionParamRef.url != ''">
${_conditionType_} a.url like #{${_conditionParam_}.url}
</if> </if>
<if test="condition.url == null"> <if test="conditionParamRef.url == null">
and a.url is null ${_conditionType_} a.url is null
</if> </if>
</if> </if>
<if test="condition.containsKey('urlList')"> <if test="conditionParamRef.containsKey('urlList') and conditionParamRef.urlList.size() > 0">
and a.url in ${_conditionType_} a.url in
<foreach collection="condition.urlList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.urlList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('parentId')"> <if test="conditionParamRef.containsKey('urlNotList') and conditionParamRef.urlNotList.size() > 0">
<if test="condition.parentId != null "> ${_conditionType_} a.url not in
and a.parentId = #{condition.parentId} <foreach collection="conditionParamRef.urlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('ancestors')">
<if test="conditionParamRef.ancestors != null and conditionParamRef.ancestors != ''">
${_conditionType_} a.ancestors like #{${_conditionParam_}.ancestors}
</if> </if>
<if test="condition.parentId == null"> <if test="conditionParamRef.ancestors == null">
and a.parentId is null ${_conditionType_} a.ancestors is null
</if> </if>
</if> </if>
<if test="condition.containsKey('parentIdList')"> <if test="conditionParamRef.containsKey('ancestorsList') and conditionParamRef.ancestorsList.size() > 0">
and a.parentId in ${_conditionType_} a.ancestors in
<foreach collection="condition.parentIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.ancestorsList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('parentIdStart') and condition.parentIdStart != null"> <if test="conditionParamRef.containsKey('ancestorsNotList') and conditionParamRef.ancestorsNotList.size() > 0">
<![CDATA[ and a.parentId >= #{condition.parentIdStart} ]]> ${_conditionType_} a.ancestors not in
<foreach collection="conditionParamRef.ancestorsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('parentIdEnd') and condition.parentIdEnd != null"> <if test="conditionParamRef.containsKey('parentId')">
<![CDATA[ and a.parentId <= #{condition.parentIdEnd} ]]> <if test="conditionParamRef.parentId != null ">
${_conditionType_} a.parentId = #{${_conditionParam_}.parentId}
</if> </if>
<if test="condition.containsKey('orderId')"> <if test="conditionParamRef.parentId == null">
<if test="condition.orderId != null "> ${_conditionType_} a.parentId is null
and a.orderId = #{condition.orderId}
</if> </if>
<if test="condition.orderId == null">
and a.orderId is null
</if> </if>
<if test="conditionParamRef.containsKey('parentIdList') and conditionParamRef.parentIdList.size() > 0">
${_conditionType_} a.parentId in
<foreach collection="conditionParamRef.parentIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('orderIdList')"> <if test="conditionParamRef.containsKey('parentIdNotList') and conditionParamRef.parentIdNotList.size() > 0">
and a.orderId in ${_conditionType_} a.parentId not in
<foreach collection="condition.orderIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.parentIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('orderIdStart') and condition.orderIdStart != null"> <if test="conditionParamRef.containsKey('parentIdStart') and conditionParamRef.parentIdStart != null">
<![CDATA[ and a.orderId >= #{condition.orderIdStart} ]]> ${_conditionType_} a.parentId <![CDATA[ >= ]]> #{${_conditionParam_}.parentIdStart}
</if> </if>
<if test="condition.containsKey('orderIdEnd') and condition.orderIdEnd != null"> <if test="conditionParamRef.containsKey('parentIdEnd') and conditionParamRef.parentIdEnd != null">
<![CDATA[ and a.orderId <= #{condition.orderIdEnd} ]]> ${_conditionType_} a.parentId <![CDATA[ <= ]]> #{${_conditionParam_}.parentIdEnd}
</if> </if>
<if test="condition.containsKey('status')">
<if test="condition.status != null "> <if test="conditionParamRef.containsKey('orderId')">
and a.status = #{condition.status} <if test="conditionParamRef.orderId != null ">
${_conditionType_} a.orderId = #{${_conditionParam_}.orderId}
</if> </if>
<if test="condition.status == null"> <if test="conditionParamRef.orderId == null">
and a.status is null ${_conditionType_} a.orderId is null
</if> </if>
</if> </if>
<if test="condition.containsKey('statusList')"> <if test="conditionParamRef.containsKey('orderIdList') and conditionParamRef.orderIdList.size() > 0">
and a.status in ${_conditionType_} a.orderId in
<foreach collection="condition.statusList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.orderIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('orderIdNotList') and conditionParamRef.orderIdNotList.size() > 0">
${_conditionType_} a.orderId not in
<foreach collection="conditionParamRef.orderIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('statusStart') and condition.statusStart != null"> <if test="conditionParamRef.containsKey('orderIdStart') and conditionParamRef.orderIdStart != null">
<![CDATA[ and a.status >= #{condition.statusStart} ]]> ${_conditionType_} a.orderId <![CDATA[ >= ]]> #{${_conditionParam_}.orderIdStart}
</if>
<if test="conditionParamRef.containsKey('orderIdEnd') and conditionParamRef.orderIdEnd != null">
${_conditionType_} a.orderId <![CDATA[ <= ]]> #{${_conditionParam_}.orderIdEnd}
</if> </if>
<if test="condition.containsKey('statusEnd') and condition.statusEnd != null">
<![CDATA[ and a.status <= #{condition.statusEnd} ]]> <if test="conditionParamRef.containsKey('status')">
<if test="conditionParamRef.status != null ">
${_conditionType_} a.status = #{${_conditionParam_}.status}
</if> </if>
<if test="condition.containsKey('linkType')"> <if test="conditionParamRef.status == null">
<if test="condition.linkType != null "> ${_conditionType_} a.status is null
and a.linkType = #{condition.linkType}
</if> </if>
<if test="condition.linkType == null">
and a.linkType is null
</if> </if>
<if test="conditionParamRef.containsKey('statusList') and conditionParamRef.statusList.size() > 0">
${_conditionType_} a.status in
<foreach collection="conditionParamRef.statusList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('linkTypeList')"> <if test="conditionParamRef.containsKey('statusNotList') and conditionParamRef.statusNotList.size() > 0">
and a.linkType in ${_conditionType_} a.status not in
<foreach collection="condition.linkTypeList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.statusNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('linkTypeStart') and condition.linkTypeStart != null"> <if test="conditionParamRef.containsKey('statusStart') and conditionParamRef.statusStart != null">
<![CDATA[ and a.linkType >= #{condition.linkTypeStart} ]]> ${_conditionType_} a.status <![CDATA[ >= ]]> #{${_conditionParam_}.statusStart}
</if> </if>
<if test="condition.containsKey('linkTypeEnd') and condition.linkTypeEnd != null"> <if test="conditionParamRef.containsKey('statusEnd') and conditionParamRef.statusEnd != null">
<![CDATA[ and a.linkType <= #{condition.linkTypeEnd} ]]> ${_conditionType_} a.status <![CDATA[ <= ]]> #{${_conditionParam_}.statusEnd}
</if> </if>
<if test="condition.containsKey('groupId')">
<if test="condition.groupId != null "> <if test="conditionParamRef.containsKey('linkType')">
and a.groupId = #{condition.groupId} <if test="conditionParamRef.linkType != null ">
${_conditionType_} a.linkType = #{${_conditionParam_}.linkType}
</if> </if>
<if test="condition.groupId == null"> <if test="conditionParamRef.linkType == null">
and a.groupId is null ${_conditionType_} a.linkType is null
</if> </if>
</if> </if>
<if test="condition.containsKey('groupIdList')"> <if test="conditionParamRef.containsKey('linkTypeList') and conditionParamRef.linkTypeList.size() > 0">
and a.groupId in ${_conditionType_} a.linkType in
<foreach collection="condition.groupIdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.linkTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('groupIdStart') and condition.groupIdStart != null"> <if test="conditionParamRef.containsKey('linkTypeNotList') and conditionParamRef.linkTypeNotList.size() > 0">
<![CDATA[ and a.groupId >= #{condition.groupIdStart} ]]> ${_conditionType_} a.linkType not in
<foreach collection="conditionParamRef.linkTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('linkTypeStart') and conditionParamRef.linkTypeStart != null">
${_conditionType_} a.linkType <![CDATA[ >= ]]> #{${_conditionParam_}.linkTypeStart}
</if> </if>
<if test="condition.containsKey('groupIdEnd') and condition.groupIdEnd != null"> <if test="conditionParamRef.containsKey('linkTypeEnd') and conditionParamRef.linkTypeEnd != null">
<![CDATA[ and a.groupId <= #{condition.groupIdEnd} ]]> ${_conditionType_} a.linkType <![CDATA[ <= ]]> #{${_conditionParam_}.linkTypeEnd}
</if>
<if test="conditionParamRef.containsKey('groupId')">
<if test="conditionParamRef.groupId != null ">
${_conditionType_} a.groupId = #{${_conditionParam_}.groupId}
</if> </if>
<if test="condition.containsKey('groupName')"> <if test="conditionParamRef.groupId == null">
<if test="condition.groupName != null and condition.groupName != ''"> ${_conditionType_} a.groupId is null
and a.groupName like #{condition.groupName}
</if> </if>
<if test="condition.groupName == null">
and a.groupName is null
</if> </if>
<if test="conditionParamRef.containsKey('groupIdList') and conditionParamRef.groupIdList.size() > 0">
${_conditionType_} a.groupId in
<foreach collection="conditionParamRef.groupIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('groupNameList')"> <if test="conditionParamRef.containsKey('groupIdNotList') and conditionParamRef.groupIdNotList.size() > 0">
and a.groupName in ${_conditionType_} a.groupId not in
<foreach collection="condition.groupNameList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.groupIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('imgPath')"> <if test="conditionParamRef.containsKey('groupIdStart') and conditionParamRef.groupIdStart != null">
<if test="condition.imgPath != null and condition.imgPath != ''"> ${_conditionType_} a.groupId <![CDATA[ >= ]]> #{${_conditionParam_}.groupIdStart}
and a.imgPath like #{condition.imgPath} </if>
<if test="conditionParamRef.containsKey('groupIdEnd') and conditionParamRef.groupIdEnd != null">
${_conditionType_} a.groupId <![CDATA[ <= ]]> #{${_conditionParam_}.groupIdEnd}
</if>
<if test="conditionParamRef.containsKey('groupName')">
<if test="conditionParamRef.groupName != null and conditionParamRef.groupName != ''">
${_conditionType_} a.groupName like #{${_conditionParam_}.groupName}
</if> </if>
<if test="condition.imgPath == null"> <if test="conditionParamRef.groupName == null">
and a.imgPath is null ${_conditionType_} a.groupName is null
</if> </if>
</if> </if>
<if test="condition.containsKey('imgPathList')"> <if test="conditionParamRef.containsKey('groupNameList') and conditionParamRef.groupNameList.size() > 0">
and a.imgPath in ${_conditionType_} a.groupName in
<foreach collection="condition.imgPathList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.groupNameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('buttonImgPath')"> <if test="conditionParamRef.containsKey('groupNameNotList') and conditionParamRef.groupNameNotList.size() > 0">
<if test="condition.buttonImgPath != null and condition.buttonImgPath != ''"> ${_conditionType_} a.groupName not in
and a.buttonImgPath like #{condition.buttonImgPath} <foreach collection="conditionParamRef.groupNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('imgPath')">
<if test="conditionParamRef.imgPath != null and conditionParamRef.imgPath != ''">
${_conditionType_} a.imgPath like #{${_conditionParam_}.imgPath}
</if>
<if test="conditionParamRef.imgPath == null">
${_conditionType_} a.imgPath is null
</if> </if>
<if test="condition.buttonImgPath == null">
and a.buttonImgPath is null
</if> </if>
<if test="conditionParamRef.containsKey('imgPathList') and conditionParamRef.imgPathList.size() > 0">
${_conditionType_} a.imgPath in
<foreach collection="conditionParamRef.imgPathList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('buttonImgPathList')"> <if test="conditionParamRef.containsKey('imgPathNotList') and conditionParamRef.imgPathNotList.size() > 0">
and a.buttonImgPath in ${_conditionType_} a.imgPath not in
<foreach collection="condition.buttonImgPathList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.imgPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('imgCommPath')">
<if test="condition.imgCommPath != null and condition.imgCommPath != ''"> <if test="conditionParamRef.containsKey('buttonImgPath')">
and a.imgCommPath like #{condition.imgCommPath} <if test="conditionParamRef.buttonImgPath != null and conditionParamRef.buttonImgPath != ''">
${_conditionType_} a.buttonImgPath like #{${_conditionParam_}.buttonImgPath}
</if> </if>
<if test="condition.imgCommPath == null"> <if test="conditionParamRef.buttonImgPath == null">
and a.imgCommPath is null ${_conditionType_} a.buttonImgPath is null
</if> </if>
</if> </if>
<if test="condition.containsKey('imgCommPathList')"> <if test="conditionParamRef.containsKey('buttonImgPathList') and conditionParamRef.buttonImgPathList.size() > 0">
and a.imgCommPath in ${_conditionType_} a.buttonImgPath in
<foreach collection="condition.imgCommPathList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.buttonImgPathList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('commMenu')"> <if test="conditionParamRef.containsKey('buttonImgPathNotList') and conditionParamRef.buttonImgPathNotList.size() > 0">
<if test="condition.commMenu != null "> ${_conditionType_} a.buttonImgPath not in
and a.commMenu = #{condition.commMenu} <foreach collection="conditionParamRef.buttonImgPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.commMenu == null">
and a.commMenu is null <if test="conditionParamRef.containsKey('imgCommPath')">
<if test="conditionParamRef.imgCommPath != null and conditionParamRef.imgCommPath != ''">
${_conditionType_} a.imgCommPath like #{${_conditionParam_}.imgCommPath}
</if> </if>
<if test="conditionParamRef.imgCommPath == null">
${_conditionType_} a.imgCommPath is null
</if> </if>
<if test="condition.containsKey('commMenuList')"> </if>
and a.commMenu in <if test="conditionParamRef.containsKey('imgCommPathList') and conditionParamRef.imgCommPathList.size() > 0">
<foreach collection="condition.commMenuList" open="(" close=")" index="index" item="item" separator=","> ${_conditionType_} a.imgCommPath in
<foreach collection="conditionParamRef.imgCommPathList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('commMenuStart') and condition.commMenuStart != null"> <if test="conditionParamRef.containsKey('imgCommPathNotList') and conditionParamRef.imgCommPathNotList.size() > 0">
<![CDATA[ and a.commMenu >= #{condition.commMenuStart} ]]> ${_conditionType_} a.imgCommPath not in
<foreach collection="conditionParamRef.imgCommPathNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('commMenuEnd') and condition.commMenuEnd != null"> <if test="conditionParamRef.containsKey('commMenu')">
<![CDATA[ and a.commMenu <= #{condition.commMenuEnd} ]]> <if test="conditionParamRef.commMenu != null ">
${_conditionType_} a.commMenu = #{${_conditionParam_}.commMenu}
</if> </if>
<if test="condition.containsKey('menuType')"> <if test="conditionParamRef.commMenu == null">
<if test="condition.menuType != null "> ${_conditionType_} a.commMenu is null
and a.menuType = #{condition.menuType}
</if> </if>
<if test="condition.menuType == null">
and a.menuType is null
</if> </if>
<if test="conditionParamRef.containsKey('commMenuList') and conditionParamRef.commMenuList.size() > 0">
${_conditionType_} a.commMenu in
<foreach collection="conditionParamRef.commMenuList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('menuTypeList')"> <if test="conditionParamRef.containsKey('commMenuNotList') and conditionParamRef.commMenuNotList.size() > 0">
and a.menuType in ${_conditionType_} a.commMenu not in
<foreach collection="condition.menuTypeList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.commMenuNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('menuTypeStart') and condition.menuTypeStart != null"> <if test="conditionParamRef.containsKey('commMenuStart') and conditionParamRef.commMenuStart != null">
<![CDATA[ and a.menuType >= #{condition.menuTypeStart} ]]> ${_conditionType_} a.commMenu <![CDATA[ >= ]]> #{${_conditionParam_}.commMenuStart}
</if> </if>
<if test="condition.containsKey('menuTypeEnd') and condition.menuTypeEnd != null"> <if test="conditionParamRef.containsKey('commMenuEnd') and conditionParamRef.commMenuEnd != null">
<![CDATA[ and a.menuType <= #{condition.menuTypeEnd} ]]> ${_conditionType_} a.commMenu <![CDATA[ <= ]]> #{${_conditionParam_}.commMenuEnd}
</if> </if>
<if test="condition.containsKey('authType')">
<if test="condition.authType != null "> <if test="conditionParamRef.containsKey('menuType')">
and a.authType = #{condition.authType} <if test="conditionParamRef.menuType != null ">
${_conditionType_} a.menuType = #{${_conditionParam_}.menuType}
</if>
<if test="conditionParamRef.menuType == null">
${_conditionType_} a.menuType is null
</if>
</if>
<if test="conditionParamRef.containsKey('menuTypeList') and conditionParamRef.menuTypeList.size() > 0">
${_conditionType_} a.menuType in
<foreach collection="conditionParamRef.menuTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('menuTypeNotList') and conditionParamRef.menuTypeNotList.size() > 0">
${_conditionType_} a.menuType not in
<foreach collection="conditionParamRef.menuTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('menuTypeStart') and conditionParamRef.menuTypeStart != null">
${_conditionType_} a.menuType <![CDATA[ >= ]]> #{${_conditionParam_}.menuTypeStart}
</if>
<if test="conditionParamRef.containsKey('menuTypeEnd') and conditionParamRef.menuTypeEnd != null">
${_conditionType_} a.menuType <![CDATA[ <= ]]> #{${_conditionParam_}.menuTypeEnd}
</if> </if>
<if test="condition.authType == null">
and a.authType is null <if test="conditionParamRef.containsKey('authType')">
<if test="conditionParamRef.authType != null ">
${_conditionType_} a.authType = #{${_conditionParam_}.authType}
</if>
<if test="conditionParamRef.authType == null">
${_conditionType_} a.authType is null
</if> </if>
</if> </if>
<if test="condition.containsKey('authTypeList')"> <if test="conditionParamRef.containsKey('authTypeList') and conditionParamRef.authTypeList.size() > 0">
and a.authType in ${_conditionType_} a.authType in
<foreach collection="condition.authTypeList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.authTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('authTypeStart') and condition.authTypeStart != null"> <if test="conditionParamRef.containsKey('authTypeNotList') and conditionParamRef.authTypeNotList.size() > 0">
<![CDATA[ and a.authType >= #{condition.authTypeStart} ]]> ${_conditionType_} a.authType not in
<foreach collection="conditionParamRef.authTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('authTypeEnd') and condition.authTypeEnd != null"> <if test="conditionParamRef.containsKey('authTypeStart') and conditionParamRef.authTypeStart != null">
<![CDATA[ and a.authType <= #{condition.authTypeEnd} ]]> ${_conditionType_} a.authType <![CDATA[ >= ]]> #{${_conditionParam_}.authTypeStart}
</if> </if>
<if test="condition.containsKey('createTime')"> <if test="conditionParamRef.containsKey('authTypeEnd') and conditionParamRef.authTypeEnd != null">
<if test="condition.createTime != null "> ${_conditionType_} a.authType <![CDATA[ <= ]]> #{${_conditionParam_}.authTypeEnd}
and a.createTime = #{condition.createTime}
</if> </if>
<if test="condition.createTime == null">
and a.createTime is null
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if> </if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if> </if>
<if test="condition.containsKey('createTimeStart') and condition.createTimeStart != null and condition.createTimeStart!=''">
<![CDATA[ and a.createTime >= STR_TO_DATE(left(concat(#{condition.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') ]]>
</if> </if>
<if test="condition.containsKey('createTimeEnd') and condition.createTimeEnd != null and condition.createTimeEnd!=''"> <if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
<![CDATA[ and a.createTime <= STR_TO_DATE(left(concat(#{condition.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ]]> ${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="condition.containsKey('createUserId')"> <if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
<if test="condition.createUserId != null "> ${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
and a.createUserId = #{condition.createUserId}
</if> </if>
<if test="condition.createUserId == null"> <if test="conditionParamRef.containsKey('createUserId')">
and a.createUserId is null <if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if> </if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if> </if>
<if test="condition.containsKey('createUserIdList')"> </if>
and a.createUserId in <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
<foreach collection="condition.createUserIdList" open="(" close=")" index="index" item="item" separator=","> ${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="condition.containsKey('createUserIdStart') and condition.createUserIdStart != null"> <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
<![CDATA[ and a.createUserId >= #{condition.createUserIdStart} ]]> ${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
<if test="condition.containsKey('createUserIdEnd') and condition.createUserIdEnd != null"> <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
<![CDATA[ and a.createUserId <= #{condition.createUserIdEnd} ]]> ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if> </if>
<if test="condition.containsKey('createUserName')"> <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
<if test="condition.createUserName != null and condition.createUserName != ''"> ${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
and a.createUserName like #{condition.createUserName}
</if> </if>
<if test="condition.createUserName == null">
and a.createUserName is null
<if test="conditionParamRef.containsKey('createUserName')">
<if test="conditionParamRef.createUserName != null and conditionParamRef.createUserName != ''">
${_conditionType_} a.createUserName like #{${_conditionParam_}.createUserName}
</if> </if>
<if test="conditionParamRef.createUserName == null">
${_conditionType_} a.createUserName is null
</if> </if>
<if test="condition.containsKey('createUserNameList')"> </if>
and a.createUserName in <if test="conditionParamRef.containsKey('createUserNameList') and conditionParamRef.createUserNameList.size() > 0">
<foreach collection="condition.createUserNameList" open="(" close=")" index="index" item="item" separator=","> ${_conditionType_} a.createUserName in
<foreach collection="conditionParamRef.createUserNameList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('createUserNameNotList') and conditionParamRef.createUserNameNotList.size() > 0">
${_conditionType_} a.createUserName not in
<foreach collection="conditionParamRef.createUserNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if> </if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
...@@ -593,128 +966,97 @@ ...@@ -593,128 +966,97 @@
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')"> <if test="orderCol.containsKey('id')">
a.id a.id
<if test="orderCol.id!= null"> <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
${orderCol.id}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('name')"> <if test="orderCol.containsKey('name')">
a.name a.name
<if test="orderCol.name!= null"> <if test='orderCol.name != null and "DESC".equalsIgnoreCase(orderCol.name)'>DESC</if>
${orderCol.name}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('url')"> <if test="orderCol.containsKey('url')">
a.url a.url
<if test="orderCol.url!= null"> <if test='orderCol.url != null and "DESC".equalsIgnoreCase(orderCol.url)'>DESC</if>
${orderCol.url} ,
</if> </if>
<if test="orderCol.containsKey('ancestors')">
a.ancestors
<if test='orderCol.ancestors != null and "DESC".equalsIgnoreCase(orderCol.ancestors)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('parentId')"> <if test="orderCol.containsKey('parentId')">
a.parentId a.parentId
<if test="orderCol.parentId!= null"> <if test='orderCol.parentId != null and "DESC".equalsIgnoreCase(orderCol.parentId)'>DESC</if>
${orderCol.parentId}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('orderId')"> <if test="orderCol.containsKey('orderId')">
a.orderId a.orderId
<if test="orderCol.orderId!= null"> <if test='orderCol.orderId != null and "DESC".equalsIgnoreCase(orderCol.orderId)'>DESC</if>
${orderCol.orderId}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('status')"> <if test="orderCol.containsKey('status')">
a.status a.status
<if test="orderCol.status!= null"> <if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if>
${orderCol.status}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('linkType')"> <if test="orderCol.containsKey('linkType')">
a.linkType a.linkType
<if test="orderCol.linkType!= null"> <if test='orderCol.linkType != null and "DESC".equalsIgnoreCase(orderCol.linkType)'>DESC</if>
${orderCol.linkType}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('groupId')"> <if test="orderCol.containsKey('groupId')">
a.groupId a.groupId
<if test="orderCol.groupId!= null"> <if test='orderCol.groupId != null and "DESC".equalsIgnoreCase(orderCol.groupId)'>DESC</if>
${orderCol.groupId}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('groupName')"> <if test="orderCol.containsKey('groupName')">
a.groupName a.groupName
<if test="orderCol.groupName!= null"> <if test='orderCol.groupName != null and "DESC".equalsIgnoreCase(orderCol.groupName)'>DESC</if>
${orderCol.groupName}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('imgPath')"> <if test="orderCol.containsKey('imgPath')">
a.imgPath a.imgPath
<if test="orderCol.imgPath!= null"> <if test='orderCol.imgPath != null and "DESC".equalsIgnoreCase(orderCol.imgPath)'>DESC</if>
${orderCol.imgPath}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('buttonImgPath')"> <if test="orderCol.containsKey('buttonImgPath')">
a.buttonImgPath a.buttonImgPath
<if test="orderCol.buttonImgPath!= null"> <if test='orderCol.buttonImgPath != null and "DESC".equalsIgnoreCase(orderCol.buttonImgPath)'>DESC</if>
${orderCol.buttonImgPath}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('imgCommPath')"> <if test="orderCol.containsKey('imgCommPath')">
a.imgCommPath a.imgCommPath
<if test="orderCol.imgCommPath!= null"> <if test='orderCol.imgCommPath != null and "DESC".equalsIgnoreCase(orderCol.imgCommPath)'>DESC</if>
${orderCol.imgCommPath}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('commMenu')"> <if test="orderCol.containsKey('commMenu')">
a.commMenu a.commMenu
<if test="orderCol.commMenu!= null"> <if test='orderCol.commMenu != null and "DESC".equalsIgnoreCase(orderCol.commMenu)'>DESC</if>
${orderCol.commMenu}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('menuType')"> <if test="orderCol.containsKey('menuType')">
a.menuType a.menuType
<if test="orderCol.menuType!= null"> <if test='orderCol.menuType != null and "DESC".equalsIgnoreCase(orderCol.menuType)'>DESC</if>
${orderCol.menuType}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('authType')"> <if test="orderCol.containsKey('authType')">
a.authType a.authType
<if test="orderCol.authType!= null"> <if test='orderCol.authType != null and "DESC".equalsIgnoreCase(orderCol.authType)'>DESC</if>
${orderCol.authType}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('createTime')"> <if test="orderCol.containsKey('createTime')">
a.createTime a.createTime
<if test="orderCol.createTime!= null"> <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
${orderCol.createTime}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('createUserId')"> <if test="orderCol.containsKey('createUserId')">
a.createUserId a.createUserId
<if test="orderCol.createUserId!= null"> <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
${orderCol.createUserId}
</if>
, ,
</if> </if>
<if test="orderCol.containsKey('createUserName')"> <if test="orderCol.containsKey('createUserName')">
a.createUserName a.createUserName
<if test="orderCol.createUserName!= null"> <if test='orderCol.createUserName != null and "DESC".equalsIgnoreCase(orderCol.createUserName)'>DESC</if>
${orderCol.createUserName}
</if>
, ,
</if> </if>
</trim> </trim>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.appointment.dao.ibatis.AppointmentConfigDaoImpl"> <mapper namespace="com.mortals.xhx.module.appointment.dao.ibatis.AppointmentConfigDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<collection property="appointmentConfigTimesList" column="id" ofType="AppointmentConfigTimesEntity" javaType="ArrayList" select="getAppointmentConfigTimesByAotoCheckCfgId"></collection> <collection property="appointmentConfigTimesList" column="id" ofType="AppointmentConfigTimesEntity" javaType="ArrayList" select="getAppointmentConfigTimesByAotoCheckCfgId"></collection>
</resultMap> </resultMap>
<resultMap type="AppointmentConfigTimesEntity" id="AppointmentConfigTimesEntity-Map"> <resultMap type="AppointmentConfigTimesEntity" id="AppointmentConfigTimesEntity-Map">
<result property="Id" column="Id" /> <result property="id" column="id" />
<result property="aotoCheckCfgId" column="aotoCheckCfgId" /> <result property="aotoCheckCfgId" column="aotoCheckCfgId" />
<result property="serviceTimeStart" column="serviceTimeStart" /> <result property="serviceTimeStart" column="serviceTimeStart" />
<result property="serviceTimeEnd" column="serviceTimeEnd" /> <result property="serviceTimeEnd" column="serviceTimeEnd" />
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<!-- 子表所有列 --> <!-- 子表所有列 -->
<sql id="_columns_sub"> <sql id="_columns_sub">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
b.Id,b.aotoCheckCfgId,b.serviceTimeStart,b.serviceTimeEnd,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime, b.id,b.aotoCheckCfgId,b.serviceTimeStart,b.serviceTimeEnd,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.appointment.dao.ibatis.AppointmentConfigTimesDaoImpl"> <mapper namespace="com.mortals.xhx.module.appointment.dao.ibatis.AppointmentConfigTimesDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
<resultMap type="AppointmentConfigTimesEntity" id="AppointmentConfigTimesEntity-Map"> <resultMap type="AppointmentConfigTimesEntity" id="AppointmentConfigTimesEntity-Map">
<id property="Id" column="Id" /> <id property="id" column="id" />
<result property="aotoCheckCfgId" column="aotoCheckCfgId" /> <result property="aotoCheckCfgId" column="aotoCheckCfgId" />
<result property="serviceTimeStart" column="serviceTimeStart" /> <result property="serviceTimeStart" column="serviceTimeStart" />
<result property="serviceTimeEnd" column="serviceTimeEnd" /> <result property="serviceTimeEnd" column="serviceTimeEnd" />
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<!-- 表所有列 --> <!-- 表所有列 -->
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('Id') or colPickMode == 1 and data.containsKey('Id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.Id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('aotoCheckCfgId') or colPickMode == 1 and data.containsKey('aotoCheckCfgId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('aotoCheckCfgId') or colPickMode == 1 and data.containsKey('aotoCheckCfgId')))">
a.aotoCheckCfgId, a.aotoCheckCfgId,
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AppointmentConfigTimesEntity" useGeneratedKeys="true" keyProperty="Id"> <insert id="insert" parameterType="AppointmentConfigTimesEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_appointment_config_times insert into mortals_xhx_appointment_config_times
(aotoCheckCfgId,serviceTimeStart,serviceTimeEnd,remark,createUserId,createTime,updateUserId,updateTime) (aotoCheckCfgId,serviceTimeStart,serviceTimeEnd,remark,createUserId,createTime,updateUserId,updateTime)
VALUES VALUES
...@@ -123,10 +123,10 @@ ...@@ -123,10 +123,10 @@
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('aotoCheckCfgId')) or (colPickMode==1 and !item.containsKey('aotoCheckCfgId'))"> <when test="(colPickMode==0 and item.containsKey('aotoCheckCfgId')) or (colPickMode==1 and !item.containsKey('aotoCheckCfgId'))">
when a.Id=#{item.Id} then #{item.aotoCheckCfgId} when a.id=#{item.id} then #{item.aotoCheckCfgId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('aotoCheckCfgIdIncrement')) or (colPickMode==1 and !item.containsKey('aotoCheckCfgIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('aotoCheckCfgIdIncrement')) or (colPickMode==1 and !item.containsKey('aotoCheckCfgIdIncrement'))">
when a.Id=#{item.Id} then ifnull(a.aotoCheckCfgId,0) + #{item.aotoCheckCfgIdIncrement} when a.id=#{item.id} then ifnull(a.aotoCheckCfgId,0) + #{item.aotoCheckCfgIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -134,21 +134,21 @@ ...@@ -134,21 +134,21 @@
<trim prefix="serviceTimeStart=(case" suffix="ELSE serviceTimeStart end),"> <trim prefix="serviceTimeStart=(case" suffix="ELSE serviceTimeStart end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('serviceTimeStart')) or (colPickMode==1 and !item.containsKey('serviceTimeStart'))"> <if test="(colPickMode==0 and item.containsKey('serviceTimeStart')) or (colPickMode==1 and !item.containsKey('serviceTimeStart'))">
when a.Id=#{item.Id} then #{item.serviceTimeStart} when a.id=#{item.id} then #{item.serviceTimeStart}
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="serviceTimeEnd=(case" suffix="ELSE serviceTimeEnd end),"> <trim prefix="serviceTimeEnd=(case" suffix="ELSE serviceTimeEnd end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('serviceTimeEnd')) or (colPickMode==1 and !item.containsKey('serviceTimeEnd'))"> <if test="(colPickMode==0 and item.containsKey('serviceTimeEnd')) or (colPickMode==1 and !item.containsKey('serviceTimeEnd'))">
when a.Id=#{item.Id} then #{item.serviceTimeEnd} when a.id=#{item.id} then #{item.serviceTimeEnd}
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="remark=(case" suffix="ELSE remark end),"> <trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))"> <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
when a.Id=#{item.Id} then #{item.remark} when a.id=#{item.id} then #{item.remark}
</if> </if>
</foreach> </foreach>
</trim> </trim>
...@@ -156,10 +156,10 @@ ...@@ -156,10 +156,10 @@
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))"> <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.Id=#{item.Id} then #{item.createUserId} when a.id=#{item.id} then #{item.createUserId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.Id=#{item.Id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement} when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<trim prefix="createTime=(case" suffix="ELSE createTime end),"> <trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.Id=#{item.Id} then #{item.createTime} when a.id=#{item.id} then #{item.createTime}
</if> </if>
</foreach> </foreach>
</trim> </trim>
...@@ -175,10 +175,10 @@ ...@@ -175,10 +175,10 @@
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))"> <when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.Id=#{item.Id} then #{item.updateUserId} when a.id=#{item.id} then #{item.updateUserId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.Id=#{item.Id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement} when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -186,36 +186,36 @@ ...@@ -186,36 +186,36 @@
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),"> <trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))"> <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.Id=#{item.Id} then #{item.updateTime} when a.id=#{item.id} then #{item.updateTime}
</if> </if>
</foreach> </foreach>
</trim> </trim>
</trim> </trim>
where Id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.Id} #{item.id}
</foreach> </foreach>
</update> </update>
<!-- 根据主健查询 --> <!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="AppointmentConfigTimesEntity-Map"> <select id="getByKey" parameterType="paramDto" resultMap="AppointmentConfigTimesEntity-Map">
select <include refid="_columns"/> select <include refid="_columns"/>
from mortals_xhx_appointment_config_times as a from mortals_xhx_appointment_config_times as a
where a.Id=#{condition.Id} where a.id=#{condition.id}
</select> </select>
<!-- 根据主健删除 --> <!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto"> <delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_appointment_config_times as a where a.Id=#{condition.Id} delete a.* from mortals_xhx_appointment_config_times as a where a.id=#{condition.id}
</delete> </delete>
<!-- 根据主健删除一批,针对单一主健有效 --> <!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys"> <delete id="deleteByKeys">
delete from mortals_xhx_appointment_config_times where Id in delete from mortals_xhx_appointment_config_times where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")"> <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</delete> </delete>
<!-- 根据主健列表删除一批,针对单一主健有效 --> <!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList"> <delete id="deleteByKeyList">
delete from mortals_xhx_appointment_config_times where Id in delete from mortals_xhx_appointment_config_times where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
<!-- 根据对象列表删除一批,针对单一主健有效 --> <!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList"> <delete id="deleteByEntityList">
delete from mortals_xhx_appointment_config_times where Id in delete from mortals_xhx_appointment_config_times where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.Id} #{item.id}
</foreach> </foreach>
</delete> </delete>
<!-- 根据paramDto删除一批 --> <!-- 根据paramDto删除一批 -->
...@@ -303,34 +303,34 @@ ...@@ -303,34 +303,34 @@
<bind name="conditionParamRef" value="${_conditionParam_}"/> <bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')"> <if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null"> <if test="conditionParamRef.id != null">
${_conditionType_} a.Id=#{${_conditionParam_}.id} ${_conditionType_} a.id=#{${_conditionParam_}.id}
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('Id')"> <if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.Id != null "> <if test="conditionParamRef.id != null ">
${_conditionType_} a.Id = #{${_conditionParam_}.Id} ${_conditionType_} a.id = #{${_conditionParam_}.id}
</if> </if>
<if test="conditionParamRef.Id == null"> <if test="conditionParamRef.id == null">
${_conditionType_} a.Id is null ${_conditionType_} a.id is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('IdList') and conditionParamRef.IdList.size() > 0"> <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.Id in ${_conditionType_} a.id in
<foreach collection="conditionParamRef.IdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('IdNotList') and conditionParamRef.IdNotList.size() > 0"> <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.Id not in ${_conditionType_} a.id not in
<foreach collection="conditionParamRef.IdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('IdStart') and conditionParamRef.IdStart != null"> <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.Id <![CDATA[ >= ]]> #{${_conditionParam_}.IdStart} ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if> </if>
<if test="conditionParamRef.containsKey('IdEnd') and conditionParamRef.IdEnd != null"> <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.Id <![CDATA[ <= ]]> #{${_conditionParam_}.IdEnd} ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if> </if>
<if test="conditionParamRef.containsKey('aotoCheckCfgId')"> <if test="conditionParamRef.containsKey('aotoCheckCfgId')">
...@@ -508,9 +508,9 @@ ...@@ -508,9 +508,9 @@
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"> <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by order by
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('Id')"> <if test="orderCol.containsKey('id')">
a.Id a.id
<if test='orderCol.Id != null and "DESC".equalsIgnoreCase(orderCol.Id)'>DESC</if> <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('aotoCheckCfgId')"> <if test="orderCol.containsKey('aotoCheckCfgId')">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.appointment.dao.ibatis.AppointmentConstraintDaoImpl"> <mapper namespace="com.mortals.xhx.module.appointment.dao.ibatis.AppointmentConstraintDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
a.operator, a.operator,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('constraint') or colPickMode == 1 and data.containsKey('constraint')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('constraint') or colPickMode == 1 and data.containsKey('constraint')))">
a.constraint, a.`constraint`,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime, a.createTime,
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AppointmentConstraintEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="AppointmentConstraintEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_appointment_constraint insert into mortals_xhx_appointment_constraint
(siteId,siteName,personId,name,contact,idCardType,idCardNo,accumulative,constraintTime,createMethod,operator,constraint,createTime,createUserId,updateTime,updateUserId) (siteId,siteName,personId,name,contact,idCardType,idCardNo,accumulative,constraintTime,createMethod,operator,`constraint`,createTime,createUserId,updateTime,updateUserId)
VALUES VALUES
(#{siteId},#{siteName},#{personId},#{name},#{contact},#{idCardType},#{idCardNo},#{accumulative},#{constraintTime},#{createMethod},#{operator},#{constraint},#{createTime},#{createUserId},#{updateTime},#{updateUserId}) (#{siteId},#{siteName},#{personId},#{name},#{contact},#{idCardType},#{idCardNo},#{accumulative},#{constraintTime},#{createMethod},#{operator},#{constraint},#{createTime},#{createUserId},#{updateTime},#{updateUserId})
</insert> </insert>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_appointment_constraint insert into mortals_xhx_appointment_constraint
(siteId,siteName,personId,name,contact,idCardType,idCardNo,accumulative,constraintTime,createMethod,operator,constraint,createTime,createUserId,updateTime,updateUserId) (siteId,siteName,personId,name,contact,idCardType,idCardNo,accumulative,constraintTime,createMethod,operator,`constraint`,createTime,createUserId,updateTime,updateUserId)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteName},#{item.personId},#{item.name},#{item.contact},#{item.idCardType},#{item.idCardNo},#{item.accumulative},#{item.constraintTime},#{item.createMethod},#{item.operator},#{item.constraint},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId}) (#{item.siteId},#{item.siteName},#{item.personId},#{item.name},#{item.contact},#{item.idCardType},#{item.idCardNo},#{item.accumulative},#{item.constraintTime},#{item.createMethod},#{item.operator},#{item.constraint},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId})
...@@ -152,10 +152,10 @@ ...@@ -152,10 +152,10 @@
a.operator=#{data.operator}, a.operator=#{data.operator},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('constraint')) or (colPickMode==1 and !data.containsKey('constraint'))"> <if test="(colPickMode==0 and data.containsKey('constraint')) or (colPickMode==1 and !data.containsKey('constraint'))">
a.constraint=#{data.constraint}, a.`constraint`=#{data.constraint},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('constraintIncrement')) or (colPickMode==1 and !data.containsKey('constraintIncrement'))"> <if test="(colPickMode==0 and data.containsKey('constraintIncrement')) or (colPickMode==1 and !data.containsKey('constraintIncrement'))">
a.constraint=ifnull(a.constraint,0) + #{data.constraintIncrement}, a.`constraint`=ifnull(a.`constraint`,0) + #{data.constraintIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))"> <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime}, a.createTime=#{data.createTime},
...@@ -284,14 +284,14 @@ ...@@ -284,14 +284,14 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="constraint=(case" suffix="ELSE constraint end),"> <trim prefix="`constraint`=(case" suffix="ELSE `constraint` end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('constraint')) or (colPickMode==1 and !item.containsKey('constraint'))"> <when test="(colPickMode==0 and item.containsKey('constraint')) or (colPickMode==1 and !item.containsKey('constraint'))">
when a.id=#{item.id} then #{item.constraint} when a.id=#{item.id} then #{item.constraint}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('constraintIncrement')) or (colPickMode==1 and !item.containsKey('constraintIncrement'))"> <when test="(colPickMode==0 and item.containsKey('constraintIncrement')) or (colPickMode==1 and !item.containsKey('constraintIncrement'))">
when a.id=#{item.id} then ifnull(a.constraint,0) + #{item.constraintIncrement} when a.id=#{item.id} then ifnull(a.`constraint`,0) + #{item.constraintIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -728,29 +728,29 @@ ...@@ -728,29 +728,29 @@
</if> </if>
<if test="conditionParamRef.containsKey('constraint')"> <if test="conditionParamRef.containsKey('constraint')">
<if test="conditionParamRef.constraint != null "> <if test="conditionParamRef.constraint != null ">
${_conditionType_} a.constraint = #{${_conditionParam_}.constraint} ${_conditionType_} a.`constraint` = #{${_conditionParam_}.constraint}
</if> </if>
<if test="conditionParamRef.constraint == null"> <if test="conditionParamRef.constraint == null">
${_conditionType_} a.constraint is null ${_conditionType_} a.`constraint` is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('constraintList') and conditionParamRef.constraintList.size() > 0"> <if test="conditionParamRef.containsKey('constraintList') and conditionParamRef.constraintList.size() > 0">
${_conditionType_} a.constraint in ${_conditionType_} a.`constraint` in
<foreach collection="conditionParamRef.constraintList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.constraintList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('constraintNotList') and conditionParamRef.constraintNotList.size() > 0"> <if test="conditionParamRef.containsKey('constraintNotList') and conditionParamRef.constraintNotList.size() > 0">
${_conditionType_} a.constraint not in ${_conditionType_} a.`constraint` not in
<foreach collection="conditionParamRef.constraintNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.constraintNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('constraintStart') and conditionParamRef.constraintStart != null"> <if test="conditionParamRef.containsKey('constraintStart') and conditionParamRef.constraintStart != null">
${_conditionType_} a.constraint <![CDATA[ >= ]]> #{${_conditionParam_}.constraintStart} ${_conditionType_} a.`constraint` <![CDATA[ >= ]]> #{${_conditionParam_}.constraintStart}
</if> </if>
<if test="conditionParamRef.containsKey('constraintEnd') and conditionParamRef.constraintEnd != null"> <if test="conditionParamRef.containsKey('constraintEnd') and conditionParamRef.constraintEnd != null">
${_conditionType_} a.constraint <![CDATA[ <= ]]> #{${_conditionParam_}.constraintEnd} ${_conditionType_} a.`constraint` <![CDATA[ <= ]]> #{${_conditionParam_}.constraintEnd}
</if> </if>
...@@ -911,7 +911,7 @@ ...@@ -911,7 +911,7 @@
, ,
</if> </if>
<if test="orderCol.containsKey('constraint')"> <if test="orderCol.containsKey('constraint')">
a.constraint a.`constraint`
<if test='orderCol.constraint != null and "DESC".equalsIgnoreCase(orderCol.constraint)'>DESC</if> <if test='orderCol.constraint != null and "DESC".equalsIgnoreCase(orderCol.constraint)'>DESC</if>
, ,
</if> </if>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.care.dao.ibatis.CareConfigDaoImpl"> <mapper namespace="com.mortals.xhx.module.care.dao.ibatis.CareConfigDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<collection property="careConfigTimesList" column="id" ofType="CareConfigTimesEntity" javaType="ArrayList" select="getCareConfigTimesByCareCfgId"></collection> <collection property="careConfigTimesList" column="id" ofType="CareConfigTimesEntity" javaType="ArrayList" select="getCareConfigTimesByCareCfgId"></collection>
</resultMap> </resultMap>
<resultMap type="CareConfigTimesEntity" id="CareConfigTimesEntity-Map"> <resultMap type="CareConfigTimesEntity" id="CareConfigTimesEntity-Map">
<result property="Id" column="Id" /> <result property="id" column="id" />
<result property="careCfgId" column="careCfgId" /> <result property="careCfgId" column="careCfgId" />
<result property="serviceTimeStart" column="serviceTimeStart" /> <result property="serviceTimeStart" column="serviceTimeStart" />
<result property="serviceTimeEnd" column="serviceTimeEnd" /> <result property="serviceTimeEnd" column="serviceTimeEnd" />
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<!-- 子表所有列 --> <!-- 子表所有列 -->
<sql id="_columns_sub"> <sql id="_columns_sub">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
b.Id,b.careCfgId,b.serviceTimeStart,b.serviceTimeEnd,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime, b.id,b.careCfgId,b.serviceTimeStart,b.serviceTimeEnd,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd"> "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.care.dao.ibatis.CareConfigTimesDaoImpl"> <mapper namespace="com.mortals.xhx.module.care.dao.ibatis.CareConfigTimesDaoImpl">
<!-- 字段和属性映射 --> <!-- 字段和属性映射 -->
<resultMap type="CareConfigTimesEntity" id="CareConfigTimesEntity-Map"> <resultMap type="CareConfigTimesEntity" id="CareConfigTimesEntity-Map">
<id property="Id" column="Id" /> <id property="id" column="id" />
<result property="careCfgId" column="careCfgId" /> <result property="careCfgId" column="careCfgId" />
<result property="serviceTimeStart" column="serviceTimeStart" /> <result property="serviceTimeStart" column="serviceTimeStart" />
<result property="serviceTimeEnd" column="serviceTimeEnd" /> <result property="serviceTimeEnd" column="serviceTimeEnd" />
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<!-- 表所有列 --> <!-- 表所有列 -->
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('Id') or colPickMode == 1 and data.containsKey('Id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.Id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('careCfgId') or colPickMode == 1 and data.containsKey('careCfgId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('careCfgId') or colPickMode == 1 and data.containsKey('careCfgId')))">
a.careCfgId, a.careCfgId,
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="CareConfigTimesEntity" useGeneratedKeys="true" keyProperty="Id"> <insert id="insert" parameterType="CareConfigTimesEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_care_config_times insert into mortals_xhx_care_config_times
(careCfgId,serviceTimeStart,serviceTimeEnd,remark,createUserId,createTime,updateUserId,updateTime) (careCfgId,serviceTimeStart,serviceTimeEnd,remark,createUserId,createTime,updateUserId,updateTime)
VALUES VALUES
...@@ -123,10 +123,10 @@ ...@@ -123,10 +123,10 @@
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('careCfgId')) or (colPickMode==1 and !item.containsKey('careCfgId'))"> <when test="(colPickMode==0 and item.containsKey('careCfgId')) or (colPickMode==1 and !item.containsKey('careCfgId'))">
when a.Id=#{item.Id} then #{item.careCfgId} when a.id=#{item.id} then #{item.careCfgId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('careCfgIdIncrement')) or (colPickMode==1 and !item.containsKey('careCfgIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('careCfgIdIncrement')) or (colPickMode==1 and !item.containsKey('careCfgIdIncrement'))">
when a.Id=#{item.Id} then ifnull(a.careCfgId,0) + #{item.careCfgIdIncrement} when a.id=#{item.id} then ifnull(a.careCfgId,0) + #{item.careCfgIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -134,21 +134,21 @@ ...@@ -134,21 +134,21 @@
<trim prefix="serviceTimeStart=(case" suffix="ELSE serviceTimeStart end),"> <trim prefix="serviceTimeStart=(case" suffix="ELSE serviceTimeStart end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('serviceTimeStart')) or (colPickMode==1 and !item.containsKey('serviceTimeStart'))"> <if test="(colPickMode==0 and item.containsKey('serviceTimeStart')) or (colPickMode==1 and !item.containsKey('serviceTimeStart'))">
when a.Id=#{item.Id} then #{item.serviceTimeStart} when a.id=#{item.id} then #{item.serviceTimeStart}
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="serviceTimeEnd=(case" suffix="ELSE serviceTimeEnd end),"> <trim prefix="serviceTimeEnd=(case" suffix="ELSE serviceTimeEnd end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('serviceTimeEnd')) or (colPickMode==1 and !item.containsKey('serviceTimeEnd'))"> <if test="(colPickMode==0 and item.containsKey('serviceTimeEnd')) or (colPickMode==1 and !item.containsKey('serviceTimeEnd'))">
when a.Id=#{item.Id} then #{item.serviceTimeEnd} when a.id=#{item.id} then #{item.serviceTimeEnd}
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="remark=(case" suffix="ELSE remark end),"> <trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))"> <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
when a.Id=#{item.Id} then #{item.remark} when a.id=#{item.id} then #{item.remark}
</if> </if>
</foreach> </foreach>
</trim> </trim>
...@@ -156,10 +156,10 @@ ...@@ -156,10 +156,10 @@
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))"> <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.Id=#{item.Id} then #{item.createUserId} when a.id=#{item.id} then #{item.createUserId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.Id=#{item.Id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement} when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<trim prefix="createTime=(case" suffix="ELSE createTime end),"> <trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.Id=#{item.Id} then #{item.createTime} when a.id=#{item.id} then #{item.createTime}
</if> </if>
</foreach> </foreach>
</trim> </trim>
...@@ -175,10 +175,10 @@ ...@@ -175,10 +175,10 @@
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))"> <when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.Id=#{item.Id} then #{item.updateUserId} when a.id=#{item.id} then #{item.updateUserId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.Id=#{item.Id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement} when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
...@@ -186,36 +186,36 @@ ...@@ -186,36 +186,36 @@
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),"> <trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))"> <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.Id=#{item.Id} then #{item.updateTime} when a.id=#{item.id} then #{item.updateTime}
</if> </if>
</foreach> </foreach>
</trim> </trim>
</trim> </trim>
where Id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.Id} #{item.id}
</foreach> </foreach>
</update> </update>
<!-- 根据主健查询 --> <!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="CareConfigTimesEntity-Map"> <select id="getByKey" parameterType="paramDto" resultMap="CareConfigTimesEntity-Map">
select <include refid="_columns"/> select <include refid="_columns"/>
from mortals_xhx_care_config_times as a from mortals_xhx_care_config_times as a
where a.Id=#{condition.Id} where a.id=#{condition.id}
</select> </select>
<!-- 根据主健删除 --> <!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto"> <delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_care_config_times as a where a.Id=#{condition.Id} delete a.* from mortals_xhx_care_config_times as a where a.id=#{condition.id}
</delete> </delete>
<!-- 根据主健删除一批,针对单一主健有效 --> <!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys"> <delete id="deleteByKeys">
delete from mortals_xhx_care_config_times where Id in delete from mortals_xhx_care_config_times where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")"> <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</delete> </delete>
<!-- 根据主健列表删除一批,针对单一主健有效 --> <!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList"> <delete id="deleteByKeyList">
delete from mortals_xhx_care_config_times where Id in delete from mortals_xhx_care_config_times where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -223,9 +223,9 @@ ...@@ -223,9 +223,9 @@
<!-- 根据对象列表删除一批,针对单一主健有效 --> <!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList"> <delete id="deleteByEntityList">
delete from mortals_xhx_care_config_times where Id in delete from mortals_xhx_care_config_times where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.Id} #{item.id}
</foreach> </foreach>
</delete> </delete>
<!-- 根据paramDto删除一批 --> <!-- 根据paramDto删除一批 -->
...@@ -303,34 +303,34 @@ ...@@ -303,34 +303,34 @@
<bind name="conditionParamRef" value="${_conditionParam_}"/> <bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')"> <if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null"> <if test="conditionParamRef.id != null">
${_conditionType_} a.Id=#{${_conditionParam_}.id} ${_conditionType_} a.id=#{${_conditionParam_}.id}
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('Id')"> <if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.Id != null "> <if test="conditionParamRef.id != null ">
${_conditionType_} a.Id = #{${_conditionParam_}.Id} ${_conditionType_} a.id = #{${_conditionParam_}.id}
</if> </if>
<if test="conditionParamRef.Id == null"> <if test="conditionParamRef.id == null">
${_conditionType_} a.Id is null ${_conditionType_} a.id is null
</if> </if>
</if> </if>
<if test="conditionParamRef.containsKey('IdList') and conditionParamRef.IdList.size() > 0"> <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.Id in ${_conditionType_} a.id in
<foreach collection="conditionParamRef.IdList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('IdNotList') and conditionParamRef.IdNotList.size() > 0"> <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.Id not in ${_conditionType_} a.id not in
<foreach collection="conditionParamRef.IdNotList" open="(" close=")" index="index" item="item" separator=","> <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('IdStart') and conditionParamRef.IdStart != null"> <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.Id <![CDATA[ >= ]]> #{${_conditionParam_}.IdStart} ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if> </if>
<if test="conditionParamRef.containsKey('IdEnd') and conditionParamRef.IdEnd != null"> <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.Id <![CDATA[ <= ]]> #{${_conditionParam_}.IdEnd} ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if> </if>
<if test="conditionParamRef.containsKey('careCfgId')"> <if test="conditionParamRef.containsKey('careCfgId')">
...@@ -508,9 +508,9 @@ ...@@ -508,9 +508,9 @@
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"> <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by order by
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('Id')"> <if test="orderCol.containsKey('id')">
a.Id a.id
<if test='orderCol.Id != null and "DESC".equalsIgnoreCase(orderCol.Id)'>DESC</if> <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('careCfgId')"> <if test="orderCol.containsKey('careCfgId')">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment