Commit d28c245c authored by hanbing's avatar hanbing

[update] 快速特勤,校验分组名称不能重复

parent 5eb8f93d
......@@ -667,9 +667,18 @@ public class SpecialServiceServiceImpl implements SpecialServiceService {
@Override
@Transactional
public void updateGroup(GroupListVO groupListVO) {
// 校验分组名称不能重复
List<GroupListVO.GroupListElement> groupList = groupListVO.getGroupList();
Set<String> groupNameSet = new HashSet<>();
for (GroupListVO.GroupListElement groupListElement : groupList) {
String groupName = groupListElement.getGroupName();
if (!groupNameSet.add(groupName)) {
throw new RuntimeException("分组名称不能重复");
}
}
Integer specialServiceId = groupListVO.getSpecialServiceId();
List<GroupListVO.GroupListElement> groupList = groupListVO.getGroupList();
for (GroupListVO.GroupListElement groupListElement : groupList) {
String groupName = groupListElement.getGroupName();
if (!"未分组路口".equals(groupName)){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment