会员管理
This commit is contained in:
@@ -69,10 +69,10 @@ public class SysUnitMangeController {
|
||||
@RequiresPermissions("sys.manager.unit")
|
||||
public Object dataUpdate() {
|
||||
// 从系统数据库中查询已有的单位
|
||||
List<Sys_unit> sys_units = sysUnitService.query();
|
||||
// List<Sys_unit> sys_units = sysUnitService.query();
|
||||
// 把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()));
|
||||
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();
|
||||
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 -> {
|
||||
if (sysUnitService.count(Cnd.where("parentId", "=", v.getId())) > 0) {
|
||||
v.setHasChildren(true);
|
||||
@@ -212,7 +212,8 @@ public class SysUnitMangeController {
|
||||
private AsyncService asyncService;
|
||||
|
||||
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 -> {
|
||||
unit.setChild(child(unit.getId()));
|
||||
|
||||
@@ -622,6 +622,11 @@ public class Sys_user extends BaseModel implements Serializable {
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date leaveSchoolDate;
|
||||
|
||||
@Column
|
||||
@Comment("参加工作日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date workDate;
|
||||
|
||||
@Column
|
||||
@Comment("退休日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
|
||||
+11
-3
@@ -114,6 +114,7 @@ public class MemberChangeManageController {
|
||||
@Param(value = "changeType", required = false) String changeType,
|
||||
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
|
||||
@Param(value = "changed", required = false) Integer changed,
|
||||
@Param(value = "myUnionGroupUser", required = false) Integer myUnionGroupUser,
|
||||
@Param(value = "isMember", required = false) Integer isMember) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -155,9 +156,16 @@ public class MemberChangeManageController {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
} else if (ShiroUtil.hasRole("ghxzzz")) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||
seg.or("u.unionGroupId", "is", null);
|
||||
cnd.and(seg);
|
||||
if (myUnionGroupUser == null) {
|
||||
seg.or("u.unionGroupId", "in", ShiroUtil.getUnionGroupIds());
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -144,7 +144,12 @@ public class MemberInquireIntegrateController {
|
||||
}
|
||||
|
||||
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())) {
|
||||
@@ -242,7 +247,7 @@ public class MemberInquireIntegrateController {
|
||||
private String endDate;
|
||||
|
||||
@Excel(name = "参加工作日期", width = 20d)
|
||||
private String schoolTime;
|
||||
private String workDate;
|
||||
|
||||
@Excel(name = "录用职位", width = 20d)
|
||||
private String position;
|
||||
|
||||
Reference in New Issue
Block a user