包头bug修改

This commit is contained in:
guoshengxiong 2025-03-20 11:27:33 +08:00
parent 6a06bdb9e8
commit 19fb0f901e
6 changed files with 20 additions and 14 deletions

View File

@ -545,6 +545,7 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
}
workerInfo.setEnterDate(enterDate);
workerInfo.setPhoneNumber(detail.getPhone());
workerInfo.setProjectGroup(detail.getProjectGroup());
workerInfo.setPartyPosition(detail.getPartyPosition());
workerInfo.setNativePlace(detail.getNativePlace());
workerInfo.setNation(detail.getNation());

View File

@ -278,6 +278,7 @@ public class WorkerAdmissionServiceImpl extends ServiceImpl<WorkerAdmissionMappe
// detail.setWorkerAdmissionId();
detail.setRandom(random);
detail.setIsCertificateQualified(isCertificateQualified);
detail.setProjectGroup(FlowUtil.getLong(m, "field8213677523569"));
detail.setPhone(FlowUtil.getString(m, "field6776257685667"));
detail.setPartyPosition(FlowUtil.getString(m, "field7296732795454"));
detail.setNativePlace(FlowUtil.getString(m, "field4503632783321"));

View File

@ -217,7 +217,7 @@ public class SystemUserController {
Integer accountType = SecurityUtils.getUser().getAccountType();
if (accountType == 6) {
map.put("accountType", accountType);
map.put("createUserId", SecurityUtils.getUser().getUserId());
map.put("createUserIdAuth", SecurityUtils.getUser().getUserId());
}
}
return Result.success(systemUserService.getProjectChildernSystemUserList(map));
@ -524,9 +524,9 @@ public class SystemUserController {
return Result.ok();
}
private void setAncestor(SystemUser planRecord, List<SystemUser> all) {
all.stream().filter(o -> o.getCreateUserId().equals(planRecord.getId())).forEach(o -> {
o.setCreateUserAncestor(planRecord.getCreateUserAncestor() + "," + planRecord.getId());
private void setAncestor(SystemUser user, List<SystemUser> all) {
all.stream().filter(o -> o.getCreateUserId().equals(user.getUserId())).forEach(o -> {
o.setCreateUserAncestor(user.getCreateUserAncestor() + "," + user.getUserId());
systemUserService.updateById(o);
setAncestor(o, all);
});

View File

@ -184,8 +184,11 @@ public class SystemUser implements Serializable {
@TableField(exist = false)
private java.lang.String roleName;
/**
* 这个为了返回workerId
*/
@TableField(exist = false)
@Deprecated
private java.lang.Long id;
@TableField(exist = false)

View File

@ -77,10 +77,11 @@
and t.user_type=#{param.userType}
</if>
<if test="param.accountType == '6'.toString() and param.notI != '1'.toString()">
and (find_in_set(#{param.createUserId},t.create_user_ancestor) or t.user_id=#{param.createUserId})
and (find_in_set(#{param.createUserIdAuth},t.create_user_ancestor) or
t.user_id=#{param.createUserIdAuth})
</if>
<if test="param.accountType == '6'.toString() and param.notI == '1'.toString()">
and find_in_set(#{param.createUserId},t.create_user_ancestor)
and find_in_set(#{param.createUserIdAuth},t.create_user_ancestor)
</if>
<if test="param.isSupervisingRoleName == '1'.toString()">
and c.role_name = '监理'

View File

@ -1034,9 +1034,9 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
systemUser.setCreateUserAncestor("0");
} else {
SystemUser pOrg = baseMapper.selectOne(new LambdaQueryWrapper<SystemUser>()
.eq(SystemUser::getId, systemUser.getCreateUserId()));
.eq(SystemUser::getUserId, systemUser.getCreateUserId()));
if (pOrg != null) {
systemUser.setCreateUserAncestor(pOrg.getCreateUserAncestor() + "," + pOrg.getId());
systemUser.setCreateUserAncestor(pOrg.getCreateUserAncestor() + "," + pOrg.getUserId());
}
}
}
@ -1113,12 +1113,12 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
//项目子账号设置createUserAncestor
if (Objects.equals(systemUser.getAccountType(), 6)) {
if (!Objects.equals(oldUser.getCreateUserId(), systemUser.getCreateUserId())) {
if (Objects.equals(systemUser.getId(), systemUser.getCreateUserId())) {
if (Objects.equals(systemUser.getUserId(), systemUser.getCreateUserId())) {
throw new OpenAlertException("不能将用户移动到其自身");
}
List<SystemUser> children = baseMapper.getChildren(systemUser.getId());
List<SystemUser> children = baseMapper.getChildren(systemUser.getUserId());
for (SystemUser child : children) {
if (child.getId().equals(systemUser.getCreateUserId())) {
if (child.getUserId().equals(systemUser.getCreateUserId())) {
throw new OpenAlertException("不能将用户移动到其自身下级");
}
}
@ -1132,9 +1132,9 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
if (pOrg == null) {
throw new OpenAlertException("上级用户不存在");
}
systemUser.setCreateUserAncestor(pOrg.getCreateUserAncestor() + "," + pOrg.getId());
systemUser.setCreateUserAncestor(pOrg.getCreateUserAncestor() + "," + pOrg.getUserId());
}
baseMapper.updateAncestors(oldUser.getCreateUserAncestor(), systemUser.getCreateUserAncestor(), systemUser.getProjectSn(), systemUser.getId());
baseMapper.updateAncestors(oldUser.getCreateUserAncestor(), systemUser.getCreateUserAncestor(), systemUser.getProjectSn(), systemUser.getUserId());
} else {
systemUser.setCreateUserAncestor(null);
}