mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 补充站点更换运营商逻辑
This commit is contained in:
@@ -307,7 +307,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
// 创建一个新的站点对应部门
|
||||
SysDept dept = sysDeptService.createStationDept(Long.valueOf(merchantInfo.getDeptId()),
|
||||
pileStationInfo.getStationName(), pileStationInfo.getStationAdminName(), pileStationInfo.getStationTel());
|
||||
pileStationInfo.setDeptId(String.valueOf(dept.getDeptId()));
|
||||
Long newDeptId = dept.getDeptId();
|
||||
|
||||
// 修改账号归属部门
|
||||
SysUser user = new SysUser();
|
||||
@@ -315,13 +315,16 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
List<SysUser> userList = userService.selectUserList(user);
|
||||
if (CollectionUtils.isNotEmpty(userList)) {
|
||||
for (SysUser sysUser : userList) {
|
||||
sysUser.setDeptId(dept.getDeptId());
|
||||
sysUser.setDeptId(newDeptId);
|
||||
userService.updateUser(sysUser);
|
||||
}
|
||||
}
|
||||
|
||||
// 逻辑删除老的部门
|
||||
sysDeptService.deleteDeptById(Long.parseLong(pileStationInfo.getDeptId()));
|
||||
|
||||
// 设置新部门id
|
||||
pileStationInfo.setDeptId(String.valueOf(newDeptId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user