From 16bd05b9518086e6d53c561ecdfd47c1e5bfe4f6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 12 Nov 2020 16:27:10 +0800 Subject: [PATCH 01/13] =?UTF-8?q?extstaffinfo=20=20=20=20=20=20=E8=BD=AC?= =?UTF-8?q?=E8=AE=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java | 2 ++ .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java index 16ac17dca2..399062ece8 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -73,6 +74,7 @@ public class IssueShiftedFromTopicFormDTO implements Serializable { /** * 议题创建时间 * */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createdTime; /** diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 17f0ae9f5e..7cf683e111 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -594,14 +594,15 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl govOrgResult = govOrgOpenFeignClient.staffInfoExt(result); if(govOrgResult.success() && null != govOrgResult.getData()){ return govOrgResult.getData(); } } + log.warn("com.epmet.service.impl.CustomerStaffServiceImpl.extStaffInfo,根据传入的用户Id未找到对应的工作人员,传参:{}",JSON.toJSONString(staffParam)); return null; } From 2244ae5c4d64d7a4732cbabdf5c87f0b33f324db Mon Sep 17 00:00:00 2001 From: wxz Date: Sat, 14 Nov 2020 13:35:44 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=B1=BB=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0MessageMode=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/exception/RenException.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenException.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenException.java index 8d6285a26c..73ae4bf6b5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenException.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenException.java @@ -19,6 +19,12 @@ import org.apache.commons.lang3.StringUtils; * @since 1.0.0 */ public class RenException extends RuntimeException { + + public enum MessageMode { + //code_内部信息_外部信息 + CODE_INTERNAL_EXTERNAL + } + private static final long serialVersionUID = 1L; private int code; /** @@ -47,7 +53,7 @@ public class RenException extends RuntimeException { } } - public RenException(int code, String internalMsg, String msg) { + public RenException(int code, String internalMsg, String msg, MessageMode mode) { this(code, internalMsg); this.msg = msg; } From 55df7c1e7714a4d8c7c3f7d1200cf6c77fb24610 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 16 Nov 2020 13:26:23 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8A=BD=E5=8F=96=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E7=BB=B4=E5=BA=A6-=E7=BD=91=E6=A0=BC=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BB=A5=E7=BB=B4?= =?UTF-8?q?=E5=BA=A6-=E7=BD=91=E6=A0=BC=E6=95=B0=E6=8D=AE=E4=B8=BA?= =?UTF-8?q?=E4=B8=BB=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?=E7=BB=84=E6=95=B0=E6=8D=AE=E4=BC=9A=E8=A2=AB=E7=A7=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginGroupMainDailyDao.java | 10 ++++++++ .../FactOriginGroupMainDailyService.java | 2 +- .../FactOriginGroupMainDailyServiceImpl.java | 7 +++++- .../todata/impl/GroupExtractServiceImpl.java | 24 ++++++++++++------- .../extract/FactOriginGroupMainDailyDao.xml | 21 ++++++++++++++++ 5 files changed, 54 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java index e5e603a40f..5bd0c89103 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java @@ -79,6 +79,16 @@ public interface FactOriginGroupMainDailyDao extends BaseDao groups); + /** * @param customerId * @return diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java index f6fc9f2dc6..c9a74e31b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java @@ -64,7 +64,7 @@ public interface FactOriginGroupMainDailyService extends BaseService originGroupData, List memberList); + boolean insertExtractedData(boolean isFirst, String customerId, String dateId, List originGroupData, List memberList, List missing); /** * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java index 093905835b..ab3efce8b4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java @@ -84,7 +84,7 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl originGroupData, List memberList) { + public boolean insertExtractedData(boolean isFirst, String customerId, String dateId,List originGroupData, List memberList,List missing) { if (isFirst) { //isFirst baseDao.deleteBatchMemberByCustomerId(customerId,null,null); @@ -95,8 +95,13 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl memberList = new LinkedList<>(); if (!CollectionUtils.isEmpty(originGroupData)) { List gridList = dimGridService.getGridAttributes(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList())); - + List missingGroups = new LinkedList<>(); if (!CollectionUtils.isEmpty(gridList)) { Map gridMap = gridList.stream().collect(Collectors.toMap(GridAttributesResultDTO::getGridId, Function.identity(), (key1, key2) -> key2)); - if (!CollectionUtils.isEmpty(originGroupData)) { + + + for(Iterator iter = originGroupData.iterator(); + iter.hasNext();){ + FactOriginGroupMainDailyDTO pointer = iter.next(); + if(null == gridMap.get(pointer.getGridId())){ + missingGroups.add(pointer.getId()); + iter.remove(); + } + } + originGroupData.forEach(group -> { GridAttributesResultDTO attr = gridMap.get(group.getGridId()); if (null != attr) { @@ -141,14 +148,15 @@ public class GroupExtractServiceImpl implements GroupExtractService { } }); - } + factOriginGroupMainDailyService.insertExtractedData( count <= NumConstant.ZERO ? true : false, param.getCustomerId(), param.getDateId(), originGroupData, - memberList + memberList, + missingGroups ); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml index 4710c224fa..c2c75be60f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml @@ -64,6 +64,17 @@ + + + DELETE FROM + fact_origin_group_member_daily + WHERE + CUSTOMER_ID = #{customerId} + + GROUP_ID = #{groupId} + + + DELETE FROM fact_origin_group_main_daily @@ -74,6 +85,16 @@ + + + DELETE FROM + fact_origin_group_main_daily + + CUSTOMER_ID = #{customerId} + AND + DATE_ID = + + UPDATE fact_origin_group_main_daily From 1f495c3d9f24fa704687b307844d3802cbd8f9a9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 14:04:06 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=82=E4=B8=8E?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=20dimGrid=20=E7=BB=B4=E5=BA=A6=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E6=97=B6=E7=9A=84=E6=83=85=E5=86=B5=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PublicPartExtractServiceImpl.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index 3c58609ada..f26101c3dd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java @@ -112,14 +112,18 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { return; } Map userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o)); - issueTotal.forEach(issue -> { + for (FactIssueGridMonthlyEntity issue : issueTotal) { String gridId = issue.getGridId(); ScreenUserJoinEntity entity = insertMap.get(gridId); + if (entity == null) { + log.warn("gridId:{} is not exist in dimGrid,monthId:{},gridId:{}", formDTO.getCustomerId(), formDTO.getMonthId(), gridId); + continue; + } entity.setJoinTotal(issue.getIssueIncr()); GridUserCountResultDTO user = userCountMap.get(gridId); if (user == null) { log.warn("gridId:{} is not exist in issue,customerId:{},monthId:{},gridId:{}", JSON.toJSONString(issue), formDTO.getCustomerId(), formDTO.getMonthId(), gridId); - return; + continue; } //百人人均议题:统计周期内总的议题数/(注册用户数/100) log.debug("issue:{}", JSON.toJSONString(issue)); @@ -129,7 +133,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { .divide(new BigDecimal(NumConstant.ONE_HUNDRED)), 4, BigDecimal.ROUND_HALF_UP); entity.setAvgIssue(avgIssueCount); } - }); + } //获取该月 表决的人数 @@ -153,6 +157,10 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { for (Map.Entry> entry : voteMap.entrySet()) { String gridId = entry.getKey(); ScreenUserJoinEntity entity = insertMap.get(gridId); + if (entity == null) { + log.warn("gridId:{} is not exist in dimGrid,monthId:{},gridId:{}", formDTO.getCustomerId(), formDTO.getMonthId(), gridId); + continue; + } List issueList = entry.getValue(); BigDecimal bigDecimal = new BigDecimal(0); BigDecimal votedByIssueCount = new BigDecimal(issueList.get(0).getIssueCount()); From cc54476df01323f65c8903be0c84e8bb8c2afcd7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 14:11:06 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=BE=97=E5=88=86=E5=86=99=E5=85=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=89=93=E5=8D=B0=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 1ad6a429fc..2ca72cacc5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -243,7 +243,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { param.setDateId(monthId); screenGrassrootsGovernDataAbsorptionService.userScoreDataHub(param); }catch(Exception e){ - log.error("大屏热心市民/党员得分数据写入失败,参数为:{}",JSON.toJSONString(formDTO)); + log.error("大屏热心市民/党员得分数据写入失败,参数为:{}" + JSON.toJSONString(formDTO), e); } //此方法保持在最后即可 计算指标分数 todo 优化 手动创建线程池 控制任务数量 ExecutorService pool = Executors.newSingleThreadExecutor(); From ce4d6e4f917e76acec3cfe6f8b6d9d2f5ff4d89c Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 14:30:07 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E5=BE=97=E5=88=86=E5=86=99=E5=85=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=89=93=E5=8D=B0=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...srootsGovernDataAbsorptionServiceImpl.java | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index d791fb239e..53aebc29cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.DateUtils; @@ -21,16 +22,13 @@ import com.epmet.service.project.ProjectService; import com.epmet.service.topic.TopicService; import com.epmet.service.user.UserService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; import java.math.BigDecimal; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; @@ -91,10 +89,10 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr dateId = DateUtils.getBeforeNMonth(NumConstant.ONE); }else{ String dateType = DateUtils.identifyTimeDimension(dateId); - if(StringUtils.isEmpty(dateType) || !org.apache.commons.lang3.StringUtils.equalsAny(dateType,"date","month")){ + if (StringUtils.isEmpty(dateType) || !StringUtils.equalsAny(dateType, "date", "month")) { dateId = DateUtils.getBeforeNMonth(NumConstant.ONE); - }else if(org.apache.commons.lang3.StringUtils.equals(dateType,"date")){ - dateId = dateId.substring(NumConstant.ZERO,dateId.length() - NumConstant.TWO); + } else if (StringUtils.equals(dateType, "date")) { + dateId = dateId.substring(NumConstant.ZERO, dateId.length() - NumConstant.TWO); } } final String finalDateId = dateId; @@ -125,7 +123,19 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr //6.存入数据库 //不按照时间删除,每次插入之前将该客户下的所有历史数据清空 - screenPartyUserRankDataService.dataClean(registeredUsers,param.getCustomerId()); + //过滤 统计维度中没有的数据 + Set gridIdSet = new HashSet<>(); + List newInsertList = registeredUsers.stream() + .filter(o -> { + if (StringUtils.isBlank(o.getGridName())) { + gridIdSet.add(o.getGridId()); + return false; + } else { + return true; + } + }).collect(Collectors.toList()); + log.warn("userScoreDataHub grids:{} not in DimGrid", JSON.toJSONString(gridIdSet)); + screenPartyUserRankDataService.dataClean(newInsertList, param.getCustomerId()); } /** From 64954f43dee90d374b4a0e6b115c0215ca8a288a Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 15:02:12 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E6=97=A5=E6=8A=BD=E5=8F=96=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20=E5=BC=82=E6=AD=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/ScreenExtractDailyController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java index 133dc09f8c..c2e4d0f6d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java @@ -5,6 +5,7 @@ import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.service.evaluationindex.extract.toscreen.ScreenExtractService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -27,6 +28,7 @@ public class ScreenExtractDailyController { * @author zxc * @date 2020/9/24 10:15 上午 */ + @Async @PostMapping("extractdailyall") public Result screenExtractDaily(@RequestBody ExtractOriginFormDTO extractOriginFormDTO) { screenExtractService.extractDailyAll(extractOriginFormDTO); From 851bc4f3d7e1c6b7bec6f372d8e3e0562b1ae862 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 15:25:37 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E6=97=A5=E6=8A=BD=E5=8F=96=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20=E4=BD=BF=E7=94=A8=E7=BA=BF=E7=A8=8B=E6=B1=A0?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenExtractDailyController.java | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java index c2e4d0f6d6..07919aa425 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java @@ -1,24 +1,33 @@ package com.epmet.controller; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.service.evaluationindex.extract.toscreen.ScreenExtractService; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.concurrent.*; + /** * @Author zxc * @DateTime 2020/9/24 9:42 上午 */ +@Slf4j @RestController @RequestMapping("screenextract") public class ScreenExtractDailyController { - + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("ScreenExtractDailyController-pool-%d").build(); + ExecutorService threadPool = new ThreadPoolExecutor(1, 1, + 10L, TimeUnit.MINUTES, + new LinkedBlockingQueue<>(500), namedThreadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); @Autowired private ScreenExtractService screenExtractService; @@ -28,10 +37,17 @@ public class ScreenExtractDailyController { * @author zxc * @date 2020/9/24 10:15 上午 */ - @Async @PostMapping("extractdailyall") public Result screenExtractDaily(@RequestBody ExtractOriginFormDTO extractOriginFormDTO) { - screenExtractService.extractDailyAll(extractOriginFormDTO); + threadPool.submit(() -> { + log.info("screenExtractDaily start,param:{}", JSON.toJSONString(extractOriginFormDTO)); + try { + screenExtractService.extractDailyAll(extractOriginFormDTO); + log.info("screenExtractDaily end"); + } catch (Exception e) { + log.error("screenExtractDaily exception", e); + } + }); return new Result(); } From b7753e02728406d5b87e891c850e7af54dc65264 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 16 Nov 2020 16:59:27 +0800 Subject: [PATCH 09/13] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=EF=BC=8Cfeginclient?= =?UTF-8?q?=E5=A4=9A=E6=B7=BB=E5=8A=A0url=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/OperCustomizeFeignClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java index 015b0d3684..b59a5c7a20 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/feign/OperCustomizeFeignClient.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; //@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeFeignClientFallBack.class, url = "localhost:8089") -@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeFeignClientFallBack.class,url="localhost:8089") +@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeFeignClientFallBack.class) public interface OperCustomizeFeignClient { /** From 97706e0a174b8db1c1636da49ec5eee971725e5f Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 16 Nov 2020 17:06:44 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E6=8A=BD=E5=8F=96=E5=88=B0=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F-=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9=E3=80=81?= =?UTF-8?q?=E7=83=AD=E5=BF=83=E5=B8=82=E6=B0=91=EF=BC=8C=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E5=88=A0=E9=99=A4=E7=BD=91=E6=A0=BC=E8=80=8C?= =?UTF-8?q?=E9=80=A0=E6=88=90=E5=9E=83=E5=9C=BE=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectLatestOperationResultDTO.java | 4 ++ .../epmet/dao/project/ProjectProcessDao.java | 11 ----- ...srootsGovernDataAbsorptionServiceImpl.java | 45 ++++++++++++++----- .../screen/ScreenDifficultyDataService.java | 2 +- .../impl/ScreenDifficultyDataServiceImpl.java | 7 ++- .../project/ProjectProcessService.java | 15 +------ .../impl/ProjectProcessServiceImpl.java | 25 ++--------- .../extract/FactOriginProjectMainDailyDao.xml | 22 +-------- .../mapper/project/ProjectProcessDao.xml | 22 ++------- 9 files changed, 54 insertions(+), 99 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java index 12750903d1..f1ee458fa0 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java @@ -17,4 +17,8 @@ public class ProjectLatestOperationResultDTO implements Serializable { private String projectId; private String operationName; + + private Integer costTime; + + private String title; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java index 79e2f51b48..37e130e678 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java @@ -153,15 +153,4 @@ public interface ProjectProcessDao extends BaseDao { * @date 2020.09.28 14:45 */ List selectLatestOperation(@Param("list") List list,@Param("customerId") String customerId); - - /** - * @Description 查找项目标题 - * @param list - * @return java.util.List - * @author wangc - * @date 2020.09.28 14:45 - */ - List selectProjectTitle(@Param("list") List list,@Param("customerId") String customerId); - - } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 53aebc29cb..8a60c6076b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dto.org.GridInfoDTO; +import com.epmet.dto.project.result.ProjectLatestOperationResultDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -77,8 +78,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr //2.查询出客户下网格的相关信息 List gridList = customerGridService.queryGridInfoList(param.getCustomerId()); - Map gridMap = new HashMap<>(); - gridList.forEach(grid -> {gridMap.put(grid.getGridId(),grid);}); + Map gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o)); //3.查询出客户下用户的累计积分(累计值,没有时间概念,否则需要查询积分明细计算出评价周期末的得分) Map pointMap = userPointService.getUserPointMap(param.getCustomerId()); @@ -99,6 +99,12 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr Map scoreMap = cpcIndexCalculateService.getCpcScore(param.getCustomerId(),dateId); + //剔除垃圾数据 + for(Iterator iter = registeredUsers.iterator(); + iter.hasNext();){ + if(null == gridMap.get(iter.next().getGridId())) iter.remove(); + } + //5.整合数据 if(!CollectionUtils.isEmpty(registeredUsers)){ registeredUsers.forEach(user -> { @@ -154,13 +160,26 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr //查询数据 List difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId(),existed)); if(CollectionUtils.isEmpty(difficulties)) return; + //剔除垃圾数据 + //2.查询出客户下网格的相关信息 + List gridList = customerGridService.queryGridInfoList(param.getCustomerId()); + Map gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o)); + List missing = new LinkedList<>(); + for(Iterator iter = difficulties.iterator(); iter.hasNext();){ + ScreenDifficultyDataEntity pointer = iter.next(); + if(null == gridMap.get(pointer.getOrgId())){ + missing.add(pointer.getEventId()); + iter.remove(); + } + } + + List projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); //最近一次操作 - Map latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId()); - //标题 - Map titleMap = projectProcessService.getProjectTitle(projectIds,param.getCustomerId()); + Map latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId()); + boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false; - boolean isTitleNull = CollectionUtils.isEmpty(titleMap) ? true : false; + //图片 List projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); @@ -178,16 +197,20 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr diff.setEventContent(contentMap.get(diff.getEventId())); } if(!isOperationNull){ - diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId())); - } - if(!isTitleNull){ - diff.setEventTitle(titleMap.get(diff.getEventId())); + ProjectLatestOperationResultDTO oper = latestOperationMap.get(diff.getEventId()); + if(null != oper){ + diff.setLatestOperateDesc(oper.getOperationName()); + diff.setEventTitle(oper.getTitle()); + diff.setEventCostTime(oper.getCostTime()); + } + } + diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE)); }); List imgList = new LinkedList<>(); imgMap.values().forEach(list -> {imgList.addAll(list);}); - screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList); + screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList,missing); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java index 3c6dec0673..c133c88c84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java @@ -49,6 +49,6 @@ public interface ScreenDifficultyDataService extends BaseService difficulties, List imgs); + void dataClean(String customerId,List difficulties, List imgs,List missing); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java index c539114666..a371230024 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java @@ -53,7 +53,11 @@ public class ScreenDifficultyDataServiceImpl extends BaseServiceImpl difficulties, List imgs) { + public void dataClean(String customerId, List difficulties, List imgs,List missing) { + if(!CollectionUtils.isEmpty(missing)){ + baseDao.deleteBatchDifficulty(customerId, missing); + baseDao.deleteBatchDifficultyImg(missing); + } if (!CollectionUtils.isEmpty(difficulties)) { baseDao.deleteBatchDifficulty(customerId, difficulties.stream().map(ScreenDifficultyDataEntity::getEventId).distinct().collect(Collectors.toList())); baseDao.insertBatch(difficulties); @@ -62,7 +66,6 @@ public class ScreenDifficultyDataServiceImpl extends BaseServiceImpl * @Description 获得项目最新操作 * @param list * @param customerId - * @return java.util.Map + * @return * @author wangc * @date 2020.09.28 14:44 */ - Map getLatestOperation(List list, String customerId); - - /** - * @Description 获取项目标题 - * @param list - * @param customerId - * @return java.util.Map - * @author wangc - * @date 2020.10.27 14:34 - */ - Map getProjectTitle(Listlist ,String customerId); - + Map getLatestOperation(List list, String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index 13552085b8..09d3d2f652 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -117,36 +117,17 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl + * @return * @author wangc * @date 2020.09.28 14:44 */ @Override - public Map getLatestOperation(List list, String customerId) { + public Map getLatestOperation(List list, String customerId) { List operations = baseDao.selectLatestOperation(list,customerId); if(CollectionUtils.isEmpty(operations)){ return Collections.EMPTY_MAP; }else{ - return operations.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName)); + return operations.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,o->o,(a,n)-> a)); } } - - /** - * @Description 获取项目标题 - * @param list - * @param customerId - * @return java.util.Map - * @author wangc - * @date 2020.10.27 14:34 - */ - @Override - public Map getProjectTitle(List list, String customerId) { - List titles = baseDao.selectProjectTitle(list,customerId); - if(CollectionUtils.isEmpty(titles)){ - return Collections.EMPTY_MAP; - }else{ - return titles.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName)); - } - } - } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index baa6a83d25..f5c56529be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -331,7 +331,7 @@ ( project.PROJECT_STATUS = 'pending', '处理中', '已结案' ) AS eventStatusDesc, IFNULL(relation.reOrg,0) AS eventReOrg, IFNULL(handleCount.HandledCount,0) AS eventHandledCount, - IFNULL(costTime.costTime,0) AS eventCostTime , + gridInfo.allParentIds FROM fact_origin_project_main_daily project @@ -382,26 +382,6 @@ GROUP BY PROJECT_ID ) handleCount ON project.ID = handleCount.PROJECT_ID - LEFT JOIN ( - SELECT - main.ID AS PROJECT_ID, - TIMESTAMPDIFF( - MINUTE, - str_to_date( main.DATE_ID, '%Y%m%d' ), - IF - ( main.IS_RESOLVED = 'resolved', time.HANDLED_DATE, NOW( ) ) - ) AS costTime - FROM - fact_origin_project_main_daily main - LEFT JOIN fact_origin_project_org_period_daily time ON main.ID = time.PROJECT_ID - AND time.DEL_FLAG = '0' - AND time.OPERATION = 'close' - WHERE - main.DEL_FLAG = '0' - AND main.CUSTOMER_ID = #{customerId} - GROUP BY - main.ID - ) costTime ON project.ID = costTime.PROJECT_ID WHERE project.DEL_FLAG = '0' AND project.CUSTOMER_ID = #{customerId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index efa7b82bb4..3236a09bea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -268,9 +268,11 @@ - - \ No newline at end of file From 0b4375f87c9c78e40c5ba59f3afccdc75985e4bd Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 17:55:10 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E6=95=B0=E6=8D=AE=E6=8A=BD=E5=8F=96=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=95=B0=E6=8D=AE=E6=8F=90=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../todata/impl/ProjectExtractServiceImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 5077794d49..5880abebe8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -16,7 +16,6 @@ import com.epmet.dto.issue.IssueDTO; import com.epmet.dto.party.PartyMemberDTO; import com.epmet.dto.project.FinishOrgDTO; import com.epmet.dto.project.ProcessInfoDTO; -import com.epmet.dto.project.ProjectOrgRelationDTO; import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO; import com.epmet.dto.result.WorkDayResultDTO; import com.epmet.dto.topic.ResiTopicDTO; @@ -42,8 +41,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; -import java.util.*; -import java.util.stream.Collector; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; import java.util.stream.Collectors; /** @@ -192,8 +193,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setFinishOrgIds(org); })); //插入数据 + factOriginProjectMainDailyService.deleteByDate(customerId, dateString); if (!list.isEmpty()) { - factOriginProjectMainDailyService.deleteByDate(customerId, dateString); factOriginProjectMainDailyService.insertBatch(list); } } @@ -368,8 +369,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { path =path.substring(NumConstant.ZERO,path.length() - NumConstant.ONE); } entity.setPids(path); - }else{ - log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}",process.getAgencyId(),process.getPids()); + } else { + log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}", process.getAgencyId(), process.getPids()); entity.setPid(NumConstant.ZERO_STR); entity.setPids(""); } @@ -378,8 +379,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; }).collect(Collectors.toList())); + factOriginProjectLogDailyService.deleteByDate(customerId, dateString); if (!logList.isEmpty()) { - factOriginProjectLogDailyService.deleteByDate(customerId, dateString); factOriginProjectLogDailyService.insertBatch(logList); } From ea4045b37e4f245af3e914ec1152137cffad3bbc Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 16 Nov 2020 18:07:09 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E6=95=B0=E6=8D=AE=E6=8A=BD=E5=8F=96=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=95=B0=E6=8D=AE=E6=8F=90=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/ProjectExtractServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 5880abebe8..452edc9665 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -124,6 +124,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //获取项目信息 List projectList = projectService.getProjectInfo(customerId, dateString); + factOriginProjectMainDailyService.deleteByDate(customerId, dateString); if (!CollectionUtils.isEmpty(projectList)) { //提取议题ID List issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList()); @@ -193,7 +194,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setFinishOrgIds(org); })); //插入数据 - factOriginProjectMainDailyService.deleteByDate(customerId, dateString); if (!list.isEmpty()) { factOriginProjectMainDailyService.insertBatch(list); } From 4997d80e9abb5ae6cce947b2a8fce4e63ff6fc85 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 17 Nov 2020 14:34:10 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3oss-client=E5=BD=B1=E5=93=8D=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/OssFeignClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java index 47daa888cc..239ca51acc 100644 --- a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java +++ b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java @@ -30,6 +30,8 @@ import org.springframework.web.multipart.MultipartFile; */ @FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallback = OssFeignClientFallback.class) +//@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallback = +// OssFeignClientFallback.class) public interface OssFeignClient { /** * 文件上传 @@ -44,7 +46,7 @@ public interface OssFeignClient { Result uploadQrCode(@RequestPart(value = "file") MultipartFile file); - @Configuration + //@Configuration class MultipartSupportConfig { @Bean public Encoder feignFormEncoder() {