Commit fcf030ea authored by shenxin's avatar shenxin

添加事项清单导入

parent c58cbd11
...@@ -2,6 +2,7 @@ package com.mortals.xhx.modules.implementlist.listener; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.modules.implementlist.listener;
import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.excel.event.AnalysisEventListener;
import com.mortals.xhx.common.utils.SnowFlakeUtil;
import com.mortals.xhx.modules.implementlist.dao.RybMatterDao; import com.mortals.xhx.modules.implementlist.dao.RybMatterDao;
import com.mortals.xhx.modules.implementlist.model.RybMatterListEntry; import com.mortals.xhx.modules.implementlist.model.RybMatterListEntry;
import lombok.SneakyThrows; import lombok.SneakyThrows;
...@@ -38,6 +39,7 @@ public class RybMatterImportListener extends AnalysisEventListener<RybMatterList ...@@ -38,6 +39,7 @@ public class RybMatterImportListener extends AnalysisEventListener<RybMatterList
@SneakyThrows @SneakyThrows
@Override @Override
public void invoke(RybMatterListEntry rybMatterListEntry, AnalysisContext analysisContext) { public void invoke(RybMatterListEntry rybMatterListEntry, AnalysisContext analysisContext) {
rybMatterListEntry.setId(SnowFlakeUtil.get().nextId());
entityList.add(rybMatterListEntry); entityList.add(rybMatterListEntry);
//达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM //达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
if (entityList.size() >= BATCH_COUNT) { if (entityList.size() >= BATCH_COUNT) {
......
...@@ -65,9 +65,9 @@ public class RybApplyAndAcceptInformationTaskImpl implements ITaskExcuteService ...@@ -65,9 +65,9 @@ public class RybApplyAndAcceptInformationTaskImpl implements ITaskExcuteService
} }
private void applyAndAccept(List<InformationEntity> informationEntities) { private void applyAndAccept(List<InformationEntity> informationEntities) {
log.info("开始推送申请并受理数据"); log.info("开始推送申请并受理数据");
if(CollectionUtils.isEmpty(informationEntities)){ if(CollectionUtils.isEmpty(informationEntities)){
log.info("没有需要推送申请并受理数据"); log.info("没有需要推送申请并受理数据");
return; return;
} }
List<InformationEntity> entities = informationEntities.parallelStream().map(e -> { List<InformationEntity> entities = informationEntities.parallelStream().map(e -> {
......
...@@ -49,7 +49,7 @@ public class RybSubmitLinkDataInformationTaskImpl implements ITaskExcuteService ...@@ -49,7 +49,7 @@ public class RybSubmitLinkDataInformationTaskImpl implements ITaskExcuteService
} }
private void submitLinkData(List<InformationEntity> informationEntities) { private void submitLinkData(List<InformationEntity> informationEntities) {
log.info("开始推送申请并受理理数据"); log.info("开始推送办件环节数据");
if(CollectionUtils.isEmpty(informationEntities)){ if(CollectionUtils.isEmpty(informationEntities)){
log.info("没有需要推送办件环节数据"); log.info("没有需要推送办件环节数据");
return; return;
......
...@@ -142,8 +142,4 @@ public class InformationController extends BaseCRUDJsonController<InformationSer ...@@ -142,8 +142,4 @@ public class InformationController extends BaseCRUDJsonController<InformationSer
} }
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<select id="findRyb" resultType="com.mortals.xhx.modules.implementlist.model.RybMatterListEntry"> <select id="findRyb" resultType="com.mortals.xhx.modules.implementlist.model.RybMatterListEntry">
select select
id,
dept_code as deptCode, dept_code as deptCode,
dept_name as deptName, dept_name as deptName,
matter_name as matterName, matter_name as matterName,
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
<select id="insertRyb" parameterType="collection"> <select id="insertRyb" parameterType="collection">
insert into values insert into values
<foreach collection="collection" item="entry" index=","> <foreach collection="collection" item="entry" index=",">
(#{entry.deptCode},#{entry.deptName},#{entry.matterName},#{entry.matterCode},#{entry.taskId},#{entry.matterType}) (#{entry.id},#{entry.deptCode},#{entry.deptName},#{entry.matterName},#{entry.matterCode},#{entry.taskId},#{entry.matterType})
</foreach> </foreach>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<select id="findRyb" resultType="com.mortals.xhx.modules.implementlist.model.RybWorkEntry"> <select id="findRyb" resultType="com.mortals.xhx.modules.implementlist.model.RybWorkEntry">
select select
id,
dept_code as deptCode, dept_code as deptCode,
dept_name as deptName, dept_name as deptName,
receive_user_name as receiveUserName, receive_user_name as receiveUserName,
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<select id="insertRyb" parameterType="collection"> <select id="insertRyb" parameterType="collection">
insert into values insert into values
<foreach collection="collection" item="entry" index=","> <foreach collection="collection" item="entry" index=",">
(#{entry.deptCode},#{entry.deptName},#{entry.matterName},#{entry.receiveUserName},#{entry.receiveUserIdcard},#{entry.receiveUserPhone}) (#{entry.id},#{entry.deptCode},#{entry.deptName},#{entry.matterName},#{entry.receiveUserName},#{entry.receiveUserIdcard},#{entry.receiveUserPhone})
</foreach> </foreach>
</select> </select>
</mapper> </mapper>
\ 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