Commit a427c9ed authored by 赵啸非's avatar 赵啸非

添加已经部署脚本

parent 34b5c84e
...@@ -545,13 +545,18 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -545,13 +545,18 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
if (ObjectUtils.isEmpty(areaCode)) { if (ObjectUtils.isEmpty(areaCode)) {
throw new AppException("区域编码不能为空!"); throw new AppException("区域编码不能为空!");
} }
SiteEntity one = this.service.selectOne(new SiteQuery().areaCode(areaCode).siteName(siteName), getContext()); SiteEntity one = this.service.selectOne(new SiteQuery().areaCode(areaCode).siteName(siteName), getContext());
if(!ObjectUtils.isEmpty(one)) throw new AppException("当前区域下站点名称已存在!"); if (!ObjectUtils.isEmpty(one)) throw new AppException("当前区域下站点名称已存在!");
AreaEntity areaEntity = areaService.selectOne(new AreaQuery().areaCode(areaCode), getContext()); AreaEntity areaEntity = areaService.selectOne(new AreaQuery().areaCode(areaCode), getContext());
siteEntity.initAttrValue(); siteEntity.initAttrValue();
//查询是否有站点了,如果有站点,这强制更新为站点 id=1的数据
SiteEntity site = this.service.get(1L);
if (!ObjectUtils.isEmpty(site)) {
siteEntity.setId(site.getId());
}
siteEntity.setAreaCode(areaCode); siteEntity.setAreaCode(areaCode);
siteEntity.setSiteName(siteName); siteEntity.setSiteName(siteName);
if (!ObjectUtils.isEmpty(areaEntity)) { if (!ObjectUtils.isEmpty(areaEntity)) {
...@@ -562,7 +567,7 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -562,7 +567,7 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
SiteEntity save = this.service.save(siteEntity, getContext()); SiteEntity save = this.service.save(siteEntity, getContext());
//todo 更新相关表中的站点名称,站点编码,站点ID //todo 更新相关表中的站点名称,站点编码,站点ID
this.service.updateSiteInfo(siteEntity,getContext()); this.service.updateSiteInfo(siteEntity, getContext());
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
...@@ -577,6 +582,4 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -577,6 +582,4 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
} }
} }
\ No newline at end of file
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