From be0e4bb2b2903a506f1cc8fe9f111409fb7f6275 Mon Sep 17 00:00:00 2001
From: qushutong <1976590620@qq.com>
Date: Tue, 31 Oct 2023 09:48:50 +0800
Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=BE=AE=E7=BD=91=E6=A0=BC=E5=88=9D?=
=?UTF-8?q?=E5=A7=8B=E5=8C=96"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit f4953c8e90132e2366c16b9b66d1272b4bba0fa0.
---
.../main/java/com/epmet/dto/MicroGridDTO.java | 141 ------------------
.../epmet/controller/MicroGridController.java | 93 ------------
.../main/java/com/epmet/dao/MicroGridDao.java | 33 ----
.../com/epmet/entity/MicroGridEntity.java | 110 --------------
.../java/com/epmet/excel/MicroGridExcel.java | 98 ------------
.../com/epmet/service/MicroGridService.java | 96 ------------
.../service/impl/MicroGridServiceImpl.java | 102 -------------
.../main/resources/mapper/MicroGridDao.xml | 31 ----
8 files changed, 704 deletions(-)
delete mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MicroGridDTO.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/MicroGridController.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/MicroGridDao.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/MicroGridEntity.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/MicroGridExcel.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/MicroGridService.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/MicroGridServiceImpl.java
delete mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/MicroGridDao.xml
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MicroGridDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MicroGridDTO.java
deleted file mode 100644
index 5e86a15311..0000000000
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/MicroGridDTO.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.dto;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-
-/**
- * 微网格表
- *
- * @author elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-@Data
-public class MicroGridDTO implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * ID 唯一标识
- */
- private String id;
-
- /**
- * 客户ID
- */
- private String customerId;
-
- /**
- * 微网格名称
- */
- private String microgridName;
-
- /**
- * 微网格长
- */
- private String contacts;
-
- /**
- * 性别(女性-0,男性-1)
- */
- private String sex;
-
- /**
- * 联系电话
- */
- private String mobile;
-
- /**
- * 地址
- */
- private String address;
-
- /**
- * 所属组织机构ID
- */
- private String pid;
-
- /**
- * 所有上级组织ID
- */
- private String pids;
-
- /**
- * 当前网格总人数
- */
- private Integer totalUser;
-
- /**
- * 网格排序
- */
- private Integer sort;
-
- /**
- * 中心位置纬度
- */
- private String latitude;
-
- /**
- * 中心点位地址
- */
- private String centerAddress;
-
- /**
- * 坐标区域
- */
- private String coordinates;
-
- /**
- * 编码
- */
- private String code;
-
- /**
- * 删除标识:0.未删除 1.已删除
- */
- private Integer delFlag;
-
- /**
- * 乐观锁
- */
- private Integer revision;
-
- /**
- * 创建人
- */
- private String createdBy;
-
- /**
- * 更新人
- */
- private String updatedBy;
-
- /**
- * 创建时间
- */
- private Date createdTime;
-
- /**
- * 更新时间
- */
- private Date updatedTime;
-
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/MicroGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/MicroGridController.java
deleted file mode 100644
index be2ff297f8..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/MicroGridController.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.controller;
-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.dto.MicroGridDTO;
-import com.epmet.excel.MicroGridExcel;
-import com.epmet.service.MicroGridService;
-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 elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-@RestController
-@RequestMapping("microgrid")
-public class MicroGridController {
-
- @Autowired
- private MicroGridService microGridService;
-
- @GetMapping("page")
- public Result> page(@RequestParam Map params){
- PageData page = microGridService.page(params);
- return new Result>().ok(page);
- }
-
- @GetMapping("{id}")
- public Result get(@PathVariable("id") String id){
- MicroGridDTO data = microGridService.get(id);
- return new Result().ok(data);
- }
-
- @PostMapping
- public Result save(@RequestBody MicroGridDTO dto){
- //效验数据
- ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
- microGridService.save(dto);
- return new Result();
- }
-
- @PutMapping
- public Result update(@RequestBody MicroGridDTO dto){
- //效验数据
- ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
- microGridService.update(dto);
- return new Result();
- }
-
- @DeleteMapping
- public Result delete(@RequestBody String[] ids){
- //效验数据
- AssertUtils.isArrayEmpty(ids, "id");
- microGridService.delete(ids);
- return new Result();
- }
-
- @GetMapping("export")
- public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
- List list = microGridService.list(params);
- ExcelUtils.exportExcelToTarget(response, null, list, MicroGridExcel.class);
- }
-
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/MicroGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/MicroGridDao.java
deleted file mode 100644
index f34a0f37a5..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/MicroGridDao.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.dao;
-
-import com.epmet.commons.mybatis.dao.BaseDao;
-import com.epmet.entity.MicroGridEntity;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 微网格表
- *
- * @author elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-@Mapper
-public interface MicroGridDao extends BaseDao {
-
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/MicroGridEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/MicroGridEntity.java
deleted file mode 100644
index 6b0089e7df..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/MicroGridEntity.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-
-/**
- * 微网格表
- *
- * @author elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-@Data
-@EqualsAndHashCode(callSuper=false)
-@TableName("micro_grid")
-public class MicroGridEntity extends BaseEpmetEntity {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 客户ID
- */
- private String customerId;
-
- /**
- * 微网格名称
- */
- private String microgridName;
-
- /**
- * 微网格长
- */
- private String contacts;
-
- /**
- * 性别(女性-0,男性-1)
- */
- private String sex;
-
- /**
- * 联系电话
- */
- private String mobile;
-
- /**
- * 地址
- */
- private String address;
-
- /**
- * 所属组织机构ID
- */
- private String pid;
-
- /**
- * 所有上级组织ID
- */
- private String pids;
-
- /**
- * 当前网格总人数
- */
- private Integer totalUser;
-
- /**
- * 网格排序
- */
- private Integer sort;
-
- /**
- * 中心位置纬度
- */
- private String latitude;
-
- /**
- * 中心点位地址
- */
- private String centerAddress;
-
- /**
- * 坐标区域
- */
- private String coordinates;
-
- /**
- * 编码
- */
- private String code;
-
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/MicroGridExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/MicroGridExcel.java
deleted file mode 100644
index a939210496..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/MicroGridExcel.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.excel;
-
-import cn.afterturn.easypoi.excel.annotation.Excel;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 微网格表
- *
- * @author elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-@Data
-public class MicroGridExcel {
-
- @Excel(name = "ID 唯一标识")
- private String id;
-
- @Excel(name = "客户ID")
- private String customerId;
-
- @Excel(name = "微网格名称")
- private String microgridName;
-
- @Excel(name = "微网格长")
- private String contacts;
-
- @Excel(name = "性别(女性-0,男性-1)")
- private String sex;
-
- @Excel(name = "联系电话")
- private String mobile;
-
- @Excel(name = "地址")
- private String address;
-
- @Excel(name = "所属组织机构ID")
- private String pid;
-
- @Excel(name = "所有上级组织ID")
- private String pids;
-
- @Excel(name = "当前网格总人数")
- private Integer totalUser;
-
- @Excel(name = "网格排序")
- private Integer sort;
-
- @Excel(name = "中心位置纬度")
- private String latitude;
-
- @Excel(name = "中心点位地址")
- private String centerAddress;
-
- @Excel(name = "坐标区域")
- private String coordinates;
-
- @Excel(name = "编码")
- private String code;
-
- @Excel(name = "删除标识:0.未删除 1.已删除")
- private Integer delFlag;
-
- @Excel(name = "乐观锁")
- private Integer revision;
-
- @Excel(name = "创建人")
- private String createdBy;
-
- @Excel(name = "更新人")
- private String updatedBy;
-
- @Excel(name = "创建时间")
- private Date createdTime;
-
- @Excel(name = "更新时间")
- private Date updatedTime;
-
-
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/MicroGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/MicroGridService.java
deleted file mode 100644
index 64bad2f2de..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/MicroGridService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.service;
-
-
-import com.epmet.commons.mybatis.service.BaseService;
-import com.epmet.commons.tools.page.PageData;
-import com.epmet.dto.MicroGridDTO;
-import com.epmet.entity.MicroGridEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 微网格表
- *
- * @author elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-public interface MicroGridService extends BaseService {
-
- /**
- * 默认分页
- *
- * @param params
- * @return PageData
- * @author generator
- * @date 2023-10-27
- */
- PageData page(Map params);
-
- /**
- * 默认查询
- *
- * @param params
- * @return java.util.List
- * @author generator
- * @date 2023-10-27
- */
- List list(Map params);
-
- /**
- * 单条查询
- *
- * @param id
- * @return MicroGridDTO
- * @author generator
- * @date 2023-10-27
- */
- MicroGridDTO get(String id);
-
- /**
- * 默认保存
- *
- * @param dto
- * @return void
- * @author generator
- * @date 2023-10-27
- */
- void save(MicroGridDTO dto);
-
- /**
- * 默认更新
- *
- * @param dto
- * @return void
- * @author generator
- * @date 2023-10-27
- */
- void update(MicroGridDTO dto);
-
- /**
- * 批量删除
- *
- * @param ids
- * @return void
- * @author generator
- * @date 2023-10-27
- */
- void delete(String[] ids);
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/MicroGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/MicroGridServiceImpl.java
deleted file mode 100644
index 10b2241fac..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/MicroGridServiceImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.service.impl;
-
-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.page.PageData;
-import com.epmet.commons.tools.utils.ConvertUtils;
-import com.epmet.dao.MicroGridDao;
-import com.epmet.dto.MicroGridDTO;
-import com.epmet.entity.MicroGridEntity;
-import com.epmet.service.MicroGridService;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 微网格表
- *
- * @author elink elink@elink-cn.com
- * @since v1.0.0 2023-10-27
- */
-@Service
-public class MicroGridServiceImpl extends BaseServiceImpl implements MicroGridService {
-
-
-
- @Override
- public PageData page(Map params) {
- IPage page = baseDao.selectPage(
- getPage(params, FieldConstant.CREATED_TIME, false),
- getWrapper(params)
- );
- return getPageData(page, MicroGridDTO.class);
- }
-
- @Override
- public List list(Map params) {
- List entityList = baseDao.selectList(getWrapper(params));
-
- return ConvertUtils.sourceToTarget(entityList, MicroGridDTO.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 MicroGridDTO get(String id) {
- MicroGridEntity entity = baseDao.selectById(id);
- return ConvertUtils.sourceToTarget(entity, MicroGridDTO.class);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void save(MicroGridDTO dto) {
- MicroGridEntity entity = ConvertUtils.sourceToTarget(dto, MicroGridEntity.class);
- insert(entity);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(MicroGridDTO dto) {
- MicroGridEntity entity = ConvertUtils.sourceToTarget(dto, MicroGridEntity.class);
- updateById(entity);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void delete(String[] ids) {
- // 逻辑删除(@TableLogic 注解)
- baseDao.deleteBatchIds(Arrays.asList(ids));
- }
-
-}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/MicroGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/MicroGridDao.xml
deleted file mode 100644
index d8d4775aad..0000000000
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/MicroGridDao.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file