bug 5801
This commit is contained in:
parent
7f7068e782
commit
23172bb8ba
|
|
@ -83,7 +83,7 @@ public class AllocCanteenController extends BaseController {
|
||||||
try {
|
try {
|
||||||
return toAjax(allocCanteenService.insertAllocCanteen(allocCanteen));
|
return toAjax(allocCanteenService.insertAllocCanteen(allocCanteen));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error("系统错误, " + e.getMessage());
|
return error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ public class AllocCanteenController extends BaseController {
|
||||||
try {
|
try {
|
||||||
return toAjax(allocCanteenService.updateAllocCanteen(allocCanteen));
|
return toAjax(allocCanteenService.updateAllocCanteen(allocCanteen));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error("系统错误, " + e.getMessage());
|
return error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ public class AllocStallController extends BaseController {
|
||||||
try {
|
try {
|
||||||
return toAjax(allocStallService.insertAllocStall(allocStall));
|
return toAjax(allocStallService.insertAllocStall(allocStall));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error("系统错误, " + e.getMessage());
|
return error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ public class AllocStallController extends BaseController {
|
||||||
try {
|
try {
|
||||||
return toAjax(allocStallService.updateAllocStall(allocStall));
|
return toAjax(allocStallService.updateAllocStall(allocStall));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error("系统错误, " + e.getMessage());
|
return error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,11 @@ public class AllocCanteenServiceImpl implements IAllocCanteenService {
|
||||||
try {
|
try {
|
||||||
AllocCanteen checkResult = allocCanteenMapper.selectAllocCanteenByCanteenName(allocCanteen);
|
AllocCanteen checkResult = allocCanteenMapper.selectAllocCanteenByCanteenName(allocCanteen);
|
||||||
if (Objects.nonNull(checkResult)) {
|
if (Objects.nonNull(checkResult)) {
|
||||||
throw new ServiceException("食堂名称已存在");
|
throw new ServiceException("该区域食堂名称已存在");
|
||||||
}
|
}
|
||||||
return allocCanteenMapper.insertAllocCanteen(allocCanteen);
|
return allocCanteenMapper.insertAllocCanteen(allocCanteen);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("新增食堂异常," + e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,11 +90,11 @@ public class AllocCanteenServiceImpl implements IAllocCanteenService {
|
||||||
.filter(item -> item.getAreaId().equals(allocCanteen.getAreaId()))
|
.filter(item -> item.getAreaId().equals(allocCanteen.getAreaId()))
|
||||||
.map(AllocCanteen::getCanteenName).collect(Collectors.toList());
|
.map(AllocCanteen::getCanteenName).collect(Collectors.toList());
|
||||||
if (otherCanteenNameList.contains(allocCanteen.getCanteenName())) {
|
if (otherCanteenNameList.contains(allocCanteen.getCanteenName())) {
|
||||||
throw new ServiceException("食堂名称已存在");
|
throw new ServiceException("该区域食堂名称已存在");
|
||||||
}
|
}
|
||||||
return allocCanteenMapper.updateAllocCanteen(allocCanteen);
|
return allocCanteenMapper.updateAllocCanteen(allocCanteen);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("更新食堂异常," + e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
|
||||||
try {
|
try {
|
||||||
AllocStall checkResult = allocStallMapper.selectAllocStallByStallName(allocStall);
|
AllocStall checkResult = allocStallMapper.selectAllocStallByStallName(allocStall);
|
||||||
if (Objects.nonNull(checkResult)) {
|
if (Objects.nonNull(checkResult)) {
|
||||||
throw new ServiceException("档口名称已存在");
|
throw new ServiceException("该食堂档口名称已存在");
|
||||||
}
|
}
|
||||||
int stallCount = allocStallMapper.insertAllocStall(allocStall);
|
int stallCount = allocStallMapper.insertAllocStall(allocStall);
|
||||||
if (stallCount > 0 && !CollectionUtils.isEmpty(allocStall.getAllocStallMealtimeList())) {
|
if (stallCount > 0 && !CollectionUtils.isEmpty(allocStall.getAllocStallMealtimeList())) {
|
||||||
|
|
@ -74,7 +74,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
|
||||||
}
|
}
|
||||||
return stallCount;
|
return stallCount;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("新增档口异常," + e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,7 +93,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
|
||||||
.filter(item -> item.getCanteenId().equals(allocStall.getCanteenId()))
|
.filter(item -> item.getCanteenId().equals(allocStall.getCanteenId()))
|
||||||
.map(AllocStall::getStallName).collect(Collectors.toList());
|
.map(AllocStall::getStallName).collect(Collectors.toList());
|
||||||
if (otherStallNameList.contains(allocStall.getStallName())) {
|
if (otherStallNameList.contains(allocStall.getStallName())) {
|
||||||
throw new ServiceException("档口名称已存在");
|
throw new ServiceException("该食堂档口名称已存在");
|
||||||
}
|
}
|
||||||
int stallCount = allocStallMapper.updateAllocStall(allocStall);
|
int stallCount = allocStallMapper.updateAllocStall(allocStall);
|
||||||
if (stallCount > 0 && !CollectionUtils.isEmpty(allocStall.getAllocStallMealtimeList())) {
|
if (stallCount > 0 && !CollectionUtils.isEmpty(allocStall.getAllocStallMealtimeList())) {
|
||||||
|
|
@ -102,7 +102,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
|
||||||
}
|
}
|
||||||
return stallCount;
|
return stallCount;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("更新档口异常," + e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue