mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-06 15:08:05 +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()),
|
SysDept dept = sysDeptService.createStationDept(Long.valueOf(merchantInfo.getDeptId()),
|
||||||
pileStationInfo.getStationName(), pileStationInfo.getStationAdminName(), pileStationInfo.getStationTel());
|
pileStationInfo.getStationName(), pileStationInfo.getStationAdminName(), pileStationInfo.getStationTel());
|
||||||
pileStationInfo.setDeptId(String.valueOf(dept.getDeptId()));
|
Long newDeptId = dept.getDeptId();
|
||||||
|
|
||||||
// 修改账号归属部门
|
// 修改账号归属部门
|
||||||
SysUser user = new SysUser();
|
SysUser user = new SysUser();
|
||||||
@@ -315,13 +315,16 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
List<SysUser> userList = userService.selectUserList(user);
|
List<SysUser> userList = userService.selectUserList(user);
|
||||||
if (CollectionUtils.isNotEmpty(userList)) {
|
if (CollectionUtils.isNotEmpty(userList)) {
|
||||||
for (SysUser sysUser : userList) {
|
for (SysUser sysUser : userList) {
|
||||||
sysUser.setDeptId(dept.getDeptId());
|
sysUser.setDeptId(newDeptId);
|
||||||
userService.updateUser(sysUser);
|
userService.updateUser(sysUser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 逻辑删除老的部门
|
// 逻辑删除老的部门
|
||||||
sysDeptService.deleteDeptById(Long.parseLong(pileStationInfo.getDeptId()));
|
sysDeptService.deleteDeptById(Long.parseLong(pileStationInfo.getDeptId()));
|
||||||
|
|
||||||
|
// 设置新部门id
|
||||||
|
pileStationInfo.setDeptId(String.valueOf(newDeptId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user