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

添加应用复选字段

parent 78105fee
......@@ -4,6 +4,7 @@ import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.ICacheService;
import com.mortals.xhx.common.code.DxTypeEnum;
import com.mortals.xhx.common.code.SourceEnum;
......@@ -70,14 +71,17 @@ public class SyncGovMatterDetailThread implements Runnable {
public void run() {
log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context);
log.info("同步站点部门:" + JSON.toJSONString(deptRest));
//log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context);
// Rest<String> rest = Rest.ok();
//Rest<String> rest = Rest.ok();
AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode());
log.info("同步事项列表:" + JSON.toJSONString(rest));
if (rest.getCode() == YesNoEnum.YES.getValue()) {
log.info("查询事项列表开始");
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue()));
log.info("查询事项列表结束");
List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream()
.filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false"))
.collect(Collectors.toList());
......
......@@ -452,6 +452,8 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
for (AreaEntity child : childList) {
SiteAreaVo siteAreaVo = new SiteAreaVo();
siteAreaVo.setAreaCode(child.getAreaCode());
siteAreaVo.setAreaName(child.getName());
String matchCode = child.getAreaCode().replaceAll("(0)+$", "");
SiteQuery siteQuery = new SiteQuery();
siteQuery.setAreaCode(matchCode + "%");
......@@ -460,12 +462,13 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
}
List<SiteEntity> siteEntities = this.find(siteQuery);
if (!ObjectUtils.isEmpty(siteEntities)) {
siteAreaVo.setAreaCode(child.getAreaCode());
siteAreaVo.setAreaName(child.getName());
siteAreaVo.setSiteList(siteEntities);
list.add(siteAreaVo);
//map.put(child.getName(), siteEntities);
}else{
//没有站点
siteAreaVo.setSiteList(Collections.EMPTY_LIST);
}
list.add(siteAreaVo);
}
return Rest.ok(list);
}
......
......@@ -54,7 +54,7 @@ POST {{baseUrl}}/base/area/genSubAreaByAreaName
Content-Type: application/json
{
"areaCode": "510700000000"
"areaCode": "511500000000"
}
......
......@@ -88,7 +88,7 @@ POST {{baseUrl}}/site/getAreaSitesBySite
Content-Type: application/json
{
"areaName":"雅安市"
"areaName":"宜宾市"
}
......@@ -97,7 +97,7 @@ POST {{baseUrl}}/site/syncGovMatterBySiteId
Content-Type: application/json
{
"id":2
"id":3
}
......
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