|
|
@@ -121,13 +121,13 @@ public class RoadInformationServiceImpl extends BaseServiceImpl<RoadInformationM |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(entity.getId())) { |
|
|
|
//新增 |
|
|
|
if (this.getInformationListByCode(entity)) return JsonResult.error("公路代号存在不能重复"); |
|
|
|
if (this.getInformationListByCode(entity)) return JsonResult.error("公路已存在"); |
|
|
|
entity.setCreateUser(userId); |
|
|
|
entity.setCreateTime(DateUtils.now()); |
|
|
|
entity.setTenantId(CurrentUserUtil.getTenantId()); |
|
|
|
} else { |
|
|
|
//更新 |
|
|
|
if (this.getInformationListByCode(entity)) return JsonResult.error("公路代号存在不能重复"); |
|
|
|
if (this.getInformationListByCode(entity)) return JsonResult.error("公路已存在"); |
|
|
|
entity.setUpdateUser(userId); |
|
|
|
entity.setUpdateTime(DateUtils.now()); |
|
|
|
entity.setTenantId(CurrentUserUtil.getTenantId()); |