南京理工-分级核对:工会组织管理页面仅给‘机关党委工会’的成员单位列表,三级单位管理员设置按钮不显示问题修复;
This commit is contained in:
@@ -50,6 +50,7 @@ public class LevelCheckService {
|
|||||||
"薪酬单位代码", "职工号", "姓名", "扣工会会费", "年月", "所在单位"
|
"薪酬单位代码", "职工号", "姓名", "扣工会会费", "年月", "所在单位"
|
||||||
);
|
);
|
||||||
private static final String UNIT_HEADER = "所在单位";
|
private static final String UNIT_HEADER = "所在单位";
|
||||||
|
private static final String THIRD_UNIT_MANAGER_UNION_CODE = "28";
|
||||||
private static final ZoneId TASK_ZONE_ID = ZoneId.of("Asia/Shanghai");
|
private static final ZoneId TASK_ZONE_ID = ZoneId.of("Asia/Shanghai");
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -745,11 +746,12 @@ public class LevelCheckService {
|
|||||||
String unionId = Strings.trim(config.getConfigValue());
|
String unionId = Strings.trim(config.getConfigValue());
|
||||||
Sys_union configuredUnion = dao.fetch(Sys_union.class, unionId);
|
Sys_union configuredUnion = dao.fetch(Sys_union.class, unionId);
|
||||||
if (configuredUnion != null
|
if (configuredUnion != null
|
||||||
&& "机关党委工会".equals(Strings.trim(configuredUnion.getUnionname()))) {
|
&& THIRD_UNIT_MANAGER_UNION_CODE.equals(Strings.trim(configuredUnion.getUnioncode()))) {
|
||||||
return unionId;
|
return unionId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Sys_union union = dao.fetch(Sys_union.class, Cnd.where("unionname", "=", "机关党委工会"));
|
Sys_union union = dao.fetch(Sys_union.class,
|
||||||
|
Cnd.where("unioncode", "=", THIRD_UNIT_MANAGER_UNION_CODE));
|
||||||
return union == null ? "" : union.getId();
|
return union == null ? "" : union.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import java.util.stream.Collectors;
|
|||||||
@Ok("json")
|
@Ok("json")
|
||||||
public class SysUnionMangeCon {
|
public class SysUnionMangeCon {
|
||||||
private static final Log log = Logs.get();
|
private static final Log log = Logs.get();
|
||||||
|
private static final String THIRD_UNIT_MANAGER_UNION_CODE = "28";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SysUnionService sysUnionService;
|
private SysUnionService sysUnionService;
|
||||||
@@ -452,7 +453,7 @@ public class SysUnionMangeCon {
|
|||||||
throw new SecurityException("仅校工会管理员可设置三级管理员");
|
throw new SecurityException("仅校工会管理员可设置三级管理员");
|
||||||
}
|
}
|
||||||
Sys_union union = sysUnionService.fetch(unionId);
|
Sys_union union = sysUnionService.fetch(unionId);
|
||||||
if (union == null || !"机关党委工会".equals(Strings.trim(union.getUnionname()))) {
|
if (union == null || !THIRD_UNIT_MANAGER_UNION_CODE.equals(Strings.trim(union.getUnioncode()))) {
|
||||||
throw new IllegalArgumentException("仅机关党委工会的成员单位可设置三级管理员");
|
throw new IllegalArgumentException("仅机关党委工会的成员单位可设置三级管理员");
|
||||||
}
|
}
|
||||||
Sys_unit unit = sysUnitService.fetch(unitId);
|
Sys_unit unit = sysUnitService.fetch(unitId);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ SET @sysadmin_role_id = (SELECT id FROM sys_role WHERE code = 'sysadmin' LIMIT 1
|
|||||||
SET @level_check_root_menu_id = 'a63f7fd56f594b29b2b5616d0d7f0101';
|
SET @level_check_root_menu_id = 'a63f7fd56f594b29b2b5616d0d7f0101';
|
||||||
SET @level_check_school_menu_id = 'a63f7fd56f594b29b2b5616d0d7f0102';
|
SET @level_check_school_menu_id = 'a63f7fd56f594b29b2b5616d0d7f0102';
|
||||||
SET @level_check_unit_menu_id = 'a63f7fd56f594b29b2b5616d0d7f0103';
|
SET @level_check_unit_menu_id = 'a63f7fd56f594b29b2b5616d0d7f0103';
|
||||||
|
SET @third_admin_union_id = (SELECT id FROM sys_union WHERE unioncode = '28' ORDER BY id LIMIT 1);
|
||||||
|
|
||||||
INSERT INTO sys_role
|
INSERT INTO sys_role
|
||||||
(id, name, code, aliasName, disabled, note, createdBy, createdAt, updatedBy, updatedAt, delFlag)
|
(id, name, code, aliasName, disabled, note, createdBy, createdAt, updatedBy, updatedAt, delFlag)
|
||||||
@@ -64,9 +65,13 @@ WHERE NOT EXISTS (
|
|||||||
|
|
||||||
INSERT INTO sys_config
|
INSERT INTO sys_config
|
||||||
(configKey, configValue, note, createdBy, createdAt, updatedBy, updatedAt, delFlag)
|
(configKey, configValue, note, createdBy, createdAt, updatedBy, updatedAt, delFlag)
|
||||||
SELECT 'LevelCheckThirdAdminUnionId', IFNULL((
|
SELECT 'LevelCheckThirdAdminUnionId', IFNULL(@third_admin_union_id, ''),
|
||||||
SELECT id FROM sys_union WHERE unionname = '机关党委工会' ORDER BY id LIMIT 1
|
'允许设置三级管理员的特殊工会ID', '', 0, '', 0, 0
|
||||||
), ''), '允许设置三级管理员的特殊工会ID', '', 0, '', 0, 0
|
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
SELECT 1 FROM sys_config WHERE configKey = 'LevelCheckThirdAdminUnionId'
|
SELECT 1 FROM sys_config WHERE configKey = 'LevelCheckThirdAdminUnionId'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
UPDATE sys_config
|
||||||
|
SET configValue = IFNULL(@third_admin_union_id, configValue),
|
||||||
|
note = '允许设置三级管理员的特殊工会ID'
|
||||||
|
WHERE configKey = 'LevelCheckThirdAdminUnionId';
|
||||||
|
|||||||
@@ -806,7 +806,7 @@ layout("/layouts/platform.html"){
|
|||||||
computed: {
|
computed: {
|
||||||
isSpecialUnion() {
|
isSpecialUnion() {
|
||||||
return this.sysadmin && this.node && this.node.data
|
return this.sysadmin && this.node && this.node.data
|
||||||
&& this.node.data.unionname === '机关党委工会'
|
&& String(this.node.data.unioncode) === '28'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user