Commit 27aa8877 authored by 赵啸非's avatar 赵啸非

添加消息任务表

parent 7446a4a6
This diff is collapsed.
...@@ -9,7 +9,10 @@ import com.mortals.framework.common.Rest; ...@@ -9,7 +9,10 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
...@@ -126,7 +129,7 @@ public class MatterHtmlParseUtil { ...@@ -126,7 +129,7 @@ public class MatterHtmlParseUtil {
log.info("error href ,title:" + title); log.info("error href ,title:" + title);
} }
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl,params);
} }
elements = dom.selectXpath(matterListLiExp); elements = dom.selectXpath(matterListLiExp);
...@@ -171,7 +174,7 @@ public class MatterHtmlParseUtil { ...@@ -171,7 +174,7 @@ public class MatterHtmlParseUtil {
} }
} }
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl,params);
} }
break; break;
...@@ -187,13 +190,23 @@ public class MatterHtmlParseUtil { ...@@ -187,13 +190,23 @@ public class MatterHtmlParseUtil {
return Rest.ok(matterEntityList); return Rest.ok(matterEntityList);
} }
private static void buildMatter(List<MatterEntity> matterEntityList, String title, String href, String evaluationUrl, String netApplyUrl) { private static void buildMatter(List<MatterEntity> matterEntityList, String title, String href, String evaluationUrl, String netApplyUrl,Map<String, String> params) {
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8); UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8);
String itemCode = builder.getQuery().get("itemCode").toString(); String itemCode = builder.getQuery().get("itemCode").toString();
String taskType = builder.getQuery().get("taskType").toString(); String taskType = builder.getQuery().get("taskType").toString();
String deptCode = builder.getQuery().get("deptCode").toString(); String deptCode = builder.getQuery().get("deptCode").toString();
String areaCode = builder.getQuery().get("areaCode").toString(); String areaCode = builder.getQuery().get("areaCode").toString();
//todo 如果部门编码与初始编码不一致,切不在部门列表中,添加默认部门
String sourceDeptCode = params.getOrDefault("deptCode", "");
DeptService deptService = SpringUtils.getBean(DeptService.class);
DeptEntity cache = deptService.getCache(deptCode);
if(ObjectUtils.isEmpty(cache)){
//抓取事项的部门编码未找到 用初始的部门编码
deptCode=sourceDeptCode;
}
MatterEntity matterEntity = new MatterEntity(); MatterEntity matterEntity = new MatterEntity();
matterEntity.initAttrValue(); matterEntity.initAttrValue();
matterEntity.setTcode(itemCode); matterEntity.setTcode(itemCode);
......
...@@ -72,7 +72,7 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -72,7 +72,7 @@ public class SyncGovMatterDetailThread implements Runnable {
@Override @Override
public void run() { public void run() {
log.info("同步站点事项开始....."); log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context); deptService.syncDeptBySiteId(siteEntity, context);
//log.info("同步站点部门:" + JSON.toJSONString(deptRest)); //log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context); Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context);
//Rest<String> rest = Rest.ok(); //Rest<String> rest = Rest.ok();
......
This diff is collapsed.
...@@ -28,6 +28,7 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.port=%PORT% ...@@ -28,6 +28,7 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.port=%PORT%
set JVM_CONFIG=%JVM_CONFIG% -Djava.io.tmpdir=%TEMP_PATH% set JVM_CONFIG=%JVM_CONFIG% -Djava.io.tmpdir=%TEMP_PATH%
set JVM_CONFIG=%JVM_CONFIG% -Dbasedir=%BASEDIR% set JVM_CONFIG=%JVM_CONFIG% -Dbasedir=%BASEDIR%
set JVM_CONFIG=%JVM_CONFIG% -Dloader.path=file://%BASEDIR%/conf,file://%BASEDIR%/lib set JVM_CONFIG=%JVM_CONFIG% -Dloader.path=file://%BASEDIR%/conf,file://%BASEDIR%/lib
set JVM_CONFIG=%JVM_CONFIG% -Dfile.encoding=utf-8
set DEBUG_OPTS= set DEBUG_OPTS=
......
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