包头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.setEnterDate(enterDate);
workerInfo.setPhoneNumber(detail.getPhone()); workerInfo.setPhoneNumber(detail.getPhone());
workerInfo.setProjectGroup(detail.getProjectGroup());
workerInfo.setPartyPosition(detail.getPartyPosition()); workerInfo.setPartyPosition(detail.getPartyPosition());
workerInfo.setNativePlace(detail.getNativePlace()); workerInfo.setNativePlace(detail.getNativePlace());
workerInfo.setNation(detail.getNation()); workerInfo.setNation(detail.getNation());

View File

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

View File

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

View File

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

View File

@ -77,10 +77,11 @@
and t.user_type=#{param.userType} and t.user_type=#{param.userType}
</if> </if>
<if test="param.accountType == '6'.toString() and param.notI != '1'.toString()"> <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>
<if test="param.accountType == '6'.toString() and param.notI == '1'.toString()"> <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>
<if test="param.isSupervisingRoleName == '1'.toString()"> <if test="param.isSupervisingRoleName == '1'.toString()">
and c.role_name = '监理' and c.role_name = '监理'

View File

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