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 9af21b42a9..e603610dea 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 @@ -20,9 +20,10 @@ public interface CaWghDataConstant { String UNICOM_ROTATORS = "ca_rotators"; String UNICOM_RENTAL = "ca_rental"; - String SHARE_BASE_GRID = "BaseGrid"; - String SHARE_BM_GRID = "bm_grid"; - String SHARE_COMMUNITY = "community"; + String SHARE_BASE_GRID = "Wgh_base_grid"; + String SHARE_WGH_SUB = "wgh_subdistrict_office"; + String SHARE_BM_GRID = "wgh_bm_grid"; + String SHARE_COMMUNITY = "wgh_community"; String SHARE_WGH_DYWG = "wgh_dywg"; String SHARE_WGH_JDB = "wgh_jdb"; String SHARE_WGH_JQZ = "wgh_jqz"; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BmGridController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BmGridController.java deleted file mode 100644 index 4c87101c5b..0000000000 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BmGridController.java +++ /dev/null @@ -1,94 +0,0 @@ -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.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.opendata.dto.form.PreserVationFormDTO; -import com.epmet.opendata.dto.wgh.BmGridDTO; -import com.epmet.opendata.excel.BmGridExcel; -import com.epmet.opendata.service.BmGridService; -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-06-14 - */ -@RestController -@RequestMapping("bmGrid") -public class BmGridController { - - @Autowired - private BmGridService bmGridService; - - @RequestMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = bmGridService.page(params); - return new Result>().ok(page); - } - - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - BmGridDTO data = bmGridService.get(id); - return new Result().ok(data); - } - - @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody BmGridDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - bmGridService.save(dto); - return new Result(); - } - - @NoRepeatSubmit - @PostMapping("update") - public Result update(@RequestBody BmGridDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - bmGridService.update(dto); - return new Result(); - } - - @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - bmGridService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = bmGridService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, BmGridExcel.class); - } - - /** - * 调用ruoyi存储bm_grid数据 - * - * @param dto - * @return com.epmet.commons.tools.utils.Result - * @author LZN - * @date 2022/6/14 14:16 - */ - @PostMapping("preserBmGridVation") - public Result getpreserBmGridVation(@RequestBody PreserVationFormDTO dto) { - bmGridService.getPreserBmGridVation(dto); - return new Result(); - } -} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BasegridController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghBaseGridController.java similarity index 91% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BasegridController.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghBaseGridController.java index f9acf3489a..dc990c7324 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BasegridController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghBaseGridController.java @@ -11,8 +11,8 @@ 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.wgh.BasegridDTO; -import com.epmet.opendata.excel.BasegridExcel; -import com.epmet.opendata.service.BasegridService; +import com.epmet.opendata.excel.WghBaseGridExcel; +import com.epmet.opendata.service.WghBaseGridService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -29,10 +29,10 @@ import java.util.Map; */ @RestController @RequestMapping("basegrid") -public class BasegridController { +public class WghBaseGridController { @Autowired - private BasegridService basegridService; + private WghBaseGridService basegridService; @RequestMapping("page") public Result> page(@RequestParam Map params){ @@ -75,7 +75,7 @@ public class BasegridController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { List list = basegridService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, BasegridExcel.class); + ExcelUtils.exportExcelToTarget(response, null, list, WghBaseGridExcel.class); } /** diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CommunityController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghCommunityController.java similarity index 91% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CommunityController.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghCommunityController.java index a7f54e01e4..90ff0ca529 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CommunityController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghCommunityController.java @@ -7,13 +7,12 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; - +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.wgh.CommunityDTO; -import com.epmet.opendata.excel.CommunityExcel; -import com.epmet.opendata.service.CommunityService; +import com.epmet.opendata.excel.WghCommunityExcel; +import com.epmet.opendata.service.WghCommunityService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -28,10 +27,10 @@ import java.util.Map; */ @RestController @RequestMapping("community") -public class CommunityController { +public class WghCommunityController { @Autowired - private CommunityService communityService; + private WghCommunityService communityService; @RequestMapping("page") public Result> page(@RequestParam Map params) { @@ -74,7 +73,7 @@ public class CommunityController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { List list = communityService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, CommunityExcel.class); + ExcelUtils.exportExcelToTarget(response, null, list, WghCommunityExcel.class); } /** diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/SubdistrictOfficeController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSubdistrictOfficeController.java similarity index 77% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/SubdistrictOfficeController.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSubdistrictOfficeController.java index 52b881b741..1deed4b024 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/SubdistrictOfficeController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/WghSubdistrictOfficeController.java @@ -10,9 +10,11 @@ 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.SubdistrictOfficeDTO; -import com.epmet.opendata.excel.SubdistrictOfficeExcel; -import com.epmet.opendata.service.SubdistrictOfficeService; + +import com.epmet.opendata.excel.WghSubdistrictOfficeExcel; +import com.epmet.opendata.service.WghSubdistrictOfficeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -29,10 +31,10 @@ import java.util.Map; */ @RestController @RequestMapping("subdistrictOffice") -public class SubdistrictOfficeController { +public class WghSubdistrictOfficeController { @Autowired - private SubdistrictOfficeService subdistrictOfficeService; + private WghSubdistrictOfficeService subdistrictOfficeService; @RequestMapping("page") public Result> page(@RequestParam Map params){ @@ -75,9 +77,22 @@ public class SubdistrictOfficeController { @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { List list = subdistrictOfficeService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, SubdistrictOfficeExcel.class); + ExcelUtils.exportExcelToTarget(response, null, list, WghSubdistrictOfficeExcel.class); } + /** + * 调用ruoyi接口 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/14 17:36 + */ + @PostMapping("/preserSubVation") + public Result getpreserSubVation(@RequestBody PreserVationFormDTO dto) { + subdistrictOfficeService.getpreserSubVation(dto); + return new Result(); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/BasegridDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBaseGridDao.java similarity index 66% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/BasegridDao.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBaseGridDao.java index 8cdc58af1c..c48f75c03f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/BasegridDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBaseGridDao.java @@ -2,7 +2,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.opendata.entity.BasegridEntity; +import com.epmet.opendata.entity.WghBaseGridEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -12,7 +12,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2022-06-14 */ @Mapper -public interface BasegridDao extends BaseDao { - +public interface WghBaseGridDao extends BaseDao { int deleteAll(); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CommunityDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBmGridDao.java similarity index 68% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CommunityDao.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBmGridDao.java index 8457a499f4..f41a557914 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CommunityDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghBmGridDao.java @@ -2,7 +2,8 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.opendata.entity.CommunityEntity; + +import com.epmet.opendata.entity.WghBmGridEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -12,7 +13,7 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2022-06-14 */ @Mapper -public interface CommunityDao extends BaseDao { +public interface WghBmGridDao extends BaseDao { int deleteAll(); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/BmGridDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghCommunityDao.java similarity index 66% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/BmGridDao.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghCommunityDao.java index b4988f03c6..624403d977 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/BmGridDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghCommunityDao.java @@ -2,7 +2,8 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.opendata.entity.BmGridEntity; + +import com.epmet.opendata.entity.WghCommunityEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -12,7 +13,7 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2022-06-14 */ @Mapper -public interface BmGridDao extends BaseDao { +public interface WghCommunityDao extends BaseDao { int deleteAll(); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/SubdistrictOfficeDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSubdistrictOfficeDao.java similarity index 56% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/SubdistrictOfficeDao.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSubdistrictOfficeDao.java index 2300a96e5c..0b58b480d1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/SubdistrictOfficeDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/WghSubdistrictOfficeDao.java @@ -2,7 +2,8 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.opendata.entity.SubdistrictOfficeEntity; + +import com.epmet.opendata.entity.WghSubdistrictOfficeEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -12,6 +13,7 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2022-06-14 */ @Mapper -public interface SubdistrictOfficeDao extends BaseDao { +public interface WghSubdistrictOfficeDao extends BaseDao { + int deleteAll(); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/BasegridEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBaseGridEntity.java similarity index 94% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/BasegridEntity.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBaseGridEntity.java index 3f97751b94..060a64e921 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/BasegridEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBaseGridEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("basegrid") -public class BasegridEntity extends BaseEpmetEntity { +public class WghBaseGridEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/BmGridEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBmGridEntity.java similarity index 98% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/BmGridEntity.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBmGridEntity.java index 0df07d3dc4..157a526928 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/BmGridEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghBmGridEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("bm_grid") -public class BmGridEntity extends BaseEpmetEntity { +public class WghBmGridEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CommunityEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghCommunityEntity.java similarity index 93% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CommunityEntity.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghCommunityEntity.java index aba2fa7d1b..f2e8a2a9c6 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CommunityEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghCommunityEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("community") -public class CommunityEntity extends BaseEpmetEntity { +public class WghCommunityEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java index c223b3edd0..9c47bdd298 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghDywgEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_dywg") -public class WghDywgEntity extends BaseEpmetEntity { +public class WghDywgEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java index 26f9ca493c..6dd4cab773 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJdbEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_jdb") -public class WghJdbEntity extends BaseEpmetEntity { +public class WghJdbEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java index 767ccacabe..eecfe7048a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJqzEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_jqz") -public class WghJqzEntity extends BaseEpmetEntity { +public class WghJqzEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java index c2ae105195..53ad3a48e3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJxcsEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_jxcs") -public class WghJxcsEntity extends BaseEpmetEntity { +public class WghJxcsEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java index 7f14adb663..9468201318 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghJyzEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_jyz") -public class WghJyzEntity extends BaseEpmetEntity { +public class WghJyzEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java index 586a8a75db..ea97c3cefe 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSjxxbEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_sjxxb") -public class WghSjxxbEntity extends BaseEpmetEntity { +public class WghSjxxbEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java index d1121e17d7..3ef9574bb9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSqxxEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_sqxx") -public class WghSqxxEntity extends BaseEpmetEntity { +public class WghSqxxEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/SubdistrictOfficeEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSubdistrictOfficeEntity.java similarity index 91% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/SubdistrictOfficeEntity.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSubdistrictOfficeEntity.java index bd3e3aaa6a..f9d249ecf7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/SubdistrictOfficeEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSubdistrictOfficeEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("subdistrict_office") -public class SubdistrictOfficeEntity extends BaseEpmetEntity { +public class WghSubdistrictOfficeEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java index ae5b53f708..35c3e95f8f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzcgwghEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_szcgwgh") -public class WghSzcgwghEntity extends BaseEpmetEntity { +public class WghSzcgwghEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java index 6b2baae270..697b37f90f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghSzzrwgEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_szzrwg") -public class WghSzzrwgEntity extends BaseEpmetEntity { +public class WghSzzrwgEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java index 4c379db795..760057255a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghWhpdwEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_whpdw") -public class WghWhpdwEntity extends BaseEpmetEntity { +public class WghWhpdwEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java index 097baf6258..6f4f0d7a74 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYjbmcsEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_yjbmcs") -public class WghYjbmcsEntity extends BaseEpmetEntity { +public class WghYjbmcsEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java index 39718863c5..909e33fd59 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/WghYqhjzEntity.java @@ -17,7 +17,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper=false) @TableName("wgh_yqhjz") -public class WghYqhjzEntity extends BaseEpmetEntity { +public class WghYqhjzEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/BasegridExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBaseGridExcel.java similarity index 95% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/BasegridExcel.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBaseGridExcel.java index c78c090c22..e1370f23d0 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/BasegridExcel.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBaseGridExcel.java @@ -12,7 +12,7 @@ import java.util.Date; * @since v1.0.0 2022-06-14 */ @Data -public class BasegridExcel { +public class WghBaseGridExcel { @Excel(name = "") private String coordinateInfo; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/BmGridExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBmGridExcel.java similarity index 99% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/BmGridExcel.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBmGridExcel.java index 351509c9dd..7703a171df 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/BmGridExcel.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghBmGridExcel.java @@ -12,7 +12,7 @@ import java.util.Date; * @since v1.0.0 2022-06-14 */ @Data -public class BmGridExcel { +public class WghBmGridExcel { @Excel(name = "网格ID") private Long gridId; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CommunityExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghCommunityExcel.java similarity index 94% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CommunityExcel.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghCommunityExcel.java index cf4f22c20f..243c77c0d3 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CommunityExcel.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghCommunityExcel.java @@ -12,7 +12,7 @@ import java.util.Date; * @since v1.0.0 2022-06-14 */ @Data -public class CommunityExcel { +public class WghCommunityExcel { @Excel(name = "") private String coordinateInfo; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/SubdistrictOfficeExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSubdistrictOfficeExcel.java similarity index 92% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/SubdistrictOfficeExcel.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSubdistrictOfficeExcel.java index 43af5c9c7a..f33f6df6ea 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/SubdistrictOfficeExcel.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/WghSubdistrictOfficeExcel.java @@ -12,7 +12,7 @@ import java.util.Date; * @since v1.0.0 2022-06-14 */ @Data -public class SubdistrictOfficeExcel { +public class WghSubdistrictOfficeExcel { @Excel(name = "") private String coordinateInfo; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BasegridService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBaseGridService.java similarity index 92% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BasegridService.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBaseGridService.java index 2dad26e69a..6c2cff2cf2 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BasegridService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBaseGridService.java @@ -4,7 +4,7 @@ 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.BasegridDTO; -import com.epmet.opendata.entity.BasegridEntity; +import com.epmet.opendata.entity.WghBaseGridEntity; import java.util.List; @@ -14,7 +14,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-14 */ -public interface BasegridService extends BaseService { +public interface WghBaseGridService extends BaseService { /** * 默认分页 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BmGridService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBmGridService.java similarity index 93% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BmGridService.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBmGridService.java index d2f79c35fe..164506d33a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BmGridService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghBmGridService.java @@ -4,7 +4,7 @@ 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.BmGridDTO; -import com.epmet.opendata.entity.BmGridEntity; +import com.epmet.opendata.entity.WghBmGridEntity; import java.util.List; @@ -16,7 +16,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-14 */ -public interface BmGridService extends BaseService { +public interface WghBmGridService extends BaseService { /** * 默认分页 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CommunityService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghCommunityService.java similarity index 92% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CommunityService.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghCommunityService.java index 1c22cad274..a53ffb8a6a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CommunityService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghCommunityService.java @@ -4,7 +4,7 @@ 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.CommunityDTO; -import com.epmet.opendata.entity.CommunityEntity; +import com.epmet.opendata.entity.WghCommunityEntity; import java.util.List; @@ -14,7 +14,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-14 */ -public interface CommunityService extends BaseService { +public interface WghCommunityService extends BaseService { /** * 默认分页 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/SubdistrictOfficeService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSubdistrictOfficeService.java similarity index 84% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/SubdistrictOfficeService.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSubdistrictOfficeService.java index 8d37a4ff87..f378b09109 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/SubdistrictOfficeService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/WghSubdistrictOfficeService.java @@ -2,9 +2,9 @@ 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.SubdistrictOfficeDTO; -import com.epmet.opendata.entity.SubdistrictOfficeEntity; - +import com.epmet.opendata.entity.WghSubdistrictOfficeEntity; import java.util.List; import java.util.Map; @@ -15,7 +15,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2022-06-14 */ -public interface SubdistrictOfficeService extends BaseService { +public interface WghSubdistrictOfficeService extends BaseService { /** * 默认分页 @@ -76,4 +76,6 @@ public interface SubdistrictOfficeService extends BaseService implements SubdistrictOfficeService { - - @Autowired - private SubdistrictOfficeRedis subdistrictOfficeRedis; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, SubdistrictOfficeDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, SubdistrictOfficeDTO.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 SubdistrictOfficeDTO get(String id) { - SubdistrictOfficeEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, SubdistrictOfficeDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(SubdistrictOfficeDTO dto) { - SubdistrictOfficeEntity entity = ConvertUtils.sourceToTarget(dto, SubdistrictOfficeEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(SubdistrictOfficeDTO dto) { - SubdistrictOfficeEntity entity = ConvertUtils.sourceToTarget(dto, SubdistrictOfficeEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - -} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BasegridServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java similarity index 81% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BasegridServiceImpl.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java index 3cbabe9382..b799f6cec9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BasegridServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBaseGridServiceImpl.java @@ -11,14 +11,13 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; -import com.epmet.opendata.dao.BasegridDao; +import com.epmet.opendata.dao.WghBaseGridDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.wgh.BasegridDTO; -import com.epmet.opendata.entity.BasegridEntity; -import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghBaseGridEntity; import com.epmet.opendata.redis.BasegridRedis; -import com.epmet.opendata.service.BasegridService; +import com.epmet.opendata.service.WghBaseGridService; import com.epmet.opendata.util.AesUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -34,14 +33,14 @@ import java.util.Map; * @since v1.0.0 2022-06-14 */ @Service -public class BasegridServiceImpl extends BaseServiceImpl implements BasegridService { +public class WghBaseGridServiceImpl extends BaseServiceImpl implements WghBaseGridService { @Autowired private BasegridRedis basegridRedis; @Override public PageData page(Map params) { - IPage page = baseDao.selectPage( + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); @@ -50,15 +49,15 @@ public class BasegridServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + List entityList = baseDao.selectList(getWrapper(params)); return ConvertUtils.sourceToTarget(entityList, BasegridDTO.class); } - private QueryWrapper getWrapper(Map params) { + private QueryWrapper getWrapper(Map params) { String id = (String) params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; @@ -66,21 +65,21 @@ public class BasegridServiceImpl extends BaseServiceImpl 0) { + if (i >= 0) { dto.setPageNo(NumConstant.ONE); dto.setPageSize(NumConstant.FIFTY); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); dto.setTableName(CaWghDataConstant.SHARE_BASE_GRID); dto.setWhereCase("1=1"); - dto.setOrderBy(""); + dto.setOrderBy("gridName"); int pageNo = 1; @@ -146,7 +145,7 @@ public class BasegridServiceImpl extends BaseServiceImpl list; + private List list; public int getTotal() { return total; @@ -156,11 +155,11 @@ public class BasegridServiceImpl extends BaseServiceImpl getList() { + public List getList() { return list; } - public void setList(List 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/BmGridServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBmGridServiceImpl.java similarity index 82% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BmGridServiceImpl.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBmGridServiceImpl.java index d3cf864f00..622f59da1a 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BmGridServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghBmGridServiceImpl.java @@ -5,21 +5,20 @@ 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.FieldConstant; 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.BmGridDao; +import com.epmet.opendata.dao.WghBmGridDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.wgh.BmGridDTO; -import com.epmet.opendata.entity.BasegridEntity; -import com.epmet.opendata.entity.BmGridEntity; +import com.epmet.opendata.entity.WghBmGridEntity; import com.epmet.opendata.redis.BmGridRedis; -import com.epmet.opendata.service.BmGridService; + +import com.epmet.opendata.service.WghBmGridService; import com.epmet.opendata.util.AesUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -37,14 +36,14 @@ import java.util.Map; * @since v1.0.0 2022-06-14 */ @Service -public class BmGridServiceImpl extends BaseServiceImpl implements BmGridService { +public class WghBmGridServiceImpl extends BaseServiceImpl implements WghBmGridService { @Autowired private BmGridRedis bmGridRedis; @Override public PageData page(Map params) { - IPage page = baseDao.selectPage( + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); @@ -53,15 +52,15 @@ public class BmGridServiceImpl extends BaseServiceImpl @Override public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + List entityList = baseDao.selectList(getWrapper(params)); return ConvertUtils.sourceToTarget(entityList, BmGridDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; @@ -69,21 +68,21 @@ public class BmGridServiceImpl extends BaseServiceImpl @Override public BmGridDTO get(String id) { - BmGridEntity entity = baseDao.selectById(id); + WghBmGridEntity entity = baseDao.selectById(id); return ConvertUtils.sourceToTarget(entity, BmGridDTO.class); } @Override @Transactional(rollbackFor = Exception.class) public void save(BmGridDTO dto) { - BmGridEntity entity = ConvertUtils.sourceToTarget(dto, BmGridEntity.class); + WghBmGridEntity entity = ConvertUtils.sourceToTarget(dto, WghBmGridEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) public void update(BmGridDTO dto) { - BmGridEntity entity = ConvertUtils.sourceToTarget(dto, BmGridEntity.class); + WghBmGridEntity entity = ConvertUtils.sourceToTarget(dto, WghBmGridEntity.class); updateById(entity); } @@ -105,7 +104,7 @@ public class BmGridServiceImpl extends BaseServiceImpl @Override public void getPreserBmGridVation(PreserVationFormDTO dto) { int i = baseDao.deleteAll(); - if (i > 0) { + if (i >= 0) { dto.setPageNo(NumConstant.ONE); dto.setPageSize(NumConstant.FIFTY); dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); @@ -148,7 +147,7 @@ public class BmGridServiceImpl extends BaseServiceImpl static class ReturnDate { private int total; - private List list; + private List list; public int getTotal() { return total; @@ -158,11 +157,11 @@ public class BmGridServiceImpl extends BaseServiceImpl this.total = total; } - public List getList() { + public List getList() { return list; } - public void setList(List 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/CommunityServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java similarity index 82% rename from epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CommunityServiceImpl.java rename to epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java index 0846ff4a95..7b19f3b5b1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CommunityServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghCommunityServiceImpl.java @@ -11,14 +11,14 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; -import com.epmet.opendata.dao.CommunityDao; +import com.epmet.opendata.dao.WghCommunityDao; import com.epmet.opendata.dto.constant.CaWghDataConstant; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.wgh.CommunityDTO; -import com.epmet.opendata.entity.CaLoudongEntity; -import com.epmet.opendata.entity.CommunityEntity; +import com.epmet.opendata.entity.WghCommunityEntity; import com.epmet.opendata.redis.CommunityRedis; -import com.epmet.opendata.service.CommunityService; + +import com.epmet.opendata.service.WghCommunityService; import com.epmet.opendata.util.AesUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -34,14 +34,14 @@ import java.util.Map; * @since v1.0.0 2022-06-14 */ @Service -public class CommunityServiceImpl extends BaseServiceImpl implements CommunityService { +public class WghCommunityServiceImpl extends BaseServiceImpl implements WghCommunityService { @Autowired private CommunityRedis communityRedis; @Override public PageData page(Map params) { - IPage page = baseDao.selectPage( + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); @@ -50,15 +50,15 @@ public class CommunityServiceImpl extends BaseServiceImpl list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + List entityList = baseDao.selectList(getWrapper(params)); return ConvertUtils.sourceToTarget(entityList, CommunityDTO.class); } - private QueryWrapper getWrapper(Map params) { + private QueryWrapper getWrapper(Map params) { String id = (String) params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; @@ -66,21 +66,21 @@ public class CommunityServiceImpl extends BaseServiceImpl list; + private List list; public int getTotal() { @@ -157,11 +157,11 @@ public class CommunityServiceImpl extends BaseServiceImpl getList() { + public List getList() { return list; } - public void setList(List 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/WghSubdistrictOfficeServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java new file mode 100644 index 0000000000..2cccafee16 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/WghSubdistrictOfficeServiceImpl.java @@ -0,0 +1,165 @@ +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.FieldConstant; +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.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.opendata.dao.WghSubdistrictOfficeDao; +import com.epmet.opendata.dto.constant.CaWghDataConstant; +import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.wgh.SubdistrictOfficeDTO; +import com.epmet.opendata.entity.CaLoudongEntity; +import com.epmet.opendata.entity.WghSubdistrictOfficeEntity; +import com.epmet.opendata.redis.SubdistrictOfficeRedis; +import com.epmet.opendata.service.WghSubdistrictOfficeService; +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-06-14 + */ +@Service +public class WghSubdistrictOfficeServiceImpl extends BaseServiceImpl implements WghSubdistrictOfficeService { + + @Autowired + private SubdistrictOfficeRedis subdistrictOfficeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, SubdistrictOfficeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, SubdistrictOfficeDTO.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 SubdistrictOfficeDTO get(String id) { + WghSubdistrictOfficeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, SubdistrictOfficeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(SubdistrictOfficeDTO dto) { + WghSubdistrictOfficeEntity entity = ConvertUtils.sourceToTarget(dto, WghSubdistrictOfficeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(SubdistrictOfficeDTO dto) { + WghSubdistrictOfficeEntity entity = ConvertUtils.sourceToTarget(dto, WghSubdistrictOfficeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void getpreserSubVation(PreserVationFormDTO dto) { + int i = baseDao.deleteAll(); + if (i >= 0) { + dto.setPageNo(NumConstant.ONE); + dto.setPageSize(NumConstant.FIFTY); + dto.setTableSchema(CaWghDataConstant.TABLESCHEMA_SHARE); + dto.setTableName(CaWghDataConstant.SHARE_WGH_SUB); + + dto.setWhereCase("1=1"); + dto.setOrderBy(""); + + int pageNo = 1; + + int total = 0; + + do { + try { + total = listSub(dto); + pageNo++; + dto.setPageNo(pageNo); + } catch (Exception e) { + e.printStackTrace(); + } + } while (total > (pageNo * NumConstant.FIFTY)); + } + + } + + + private int listSub(PreserVationFormDTO dto) throws Exception { + String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); + JSONObject obj = new JSONObject(); + obj.put(CaWghDataConstant.SHARE_CONDITION, aes); + String data = HttpClientManager.getInstance().sendPostByJSON(CaWghDataConstant.DATA_URL_SHARE, 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/resources/mapper/BasegridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/BasegridDao.xml deleted file mode 100644 index daab0d0aee..0000000000 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/BasegridDao.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - delete from BaseGrid - - - - diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/BmGridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/BmGridDao.xml deleted file mode 100644 index 230d6fee17..0000000000 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/BmGridDao.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - delete from bm_grid - - - - diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CommunityDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CommunityDao.xml deleted file mode 100644 index 03d2f5d563..0000000000 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CommunityDao.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - delete from community - - - - diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/SubdistrictOfficeDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/SubdistrictOfficeDao.xml deleted file mode 100644 index 9848740d6e..0000000000 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/SubdistrictOfficeDao.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBaseGridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBaseGridDao.xml new file mode 100644 index 0000000000..da9b931654 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBaseGridDao.xml @@ -0,0 +1,11 @@ + + + + + + + delete from wgh_base_grid + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBmGridDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBmGridDao.xml new file mode 100644 index 0000000000..bc8c5b7f7e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghBmGridDao.xml @@ -0,0 +1,12 @@ + + + + + + + + delete from wgh_bm_grid + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghCommunityDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghCommunityDao.xml new file mode 100644 index 0000000000..0b843deb67 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghCommunityDao.xml @@ -0,0 +1,12 @@ + + + + + + + + delete from wgh_community + + + + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSubdistrictOfficeDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSubdistrictOfficeDao.xml new file mode 100644 index 0000000000..b34fb0e20e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/WghSubdistrictOfficeDao.xml @@ -0,0 +1,10 @@ + + + + + + + + delete from wgh_subdistrict_office + +