From f8fdc30b67d98a412e339914ec3ffcd6e782208e Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 29 Jun 2022 09:39:47 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java | 5 +++++ .../java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java | 5 +++++ .../java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java | 5 +++++ .../java/com/epmet/opendata/dto/form/CaResidentFormDTO.java | 5 +++++ .../java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java | 5 +++++ .../src/main/java/com/epmet/opendata/dao/CaLoudongDao.java | 3 ++- .../src/main/java/com/epmet/opendata/dao/CaPingfangDao.java | 3 ++- .../src/main/java/com/epmet/opendata/dao/CaRentalDao.java | 3 ++- .../src/main/java/com/epmet/opendata/dao/CaResidentDao.java | 3 ++- .../src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java | 3 ++- .../epmet/opendata/service/impl/CaLoudongServiceImpl.java | 3 ++- .../epmet/opendata/service/impl/CaPingfangServiceImpl.java | 3 ++- .../com/epmet/opendata/service/impl/CaRentalServiceImpl.java | 3 ++- .../epmet/opendata/service/impl/CaResidentServiceImpl.java | 3 ++- .../epmet/opendata/service/impl/CaRotatorsServiceImpl.java | 3 ++- .../src/main/resources/mapper/CaLoudongDao.xml | 3 +++ .../src/main/resources/mapper/CaPingfangDao.xml | 3 +++ .../src/main/resources/mapper/CaRentalDao.xml | 3 +++ .../src/main/resources/mapper/CaResidentDao.xml | 3 +++ .../src/main/resources/mapper/CaRotatorsDao.xml | 3 +++ 20 files changed, 60 insertions(+), 10 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java index 6c6194c0e7..ca07897a61 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java @@ -35,6 +35,11 @@ public class CaLoudongFormDTO implements Serializable { */ private String gridId; + /** + * 所处位置 + */ + private String buildingAddr; + private Integer page; private Integer limit; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java index 5a507918a2..33e91700f9 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java @@ -29,6 +29,11 @@ public class CaPingfangFormDTO implements Serializable { */ private String communityName; + /** + * 所处位置 + */ + private String buildingAddr; + /** * 网格id */ diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java index 06070f65ae..8a48beeff7 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java @@ -39,6 +39,11 @@ public class CaRentalFormtDTO implements Serializable { */ private String renterName; + /** + * 房屋地址 + */ + private String houseAddress; + private Integer page; private Integer limit; diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java index 07ba491aca..62f1445e98 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java @@ -44,4 +44,9 @@ public class CaResidentFormDTO implements Serializable { */ private String gridId; + /** + * 现住详细地址 + */ + private String curliveAddressDetail; + } diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java index 9d02d8178d..57eec76120 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java @@ -40,6 +40,11 @@ public class CaRotatorsFormDTO implements Serializable { */ private String gridId; + /** + * 现住详细地址 + */ + private String curliveAddressDetail; + private Integer page; private Integer limit; } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java index 1d8ca38493..1a5fd0756c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java @@ -35,7 +35,8 @@ public interface CaLoudongDao extends BaseDao { List getPage(@Param("communityName") String communityName, @Param("buildingName") String buildingName, @Param("gridId") String gridId, - @Param("gridList") List gridList); + @Param("gridList") List gridList, + @Param("buildingAddr") String buildingAddr); /** * 楼栋基本信息详情 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java index 16889328a4..073b6cb1a1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java @@ -25,7 +25,8 @@ public interface CaPingfangDao extends BaseDao { List getPage(@Param("buildingName") String buildingName, @Param("communityName") String communityName, @Param("gridId") String gridId, - @Param("gridList") List gridList); + @Param("gridList") List gridList, + @Param("buildingAddr") String buildingAddr); int deleteAll(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java index 3fbdf239e6..d7ff21cf98 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java @@ -30,7 +30,8 @@ public interface CaRentalDao extends BaseDao { @Param("houseName") String houseName, @Param("renterName") String renterName, @Param("gridId") String gridId, - @Param("gridList") List gridList); + @Param("gridList") List gridList, + @Param("houseAddress") String houseAddress); int deleteAll(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java index d53c54856d..572005b3e5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -32,7 +32,8 @@ public interface CaResidentDao extends BaseDao { @Param("idCard") String idCard, @Param("telephone") String telephone, @Param("gridId") String gridId, - @Param("gridList") List gridList); + @Param("gridList") List gridList, + @Param("curliveAddressDetail") String curliveAddressDetail); int deleteAll(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java index f790b1dcdc..6eb02a1440 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java @@ -30,7 +30,8 @@ public interface CaRotatorsDao extends BaseDao { @Param("idCard") String idCard, @Param("telephone") String telephone, @Param("gridId") String gridId, - @Param("gridList") List gridList); + @Param("gridList") List gridList, + @Param("curliveAddressDetail") String curliveAddressDetail); int deleteAll(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java index 79d3c65a91..2fb0a91fe1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java @@ -133,7 +133,8 @@ public class CaLoudongServiceImpl extends BaseServiceImpl result = baseDao.getPage(dto.getCommunityName(), dto.getBuildingName(), dto.getGridId(), - gridList); + gridList, + dto.getBuildingAddr()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java index 9161176eaa..e5b15a0bff 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java @@ -127,7 +127,8 @@ public class CaPingfangServiceImpl extends BaseServiceImpl result = baseDao.getPage(dto.getBuildingName(), dto.getCommunityName(), dto.getGridId(), - gridList); + gridList, + dto.getBuildingAddr()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java index 51b2a9a2db..7ed267303e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java @@ -131,7 +131,8 @@ public class CaRentalServiceImpl extends BaseServiceImpl info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index a0878ffbad..89106d0aa1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -139,7 +139,8 @@ public class CaResidentServiceImpl extends BaseServiceImpl info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java index 56c0de7d95..5ba5738f45 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java @@ -135,7 +135,8 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml index 9f62247250..9e5814844f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml @@ -114,6 +114,9 @@ AND vs.business_org_id = #{gridId} + + AND ca.building_addr like '%${buildingAddr}%' + order by ca.grid_id,ca.building_id,ca.community_id desc diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml index 25bb366707..688c7baf5a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml @@ -111,6 +111,9 @@ AND vs.business_org_id = #{gridId} + + AND ca.building_addr like '%${buildingAddr}%' + order by ca.grid_id,ca.building_id,ca.community_id desc diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml index f87e62be7f..ebe3b66a73 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml @@ -106,6 +106,9 @@ AND vs.business_org_id = #{gridId} + + AND ca.house_address like '%${houseAddress}%' + order by ca.grid_id,ca.rental_id,ca.id_card desc diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index 98049c9977..b720dacb29 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -138,6 +138,9 @@ AND vs.business_org_id = #{gridId} + + AND ca.curlive_address_detail like '%${curliveAddressDetail}%' + order by ca.grid_id,ca.resident_id,ca.id_card desc diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml index dbe97aecb8..2cb42cbcf3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml @@ -138,6 +138,9 @@ AND vs.business_org_id = #{gridId} + + AND curlive_address_detail like '%${curliveAddressDetail}%' + order by ca.grid_id,ca.rotators_id,ca.id_card desc From 6c0d6973060ce5c046edaeb851a2952da896050d Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 29 Jun 2022 10:44:16 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/WghSjxxFormDTO.java | 37 +++++++++++++++ .../opendata/dto/result/WghSjxxResultDTO.java | 47 +++++++++++++++++++ .../controller/WghSjxxbController.java | 20 ++++++++ .../com/epmet/opendata/dao/WghSjxxbDao.java | 16 +++++++ .../opendata/service/WghSjxxbService.java | 12 +++++ .../service/impl/WghSjxxbServiceImpl.java | 21 +++++++++ .../src/main/resources/mapper/WghSjxxbDao.xml | 27 +++++++++++ 7 files changed, 180 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxFormDTO.java new file mode 100644 index 0000000000..b0e96441bf --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxFormDTO.java @@ -0,0 +1,37 @@ +package com.epmet.opendata.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.net.Inet4Address; + +@Data +public class WghSjxxFormDTO implements Serializable { + + private static final long serialVersionUID = 3208547934202974728L; + + /** + * 事件来源 + */ + private String infosourcename; + + /** + * 事件类别 + */ + private String infotypename; + + /** + * 社区名称 + */ + private String communityname; + + /** + * 事件状态 + */ + private String statusname; + + private Integer page; + + private Integer limit; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java new file mode 100644 index 0000000000..709e21f049 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class WghSjxxResultDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -5318466282262952340L; + + /** + * 事件来源 + */ + private String infosourcename; + + /** + * 事件类别 + */ + private String infotypename; + + /** + * 社区名称 + */ + private String communityname; + + /** + * 事见描述 + */ + private String description; + + /** + * 事见地址 + */ + private String address; + + /** + * 事见状态 + */ + private String statusname; + + /** + * 街道名称 + */ + private String streetname; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java index 4d3a6cd04b..2c15dcd393 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.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; @@ -10,6 +12,9 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; import com.epmet.opendata.excel.WghSjxxbExcel; import com.epmet.opendata.service.WghSjxxbService; @@ -92,4 +97,19 @@ public class WghSjxxbController { return new Result(); } + /** + * 事件信息分页 + * + * @param form + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @author LZN + * @date 2022/6/29 10:42 + */ + @PostMapping("getPage") + public Result> getSjxxPage(@RequestBody WghSjxxFormDTO form, @LoginUser TokenDto tokenDto) { + PageData dto = wghSjxxbService.getSjxxPage(form); + return new Result>().ok(dto); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java index d2806b93fe..3b82cc612b 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java @@ -1,8 +1,13 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.entity.WghSjxxbEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 事件信息 @@ -14,4 +19,15 @@ import org.apache.ibatis.annotations.Mapper; public interface WghSjxxbDao extends BaseDao { int deleteAll(); + + + /** + * 事件信息分页 + * + * @param form + * @return java.util.List + * @author LZN + * @date 2022/6/29 10:43 + */ + List getSjxxPage(@Param("form") WghSjxxFormDTO form); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java index 1185b76fcb..791059b024 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java @@ -3,6 +3,8 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; import com.epmet.opendata.entity.WghSjxxbEntity; @@ -86,4 +88,14 @@ public interface WghSjxxbService extends BaseService { * @date 2022/6/14 16:02 */ void getPreserSjxxVation(PreserVationFormDTO dto); + + /** + * 事件信息分页 + * + * @param form + * @return com.epmet.commons.tools.page.PageData + * @author LZN + * @date 2022/6/29 10:43 + */ + PageData getSjxxPage(WghSjxxFormDTO form); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java index ad2dee773b..c0f823a9f4 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java @@ -14,12 +14,17 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.WghSjxxbDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.WghSjxxbEntity; import com.epmet.opendata.redis.WghSjxxbRedis; import com.epmet.opendata.service.WghSjxxbService; import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -130,6 +135,22 @@ public class WghSjxxbServiceImpl extends BaseServiceImpl + * @author LZN + * @date 2022/6/29 10:43 + */ + @Override + public PageData getSjxxPage(WghSjxxFormDTO form) { + PageHelper.startPage(form.getPage(), form.getLimit()); + List result = baseDao.getSjxxPage(form); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + private int listLouDong(PreserVationFormDTO dto) throws Exception { String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml index ea94d5912f..25f8095938 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml @@ -23,6 +23,33 @@ delete from wgh_sjxxb + From b202d32885820cc55d8da0c4efcb3479d3e39fc3 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 29 Jun 2022 11:05:13 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/opendata/controller/WghSjxxbController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java index 2c15dcd393..269d18c820 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java @@ -106,7 +106,7 @@ public class WghSjxxbController { * @author LZN * @date 2022/6/29 10:42 */ - @PostMapping("getPage") + @PostMapping("todo/page") public Result> getSjxxPage(@RequestBody WghSjxxFormDTO form, @LoginUser TokenDto tokenDto) { PageData dto = wghSjxxbService.getSjxxPage(form); return new Result>().ok(dto); From 451a908d19d066f818317036a31d8c66bbf274fa Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 30 Jun 2022 14:15:07 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEid=E6=9F=A5=E8=AF=A2=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/WghSjxxbDetailFormDTO.java | 16 +++++++ .../dto/result/WghSjxxbDetailResultDTO.java | 46 +++++++++++++++++++ .../controller/WghSjxxbController.java | 16 +++++++ .../com/epmet/opendata/dao/WghSjxxbDao.java | 11 +++++ .../opendata/service/WghSjxxbService.java | 12 +++++ .../service/impl/WghSjxxbServiceImpl.java | 16 +++++++ .../src/main/resources/mapper/WghSjxxbDao.xml | 17 ++++++- 7 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxbDetailFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxbDetailResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxbDetailFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxbDetailFormDTO.java new file mode 100644 index 0000000000..0e159dccea --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxbDetailFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class WghSjxxbDetailFormDTO implements Serializable { + + private static final long serialVersionUID = -7558785082629887627L; + + /** + * 唯一id + */ + private String taskid; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxbDetailResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxbDetailResultDTO.java new file mode 100644 index 0000000000..618665f63a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxbDetailResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class WghSjxxbDetailResultDTO implements Serializable { + + private static final long serialVersionUID = 8965818800454155651L; + + /** + * 事件来源 + */ + private String infosourcename; + + /** + * 事件类别 + */ + private String infotypename; + + /** + * 社区名称 + */ + private String communityname; + + /** + * 事见描述 + */ + private String description; + + /** + * 事见地址 + */ + private String address; + + /** + * 事见状态 + */ + private String statusname; + + /** + * 街道名称 + */ + private String streetname; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java index 269d18c820..a09e7b69cf 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java @@ -13,8 +13,10 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.form.WghSjxxbDetailFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; import com.epmet.opendata.excel.WghSjxxbExcel; import com.epmet.opendata.service.WghSjxxbService; @@ -112,4 +114,18 @@ public class WghSjxxbController { return new Result>().ok(dto); } + /** + * 根据id查询详情 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/30 14:12 + */ + @PostMapping("sjxx/getDetailById") + public Result getDetailById(@RequestBody WghSjxxbDetailFormDTO dto) { + WghSjxxbDetailResultDTO result = wghSjxxbService.getDetailById(dto); + return new Result().ok(result); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java index 3b82cc612b..a23776f5e0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxbDao.java @@ -3,6 +3,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.opendata.dto.form.WghSjxxFormDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO; import com.epmet.opendata.entity.WghSjxxbEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -30,4 +31,14 @@ public interface WghSjxxbDao extends BaseDao { * @date 2022/6/29 10:43 */ List getSjxxPage(@Param("form") WghSjxxFormDTO form); + + /** + * 根据id查询详情 + * + * @param taskid + * @return com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO + * @author LZN + * @date 2022/6/30 14:13 + */ + WghSjxxbDetailResultDTO getDetailById(@Param("taskid") String taskid); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java index 791059b024..9726debd07 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxbService.java @@ -4,7 +4,9 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.form.WghSjxxbDetailFormDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; import com.epmet.opendata.entity.WghSjxxbEntity; @@ -98,4 +100,14 @@ public interface WghSjxxbService extends BaseService { * @date 2022/6/29 10:43 */ PageData getSjxxPage(WghSjxxFormDTO form); + + /** + * 根据id查询详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO + * @author LZN + * @date 2022/6/30 14:12 + */ + WghSjxxbDetailResultDTO getDetailById(WghSjxxbDetailFormDTO dto); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java index c0f823a9f4..f544232319 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java @@ -15,8 +15,10 @@ import com.epmet.opendata.dao.WghSjxxbDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.form.WghSjxxFormDTO; +import com.epmet.opendata.dto.form.WghSjxxbDetailFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.WghSjxxbEntity; @@ -151,6 +153,20 @@ public class WghSjxxbServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + /** + * 根据id查询详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO + * @author LZN + * @date 2022/6/30 14:12 + */ + @Override + public WghSjxxbDetailResultDTO getDetailById(WghSjxxbDetailFormDTO dto) { + WghSjxxbDetailResultDTO result = baseDao.getDetailById(dto.getTaskid()); + return result; + } + private int listLouDong(PreserVationFormDTO dto) throws Exception { String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml index 25f8095938..1f0e3fd53e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxbDao.xml @@ -31,7 +31,8 @@ DESCRIPTION, ADDRESS, STATUSNAME, - STREETNAME + STREETNAME, + TASKID FROM wgh_sjxxb @@ -50,6 +51,20 @@ + From d17a3a93ce91103b443f74c48d299dc3c6a3e53a Mon Sep 17 00:00:00 2001 From: HAHA Date: Thu, 30 Jun 2022 14:23:32 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java index 709e21f049..1e5bb43138 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/WghSjxxResultDTO.java @@ -44,4 +44,9 @@ public class WghSjxxResultDTO extends PageFormDTO implements Serializable { * 街道名称 */ private String streetname; + + /** + * 唯一id + */ + private String taskid; } From cac670d4366bb41330567454bd88e6c0acdc2e9b Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 5 Jul 2022 14:22:16 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E7=94=A8ruoyi=E6=8E=A5=E5=8F=A3=E8=8E=B7?= =?UTF-8?q?=E5=8F=96wgh=5Fsjxx=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/constant/CaWghDataConstant.java | 8 +- .../epmet/opendata/dto/wgh/WghSjxxDTO.java | 330 +++++++++++++++++ .../controller/WghSjxxController.java | 96 +++++ .../controller/WghSjxxbController.java | 2 +- .../com/epmet/opendata/dao/WghSjxxDao.java | 26 ++ .../epmet/opendata/entity/WghSjxxEntity.java | 335 ++++++++++++++++++ .../epmet/opendata/excel/WghSjxxExcel.java | 205 +++++++++++ .../epmet/opendata/redis/WghSjxxRedis.java | 30 ++ .../opendata/service/WghSjxxService.java | 90 +++++ .../impl/GuardarDatosTaskServiceImpl.java | 9 +- .../service/impl/WghSjxxServiceImpl.java | 172 +++++++++ .../service/impl/WghSjxxbServiceImpl.java | 4 +- .../src/main/resources/mapper/WghSjxxDao.xml | 75 ++++ 13 files changed, 1375 insertions(+), 7 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxEntity.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxExcel.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxRedis.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java index 0c43a0ae97..949522d31d 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/CaWghDataConstant.java @@ -13,6 +13,7 @@ public interface CaWghDataConstant { String TABLESCHEMA_UNICOM = "unicom"; String TABLESCHEMA_SHARE = "share"; + String TABLESCHEMA_WGH = "wgh"; String UNICOM_PINGFANG = "ca_pingfang"; @@ -32,7 +33,7 @@ public interface CaWghDataConstant { String SHARE_WGH_JQZ = "wgh_jqz"; String SHARE_WGH_JXCS = "wgh_jxcs"; String SHARE_WGH_JYZ = "wgh_jyz"; - String SHARE_WGH_SJXX = "wgh_sjxxb"; + String SHARE_WGH_SJXXB = "wgh_sjxxb"; String SHARE_WGH_SQXX = "wgh_sqxx"; String SHARE_WGH_SZCGWGH = "wgh_szcgwgh"; String SHARE_WGH_SZZRWG = "wgh_szzrwg"; @@ -40,9 +41,14 @@ public interface CaWghDataConstant { String SHARE_WGH_YJBMCS = "wgh_yjbmcs"; String SHARE_WGH_YQHJZ = "wgh_yqhjz"; + + String SHARE_WGH_SJXX = "wgh_sjxx"; + String DATA_URL_UNICON = "http://120.221.72.83:9090/bridge/unicom/page"; String DATA_URL_SHARE = "http://120.221.72.83:9090/bridge/share/sharePage"; + String DATA_URL_WGH = "http://120.221.72.83:9090/bridge/wgh/wghPage"; String UNICOM_CONDITION = "unicomCondition"; String SHARE_CONDITION = "shareCondition"; + String WGH_CONDITION = "wghCondition"; } diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxDTO.java new file mode 100644 index 0000000000..1b0951fcc5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/wgh/WghSjxxDTO.java @@ -0,0 +1,330 @@ +package com.epmet.opendata.dto.wgh; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@Data +public class WghSjxxDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 案卷标识 + */ + private Integer recid; + + /** + * 事件编号 + */ + private String sjbh; + + /** + * 事件领域 + */ + private String sjlyu; + + /** + * 事件大类 + */ + private String sjdl; + + /** + * 事件小类 + */ + private String sjxl; + + /** + * 事件细类 + */ + private String sjxil; + + /** + * 事件来源 + */ + private String sjly; + + /** + * 所属区/市 + */ + private String ssqs; + + /** + * 所属街道 + */ + private String ssjd; + + /** + * 所属社区 + */ + private String sssq; + + /** + * 事件地址 + */ + private String sjdz; + + /** + * 事件描述 + */ + private String sjms; + + /** + * 网格员标识 + */ + private String wgybs; + + /** + * 网格员名称 + */ + private String wgymc; + + /** + * 所属部门 + */ + private String ssbm; + + /** + * X坐标 + */ + private BigDecimal xzb; + + /** + * Y坐标 + */ + private BigDecimal yzb; + + /** + * 核实意见 + */ + private String hsyj; + + /** + * 创建日期 + */ + private Date createdate; + + /** + * 事件领域标签 + */ + private String sjlyubq; + + /** + * 事件大类标签 + */ + private String sjdlbq; + + /** + * 事件小类标签 + */ + private String sjxlbq; + + /** + * 事件细类标签 + */ + private String sjxilbq; + + /** + * 所属区/市标签 + */ + private String ssqsbq; + + /** + * 所属街道标签 + */ + private String ssjdbq; + + /** + * 所属社区标签 + */ + private String sssqbq; + + /** + * 事件上报 + */ + private String sjsbwj; + + /** + * 事件核实 + */ + private String sjhswj; + + /** + * 事件处置 + */ + private String sjczwj; + + /** + * 事件核查 + */ + private String sjhcwj; + + /** + * 外系统唯一标识 + */ + private String wxtwybs; + + /** + * 缩略图 + */ + private String slt; + + /** + * 处置单位 + */ + private Integer czdw; + + /** + * 处置结果 + */ + private String czjg; + + /** + * 处置单位标签 + */ + private String czdwbq; + + /** + * 是否退单 + */ + private Integer sftd; + + /** + * 是否延期 + */ + private Integer sfyq; + + /** + * 核查意见 + */ + private String hcyj; + + /** + * 是否作废 + */ + private Integer sfzf; + + /** + * 是否已核实 + */ + private Integer sfyhs; + + /** + * 是否已核查 + */ + private Integer sfyhc; + + /** + * 是否已督办 + */ + private Integer sfydb; + + /** + * 专项任务标识 + */ + private Integer zxrwbs; + + /** + * 待确责 + */ + private Integer dqz; + + /** + * 熔断状态 + */ + private Integer rdzt; + + /** + * 事件来源标签 + */ + private String sjlybq; + + /** + * 应办结时间 + */ + private Date ybjsj; + + /** + * 接收部门标识 + */ + private Integer jsbmbs; + + /** + * 核实人员标识 + */ + private Integer hsrybs; + + /** + * 核查人员标识 + */ + private Integer hcrybs; + + /** + * 处置人员标识 + */ + private Integer czrybs; + + /** + * 是否已处置 + */ + private Integer sfycz; + + /** + * 核实时间 + */ + private Date hssj; + + /** + * 核查时间 + */ + private Date hcsj; + + /** + * 处置时间 + */ + private Date czsj; + + /** + * 是否自发自处 + */ + private Integer sfzfzc; + + /** + * 核查用时 + */ + private BigDecimal hcys; + + /** + * 诉求联系人 + */ + private String sqlxr; + + /** + * 僵尸车 + */ + private Integer jsc; + + /** + * 到期时间 + */ + private Date dqsj; + + /** + * 星级评定 + */ + private Integer xjpd; + + /** + * 所属网格 + */ + private String sswg; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java new file mode 100644 index 0000000000..c56867a32a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java @@ -0,0 +1,96 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +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.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSjxxDTO; +import com.epmet.opendata.excel.WghSjxxExcel; +import com.epmet.opendata.service.WghSjxxService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@RestController +@RequestMapping("wghSjxx") +public class WghSjxxController { + + @Autowired + private WghSjxxService wghSjxxService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = wghSjxxService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + WghSjxxDTO data = wghSjxxService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody WghSjxxDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wghSjxxService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody WghSjxxDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wghSjxxService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wghSjxxService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wghSjxxService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WghSjxxExcel.class); + } + + /** + * 调用ruoyi接口获取wgh_sjxxb数据 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/7/5 14:17 + */ + @PostMapping("/wgh/getWghSjxx") + public Result getWghSjxx(@RequestBody PreserVationFormDTO dto) { + wghSjxxService.getWghSjxx(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java index a09e7b69cf..729ae19926 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxbController.java @@ -86,7 +86,7 @@ public class WghSjxxbController { } /** - * 调用ruoyi接口获取wgh_sjxx数据 + * 调用ruoyi接口获取wgh_sjxxb数据 * * @param dto * @return com.epmet.commons.tools.utils.Result diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java new file mode 100644 index 0000000000..7d9c9891e7 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java @@ -0,0 +1,26 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.entity.WghSjxxEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@Mapper +public interface WghSjxxDao extends BaseDao { + + /** + * 全量删除 + * + * @param + * @return int + * @author LZN + * @date 2022/7/5 14:18 + */ + int deleteAll(); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxEntity.java new file mode 100644 index 0000000000..6b712eed8d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxEntity.java @@ -0,0 +1,335 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("wgh_sjxx") +public class WghSjxxEntity { + + private static final long serialVersionUID = 1L; + + /** + * 案卷标识 + */ + private Integer recid; + + /** + * 事件编号 + */ + private String sjbh; + + /** + * 事件领域 + */ + private String sjlyu; + + /** + * 事件大类 + */ + private String sjdl; + + /** + * 事件小类 + */ + private String sjxl; + + /** + * 事件细类 + */ + private String sjxil; + + /** + * 事件来源 + */ + private String sjly; + + /** + * 所属区/市 + */ + private String ssqs; + + /** + * 所属街道 + */ + private String ssjd; + + /** + * 所属社区 + */ + private String sssq; + + /** + * 事件地址 + */ + private String sjdz; + + /** + * 事件描述 + */ + private String sjms; + + /** + * 网格员标识 + */ + private String wgybs; + + /** + * 网格员名称 + */ + private String wgymc; + + /** + * 所属部门 + */ + private String ssbm; + + /** + * X坐标 + */ + private BigDecimal xzb; + + /** + * Y坐标 + */ + private BigDecimal yzb; + + /** + * 核实意见 + */ + private String hsyj; + + /** + * 创建日期 + */ + private Date createdate; + + /** + * 事件领域标签 + */ + private String sjlyubq; + + /** + * 事件大类标签 + */ + private String sjdlbq; + + /** + * 事件小类标签 + */ + private String sjxlbq; + + /** + * 事件细类标签 + */ + private String sjxilbq; + + /** + * 所属区/市标签 + */ + private String ssqsbq; + + /** + * 所属街道标签 + */ + private String ssjdbq; + + /** + * 所属社区标签 + */ + private String sssqbq; + + /** + * 事件上报 + */ + private String sjsbwj; + + /** + * 事件核实 + */ + private String sjhswj; + + /** + * 事件处置 + */ + private String sjczwj; + + /** + * 事件核查 + */ + private String sjhcwj; + + /** + * 外系统唯一标识 + */ + private String wxtwybs; + + /** + * 缩略图 + */ + private String slt; + + /** + * 处置单位 + */ + private Integer czdw; + + /** + * 处置结果 + */ + private String czjg; + + /** + * 处置单位标签 + */ + private String czdwbq; + + /** + * 是否退单 + */ + private Integer sftd; + + /** + * 是否延期 + */ + private Integer sfyq; + + /** + * 核查意见 + */ + private String hcyj; + + /** + * 是否作废 + */ + private Integer sfzf; + + /** + * 是否已核实 + */ + private Integer sfyhs; + + /** + * 是否已核查 + */ + private Integer sfyhc; + + /** + * 是否已督办 + */ + private Integer sfydb; + + /** + * 专项任务标识 + */ + private Integer zxrwbs; + + /** + * 待确责 + */ + private Integer dqz; + + /** + * 熔断状态 + */ + private Integer rdzt; + + /** + * 事件来源标签 + */ + private String sjlybq; + + /** + * 应办结时间 + */ + private Date ybjsj; + + /** + * 接收部门标识 + */ + private Integer jsbmbs; + + /** + * 核实人员标识 + */ + private Integer hsrybs; + + /** + * 核查人员标识 + */ + private Integer hcrybs; + + /** + * 处置人员标识 + */ + private Integer czrybs; + + /** + * 是否已处置 + */ + private Integer sfycz; + + /** + * 核实时间 + */ + private Date hssj; + + /** + * 核查时间 + */ + private Date hcsj; + + /** + * 处置时间 + */ + private Date czsj; + + /** + * 是否自发自处 + */ + private Integer sfzfzc; + + /** + * 核查用时 + */ + private BigDecimal hcys; + + /** + * 诉求联系人 + */ + private String sqlxr; + + /** + * 僵尸车 + */ + private Integer jsc; + + /** + * 到期时间 + */ + private Date dqsj; + + /** + * 星级评定 + */ + private Integer xjpd; + + /** + * 所属网格 + */ + private String sswg; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxExcel.java new file mode 100644 index 0000000000..e676083ab0 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSjxxExcel.java @@ -0,0 +1,205 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@Data +public class WghSjxxExcel { + + @Excel(name = "案卷标识") + private Integer recid; + + @Excel(name = "事件编号") + private String sjbh; + + @Excel(name = "事件领域") + private String sjlyu; + + @Excel(name = "事件大类") + private String sjdl; + + @Excel(name = "事件小类") + private String sjxl; + + @Excel(name = "事件细类") + private String sjxil; + + @Excel(name = "事件来源") + private String sjly; + + @Excel(name = "所属区/市") + private String ssqs; + + @Excel(name = "所属街道") + private String ssjd; + + @Excel(name = "所属社区") + private String sssq; + + @Excel(name = "事件地址") + private String sjdz; + + @Excel(name = "事件描述") + private String sjms; + + @Excel(name = "网格员标识") + private String wgybs; + + @Excel(name = "网格员名称") + private String wgymc; + + @Excel(name = "所属部门") + private String ssbm; + + @Excel(name = "X坐标") + private BigDecimal xzb; + + @Excel(name = "Y坐标") + private BigDecimal yzb; + + @Excel(name = "核实意见") + private String hsyj; + + @Excel(name = "创建日期") + private Date createdate; + + @Excel(name = "事件领域标签") + private String sjlyubq; + + @Excel(name = "事件大类标签") + private String sjdlbq; + + @Excel(name = "事件小类标签") + private String sjxlbq; + + @Excel(name = "事件细类标签") + private String sjxilbq; + + @Excel(name = "所属区/市标签") + private String ssqsbq; + + @Excel(name = "所属街道标签") + private String ssjdbq; + + @Excel(name = "所属社区标签") + private String sssqbq; + + @Excel(name = "事件上报") + private String sjsbwj; + + @Excel(name = "事件核实") + private String sjhswj; + + @Excel(name = "事件处置") + private String sjczwj; + + @Excel(name = "事件核查") + private String sjhcwj; + + @Excel(name = "外系统唯一标识") + private String wxtwybs; + + @Excel(name = "缩略图") + private String slt; + + @Excel(name = "处置单位") + private Integer czdw; + + @Excel(name = "处置结果") + private String czjg; + + @Excel(name = "处置单位标签") + private String czdwbq; + + @Excel(name = "是否退单") + private Integer sftd; + + @Excel(name = "是否延期") + private Integer sfyq; + + @Excel(name = "核查意见") + private String hcyj; + + @Excel(name = "是否作废") + private Integer sfzf; + + @Excel(name = "是否已核实") + private Integer sfyhs; + + @Excel(name = "是否已核查") + private Integer sfyhc; + + @Excel(name = "是否已督办") + private Integer sfydb; + + @Excel(name = "专项任务标识") + private Integer zxrwbs; + + @Excel(name = "待确责") + private Integer dqz; + + @Excel(name = "熔断状态") + private Integer rdzt; + + @Excel(name = "事件来源标签") + private String sjlybq; + + @Excel(name = "应办结时间") + private Date ybjsj; + + @Excel(name = "接收部门标识") + private Integer jsbmbs; + + @Excel(name = "核实人员标识") + private Integer hsrybs; + + @Excel(name = "核查人员标识") + private Integer hcrybs; + + @Excel(name = "处置人员标识") + private Integer czrybs; + + @Excel(name = "是否已处置") + private Integer sfycz; + + @Excel(name = "核实时间") + private Date hssj; + + @Excel(name = "核查时间") + private Date hcsj; + + @Excel(name = "处置时间") + private Date czsj; + + @Excel(name = "是否自发自处") + private Integer sfzfzc; + + @Excel(name = "核查用时") + private BigDecimal hcys; + + @Excel(name = "诉求联系人") + private String sqlxr; + + @Excel(name = "僵尸车") + private Integer jsc; + + @Excel(name = "到期时间") + private Date dqsj; + + @Excel(name = "星级评定") + private Integer xjpd; + + @Excel(name = "所属网格") + private String sswg; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxRedis.java new file mode 100644 index 0000000000..bda306137a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/WghSjxxRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@Component +public class WghSjxxRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java new file mode 100644 index 0000000000..38396400ed --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java @@ -0,0 +1,90 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSjxxDTO; +import com.epmet.opendata.entity.WghSjxxEntity; + + +import java.util.List; +import java.util.Map; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +public interface WghSjxxService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-07-05 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-07-05 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return WghSjxxDTO + * @author generator + * @date 2022-07-05 + */ + WghSjxxDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-07-05 + */ + void save(WghSjxxDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-07-05 + */ + void update(WghSjxxDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-07-05 + */ + void delete(String[] ids); + + /** + * 调用ruoyi接口获取wgh_sjxxb数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/7/5 14:18 + */ + void getWghSjxx(PreserVationFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java index 8937858883..76d82e71b7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GuardarDatosTaskServiceImpl.java @@ -4,7 +4,6 @@ import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.service.*; import lombok.extern.slf4j.Slf4j; -import net.bytebuddy.asm.Advice; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -79,6 +78,9 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { @Autowired private CaBmCategoryService caBmCategoryService; + @Autowired + private WghSjxxService wghSjxxService; + @Override public void guardarDatosTask(PreserVationFormDTO dto) { if (StringUtils.isNotBlank(dto.getTableName())) { @@ -122,7 +124,7 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { case CaWghDataConstant.SHARE_WGH_JYZ: wghJyzService.getPreserWghJyzVation(dto); break; - case CaWghDataConstant.SHARE_WGH_SJXX: + case CaWghDataConstant.SHARE_WGH_SJXXB: wghSjxxbService.getPreserSjxxVation(dto); break; case CaWghDataConstant.SHARE_WGH_SQXX: @@ -149,6 +151,9 @@ public class GuardarDatosTaskServiceImpl implements GuardarDatosTaskService { case CaWghDataConstant.UNICOM_SYS_DICT: caSysDictService.preserSysdictVation(dto); break; + case CaWghDataConstant.SHARE_WGH_SJXX: + wghSjxxService.getWghSjxx(dto); + break; } } else{ throw new Error("没传名字"); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java new file mode 100644 index 0000000000..e3f30b415e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java @@ -0,0 +1,172 @@ +package com.epmet.opendata.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSjxxDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.WghSjxxDTO; +import com.epmet.opendata.entity.WghSjxxEntity; +import com.epmet.opendata.entity.WghSjxxbEntity; +import com.epmet.opendata.redis.WghSjxxRedis; +import com.epmet.opendata.service.WghSjxxService; +import com.epmet.opendata.util.AesUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-05 + */ +@Service +public class WghSjxxServiceImpl extends BaseServiceImpl implements WghSjxxService { + + @Autowired + private WghSjxxRedis wghSjxxRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WghSjxxDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WghSjxxDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public WghSjxxDTO get(String id) { + WghSjxxEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WghSjxxDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WghSjxxDTO dto) { + WghSjxxEntity entity = ConvertUtils.sourceToTarget(dto, WghSjxxEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WghSjxxDTO dto) { + WghSjxxEntity entity = ConvertUtils.sourceToTarget(dto, WghSjxxEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 调用ruoyi接口获取wgh_sjxxb数据 + * + * @param dto + * @return void + * @author LZN + * @date 2022/7/5 14:18 + */ + @Override + public void getWghSjxx(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(CaWghDataConstant.PAGE_LIMIT); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_WGH); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SJXX); + + dto.setWhereCase("1=1"); + dto.setOrderBy("createdate,hssj,hcsj,czsj"); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listWgh(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + } + + private int listWgh(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.WGH_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_WGH, obj.toJSONString()).getData(); + JSONObject toResult = JSON.parseObject(data); + Result result = ConvertUtils.mapToEntity(toResult, Result.class); + if (!result.success()) { + return dto.getPageNo() + 1; + } + + ReturnDate returnDate = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), ReturnDate.class); + this.insertBatch(returnDate.getList()); + return returnDate.getTotal(); + } + + static class ReturnDate { + + private int total; + private List list; + + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java index f544232319..c9c8fc9cca 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxbServiceImpl.java @@ -16,11 +16,9 @@ import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.form.WghSjxxFormDTO; import com.epmet.opendata.dto.form.WghSjxxbDetailFormDTO; -import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.result.WghSjxxbDetailResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxbDTO; -import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.WghSjxxbEntity; import com.epmet.opendata.redis.WghSjxxbRedis; import com.epmet.opendata.service.WghSjxxbService; @@ -115,7 +113,7 @@ public class WghSjxxbServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from wgh_sjxx + + + + From 8bc03089641805022be255c41888f6babb0f17a3 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 5 Jul 2022 14:50:50 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0flyway=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V0.0.12__create_table_wgh_sjxx.sql | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.12__create_table_wgh_sjxx.sql diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.12__create_table_wgh_sjxx.sql b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.12__create_table_wgh_sjxx.sql new file mode 100644 index 0000000000..0006577acd --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/db/migration/V0.0.12__create_table_wgh_sjxx.sql @@ -0,0 +1,67 @@ +DROP TABLE IF EXISTS `wgh_sjxx`; + +CREATE TABLE `wgh_sjxx` ( + `recid` int(11) NOT NULL COMMENT '案卷标识', + `sjbh` varchar(100) DEFAULT NULL COMMENT '事件编号', + `sjlyu` varchar(2) DEFAULT NULL COMMENT '事件领域', + `sjdl` varchar(4) DEFAULT NULL COMMENT '事件大类', + `sjxl` varchar(6) DEFAULT NULL COMMENT '事件小类', + `sjxil` varchar(8) DEFAULT NULL COMMENT '事件细类', + `sjly` varchar(100) DEFAULT NULL COMMENT '事件来源', + `ssqs` varchar(12) DEFAULT NULL COMMENT '所属区/市', + `ssjd` varchar(19) DEFAULT NULL COMMENT '所属街道', + `sssq` varchar(19) DEFAULT NULL COMMENT '所属社区', + `sjdz` text COMMENT '事件地址', + `sjms` text COMMENT '事件描述', + `wgybs` varchar(100) DEFAULT NULL COMMENT '网格员标识', + `wgymc` varchar(100) DEFAULT NULL COMMENT '网格员名称', + `ssbm` varchar(100) DEFAULT NULL COMMENT '所属部门', + `xzb` decimal(18,9) DEFAULT NULL COMMENT 'X坐标', + `yzb` decimal(18,9) DEFAULT NULL COMMENT 'Y坐标', + `hsyj` varchar(100) DEFAULT NULL COMMENT '核实意见', + `createdate` datetime DEFAULT NULL COMMENT '创建日期', + `sjlyubq` varchar(100) DEFAULT NULL COMMENT '事件领域标签', + `sjdlbq` varchar(100) DEFAULT NULL COMMENT '事件大类标签', + `sjxlbq` varchar(200) DEFAULT NULL COMMENT '事件小类标签', + `sjxilbq` varchar(200) DEFAULT NULL COMMENT '事件细类标签', + `ssqsbq` varchar(100) DEFAULT NULL COMMENT '所属区/市标签', + `ssjdbq` varchar(100) DEFAULT NULL COMMENT '所属街道标签', + `sssqbq` varchar(100) DEFAULT NULL COMMENT '所属社区标签', + `sjsbwj` text COMMENT '事件上报', + `sjhswj` text COMMENT '事件核实', + `sjczwj` text COMMENT '事件处置', + `sjhcwj` text COMMENT '事件核查', + `wxtwybs` varchar(100) DEFAULT NULL COMMENT '外系统唯一标识', + `slt` varchar(100) DEFAULT NULL COMMENT '缩略图', + `czdw` int(11) DEFAULT NULL COMMENT '处置单位', + `czjg` text COMMENT '处置结果', + `czdwbq` varchar(100) DEFAULT NULL COMMENT '处置单位标签', + `sftd` int(11) DEFAULT NULL COMMENT '是否退单', + `sfyq` int(11) DEFAULT NULL COMMENT '是否延期', + `hcyj` varchar(100) DEFAULT NULL COMMENT '核查意见', + `sfzf` int(11) DEFAULT NULL COMMENT '是否作废', + `sfyhs` int(11) DEFAULT NULL COMMENT '是否已核实', + `sfyhc` int(11) DEFAULT NULL COMMENT '是否已核查', + `sfydb` int(11) DEFAULT NULL COMMENT '是否已督办', + `zxrwbs` int(11) DEFAULT NULL COMMENT '专项任务标识', + `dqz` int(11) DEFAULT NULL COMMENT '待确责', + `rdzt` int(11) DEFAULT NULL COMMENT '熔断状态', + `sjlybq` varchar(100) DEFAULT NULL COMMENT '事件来源标签', + `ybjsj` datetime DEFAULT NULL COMMENT '应办结时间', + `jsbmbs` int(11) DEFAULT NULL COMMENT '接收部门标识', + `hsrybs` int(11) DEFAULT NULL COMMENT '核实人员标识', + `hcrybs` int(11) DEFAULT NULL COMMENT '核查人员标识', + `czrybs` int(11) DEFAULT NULL COMMENT '处置人员标识', + `sfycz` int(11) DEFAULT NULL COMMENT '是否已处置', + `hssj` datetime DEFAULT NULL COMMENT '核实时间', + `hcsj` datetime DEFAULT NULL COMMENT '核查时间', + `czsj` datetime DEFAULT NULL COMMENT '处置时间', + `sfzfzc` int(11) DEFAULT NULL COMMENT '是否自发自处', + `hcys` decimal(10,2) DEFAULT NULL COMMENT '核查用时', + `sqlxr` varchar(200) DEFAULT NULL COMMENT '诉求联系人', + `jsc` int(11) DEFAULT NULL COMMENT '僵尸车', + `dqsj` datetime DEFAULT NULL COMMENT '到期时间', + `xjpd` int(11) DEFAULT NULL COMMENT '星级评定', + `sswg` varchar(19) DEFAULT NULL COMMENT '所属网格', + PRIMARY KEY (`recid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件信息'; From ab271f9a9834a562503bbd328c4ebb540ee79ac2 Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 5 Jul 2022 15:53:28 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=8C=96=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E4=BF=A1=E6=81=AF=E6=96=B0=E5=88=86=E9=A1=B5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/NewWghSjxxFormDTO.java | 35 +++++++++++++++ .../dto/result/NewWghSjxxResultDTO.java | 43 +++++++++++++++++++ .../controller/WghSjxxController.java | 19 ++++++++ .../com/epmet/opendata/dao/WghSjxxDao.java | 15 +++++++ .../opendata/service/WghSjxxService.java | 13 ++++++ .../service/impl/WghSjxxServiceImpl.java | 21 +++++++++ .../src/main/resources/mapper/WghSjxxDao.xml | 26 +++++++++++ 7 files changed, 172 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/NewWghSjxxFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/NewWghSjxxFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/NewWghSjxxFormDTO.java new file mode 100644 index 0000000000..9c3d70e155 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/NewWghSjxxFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class NewWghSjxxFormDTO implements Serializable { + + private static final long serialVersionUID = -4846956644682609996L; + + /** + * 网格员名称 + */ + private String wgymc; + + /** + * 街道标签 + */ + private String ssjdbq; + + /** + * 社区标签 + */ + private String sssqbq; + + /** + * 核查意见 + */ + private String hcyj; + + private Integer page; + + private Integer limit; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java new file mode 100644 index 0000000000..f59cf0a603 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java @@ -0,0 +1,43 @@ +package com.epmet.opendata.dto.result; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class NewWghSjxxResultDTO implements Serializable { + + private static final long serialVersionUID = -4088593179578850358L; + + /** + * 网格员标签 + */ + private String wgymc; + + /** + * 所属街道标签 + */ + private String ssjdbq; + + /** + * 所属社区标签 + */ + private String sssqbq; + + /** + * 核查意见 + */ + private String hcyj; + + /** + * 核查时间 + */ + private Date hcsj; + + /** + * 事件描述 + */ + private String sjms; +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java index c56867a32a..2cfeb3ee54 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java @@ -1,7 +1,9 @@ package com.epmet.opendata.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; @@ -10,7 +12,10 @@ 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.opendata.dto.form.NewWghSjxxFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxDTO; import com.epmet.opendata.excel.WghSjxxExcel; import com.epmet.opendata.service.WghSjxxService; @@ -93,4 +98,18 @@ public class WghSjxxController { return new Result(); } + /** + * 新的事件信息分页 + * + * @param form + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/7/5 15:48 + */ + @PostMapping("todo/wghSjxxPage") + public Result getWghSjxxPage(@RequestBody NewWghSjxxFormDTO form, @LoginUser TokenDto tokenDto) { + PageData dto = wghSjxxService.getWghSjxxPage(form); + return new Result>().ok(dto); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java index 7d9c9891e7..b973b33d6b 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java @@ -2,8 +2,13 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; +import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; import com.epmet.opendata.entity.WghSjxxEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 事件信息 @@ -23,4 +28,14 @@ public interface WghSjxxDao extends BaseDao { * @date 2022/7/5 14:18 */ int deleteAll(); + + /** + * 新的事件信息分页 + * + * @param form + * @return java.util.List + * @author LZN + * @date 2022/7/5 15:49 + */ + List getWghSjxxPage(@Param("form") NewWghSjxxFormDTO form); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java index 38396400ed..f538877e6f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java @@ -2,7 +2,10 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxDTO; import com.epmet.opendata.entity.WghSjxxEntity; @@ -87,4 +90,14 @@ public interface WghSjxxService extends BaseService { * @date 2022/7/5 14:18 */ void getWghSjxx(PreserVationFormDTO dto); + + /** + * 新的事件信息分页 + * + * @param form + * @return com.epmet.commons.tools.page.PageData + * @author LZN + * @date 2022/7/5 15:49 + */ + PageData getWghSjxxPage(NewWghSjxxFormDTO form); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java index e3f30b415e..07a50b92a2 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java @@ -13,13 +13,18 @@ import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dao.WghSjxxDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; +import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxDTO; import com.epmet.opendata.entity.WghSjxxEntity; import com.epmet.opendata.entity.WghSjxxbEntity; import com.epmet.opendata.redis.WghSjxxRedis; import com.epmet.opendata.service.WghSjxxService; import com.epmet.opendata.util.AesUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -130,6 +135,22 @@ public class WghSjxxServiceImpl extends BaseServiceImpl + * @author LZN + * @date 2022/7/5 15:49 + */ + @Override + public PageData getWghSjxxPage(NewWghSjxxFormDTO form) { + PageHelper.startPage(form.getPage(), form.getLimit()); + List result = baseDao.getWghSjxxPage(form); + PageInfo info = new PageInfo<>(result); + return new PageData<>(result, info.getTotal()); + } + private int listWgh(PreserVationFormDTO dto) throws Exception { String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); JSONObject obj = new JSONObject(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml index 315d7043a1..c4b1dd6fba 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml @@ -70,6 +70,32 @@ delete from wgh_sjxx + From 1e0fea80c598c5fe3e3dd972f2d88a845b02cd7b Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 5 Jul 2022 16:16:46 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/WghSjxxDetailFormDto.java | 13 +++++++++++++ .../opendata/dto/result/NewWghSjxxResultDTO.java | 5 +++++ .../opendata/controller/WghSjxxController.java | 15 +++++++++++++++ .../java/com/epmet/opendata/dao/WghSjxxDao.java | 11 +++++++++++ .../epmet/opendata/service/WghSjxxService.java | 11 +++++++++++ .../opendata/service/impl/WghSjxxServiceImpl.java | 14 ++++++++++++++ .../src/main/resources/mapper/WghSjxxDao.xml | 12 ++++++++++++ 7 files changed, 81 insertions(+) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxDetailFormDto.java diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxDetailFormDto.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxDetailFormDto.java new file mode 100644 index 0000000000..ad0078058e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/WghSjxxDetailFormDto.java @@ -0,0 +1,13 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class WghSjxxDetailFormDto implements Serializable { + + private static final long serialVersionUID = 3053467128163250132L; + + private Integer recid; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java index f59cf0a603..db3203bb3d 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/NewWghSjxxResultDTO.java @@ -40,4 +40,9 @@ public class NewWghSjxxResultDTO implements Serializable { * 事件描述 */ private String sjms; + + /** + * 唯一标识 + */ + private Integer recid; } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java index 2cfeb3ee54..fdeb46888f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSjxxController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.WghSjxxDetailFormDto; import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxDTO; @@ -112,4 +113,18 @@ public class WghSjxxController { PageData dto = wghSjxxService.getWghSjxxPage(form); return new Result>().ok(dto); } + + /** + * 查询事件信息详情 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/7/5 16:14 + */ + @PostMapping("getWghSjxxDetail") + public Result getWghSjxxDetail(@RequestBody WghSjxxDetailFormDto dto){ + NewWghSjxxResultDTO result = wghSjxxService.getWghSjxxDetail(dto); + return new Result().ok(result); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java index b973b33d6b..d7a49811c6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSjxxDao.java @@ -3,6 +3,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; +import com.epmet.opendata.dto.form.WghSjxxDetailFormDto; import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; import com.epmet.opendata.entity.WghSjxxEntity; import org.apache.ibatis.annotations.Mapper; @@ -38,4 +39,14 @@ public interface WghSjxxDao extends BaseDao { * @date 2022/7/5 15:49 */ List getWghSjxxPage(@Param("form") NewWghSjxxFormDTO form); + + /** + * 查询事件信息详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.NewWghSjxxResultDTO + * @author LZN + * @date 2022/7/5 16:15 + */ + NewWghSjxxResultDTO getWghSjxxDetail(@Param("dto") WghSjxxDetailFormDto dto); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java index f538877e6f..809b33ea05 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSjxxService.java @@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.WghSjxxDetailFormDto; import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxDTO; @@ -100,4 +101,14 @@ public interface WghSjxxService extends BaseService { * @date 2022/7/5 15:49 */ PageData getWghSjxxPage(NewWghSjxxFormDTO form); + + /** + * 查询事件信息详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.NewWghSjxxResultDTO + * @author LZN + * @date 2022/7/5 16:15 + */ + NewWghSjxxResultDTO getWghSjxxDetail(WghSjxxDetailFormDto dto); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java index 07a50b92a2..72c94f7492 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSjxxServiceImpl.java @@ -15,6 +15,7 @@ import com.epmet.opendata.dao.WghSjxxDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.NewWghSjxxFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.WghSjxxDetailFormDto; import com.epmet.opendata.dto.result.NewWghSjxxResultDTO; import com.epmet.opendata.dto.result.WghSjxxResultDTO; import com.epmet.opendata.dto.wgh.WghSjxxDTO; @@ -151,6 +152,19 @@ public class WghSjxxServiceImpl extends BaseServiceImpl(result, info.getTotal()); } + /** + * 查询事件信息详情 + * + * @param dto + * @return com.epmet.opendata.dto.result.NewWghSjxxResultDTO + * @author LZN + * @date 2022/7/5 16:15 + */ + @Override + public NewWghSjxxResultDTO getWghSjxxDetail(WghSjxxDetailFormDto dto) { + return baseDao.getWghSjxxDetail(dto); + } + private int listWgh(PreserVationFormDTO dto) throws Exception { String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); JSONObject obj = new JSONObject(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml index c4b1dd6fba..efd85b7e97 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml @@ -96,6 +96,18 @@ + From 0a74e2f1a547cc397250c79d61bdd00bfabcb1fb Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 5 Jul 2022 16:26:48 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WghSjxxDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml index efd85b7e97..aaf0872494 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml @@ -77,7 +77,8 @@ sssqbq, hcyj, hcsj, - sjms + sjms, + recid FROM wgh_sjxx From 8b09f28af5b6cc0825a79f7a9fa4afd28bc7e5df Mon Sep 17 00:00:00 2001 From: HAHA Date: Tue, 5 Jul 2022 16:47:18 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WghSjxxDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml index aaf0872494..3bcd047057 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSjxxDao.xml @@ -96,6 +96,7 @@ AND hcyj like '%${form.hcyj}%' + order by czsj desc