Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/V1.3.3
wanjing 1 year ago
parent
commit
ffd85f7e29
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java

+ 8
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java View File

@@ -54,8 +54,9 @@ public class AddDeptService {
*/
public JsonResult add(AddDeptRequest addDeptRequest) {
log.info("进入添加部门业务接口");
String userId = CurrentUserUtil.getUserId();
String tenantId = CurrentUserUtil.getTenantId();
User user = CurrentUserUtil.getUserInfo();
String userId = user.getId();
String tenantId = user.getTenantId();
JsonResult result = this.check(tenantId, addDeptRequest);
if (0 != result.getCode()) {
log.info("添加部门业务接口:校验失败:{}", result.getMsg());
@@ -79,7 +80,7 @@ public class AddDeptService {
this.updateSuperAdminUser(userId, tenantId, dept);

// 新增公路/路段与部门数据
addRoadAndSectionToDept(tenantId, dept.getId(), addDeptRequest.getRoadSectionDtoList());
this.addRoadAndSectionToDept(tenantId, dept.getId(), addDeptRequest.getRoadSectionDtoList());

log.info("添加部门业务接口:添加部门成功:{}");
return JsonResult.success(dept);
@@ -156,6 +157,10 @@ public class AddDeptService {
* @return 结果
*/
private void addRoadAndSectionToDept(String tenantId, String deptId, List<RoadSectionDto> roadSectionDtoList) {
if (CollectionUtil.isNotEmpty(roadSectionDtoList)) {
log.info("新增部门公路/路段数据为空");
return;
}
List<RoadInformation> roadInformationList = new ArrayList<>();
List<Section> sectionList = new ArrayList<>();
RoadInformation road;

Loading…
Cancel
Save