pref#ncu_优化民主管理、更新时冲掉单位问题、工会干部设置时展示多条成员数据等其他bug
This commit is contained in:
@@ -57,7 +57,7 @@ public class SysDataUserPullController {
|
||||
}
|
||||
cnd.desc(Sys_user_source::getPullTime);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserPullService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
Pagination pagination = sysUserPullService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@ public class SysUnionController {
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
$constructionSql
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.where("role.`code`", "in", branchUnionRoleCodes);
|
||||
@@ -302,7 +303,9 @@ public class SysUnionController {
|
||||
case "roleName" -> cnd.where().andLike("role.`name`", pageForm.getSearchKeyword());
|
||||
}
|
||||
}
|
||||
cnd.and(new Static("1=1 order by field(role.code," + branchUnionRoleCodes.stream().map(code -> "'" + code + "'").collect(Collectors.joining(",")) + ")"));
|
||||
sql.setVar("constructionSql",
|
||||
new Static(" group by info.id order by field(role.code," + branchUnionRoleCodes.stream().map(code -> "'" + code + "'").collect(Collectors.joining(",")) + ")")
|
||||
);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = sysUserService.listMap(sql);
|
||||
return Result.success(list);
|
||||
@@ -453,7 +456,7 @@ public class SysUnionController {
|
||||
@ApiOperation("按关键字查询分工会下的人员")
|
||||
@Ok("json:{ignoreNull:true}")
|
||||
@SaCheckPermission("sys.manager.union")
|
||||
public Result listUserSelect(@Valid String unionId, @Valid String keyWord) {
|
||||
public Result listUnion(@Valid String unionId, @Valid String keyWord) {
|
||||
Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(View_user::getUnionId, "=", unionId);
|
||||
|
||||
@@ -47,6 +47,7 @@ public class Sys_user extends BaseModel implements Serializable {
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@DataCenterColumn(name = "性别", key = "xbm")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sex;
|
||||
|
||||
|
||||
@@ -108,6 +108,6 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
|
||||
}
|
||||
log.info("本次拉取单位数据,新增{}条,更新{}条", insertList.size(), updateList.size());
|
||||
dao().insert(insertList);
|
||||
dao().update(updateList);
|
||||
dao().updateIgnoreNull(updateList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,15 +189,18 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
Sys_user u = new Sys_user();
|
||||
BeanUtils.copyProperties(source, u);
|
||||
|
||||
// 先不处理会员
|
||||
u.setMember(null);
|
||||
|
||||
if (user == null) {
|
||||
// 新增用户,初始化数据
|
||||
String salt = R.UU32();
|
||||
u.setSalt(salt);
|
||||
u.setPassword(PwdUtil.getPassword(PwdUtil.generate(12), salt));
|
||||
|
||||
if (u.getMember()) {
|
||||
addMemberUserIds.add(u.getId());
|
||||
}
|
||||
// if (u.getMember()) {
|
||||
// addMemberUserIds.add(u.getId());
|
||||
// }
|
||||
needInitUserList.add(u);
|
||||
} else {
|
||||
// 修改现有用户
|
||||
@@ -206,11 +209,11 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
// 更新会员状态
|
||||
boolean currentIsMember = user.getMember() != null && user.getMember();
|
||||
|
||||
if (!currentIsMember) {
|
||||
addMemberUserIds.add(user.getId());
|
||||
} else{
|
||||
removeMemberUserIds.add(user.getId());
|
||||
}
|
||||
// if (!currentIsMember) {
|
||||
// addMemberUserIds.add(user.getId());
|
||||
// } else{
|
||||
// removeMemberUserIds.add(user.getId());
|
||||
// }
|
||||
|
||||
needDoUpdateList.add(u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user