From 16bd05b9518086e6d53c561ecdfd47c1e5bfe4f6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 12 Nov 2020 16:27:10 +0800 Subject: [PATCH 1/2] =?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 55df7c1e7714a4d8c7c3f7d1200cf6c77fb24610 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 16 Nov 2020 13:26:23 +0800 Subject: [PATCH 2/2] =?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