会员管理
This commit is contained in:
@@ -69,10 +69,10 @@ public class SysUnitMangeController {
|
|||||||
@RequiresPermissions("sys.manager.unit")
|
@RequiresPermissions("sys.manager.unit")
|
||||||
public Object dataUpdate() {
|
public Object dataUpdate() {
|
||||||
// 从系统数据库中查询已有的单位
|
// 从系统数据库中查询已有的单位
|
||||||
List<Sys_unit> sys_units = sysUnitService.query();
|
// List<Sys_unit> sys_units = sysUnitService.query();
|
||||||
// 把sys_units这个复杂的list集合转为简单的map 直接取key 提高效率
|
// 把sys_units这个复杂的list集合转为简单的map 直接取key 提高效率
|
||||||
// Map<String, String> map = sys_units.stream().collect(Collectors.toMap(sys_unit -> sys_unit.getId(), sys_unit -> sys_unit.getParentId()));
|
// Map<String, String> map = sys_units.stream().collect(Collectors.toMap(sys_unit -> sys_unit.getId(), sys_unit -> sys_unit.getParentId()));
|
||||||
List<String> list = sys_units.stream().map(v -> v.getId()).collect(Collectors.toList());
|
// List<String> list = sys_units.stream().map(v -> v.getId()).collect(Collectors.toList());
|
||||||
// 从源数据中心拉取所有的单位
|
// 从源数据中心拉取所有的单位
|
||||||
/* List<Sys_unit> units = SourceData.units();
|
/* List<Sys_unit> units = SourceData.units();
|
||||||
for (Sys_unit unit : units) {
|
for (Sys_unit unit : units) {
|
||||||
@@ -85,7 +85,7 @@ public class SysUnitMangeController {
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
List<Sys_unit> query = sysUnitService.query();
|
List<Sys_unit> query = sysUnitService.query(Cnd.where("unitlevel", "!=", 3));
|
||||||
query.forEach(v -> {
|
query.forEach(v -> {
|
||||||
if (sysUnitService.count(Cnd.where("parentId", "=", v.getId())) > 0) {
|
if (sysUnitService.count(Cnd.where("parentId", "=", v.getId())) > 0) {
|
||||||
v.setHasChildren(true);
|
v.setHasChildren(true);
|
||||||
@@ -212,7 +212,8 @@ public class SysUnitMangeController {
|
|||||||
private AsyncService asyncService;
|
private AsyncService asyncService;
|
||||||
|
|
||||||
private List<Sys_unit> child(String parentId) {
|
private List<Sys_unit> child(String parentId) {
|
||||||
List<Sys_unit> units = sysUnitService.query(Cnd.where("parentId", "=", parentId).asc("location"));
|
List<Sys_unit> units = sysUnitService.query(Cnd.where("parentId", "=", parentId)
|
||||||
|
.and("unitlevel", "!=", 3).asc("location"));
|
||||||
|
|
||||||
units.forEach(unit -> {
|
units.forEach(unit -> {
|
||||||
unit.setChild(child(unit.getId()));
|
unit.setChild(child(unit.getId()));
|
||||||
|
|||||||
@@ -622,6 +622,11 @@ public class Sys_user extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.DATE)
|
@ColDefine(type = ColType.DATE)
|
||||||
private Date leaveSchoolDate;
|
private Date leaveSchoolDate;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("参加工作日期")
|
||||||
|
@ColDefine(type = ColType.DATE)
|
||||||
|
private Date workDate;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("退休日期")
|
@Comment("退休日期")
|
||||||
@ColDefine(type = ColType.DATE)
|
@ColDefine(type = ColType.DATE)
|
||||||
|
|||||||
+11
-3
@@ -114,6 +114,7 @@ public class MemberChangeManageController {
|
|||||||
@Param(value = "changeType", required = false) String changeType,
|
@Param(value = "changeType", required = false) String changeType,
|
||||||
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
||||||
@Param(value = "changed", required = false) Integer changed,
|
@Param(value = "changed", required = false) Integer changed,
|
||||||
|
@Param(value = "myUnionGroupUser", required = false) Integer myUnionGroupUser,
|
||||||
@Param(value = "isMember", required = false) Integer isMember) {
|
@Param(value = "isMember", required = false) Integer isMember) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -155,9 +156,16 @@ public class MemberChangeManageController {
|
|||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
if (myUnionGroupUser == null) {
|
||||||
seg.or("u.unionGroupId", "is", null);
|
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
cnd.and(seg);
|
seg.or("u.unionGroupId", "is", null);
|
||||||
|
cnd.and(seg);
|
||||||
|
} else if (myUnionGroupUser == 1) {
|
||||||
|
cnd.and("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
|
} else {
|
||||||
|
seg.or("u.unionGroupId", "is", null);
|
||||||
|
cnd.and(seg);
|
||||||
|
}
|
||||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -144,7 +144,12 @@ public class MemberInquireIntegrateController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) {
|
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H03")) {
|
||||||
cnd.and("unionid", "=", Vi.getUnionId());
|
if (ShiroUtil.hasAnyRoles("H04,gh01")) {
|
||||||
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
|
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||||
|
cnd.and("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||||
|
// cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isBlank(pageForm.getPageOrderName()) && StrUtil.isBlank(pageForm.getPageOrderBy())) {
|
if (StrUtil.isBlank(pageForm.getPageOrderName()) && StrUtil.isBlank(pageForm.getPageOrderBy())) {
|
||||||
@@ -242,7 +247,7 @@ public class MemberInquireIntegrateController {
|
|||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
@Excel(name = "参加工作日期", width = 20d)
|
@Excel(name = "参加工作日期", width = 20d)
|
||||||
private String schoolTime;
|
private String workDate;
|
||||||
|
|
||||||
@Excel(name = "录用职位", width = 20d)
|
@Excel(name = "录用职位", width = 20d)
|
||||||
private String position;
|
private String position;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
components: {
|
components: {
|
||||||
'user-change-history': httpVueLoader('/components/userChangeHistory/UserChangeHistory.vue?v=' + new Date().getTime()),
|
'user-change-history': httpVueLoader('/components/userChangeHistory/userChangeHistory.vue?v=' + new Date().getTime()),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
records: {type: Array, default: []},
|
records: {type: Array, default: []},
|
||||||
|
|||||||
@@ -204,12 +204,12 @@
|
|||||||
placeholder="更新时间"
|
placeholder="更新时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="schoolTime" label="参加工作日期">
|
<el-form-item prop="workDate" label="参加工作日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
v-model="formData.schoolTime"
|
v-model="formData.workDate"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择参加工作日期"
|
placeholder="选择参加工作日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
|
|||||||
@@ -158,10 +158,17 @@ layout("/layouts/platform.html"){
|
|||||||
<!-- <span class="text-danger">(温馨提醒:异动类型为新增的教职工,需要新入职变更操作后才能成为工会会员!)</span>-->
|
<!-- <span class="text-danger">(温馨提醒:异动类型为新增的教职工,需要新入职变更操作后才能成为工会会员!)</span>-->
|
||||||
</template>
|
</template>
|
||||||
<template #func>
|
<template #func>
|
||||||
|
<el-radio-group v-model="pageForm.myUnionGroupUser" @change="doSearch" class="mr5"
|
||||||
|
v-if="isThreeUnit" size="small">
|
||||||
|
<el-radio-button label="">全部</el-radio-button>
|
||||||
|
<el-radio-button :label="1">本小组会员</el-radio-button>
|
||||||
|
<el-radio-button :label="0">非本小组会员</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
<span class="text-danger">人员信息有无变化:</span>
|
<span class="text-danger">人员信息有无变化:</span>
|
||||||
<el-select v-model="pageForm.isMember" @change="doSearch()"
|
<el-select v-model="pageForm.isMember" @change="doSearch()"
|
||||||
:clearable="false" size="small"
|
:clearable="false" size="small"
|
||||||
style="width: 200px;margin-right: 5px">
|
style="width: 130px;margin-right: 5px">
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label="全部" value=""></el-option>
|
||||||
<el-option label="是会员" value="1"></el-option>
|
<el-option label="是会员" value="1"></el-option>
|
||||||
<el-option label="不是会员" value="0"></el-option>
|
<el-option label="不是会员" value="0"></el-option>
|
||||||
@@ -169,11 +176,11 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-radio-group v-model="pageForm.changed" @change="doSearch" class="mr5"
|
<el-radio-group v-model="pageForm.changed" @change="doSearch" class="mr5"
|
||||||
size="small">
|
size="small">
|
||||||
<el-radio-button label="">全部({{numData.userSumNum || 0}})
|
<el-radio-button label="">全部
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button :label="1">有变化({{numData.changeNum || 0}})
|
<el-radio-button :label="1">有变化
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button :label="0">无变化({{numData.notChangeNum || 0}})
|
<el-radio-button :label="0">无变化
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
@@ -588,6 +595,7 @@ layout("/layouts/platform.html"){
|
|||||||
formData: {},
|
formData: {},
|
||||||
pageForm: {
|
pageForm: {
|
||||||
searchName: "u.username",
|
searchName: "u.username",
|
||||||
|
myUnionGroupUser: '',
|
||||||
changed: '',
|
changed: '',
|
||||||
isMember: '1',
|
isMember: '1',
|
||||||
changeTypes: [],
|
changeTypes: [],
|
||||||
@@ -606,8 +614,8 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'preparedBy', label: '人员性质', sortable: true},
|
{prop: 'preparedBy', label: '人员性质', sortable: true},
|
||||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||||
// {prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||||
// {prop: 'campusName', label: '所属校区', sortable: true},
|
// {prop: 'campusName', label: '所属校区', sortable: true},
|
||||||
],
|
],
|
||||||
campusOptions: [],
|
campusOptions: [],
|
||||||
@@ -863,12 +871,12 @@ layout("/layouts/platform.html"){
|
|||||||
return changeType
|
return changeType
|
||||||
},
|
},
|
||||||
async getNumData() {
|
async getNumData() {
|
||||||
const resp = await $.post(loc() + '/getButtonNum', this.pageForm)
|
// const resp = await $.post(loc() + '/getButtonNum', this.pageForm)
|
||||||
if (resp.code === 0) {
|
// if (resp.code === 0) {
|
||||||
this.numData = resp.data
|
// this.numData = resp.data
|
||||||
} else {
|
// } else {
|
||||||
this.notifyWarning(resp.msg)
|
// this.notifyWarning(resp.msg)
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
getChangeTypes(changeTypes) {
|
getChangeTypes(changeTypes) {
|
||||||
if (changeTypes) {
|
if (changeTypes) {
|
||||||
@@ -902,8 +910,11 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
// this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||||
|
this.isThreeUnit = '${@shiro.getPrincipalProperty("union").getUnionname()}'.includes('机关') && "${@shiro.hasRole('ghxzzz')}"
|
||||||
|
console.log(this.isThreeUnit)
|
||||||
if (this.isThreeUnit) {
|
if (this.isThreeUnit) {
|
||||||
|
this.pageForm.myUnionGroupUser = 1
|
||||||
this.tableColumns.forEach(v => {
|
this.tableColumns.forEach(v => {
|
||||||
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
||||||
v.checked = 1
|
v.checked = 1
|
||||||
|
|||||||
@@ -286,9 +286,9 @@ layout("/layouts/platform.html"){
|
|||||||
{ prop: 'mobile', label: '联系电话' },
|
{ prop: 'mobile', label: '联系电话' },
|
||||||
{ prop: 'personType', label: '人员类型', sortable: true },
|
{ prop: 'personType', label: '人员类型', sortable: true },
|
||||||
{ prop: 'userState', label: '在职状态', sortable: true },
|
{ prop: 'userState', label: '在职状态', sortable: true },
|
||||||
{ prop: 'personnelRelationUnionName', label: '人事关系工会', sortable: true, width: 150 },
|
{ prop: 'personnelRelationUnionName', label: '人事关系工会', sortable: true, width: 180 },
|
||||||
{ prop: 'personnelRelationUnitName', label: '人事关系单位', sortable: true },
|
{ prop: 'personnelRelationUnitName', label: '人事关系单位', sortable: true },
|
||||||
{ prop: 'unionRelationUnionName', label: '工会关系工会', sortable: true, width: 150 },
|
{ prop: 'unionRelationUnionName', label: '工会关系工会', sortable: true, width: 180 },
|
||||||
{ prop: 'distSpecialStaffType', label: '特别人员类型', sortable: true },
|
{ prop: 'distSpecialStaffType', label: '特别人员类型', sortable: true },
|
||||||
// { prop: 'specialStaffRemark', label: '多单位人员备注', sortable: true, checked: 0 }
|
// { prop: 'specialStaffRemark', label: '多单位人员备注', sortable: true, checked: 0 }
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user