From e8381f97c4c21714cc2cb2383d00d37c7bcaf3b8 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 27 Oct 2023 14:08:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=20=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=92=8C=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kqapi/.idea/.gitignore | 8 ++ kqapi/.idea/checkstyle-idea.xml | 14 ++++ kqapi/.idea/compiler.xml | 14 ++++ kqapi/.idea/eclipseCodeFormatter.xml | 12 +++ kqapi/.idea/encodings.xml | 8 ++ kqapi/.idea/inspectionProfiles/Project_Default.xml | 10 +++ kqapi/.idea/jarRepositories.xml | 25 ++++++ kqapi/.idea/misc.xml | 12 +++ .../0/0/002597a7f172f343a6cffcd273be74aa895d74b3 | 3 + .../0/2/02999ca52b20720a6dba73a2ea57a018dba90084 | 3 + .../0/3/032c44040c9d507864de35d7170661addf623095 | 0 .../3/a/3a29a241dcf97a75f4de88a48dacd988a7193f67 | 0 .../4/d/4d181ee0ef35161a71fa355047c13e9ab5aa4793 | 0 .../7/a/7a4df0ff8172ed96c29e54029f6ecac024700aa5 | 95 ++++++++++++++++++++++ .../8/c/8c928fdb02a7d0f06b9a34c0b545a00ddf44aab7 | 3 + .../9/2/92bb80058f98a2589a95655e976c4c3b31905e3f | 5 ++ .../a/9/a90097c62f2d5eef81300bceaa14afa9559ec829 | 5 ++ .../b/7/b7eec6c95fd743ceb0853f62f1870e78ac47fa1d | 0 .../d/3/d39b8ec842398247637f12ea4caf897c9a0a8463 | 15 ++++ .../d/7/d7146276b7a0a780dc7631a29b70c58f9c37fac3 | 72 ++++++++++++++++ .../e/4/e427e2fbf9cff46a15e651e8759e4487828aaa90 | 0 .../e/c/ecd8157d3ccb289d327361f90fcef4d14eddb335 | 5 ++ .../f/1/f1ece2c596126c2753f07e9c33ac1dee153eca7c | 3 + kqapi/.idea/sonarlint/issuestore/index.pb | 31 +++++++ kqapi/.idea/vcs.xml | 6 ++ .../common/handler/GlobalResponseHandler.java | 2 +- .../zzsfw/controller/NdKqZzsfwMenuController.java | 5 +- .../kqapi/zzsfw/manage/MatterManage.java | 16 ++-- 28 files changed, 361 insertions(+), 11 deletions(-) create mode 100644 kqapi/.idea/.gitignore create mode 100644 kqapi/.idea/checkstyle-idea.xml create mode 100644 kqapi/.idea/compiler.xml create mode 100644 kqapi/.idea/eclipseCodeFormatter.xml create mode 100644 kqapi/.idea/encodings.xml create mode 100644 kqapi/.idea/inspectionProfiles/Project_Default.xml create mode 100644 kqapi/.idea/jarRepositories.xml create mode 100644 kqapi/.idea/misc.xml create mode 100644 kqapi/.idea/sonarlint/issuestore/0/0/002597a7f172f343a6cffcd273be74aa895d74b3 create mode 100644 kqapi/.idea/sonarlint/issuestore/0/2/02999ca52b20720a6dba73a2ea57a018dba90084 create mode 100644 kqapi/.idea/sonarlint/issuestore/0/3/032c44040c9d507864de35d7170661addf623095 create mode 100644 kqapi/.idea/sonarlint/issuestore/3/a/3a29a241dcf97a75f4de88a48dacd988a7193f67 create mode 100644 kqapi/.idea/sonarlint/issuestore/4/d/4d181ee0ef35161a71fa355047c13e9ab5aa4793 create mode 100644 kqapi/.idea/sonarlint/issuestore/7/a/7a4df0ff8172ed96c29e54029f6ecac024700aa5 create mode 100644 kqapi/.idea/sonarlint/issuestore/8/c/8c928fdb02a7d0f06b9a34c0b545a00ddf44aab7 create mode 100644 kqapi/.idea/sonarlint/issuestore/9/2/92bb80058f98a2589a95655e976c4c3b31905e3f create mode 100644 kqapi/.idea/sonarlint/issuestore/a/9/a90097c62f2d5eef81300bceaa14afa9559ec829 create mode 100644 kqapi/.idea/sonarlint/issuestore/b/7/b7eec6c95fd743ceb0853f62f1870e78ac47fa1d create mode 100644 kqapi/.idea/sonarlint/issuestore/d/3/d39b8ec842398247637f12ea4caf897c9a0a8463 create mode 100644 kqapi/.idea/sonarlint/issuestore/d/7/d7146276b7a0a780dc7631a29b70c58f9c37fac3 create mode 100644 kqapi/.idea/sonarlint/issuestore/e/4/e427e2fbf9cff46a15e651e8759e4487828aaa90 create mode 100644 kqapi/.idea/sonarlint/issuestore/e/c/ecd8157d3ccb289d327361f90fcef4d14eddb335 create mode 100644 kqapi/.idea/sonarlint/issuestore/f/1/f1ece2c596126c2753f07e9c33ac1dee153eca7c create mode 100644 kqapi/.idea/sonarlint/issuestore/index.pb create mode 100644 kqapi/.idea/vcs.xml diff --git a/kqapi/.idea/.gitignore b/kqapi/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/kqapi/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/kqapi/.idea/checkstyle-idea.xml b/kqapi/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..0508403 --- /dev/null +++ b/kqapi/.idea/checkstyle-idea.xml @@ -0,0 +1,14 @@ + + + + 10.5.0 + JavaOnly + true + + + \ No newline at end of file diff --git a/kqapi/.idea/compiler.xml b/kqapi/.idea/compiler.xml new file mode 100644 index 0000000..5439b93 --- /dev/null +++ b/kqapi/.idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kqapi/.idea/eclipseCodeFormatter.xml b/kqapi/.idea/eclipseCodeFormatter.xml new file mode 100644 index 0000000..d868994 --- /dev/null +++ b/kqapi/.idea/eclipseCodeFormatter.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/kqapi/.idea/encodings.xml b/kqapi/.idea/encodings.xml new file mode 100644 index 0000000..7d45135 --- /dev/null +++ b/kqapi/.idea/encodings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/kqapi/.idea/inspectionProfiles/Project_Default.xml b/kqapi/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..b400ae1 --- /dev/null +++ b/kqapi/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/kqapi/.idea/jarRepositories.xml b/kqapi/.idea/jarRepositories.xml new file mode 100644 index 0000000..a2e2b69 --- /dev/null +++ b/kqapi/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/kqapi/.idea/misc.xml b/kqapi/.idea/misc.xml new file mode 100644 index 0000000..d5cd614 --- /dev/null +++ b/kqapi/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/kqapi/.idea/sonarlint/issuestore/0/0/002597a7f172f343a6cffcd273be74aa895d74b3 b/kqapi/.idea/sonarlint/issuestore/0/0/002597a7f172f343a6cffcd273be74aa895d74b3 new file mode 100644 index 0000000..0c7d268 --- /dev/null +++ b/kqapi/.idea/sonarlint/issuestore/0/0/002597a7f172f343a6cffcd273be74aa895d74b3 @@ -0,0 +1,3 @@ + +U +java:S1118":Add a private constructor to hide the implicit public one.(۫ \ No newline at end of file diff --git a/kqapi/.idea/sonarlint/issuestore/0/2/02999ca52b20720a6dba73a2ea57a018dba90084 b/kqapi/.idea/sonarlint/issuestore/0/2/02999ca52b20720a6dba73a2ea57a018dba90084 new file mode 100644 index 0000000..1f74f1e --- /dev/null +++ b/kqapi/.idea/sonarlint/issuestore/0/2/02999ca52b20720a6dba73a2ea57a018dba90084 @@ -0,0 +1,3 @@ + +U +java:S1118":Add a private constructor to hide the implicit public one.( \ No newline at end of file diff --git a/kqapi/.idea/sonarlint/issuestore/0/3/032c44040c9d507864de35d7170661addf623095 b/kqapi/.idea/sonarlint/issuestore/0/3/032c44040c9d507864de35d7170661addf623095 new file mode 100644 index 0000000..e69de29 diff --git a/kqapi/.idea/sonarlint/issuestore/3/a/3a29a241dcf97a75f4de88a48dacd988a7193f67 b/kqapi/.idea/sonarlint/issuestore/3/a/3a29a241dcf97a75f4de88a48dacd988a7193f67 new file mode 100644 index 0000000..e69de29 diff --git a/kqapi/.idea/sonarlint/issuestore/4/d/4d181ee0ef35161a71fa355047c13e9ab5aa4793 b/kqapi/.idea/sonarlint/issuestore/4/d/4d181ee0ef35161a71fa355047c13e9ab5aa4793 new file mode 100644 index 0000000..e69de29 diff --git a/kqapi/.idea/sonarlint/issuestore/7/a/7a4df0ff8172ed96c29e54029f6ecac024700aa5 b/kqapi/.idea/sonarlint/issuestore/7/a/7a4df0ff8172ed96c29e54029f6ecac024700aa5 new file mode 100644 index 0000000..dfefc2b --- /dev/null +++ b/kqapi/.idea/sonarlint/issuestore/7/a/7a4df0ff8172ed96c29e54029f6ecac024700aa5 @@ -0,0 +1,95 @@ + +o +java:S1192"SDefine a constant instead of duplicating this literal "Unexpected value: " 3 times.( +n +java:S1192"WDefine a constant instead of duplicating this literal "状态机执行失败!" 3 times.( +e +java:S1192"IDefine a constant instead of duplicating this literal "approve_" 5 times.( +t java:S135"YReduce the total number of break and continue statements in this loop to use at most one.(Î +A +java:S5411"*Use the primitive boolean expression here.( +Z +java:S2583"CChange this condition so that it does not always evaluate to "true"( +W java:S125"src/main/java/com/ningdatech/pmapi/irs/sign/IRSAPIRequest.java,d\7\d7146276b7a0a780dc7631a29b70c58f9c37fac3 \ No newline at end of file diff --git a/kqapi/.idea/vcs.xml b/kqapi/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/kqapi/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/kqapi/src/main/java/com/ningdatech/kqapi/common/handler/GlobalResponseHandler.java b/kqapi/src/main/java/com/ningdatech/kqapi/common/handler/GlobalResponseHandler.java index 9adeba0..28d1001 100644 --- a/kqapi/src/main/java/com/ningdatech/kqapi/common/handler/GlobalResponseHandler.java +++ b/kqapi/src/main/java/com/ningdatech/kqapi/common/handler/GlobalResponseHandler.java @@ -16,7 +16,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; * @Version 1.0 **/ @RestControllerAdvice(basePackages = { - "com.ningdatech.kqapi.zzsfw.controller" + }) public class GlobalResponseHandler implements ResponseBodyAdvice { diff --git a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java index 4745531..c4e7ff3 100644 --- a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java +++ b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/controller/NdKqZzsfwMenuController.java @@ -1,6 +1,7 @@ package com.ningdatech.kqapi.zzsfw.controller; +import com.ningdatech.basic.model.ApiResponse; import com.ningdatech.kqapi.zzsfw.entity.vo.MattersVO; import com.ningdatech.kqapi.zzsfw.entity.vo.ZoneVO; import com.ningdatech.kqapi.zzsfw.manage.MatterManage; @@ -36,7 +37,7 @@ public class NdKqZzsfwMenuController { @ApiOperation(value = "获取政务事项数据列表", notes = "获取政务事项数据列表") @GetMapping("/matters") - public List getMatters() { - return matterManage.getMatters(); + public ApiResponse> getMatters() { + return ApiResponse.ofSuccess(matterManage.getMatters()); } } diff --git a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java index b8ec982..d099222 100644 --- a/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java +++ b/kqapi/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java @@ -1,14 +1,13 @@ package com.ningdatech.kqapi.zzsfw.manage; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.StopWatch; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq; +import com.ningdatech.kqapi.common.enumeration.CommonEnum; import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu; import com.ningdatech.kqapi.zzsfw.entity.vo.MattersVO; import com.ningdatech.kqapi.zzsfw.entity.vo.WindowVO; import com.ningdatech.kqapi.zzsfw.entity.vo.ZoneVO; -import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService; import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -36,24 +35,25 @@ public class MatterManage { public List getMatters() { List matters = menuService.list(Wrappers.lambdaQuery(NdKqZzsfwMenu.class) - .eq(NdKqZzsfwMenu::getHasUrl,1) + .eq(NdKqZzsfwMenu::getHasUrl, CommonEnum.YES.getCode()) .orderByAsc(NdKqZzsfwMenu::getSort)); - if(CollUtil.isEmpty(matters)){ return Collections.emptyList(); } Set zoneSet = new HashSet<>(); - return matters.stream().filter(m -> zoneSet.add(m.getZoneName())).map(m -> { + List res = matters.stream().filter(m -> zoneSet.add(m.getZoneName())).map(m -> { ZoneVO zone = new ZoneVO(); zone.setZoneName(m.getZoneName()); - zone.setWindows(generateWindows(m,matters)); + zone.setWindows(generateWindows(m, matters)); return zone; }).collect(Collectors.toList()); + return res; } private List generateWindows(NdKqZzsfwMenu menu, List matters) { - return matters.stream().filter(m -> StringUtils.isNotBlank(m.getZoneName()) && m.getZoneName().equals(menu.getZoneName())) + Set windowSet = new HashSet<>(); + return matters.stream().filter(m -> windowSet.add(m.getWindow()) && StringUtils.isNotBlank(m.getZoneName()) && m.getZoneName().equals(menu.getZoneName())) .map(m -> { WindowVO window = new WindowVO(); window.setWindowName(m.getWindow());