Commit 6d018c9b authored by 赵啸非's avatar 赵啸非

添加已经部署脚本

parent 4ded6e0c
...@@ -8,6 +8,7 @@ import com.mortals.framework.service.ICRUDService; ...@@ -8,6 +8,7 @@ import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.area.model.AreaEntity; import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaTreeSelect; import com.mortals.xhx.module.area.model.AreaTreeSelect;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.site.dao.SiteDao;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteQuery; import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
...@@ -28,6 +29,9 @@ import java.util.Set; ...@@ -28,6 +29,9 @@ import java.util.Set;
*/ */
public interface SiteService extends ICRUDCacheService<SiteEntity, Long> { public interface SiteService extends ICRUDCacheService<SiteEntity, Long> {
SiteDao getDao();
/** /**
* 区域站点树 * 区域站点树
* *
......
...@@ -8,12 +8,14 @@ import com.mortals.framework.model.Context; ...@@ -8,12 +8,14 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.util.ThreadPool; import com.mortals.framework.util.ThreadPool;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserEntity; import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.common.code.AreaLevelEnum; import com.mortals.xhx.common.code.AreaLevelEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.keys.RedisCacheKeys; import com.mortals.xhx.common.keys.RedisCacheKeys;
import com.mortals.xhx.common.utils.SyncDeptThread; import com.mortals.xhx.common.utils.SyncDeptThread;
import com.mortals.xhx.common.utils.SyncGovMatterDetailThread; import com.mortals.xhx.common.utils.SyncGovMatterDetailThread;
...@@ -565,11 +567,12 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -565,11 +567,12 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
siteEntity.setAreaLevel(areaEntity.getAreaLevel()); siteEntity.setAreaLevel(areaEntity.getAreaLevel());
} }
SiteEntity save = null;
if (!ObjectUtils.isEmpty(siteEntity.getId())) { if (!ObjectUtils.isEmpty(siteEntity.getId())) {
save = this.service.update(siteEntity, getContext()); List<SiteEntity> siteEntities = this.service.find(new SiteQuery().areaCode(siteEntity.getAreaCode()));
siteEntity.setSiteCode(siteEntity.getAreaCode() + Constant.SITE_SPLIT_MARK + StringUtils.lpad(siteEntities.size() + 1, Constant.SITE_CODE_NUM));
this.service.getDao().update(siteEntity);
} else { } else {
save = this.service.save(siteEntity, getContext()); this.service.save(siteEntity, getContext());
} }
//todo 更新相关表中的站点名称,站点编码,站点ID //todo 更新相关表中的站点名称,站点编码,站点ID
...@@ -577,7 +580,7 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -577,7 +580,7 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_DATA, save); jsonObject.put(KEY_RESULT_DATA, siteEntity);
jsonObject.put(KEY_RESULT_MSG, "外部站点添加成功!"); jsonObject.put(KEY_RESULT_MSG, "外部站点添加成功!");
} catch (Exception e) { } catch (Exception e) {
log.error("外部站点添加", e); log.error("外部站点添加", e);
......
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