ソースを参照

1、添加部门,去掉航道航段为必填;2、修改部门部门,去掉航道航段为必填;

tags/V1.3.3
wanjing 1年前
コミット
d5d6283786
2個のファイルの変更20行の追加24行の削除
  1. +11
    -13
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java
  2. +9
    -11
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/update/UpdateDeptService.java

+ 11
- 13
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/add/AddDeptService.java ファイルの表示

@@ -1,5 +1,6 @@
package com.tuoheng.admin.service.dept.add;

import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.dto.RoadSectionDto;
@@ -133,19 +134,16 @@ public class AddDeptService {
}
}

// 新增部门,公路和路段信息不能为空
// if (CollectionUtils.isEmpty(addDeptRequest.getRoadSectionDtoList())) {
// return JsonResult.error(AddDeptCodeEnum.ROAD_IS_NULL.getCode(), AddDeptCodeEnum.ROAD_IS_NULL.getMsg());
// }

List<Section> sectionList;
List<RoadSectionDto> roadSectionDtoList = addDeptRequest.getRoadSectionDtoList();
for (RoadSectionDto roadSectionDto : roadSectionDtoList) {
sectionList = roadSectionDto.getSectionList();
if (CollectionUtils.isEmpty(sectionList)) {
return JsonResult.error(AddDeptCodeEnum.SECTION_IS_NULL.getCode(), AddDeptCodeEnum.SECTION_IS_NULL.getMsg());
}
}
if (CollectionUtil.isNotEmpty(addDeptRequest.getRoadSectionDtoList())) {
List<Section> sectionList;
List<RoadSectionDto> roadSectionDtoList = addDeptRequest.getRoadSectionDtoList();
for (RoadSectionDto roadSectionDto : roadSectionDtoList) {
sectionList = roadSectionDto.getSectionList();
if (CollectionUtils.isEmpty(sectionList)) {
return JsonResult.error(AddDeptCodeEnum.SECTION_IS_NULL.getCode(), AddDeptCodeEnum.SECTION_IS_NULL.getMsg());
}
}
}
return JsonResult.success();
}


+ 9
- 11
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/update/UpdateDeptService.java ファイルの表示

@@ -138,19 +138,17 @@ public class UpdateDeptService {
}
}

// 修改部门,公路和路段信息不能为空
// if (CollectionUtil.isEmpty(newEditDeptRequest.getRoadSectionDtoList())) {
// return JsonResult.error(EditDeptCodeEnum.ROAD_IS_NULL.getCode(), EditDeptCodeEnum.ROAD_IS_NULL.getMsg());
// }

List<Section> sectionList;
List<RoadSectionDto> roadSectionDtoList = newEditDeptRequest.getRoadSectionDtoList();
for (RoadSectionDto roadSectionDto : roadSectionDtoList) {
sectionList = roadSectionDto.getSectionList();
if (CollectionUtil.isEmpty(sectionList)) {
return JsonResult.error(EditDeptCodeEnum.SECTION_IS_NULL.getCode(), EditDeptCodeEnum.SECTION_IS_NULL.getMsg());
if (CollectionUtil.isNotEmpty(newEditDeptRequest.getRoadSectionDtoList())) {
List<Section> sectionList;
List<RoadSectionDto> roadSectionDtoList = newEditDeptRequest.getRoadSectionDtoList();
for (RoadSectionDto roadSectionDto : roadSectionDtoList) {
sectionList = roadSectionDto.getSectionList();
if (CollectionUtil.isEmpty(sectionList)) {
return JsonResult.error(EditDeptCodeEnum.SECTION_IS_NULL.getCode(), EditDeptCodeEnum.SECTION_IS_NULL.getMsg());
}
}
}

return JsonResult.success();
}


読み込み中…
キャンセル
保存