|
@@ -1020,6 +1020,10 @@ public class BuildingServiceImpl implements BuildingService {
|
|
|
if (nameResult > 0) {
|
|
|
throw new ServiceException(-900, "建筑名称已经存在");
|
|
|
}
|
|
|
+
|
|
|
+ if(building.getProvince() == null || building.getProvince() == 0){
|
|
|
+ throw new ServiceException(-900, "获取省市区编码错误,请重新输入");
|
|
|
+ }
|
|
|
building.setSiteId(loginUser.getSiteId());
|
|
|
building.setStatus(1);
|
|
|
int result = this.insert(building);
|
|
@@ -1074,6 +1078,9 @@ public class BuildingServiceImpl implements BuildingService {
|
|
|
if (nameResult > 0) {
|
|
|
throw new ServiceException(-900, "建筑名称已经存在");
|
|
|
}
|
|
|
+ if(building.getProvince() == null || building.getProvince() == 0){
|
|
|
+ throw new ServiceException(-900, "获取省市区编码错误,请重新输入");
|
|
|
+ }
|
|
|
int result = this.updateByPrimaryKeySelective(building);
|
|
|
//添加建筑
|
|
|
|