From a236cbf7a21f4422e6a96dd5b7e8af68c6ef10a4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 7 Dec 2021 15:55:06 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=85=88=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ExternalCustomerController.java | 3 +++ .../epmet/controller/ActCustomizedController.java | 6 ++++-- .../controller/PartyBranchManageController.java | 4 +++- .../epmet/controller/IssueCategoryController.java | 4 +++- .../controller/IssueSuggestionController.java | 6 ++++-- .../com/epmet/controller/IssueTagsController.java | 7 +++++-- .../controller/CustomerPartyBranchController.java | 6 ++++-- .../controller/ProjectCategoryController.java | 8 ++++---- .../epmet/controller/ProjectTagsController.java | 9 +++++---- .../epmet/controller/GuideCategoryController.java | 15 +++++++++------ .../com/epmet/controller/GuideController.java | 4 +++- .../controller/SpecialSubjectController.java | 4 +++- .../com/epmet/controller/CustomerController.java | 4 ++++ .../com/epmet/controller/BadgeController.java | 3 ++- 14 files changed, 56 insertions(+), 27 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java index becc72c341..149249599b 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalCustomerController.java @@ -1,5 +1,6 @@ package com.epmet.controller; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -44,6 +45,7 @@ public class ExternalCustomerController { * @param formDTO * @return */ + @NoRepeatSubmit @PostMapping("add") public Result add(@RequestBody ExternalCustomerFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, ExternalCustomerFormDTO.AddExternalCustomerGroup.class); @@ -57,6 +59,7 @@ public class ExternalCustomerController { * @param formDTO * @return */ + @NoRepeatSubmit @PostMapping("update") public Result update(@RequestBody ExternalCustomerFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, ExternalCustomerFormDTO.UpdateExternalCustomerGroup.class); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ActCustomizedController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ActCustomizedController.java index 268e936521..e4aa2f1660 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ActCustomizedController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ActCustomizedController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -42,7 +43,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("actcustomized") public class ActCustomizedController { - + @Autowired private ActCustomizedService actCustomizedService; @@ -68,6 +69,7 @@ public class ActCustomizedController { * @description 保存自定义配置 * @Date 2020/7/20 17:25 **/ + @NoRepeatSubmit @RequirePermission(requirePermission = RequirePermissionEnum.MORE_HEART_CUSTOMIZED_SAVE) @PostMapping("save") public Result saveConfigs(@RequestBody SaveActCustomizedFormDTO formDTO){ @@ -89,4 +91,4 @@ public class ActCustomizedController { CustomerHeartConfigsResultDTO resultDTO = actCustomizedService.getCustomerHeartConfigs(formDTO); return new Result().ok(resultDTO); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/PartyBranchManageController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/PartyBranchManageController.java index 6e4a6e9bf3..02ffd27345 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/PartyBranchManageController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/PartyBranchManageController.java @@ -1,6 +1,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -34,6 +35,7 @@ public class PartyBranchManageController { * @description 添加党支部 * @Date 2020/6/17 12:47 **/ + @NoRepeatSubmit @PostMapping("add") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_PARTY_BRANCH_ADD) public Result addPartyBranch(@RequestBody PartyBranchAddFormDTO formDTO) { @@ -107,7 +109,7 @@ public class PartyBranchManageController { * @param formDTO * @author yinzuomei * @description 6、党员列表查询 - * @Date 2020/6/18 0:17 + * @Date 2020/6/18 0:17 **/ @PostMapping("/partymember/list") public Result> listPartyMember(@RequestBody PartyBranchIdFormDTO formDTO){ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index cba3ed0825..6f459a71ad 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -127,6 +128,7 @@ public class IssueCategoryController { * @Description 议题:保存/修改分类 * @Author sun **/ + @NoRepeatSubmit @PostMapping("save") public Result saveCategory(@LoginUser TokenDto tokenDto, @RequestBody IssueSaveCategoryFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -135,4 +137,4 @@ public class IssueCategoryController { return new Result(); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java index 4ce01a56d5..c5a10203e5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java @@ -17,6 +17,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.IssueSuggestionDTO; @@ -43,7 +44,7 @@ import java.util.List; @RestController @RequestMapping("issuesuggestion") public class IssueSuggestionController { - + @Autowired private IssueSuggestionService issueSuggestionService; @@ -66,6 +67,7 @@ public class IssueSuggestionController { * @description 保存居民端用户对议题的建议或意见 * @Date 2020/11/18 13:15 **/ + @NoRepeatSubmit @PostMapping("save") public Result saveIssueSuggestion(@RequestBody IssueSuggestionDTO dto) { SaveIssueSuggestionResultDTO resultDTO = issueSuggestionService.saveIssueSuggestion(dto); @@ -84,4 +86,4 @@ public class IssueSuggestionController { List list = issueSuggestionService.listIssueSug(formDTO); return new Result>().ok(list); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java index de6cfd4cc2..2c1d8593ff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -50,7 +51,7 @@ import java.util.Map; @RestController @RequestMapping("issuetags") public class IssueTagsController { - + @Autowired private IssueTagsService issueTagsService; @@ -102,6 +103,7 @@ public class IssueTagsController { * @author zxc * @date 2020/12/9 下午3:29 */ + @NoRepeatSubmit @PostMapping("add") public Result addTag(@RequestBody AddTagFormDTO form, @LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(form, AddTagFormDTO.AddTag.class); @@ -116,6 +118,7 @@ public class IssueTagsController { * @author zxc * @date 2020/12/10 上午9:37 */ + @NoRepeatSubmit @PostMapping("save") public Result issueTagSave(@RequestBody IssueTagsSaveFormDTO form,@LoginUser TokenDto tokenDto){ ValidatorUtils.validateEntity(form, IssueTagsSaveFormDTO.IssueTagsSaveForm.class); @@ -123,4 +126,4 @@ public class IssueTagsController { return new Result(); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerPartyBranchController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerPartyBranchController.java index 04ebd8e0a0..c0309c6610 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerPartyBranchController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerPartyBranchController.java @@ -17,6 +17,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -49,7 +50,7 @@ import java.util.Map; @RestController @RequestMapping("customerpartybranch") public class CustomerPartyBranchController { - + @Autowired private CustomerPartyBranchService customerPartyBranchService; @@ -65,6 +66,7 @@ public class CustomerPartyBranchController { return new Result().ok(data); } + @NoRepeatSubmit @PostMapping("save") public Result save(@RequestBody CustomerPartyBranchDTO dto){ //效验数据 @@ -129,4 +131,4 @@ public class CustomerPartyBranchController { customerPartyBranchService.decrPartyBranchMember(partyBranchId); return new Result(); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java index ff9417e6ca..9d86baccde 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java @@ -18,8 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -53,7 +52,7 @@ import java.util.Map; @RestController @RequestMapping("projectcategory") public class ProjectCategoryController { - + @Autowired private ProjectCategoryService projectCategoryService; @@ -118,6 +117,7 @@ public class ProjectCategoryController { * @Description 项目:保存/修改分类 * @Author sun **/ + @NoRepeatSubmit @PostMapping("save") public Result saveCategory(@LoginUser TokenDto tokenDto, @RequestBody ProjectSaveCategoryFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -136,4 +136,4 @@ public class ProjectCategoryController { return new Result>().ok(projectCategoryService.getProjectCategoryList(formDTO)); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java index 80fad9fab5..84d965f2d0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java @@ -18,15 +18,15 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ProjectTagsDTO; import com.epmet.dto.form.ProjectTagHookFormDTO; import com.epmet.excel.ProjectTagsExcel; @@ -48,7 +48,7 @@ import java.util.Map; @RestController @RequestMapping("projecttags") public class ProjectTagsController { - + @Autowired private ProjectTagsService projectTagsService; @@ -64,6 +64,7 @@ public class ProjectTagsController { return new Result().ok(data); } + @NoRepeatSubmit @PostMapping("save") public Result save(@RequestBody ProjectTagHookFormDTO dto, @LoginUser TokenDto token){ dto.setCustomerId(token.getCustomerId()); @@ -96,4 +97,4 @@ public class ProjectTagsController { ExcelUtils.exportExcelToTarget(response, null, list, ProjectTagsExcel.class); } -} \ No newline at end of file +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java index b1e8824223..7d5a92fc9b 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -47,7 +48,7 @@ import java.util.List; @RestController @RequestMapping("guidecategory") public class GuideCategoryController { - + @Autowired private GuideCategoryService guideCategoryService; @@ -68,10 +69,10 @@ public class GuideCategoryController { /** * 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 - * - * @param tokenDto - * @return com.epmet.commons.tools.utils.Result> - * @author yinzuomei + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei * @date 2021/9/8 2:47 下午 */ @PostMapping("getcategory") @@ -143,6 +144,7 @@ public class GuideCategoryController { * @author yinzuomei * @date 2021/9/8 5:11 下午 */ + @NoRepeatSubmit @PostMapping("save") public Result save(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ formDTO.setStaffId(tokenDto.getUserId()); @@ -160,6 +162,7 @@ public class GuideCategoryController { * @author yinzuomei * @date 2021/9/8 5:37 下午 */ + @NoRepeatSubmit @PostMapping("update") public Result update(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ formDTO.setStaffId(tokenDto.getUserId()); @@ -168,4 +171,4 @@ public class GuideCategoryController { } -} \ No newline at end of file +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java index 88d8115216..8fe57c6f76 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; @@ -113,6 +114,7 @@ public class GuideController { * @Author zhaoqifeng * @Date 2021/9/7 14:13 */ + @NoRepeatSubmit @PostMapping("add") public Result guideAdd(@LoginUser TokenDto tokenDto, @RequestBody GuideAddFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); @@ -177,4 +179,4 @@ public class GuideController { } -} \ No newline at end of file +} diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java index 017338b433..a24b0c5b9e 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java @@ -19,6 +19,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -58,6 +59,7 @@ public class SpecialSubjectController { * @description 添加专题 * @Date 2021/7/15 15:31 **/ + @NoRepeatSubmit @RequirePermission(requirePermission = RequirePermissionEnum.WORK_SPECIAL_PROJECT_ADD) @PostMapping("add") public Result addSpecialSubject(@LoginUser TokenDto tokenDto, @RequestBody AddSpecialSubjectFormDTO formDTO) { @@ -125,4 +127,4 @@ public class SpecialSubjectController { public Result> preview(@RequestBody PreviewFormDTO formDTO) { return new Result>().ok(specialSubjectService.preview(formDTO)); } -} \ No newline at end of file +} diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index 032fab629a..ab4987388f 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -87,6 +88,7 @@ public class CustomerController { return new Result().ok(data); } + @NoRepeatSubmit @PostMapping("save") public Result save(@RequestBody CustomerDTO dto) { //效验数据 @@ -95,6 +97,7 @@ public class CustomerController { return new Result(); } + @NoRepeatSubmit @PutMapping("update") public Result update(@RequestBody CustomerDTO dto) { //效验数据 @@ -183,6 +186,7 @@ public class CustomerController { * @param form * @return */ + @NoRepeatSubmit @PostMapping("add") public Result> addCustomer(@RequestBody CustomerFormDTO form) { ValidatorUtils.validateEntity(form, CustomerFormDTO.AddCustomerGroup.class); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java index 503da1bd31..e25083f669 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java @@ -50,6 +50,7 @@ public class BadgeController { * @param formDTO * @return com.epmet.commons.tools.utils.Result */ + @NoRepeatSubmit @PostMapping("add") public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddBadgeFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); @@ -191,7 +192,7 @@ public class BadgeController { /** * @Description - * @return + * @return * @author wxz * @date 2021.08.02 10:27 */ From a42931f6d7e9291a686f2df8676eee825e6fc0a9 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 7 Dec 2021 16:56:30 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8A=BD=E5=8F=96?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactOriginExtractController.java | 14 +- .../impl/ProjectExtractServiceImpl.java | 2 +- .../toscreen/OrgRankStatisticsService.java | 189 +++++++++++ .../impl/OrgRankStatisticsServiceImpl.java | 306 ++++++++++++++++++ 4 files changed, 508 insertions(+), 3 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankStatisticsService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankStatisticsServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java index b42b862736..8d86caed9c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java @@ -95,8 +95,18 @@ public class FactOriginExtractController { @PostMapping("project") public Result projectData(@RequestBody ExtractOriginFormDTO extractOriginFormDTO) { - if (null != extractOriginFormDTO) { - projectExtractService.saveOriginProjectDaily(extractOriginFormDTO); + if (StringUtils.isNotBlank(extractOriginFormDTO.getCustomerId())) { + List daysBetween; + if (StringUtils.isBlank(extractOriginFormDTO.getDateId())) { + daysBetween = DateUtils.getDaysBetween(extractOriginFormDTO.getStartDate(), extractOriginFormDTO.getEndDate()); + daysBetween.forEach(dateId -> { + extractOriginFormDTO.setDateId(dateId); + projectExtractService.saveOriginProjectDaily(extractOriginFormDTO); + }); + } else{ + projectExtractService.saveOriginProjectDaily(extractOriginFormDTO); + } + } else { List customerIds = dimCustomerService.selectCustomerIdPage(1, 100); customerIds.forEach(customerId -> { 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 2209f0e396..e1c74d8f30 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 @@ -224,7 +224,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { })); //插入数据 if (!list.isEmpty()) { - factOriginProjectMainDailyService.saveOrUpdateBatch(list); + factOriginProjectMainDailyService.insertBatch(list); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankStatisticsService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankStatisticsService.java new file mode 100644 index 0000000000..6bd70ff16c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/OrgRankStatisticsService.java @@ -0,0 +1,189 @@ +package com.epmet.service.evaluationindex.extract.toscreen; + +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; + +import java.util.Map; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/12/7 10:43 + */ +public interface OrgRankStatisticsService { + /** + * 网格被吹哨项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getGridProjectCount(String customerId, String monthId, String dateId); + + /** + * 部门被吹哨项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getDeptProjectCount(String customerId, String monthId, String dateId); + + /** + * 组织被吹哨项目数(含下级组织网格部门) + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getAgencyProjectCount(String customerId, String monthId, String dateId); + + + /** + * 网格被吹哨项目中已结案项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getGridProjectClosedCount(String customerId, String monthId, String dateId); + + /** + * 部门被吹哨项目中已结案项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getDeptProjectClosedCount(String customerId, String monthId, String dateId); + + /** + * 组织被吹哨项目中已结案项目数(含下级组织网格部门) + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getAgencyProjectClosedCount(String customerId, String monthId, String dateId); + + /** + * 网格被吹哨项目中自己办结项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getGridProjectResolvedCount(String customerId, String monthId, String dateId); + + /** + * 部门被吹哨项目中自己办结项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getDeptProjectResolvedCount(String customerId, String monthId, String dateId); + + /** + * 组织被吹哨项目中自己办结项目数(含下级组织网格部门) + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getAgencyProjectResolvedCount(String customerId, String monthId, String dateId); + + /** + * 网格自治项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getGridProjectSelfCount(String customerId, String monthId, String dateId); + + /** + * 部门自治项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getDeptProjectSelfCount(String customerId, String monthId, String dateId); + + /** + * 组织自治项目数(含下级组织网格部门) + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getAgencyProjectSelfCount(String customerId, String monthId, String dateId); + + /** + * 网格产生的项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getGridProjectTotal(String customerId, String monthId, String dateId); + + /** + * 组织产生的项目数(含下级组织网格部门) + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getAgencyProjectTotal(String customerId, String monthId, String dateId); + + /** + * 网格产生的项目数中结案的项目数 + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getGridProjectClosedTotal(String customerId, String monthId, String dateId); + + /** + * 组织产生的项目数中结案的项目数(含下级组织网格部门) + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + Map getAgencyProjectClosedTotal(String customerId, String monthId, String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankStatisticsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankStatisticsServiceImpl.java new file mode 100644 index 0000000000..730d3d9ab4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankStatisticsServiceImpl.java @@ -0,0 +1,306 @@ +package com.epmet.service.evaluationindex.extract.toscreen.impl; + +import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.service.evaluationindex.extract.toscreen.OrgRankStatisticsService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/12/7 10:43 + */ +@Service +@Slf4j +public class OrgRankStatisticsServiceImpl implements OrgRankStatisticsService { + + /** + * 网格被吹哨项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map < String, OrgStatisticsResultDTO >} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getGridProjectCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 部门被吹哨项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getDeptProjectCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 组织被吹哨项目数(含下级组织网格部门) + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getAgencyProjectCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 网格被吹哨项目中已结案项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getGridProjectClosedCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 部门被吹哨项目中已结案项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getDeptProjectClosedCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 组织被吹哨项目中已结案项目数(含下级组织网格部门) + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getAgencyProjectClosedCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 网格被吹哨项目中自己办结项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getGridProjectResolvedCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 部门被吹哨项目中自己办结项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getDeptProjectResolvedCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 组织被吹哨项目中自己办结项目数(含下级组织网格部门) + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getAgencyProjectResolvedCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 网格自治项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getGridProjectSelfCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 部门自治项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getDeptProjectSelfCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 组织自治项目数(含下级组织网格部门) + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getAgencyProjectSelfCount(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 网格产生的项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getGridProjectTotal(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 组织产生的项目数(含下级组织网格部门) + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getAgencyProjectTotal(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 网格产生的项目数中结案的项目数 + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getGridProjectClosedTotal(String customerId, String monthId, String dateId) { + return null; + } + + /** + * 组织产生的项目数中结案的项目数(含下级组织网格部门) + * + * @param customerId + * @param monthId + * @param dateId + * @Param customerId + * @Param monthId + * @Param dateId + * @Return {@link Map< String, OrgStatisticsResultDTO>} + * @Author zhaoqifeng + * @Date 2021/12/7 10:52 + */ + @Override + public Map getAgencyProjectClosedTotal(String customerId, String monthId, String dateId) { + return null; + } +} From cff289eca54bcf60e47b79b491b5d2044257aeab Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 7 Dec 2021 18:19:34 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=AF=9D=E9=A2=98=20=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=20=E7=BB=A7=E7=BB=AD=E4=B8=8B?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FactOriginTopicMainDailyServiceImpl.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java index c9e42a3a49..72888c5420 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginTopicMainDailyServiceImpl.java @@ -20,7 +20,6 @@ package com.epmet.service.evaluationindex.extract.todata.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; @@ -166,7 +165,7 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl logDailyEntityList) { //批量插入 @@ -175,7 +174,7 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl * @param topicOriginInfoList @@ -195,8 +194,8 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl Date: Tue, 7 Dec 2021 18:30:06 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E8=AF=9D=E9=A2=98=20=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=20=E7=BB=A7=E7=BB=AD=E4=B8=8B?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/IssueExtractServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java index e8730541d8..5164c9ae6d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java @@ -121,7 +121,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { }); }); // 5. 查询pid - List agencyIds = result.stream().map(r -> r.getAgencyId()).distinct().collect(Collectors.toList()); + List agencyIds = result.stream().map(IssueMainDailyFormDTO::getAgencyId).distinct().collect(Collectors.toList()); List agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); if (CollectionUtils.isEmpty(agencyInfoList)){ throw new RenException(ExtractConstant.PARENT_AGENCY_ID_LIST); @@ -138,7 +138,9 @@ public class IssueExtractServiceImpl implements IssueExtractService { } }); }); - delAndInsertMain(customerId,dateId,result); + //过滤掉pids为空的数据 + List collect = result.stream().filter(o -> StringUtils.isNotBlank(o.getPids())).collect(Collectors.toList()); + delAndInsertMain(customerId,dateId,collect); return true; } From d0c28354f5930883a2dd59bc2defa514231ca319 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 7 Dec 2021 18:31:48 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=85=9A=E5=91=98=E6=8A=BD=E5=8F=96?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/stats/impl/DimCustomerPartymemberServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java index cec5da65e6..940a77d134 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java @@ -173,6 +173,7 @@ public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl StringUtils.isNotBlank(item.getAgencyId())).collect(Collectors.toList()); delAndInsertParty(partyMemberList,customerId,dateId); }); }); From a641e679e19f650193cd16a26b53f4057d685495 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 7 Dec 2021 21:20:25 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E8=BF=99=E4=B8=80=E6=89=B9=E9=83=BD?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=AE=8C=E5=86=8D=E7=BB=A7=E7=BB=AD=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FactOriginExtractServiceImpl.java | 238 ++++++++++-------- 1 file changed, 134 insertions(+), 104 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java index 649391be59..f35bfe05ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java @@ -5,9 +5,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.dto.extract.form.ExtractOriginFormDTO; -import com.epmet.dto.group.form.GroupTotalFormDTO; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; -import com.epmet.dto.stats.topic.form.TopicStatusFormDTO; import com.epmet.service.StatsGroupService; import com.epmet.service.StatsTopicService; import com.epmet.service.evaluationindex.extract.todata.*; @@ -94,6 +92,7 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } private void submitJob(ExtractOriginFormDTO param) { + CountDownLatch countDownLatch = new CountDownLatch(NumConstant.FIVE); boolean isRange = StringUtils.isBlank(param.getDateId()); List daysBetween = null; if (isRange) { @@ -101,139 +100,159 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } List finalDaysBetween = daysBetween; threadPool.submit(() -> { - CustomerIdAndDateIdFormDTO formDTO = new CustomerIdAndDateIdFormDTO(); - formDTO.setCustomerId(param.getCustomerId()); - if (!isRange) { - try { - formDTO.setDateId(param.getDateId()); - dimCustomerPartymemberService.statsPartyMember(formDTO); - } catch (Exception e) { - log.error("抽取【党员数据】发生异常,参数:" + JSON.toJSONString(formDTO), e); - } - } else { - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - formDTO.setDateId(dateDimId); + try { + CustomerIdAndDateIdFormDTO formDTO = new CustomerIdAndDateIdFormDTO(); + formDTO.setCustomerId(param.getCustomerId()); + if (!isRange) { + try { + formDTO.setDateId(param.getDateId()); dimCustomerPartymemberService.statsPartyMember(formDTO); + } catch (Exception e) { + log.error("抽取【党员数据】发生异常,参数:" + JSON.toJSONString(formDTO), e); + } + } else { + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + formDTO.setDateId(dateDimId); + dimCustomerPartymemberService.statsPartyMember(formDTO); + } + } catch (Exception e) { + log.error("抽取【党员数据】发生异常,参数:" + JSON.toJSONString(param), e); } - } catch (Exception e) { - log.error("抽取【党员数据】发生异常,参数:" + JSON.toJSONString(param), e); } + } finally { + countDownLatch.countDown(); } }); threadPool.submit(() -> { - ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); - if (!isRange) { - try { - groupExtractService.extractGroupData(paramNew); - } catch (Exception e) { - log.error("抽取【小组数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); - } - } else { - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - paramNew.setDateId(dateDimId); + try { + ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); + if (!isRange) { + try { groupExtractService.extractGroupData(paramNew); + } catch (Exception e) { + log.error("抽取【小组数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); + } + } else { + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + paramNew.setDateId(dateDimId); + groupExtractService.extractGroupData(paramNew); + } + } catch (Exception e) { + log.error("抽取【小组数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } - } catch (Exception e) { - log.error("抽取【小组数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } + } finally { + countDownLatch.countDown(); } }); threadPool.submit(() -> { - log.debug("extractAll start param:{}", JSON.toJSONString(param)); - ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); - if (!isRange) { - try { - factOriginTopicMainDailyService.topicCleaning(paramNew); - } catch (Exception e) { - log.error("抽取【话题数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); - } - } else { - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - paramNew.setDateId(dateDimId); - log.info("extractAll cal param:{}", JSON.toJSONString(paramNew)); + try { + log.debug("extractAll start param:{}", JSON.toJSONString(param)); + ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); + if (!isRange) { + try { factOriginTopicMainDailyService.topicCleaning(paramNew); + } catch (Exception e) { + log.error("抽取【话题数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); + } + } else { + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + paramNew.setDateId(dateDimId); + log.info("extractAll cal param:{}", JSON.toJSONString(paramNew)); + factOriginTopicMainDailyService.topicCleaning(paramNew); + } + } catch (Exception e) { + log.error("抽取【话题数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } - } catch (Exception e) { - log.error("抽取【话题数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } + log.debug("extractAll end param:{}", JSON.toJSONString(paramNew)); + } finally { + countDownLatch.countDown(); } - log.debug("extractAll end param:{}", JSON.toJSONString(paramNew)); }); threadPool.submit(() -> { - ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); - if (!isRange) { - try { - issueExtractService.issueExtractMain(paramNew); - } catch (Exception e) { - log.error("抽取【议题数据主表】发生异常,参数:" + JSON.toJSONString(paramNew), e); - } - try { - issueExtractService.issueExtractLog(paramNew); - } catch (Exception e) { - log.error("抽取【议题数据附表】发生异常,参数:" + JSON.toJSONString(paramNew), e); - } - } else { - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - paramNew.setDateId(dateDimId); + try { + ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); + if (!isRange) { + try { issueExtractService.issueExtractMain(paramNew); + } catch (Exception e) { + log.error("抽取【议题数据主表】发生异常,参数:" + JSON.toJSONString(paramNew), e); } - } catch (Exception e) { - log.error("抽取【议题数据主表】发生异常,参数:" + JSON.toJSONString(paramNew), e); - } - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - paramNew.setDateId(dateDimId); + try { issueExtractService.issueExtractLog(paramNew); + } catch (Exception e) { + log.error("抽取【议题数据附表】发生异常,参数:" + JSON.toJSONString(paramNew), e); + } + } else { + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + paramNew.setDateId(dateDimId); + issueExtractService.issueExtractMain(paramNew); + } + } catch (Exception e) { + log.error("抽取【议题数据主表】发生异常,参数:" + JSON.toJSONString(paramNew), e); + } + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + paramNew.setDateId(dateDimId); + issueExtractService.issueExtractLog(paramNew); + } + } catch (Exception e) { + log.error("抽取【议题数据附表】发生异常,参数:" + JSON.toJSONString(paramNew), e); } - } catch (Exception e) { - log.error("抽取【议题数据附表】发生异常,参数:" + JSON.toJSONString(paramNew), e); } + } finally { + countDownLatch.countDown(); } }); //小组活动 threadPool.submit(() -> { - ExtractOriginFormDTO extractOriginFormDTO = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); - if (!isRange) { - //截止到当前dateId - try { - factGroupActDailyService.extractGridGroupActDaily(extractOriginFormDTO.getCustomerId(), extractOriginFormDTO.getDateId()); - } catch (Exception e) { - log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); - } - try { - factGroupActDailyService.extractAgencyGroupActDaily(extractOriginFormDTO.getCustomerId(), extractOriginFormDTO.getDateId()); - } catch (Exception e) { - log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); - } - } else { - //参数指定日期内,比如startDate=20210501,endDate=20210513;依次计算截止到20210501的数据.....截止到20210513的数据 - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - extractOriginFormDTO.setDateId(dateDimId); + try { + ExtractOriginFormDTO extractOriginFormDTO = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); + if (!isRange) { + //截止到当前dateId + try { factGroupActDailyService.extractGridGroupActDaily(extractOriginFormDTO.getCustomerId(), extractOriginFormDTO.getDateId()); + } catch (Exception e) { + log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); } - } catch (Exception e) { - log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); - } - try { - for (int i = 0; i < finalDaysBetween.size(); i++) { - String dateDimId = finalDaysBetween.get(i); - extractOriginFormDTO.setDateId(dateDimId); + try { factGroupActDailyService.extractAgencyGroupActDaily(extractOriginFormDTO.getCustomerId(), extractOriginFormDTO.getDateId()); + } catch (Exception e) { + log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); + } + } else { + //参数指定日期内,比如startDate=20210501,endDate=20210513;依次计算截止到20210501的数据.....截止到20210513的数据 + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + extractOriginFormDTO.setDateId(dateDimId); + factGroupActDailyService.extractGridGroupActDaily(extractOriginFormDTO.getCustomerId(), extractOriginFormDTO.getDateId()); + } + } catch (Exception e) { + log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); + } + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + extractOriginFormDTO.setDateId(dateDimId); + factGroupActDailyService.extractAgencyGroupActDaily(extractOriginFormDTO.getCustomerId(), extractOriginFormDTO.getDateId()); + } + } catch (Exception e) { + log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); } - } catch (Exception e) { - log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); } + } finally { + countDownLatch.countDown(); } }); @@ -297,7 +316,18 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } });*/ - submitProjectRelationData(param, finalDaysBetween); + Future future = submitProjectRelationData(param, finalDaysBetween); + try { + future.get(); + } catch (Exception e) { + log.error("submitProjectRelationData exception:{}",e); + } + try { + countDownLatch.await(); + log.info("extractAll submitJob execute end,param:{}",JSON.toJSONString(param)); + } catch (InterruptedException e) { + log.error("extractAll daily InterruptedException:{}", e); + } } @Override From e97212815276dae3ef26cfb8bb4684c46894861c Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 7 Dec 2021 21:32:28 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E8=BF=99=E4=B8=80=E6=89=B9=E9=83=BD?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=AE=8C=E5=86=8D=E7=BB=A7=E7=BB=AD=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=9A=84=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/IssueExtractServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java index 5164c9ae6d..4cdd1368e6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/IssueExtractServiceImpl.java @@ -246,7 +246,9 @@ public class IssueExtractServiceImpl implements IssueExtractService { } }); }); - delAndInsertLog(customerId,dateId,result); + //去除pids 为空的数据 + List collect = result.stream().filter(o -> StringUtils.isNotBlank(o.getPids())).collect(Collectors.toList()); + delAndInsertLog(customerId,dateId,collect); return true; } From 5aa5e48473608e6ae4d4b40675845426ab072451 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 8 Dec 2021 09:14:21 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=B2=BB=E7=90=86=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectMainDailyDao.xml | 35 ------------------- 1 file changed, 35 deletions(-) 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 06e5479396..79a1c7b8eb 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 @@ -899,41 +899,6 @@ ON a.GRID_ID = b.GRID_ID