From 41ff99cedb97a6caaa4dd40ca3efeb5541bc22c3 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 11 May 2022 09:20:06 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=A7=9F=E6=88=BF?= =?UTF-8?q?=E5=90=88=E5=90=8C=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rent/service/impl/RentContractInfoServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java index 94d1de1..79d7d0b 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java @@ -242,12 +242,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl tenantList = ConvertUtils.sourceToTarget(dto.getTenantList(), RentTenantInfoEntity.class); long idCardNum = tenantList.stream().map(RentTenantInfoEntity::getIdCard).collect(Collectors.toList()).stream().distinct().count(); if (tenantList.size() != idCardNum) { - return new Result().error("租客身份证重复"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"租客身份证重复"); } tenantList.forEach(tenant -> { @@ -279,7 +279,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl fileList = ConvertUtils.sourceToTarget(dto.getFileList(), RentContractFileEntity.class); fileList.forEach(item -> { From fa9129860cdc6196026a4c9090f5b99da45a31a8 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 11 May 2022 10:35:57 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=B4=AD=E6=88=BF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/power/dto/rent/RentHouseDTO.java | 190 ++++++++++++++++++ .../rent/controller/RentHouseController.java | 82 ++++++++ .../power/modules/rent/dao/RentHouseDao.java | 16 ++ .../modules/rent/entity/RentHouseEntity.java | 160 +++++++++++++++ .../modules/rent/excel/RentHouseExcel.java | 121 +++++++++++ .../modules/rent/redis/RentHouseRedis.java | 30 +++ .../rent/service/RentHouseService.java | 78 +++++++ .../service/impl/RentHouseServiceImpl.java | 87 ++++++++ .../resources/mapper/rent/RentHouseDao.xml | 44 ++++ 9 files changed, 808 insertions(+) create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentHouseController.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentHouseDao.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentHouseEntity.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/redis/RentHouseRedis.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentHouseService.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentHouseDao.xml diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java new file mode 100644 index 0000000..9074d52 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java @@ -0,0 +1,190 @@ +package com.epmet.plugin.power.dto.rent; + +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-05-11 + */ +@Data +public class RentHouseDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 房屋主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 小区id + */ + private String neighborHoodId; + + /** + * 片区id,neighbor_hood_part.id,可为空。 + */ + private String partId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id + */ + private String buildingUnitId; + + /** + * 房屋名字后台插入时生成 + */ + private String houseName; + + /** + * 门牌号 + */ + private String doorName; + + /** + * 房屋类型,1楼房,2平房,3别墅 + */ + private String houseType; + + /** + * 存储字典value + */ + private String purpose; + + /** + * 1:出租 0:自住 2:闲置 + */ + private Integer rentFlag; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 房主电话 + */ + private String ownerPhone; + + /** + * 房主身份证号 + */ + private String ownerIdCard; + + /** + * 排序 + */ + private BigDecimal sort; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 社区ID + */ + private String communityId; + + /** + * 社区 + */ + private String communityName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格 + */ + private String gridName; + + /** + * 房屋小区ID + */ + private String villageId; + + /** + * 房屋小区 + */ + private String villageName; + + /** + * 楼号ID + */ + private String buildId; + + /** + * 楼号 + */ + private String buildName; + + /** + * 单元ID + */ + private String unitId; + + /** + * 单元 + */ + private String unitName; + + /** + * 房屋ID + */ + private String homeId; + + /** + * 房屋 + */ + private String homeName; + + /** + * 购房日期 + */ + private String purchaseDate; + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentHouseController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentHouseController.java new file mode 100644 index 0000000..bf9481d --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentHouseController.java @@ -0,0 +1,82 @@ +package com.epmet.plugin.power.modules.rent.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.plugin.power.dto.rent.RentHouseDTO; +import com.epmet.plugin.power.modules.rent.excel.RentHouseExcel; +import com.epmet.plugin.power.modules.rent.service.RentHouseService; +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-05-11 + */ +@RestController +@RequestMapping("rentHouse") +public class RentHouseController { + + @Autowired + private RentHouseService rentHouseService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = rentHouseService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + RentHouseDTO data = rentHouseService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody RentHouseDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + rentHouseService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody RentHouseDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + rentHouseService.update(dto); + return new Result(); + } + + @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + rentHouseService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = rentHouseService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, RentHouseExcel.class); + } + + + +} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentHouseDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentHouseDao.java new file mode 100644 index 0000000..2975d72 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentHouseDao.java @@ -0,0 +1,16 @@ +package com.epmet.plugin.power.modules.rent.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.plugin.power.modules.rent.entity.RentHouseEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-11 + */ +@Mapper +public interface RentHouseDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentHouseEntity.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentHouseEntity.java new file mode 100644 index 0000000..9a465d3 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentHouseEntity.java @@ -0,0 +1,160 @@ +package com.epmet.plugin.power.modules.rent.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-05-11 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pli_rent_house") +public class RentHouseEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小区id + */ + private String neighborHoodId; + + /** + * 片区id,neighbor_hood_part.id,可为空。 + */ + private String partId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id + */ + private String buildingUnitId; + + /** + * 房屋名字后台插入时生成 + */ + private String houseName; + + /** + * 门牌号 + */ + private String doorName; + + /** + * 房屋类型,1楼房,2平房,3别墅 + */ + private String houseType; + + /** + * 存储字典value + */ + private String purpose; + + /** + * 1:出租 0:自住 2:闲置 + */ + private Integer rentFlag; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 房主电话 + */ + private String ownerPhone; + + /** + * 房主身份证号 + */ + private String ownerIdCard; + + /** + * 排序 + */ + private BigDecimal sort; + + /** + * 社区ID + */ + private String communityId; + + /** + * 社区 + */ + private String communityName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格 + */ + private String gridName; + + /** + * 房屋小区ID + */ + private String villageId; + + /** + * 房屋小区 + */ + private String villageName; + + /** + * 楼号ID + */ + private String buildId; + + /** + * 楼号 + */ + private String buildName; + + /** + * 单元ID + */ + private String unitId; + + /** + * 单元 + */ + private String unitName; + + /** + * 房屋ID + */ + private String homeId; + + /** + * 房屋 + */ + private String homeName; + + /** + * 购房日期 + */ + private String purchaseDate; + +} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java new file mode 100644 index 0000000..41aead0 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java @@ -0,0 +1,121 @@ +package com.epmet.plugin.power.modules.rent.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-05-11 + */ +@Data +public class RentHouseExcel { + + @Excel(name = "房屋主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "小区id") + private String neighborHoodId; + + @Excel(name = "片区id,neighbor_hood_part.id,可为空。") + private String partId; + + @Excel(name = "所属楼栋id") + private String buildingId; + + @Excel(name = "所属单元id") + private String buildingUnitId; + + @Excel(name = "房屋名字后台插入时生成") + private String houseName; + + @Excel(name = "门牌号") + private String doorName; + + @Excel(name = "房屋类型,1楼房,2平房,3别墅") + private String houseType; + + @Excel(name = "存储字典value") + private String purpose; + + @Excel(name = "1:出租 0:自住 2:闲置") + private Integer rentFlag; + + @Excel(name = "房主姓名") + private String ownerName; + + @Excel(name = "房主电话") + private String ownerPhone; + + @Excel(name = "房主身份证号") + private String ownerIdCard; + + @Excel(name = "排序") + private BigDecimal sort; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "社区ID") + private String communityId; + + @Excel(name = "社区") + private String communityName; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "网格") + private String gridName; + + @Excel(name = "房屋小区ID") + private String villageId; + + @Excel(name = "房屋小区") + private String villageName; + + @Excel(name = "楼号ID") + private String buildId; + + @Excel(name = "楼号") + private String buildName; + + @Excel(name = "单元ID") + private String unitId; + + @Excel(name = "单元") + private String unitName; + + @Excel(name = "房屋ID") + private String homeId; + + @Excel(name = "房屋") + private String homeName; + + @Excel(name = "购房日期") + private String purchaseDate; + + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/redis/RentHouseRedis.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/redis/RentHouseRedis.java new file mode 100644 index 0000000..4165a7e --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/redis/RentHouseRedis.java @@ -0,0 +1,30 @@ +package com.epmet.plugin.power.modules.rent.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-05-11 + */ +@Component +public class RentHouseRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentHouseService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentHouseService.java new file mode 100644 index 0000000..27caab0 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentHouseService.java @@ -0,0 +1,78 @@ +package com.epmet.plugin.power.modules.rent.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.plugin.power.dto.rent.RentHouseDTO; +import com.epmet.plugin.power.modules.rent.entity.RentHouseEntity; + +import java.util.List; +import java.util.Map; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-11 + */ +public interface RentHouseService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-11 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-11 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return RentHouseDTO + * @author generator + * @date 2022-05-11 + */ + RentHouseDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-11 + */ + void save(RentHouseDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-11 + */ + void update(RentHouseDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-11 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java new file mode 100644 index 0000000..e4cef4d --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java @@ -0,0 +1,87 @@ +package com.epmet.plugin.power.modules.rent.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.plugin.power.modules.rent.dao.RentHouseDao; +import com.epmet.plugin.power.dto.rent.RentHouseDTO; +import com.epmet.plugin.power.modules.rent.entity.RentHouseEntity; +import com.epmet.plugin.power.modules.rent.redis.RentHouseRedis; +import com.epmet.plugin.power.modules.rent.service.RentHouseService; +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-05-11 + */ +@Service +public class RentHouseServiceImpl extends BaseServiceImpl implements RentHouseService { + + @Autowired + private RentHouseRedis rentHouseRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, RentHouseDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, RentHouseDTO.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 RentHouseDTO get(String id) { + RentHouseEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, RentHouseDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(RentHouseDTO dto) { + RentHouseEntity entity = ConvertUtils.sourceToTarget(dto, RentHouseEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(RentHouseDTO dto) { + RentHouseEntity entity = ConvertUtils.sourceToTarget(dto, RentHouseEntity.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-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentHouseDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentHouseDao.xml new file mode 100644 index 0000000..af389c5 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentHouseDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 9cc8cb2452a0d8721955493e9f699c6d5c42ad62 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Wed, 11 May 2022 13:37:35 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E5=90=88=E5=90=8C?= =?UTF-8?q?=E7=AD=BE=E8=AE=A2=E6=9B=B4=E6=96=B0=E6=88=BF=E5=B1=8B=E7=8A=B6?= =?UTF-8?q?=E6=80=81=EF=BC=8C=E6=88=BF=E5=B1=8B=E8=B4=AD=E4=B9=B0=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=BF=E5=B1=8B=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/power/dto/rent/RentHouseDTO.java | 5 +++ .../impl/RentContractInfoServiceImpl.java | 16 ++++++-- .../service/impl/RentHouseServiceImpl.java | 41 +++++++++++++++++-- 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java index 9074d52..de045e1 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java @@ -187,4 +187,9 @@ public class RentHouseDTO implements Serializable { */ private String purchaseDate; + /** + * 是否更新 + */ + private String flag; + } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java index 79d7d0b..97f41ae 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java @@ -13,8 +13,10 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.IdCardNoValidatorUtils; import com.epmet.dto.CustomerAgencyDTO; +import com.epmet.dto.IcHouseDTO; import com.epmet.dto.IcResiUserAttachmentDTO; import com.epmet.dto.IcResiUserDTO; +import com.epmet.dto.form.IcHouseAddFormDTO; import com.epmet.dto.form.RentTenantFormDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; @@ -162,7 +164,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl houseInfo = govOrgOpenFeignClient.get(dto.getHomeId()); + IcHouseAddFormDTO formDTO = ConvertUtils.sourceToTarget(houseInfo.getData(), IcHouseAddFormDTO.class); + formDTO.setRentFlag(NumConstant.ONE); + govOrgOpenFeignClient.houseUpdate(formDTO); } } @@ -242,12 +250,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl tenantList = ConvertUtils.sourceToTarget(dto.getTenantList(), RentTenantInfoEntity.class); long idCardNum = tenantList.stream().map(RentTenantInfoEntity::getIdCard).collect(Collectors.toList()).stream().distinct().count(); if (tenantList.size() != idCardNum) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"租客身份证重复"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "租客身份证重复"); } tenantList.forEach(tenant -> { @@ -279,7 +287,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl fileList = ConvertUtils.sourceToTarget(dto.getFileList(), RentContractFileEntity.class); fileList.forEach(item -> { diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java index e4cef4d..2a355f6 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java @@ -3,11 +3,13 @@ package com.epmet.plugin.power.modules.rent.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.commons.tools.constant.FieldConstant; -import com.epmet.plugin.power.modules.rent.dao.RentHouseDao; +import com.epmet.dto.form.IcHouseAddFormDTO; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.plugin.power.dto.rent.RentHouseDTO; +import com.epmet.plugin.power.modules.rent.dao.RentHouseDao; import com.epmet.plugin.power.modules.rent.entity.RentHouseEntity; import com.epmet.plugin.power.modules.rent.redis.RentHouseRedis; import com.epmet.plugin.power.modules.rent.service.RentHouseService; @@ -32,6 +34,9 @@ public class RentHouseServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -48,11 +53,33 @@ public class RentHouseServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String gridId = (String) params.get("gridId"); + String villageId = (String) params.get("villageId"); + String buildId = (String) params.get("buildId"); + String unitId = (String) params.get("unitId"); + String homeId = (String) params.get("homeId"); + String ownerName = (String) params.get("ownerName"); + String ownerPhone = (String) params.get("ownerPhone"); + String ownerIdCard = (String) params.get("ownerIdCard"); + String rentFlag = (String) params.get("rentFlag"); + String startTime = (String) params.get("startTime"); + String endTime = (String) params.get("endTime"); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(gridId), "GRID_ID", gridId); + wrapper.eq(StringUtils.isNotBlank(villageId), "VILLAGE_ID", villageId); + wrapper.eq(StringUtils.isNotBlank(buildId), "BUILD_ID", buildId); + wrapper.eq(StringUtils.isNotBlank(unitId), "UNIT_ID", unitId); + wrapper.eq(StringUtils.isNotBlank(homeId), "HOME_ID", homeId); + wrapper.eq(StringUtils.isNotBlank(ownerName), "OWNER_NAME", ownerName); + wrapper.eq(StringUtils.isNotBlank(ownerPhone), "OWNER_PHONE", ownerPhone); + wrapper.eq(StringUtils.isNotBlank(ownerIdCard), "OWNER_ID_CARD", ownerIdCard); + wrapper.eq(StringUtils.isNotBlank(rentFlag), "RENT_FLAG", rentFlag); + wrapper.ge(StringUtils.isNotBlank(startTime), "PURCHASE_DATE", startTime); + wrapper.le(StringUtils.isNotBlank(endTime), "PURCHASE_DATE", endTime); return wrapper; } @@ -68,6 +95,12 @@ public class RentHouseServiceImpl extends BaseServiceImpl Date: Wed, 11 May 2022 15:16:46 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E6=88=BF=E5=B1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/power/dto/rent/RentHouseDTO.java | 2 +- .../modules/rent/excel/RentHouseExcel.java | 98 +++---------------- .../service/impl/RentHouseServiceImpl.java | 2 +- 3 files changed, 13 insertions(+), 89 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java index de045e1..34008cb 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentHouseDTO.java @@ -190,6 +190,6 @@ public class RentHouseDTO implements Serializable { /** * 是否更新 */ - private String flag; + private Boolean needUpdate; } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java index 41aead0..bea060e 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentHouseExcel.java @@ -3,9 +3,6 @@ package com.epmet.plugin.power.modules.rent.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import lombok.Data; -import java.math.BigDecimal; -import java.util.Date; - /** * 房屋信息 * @@ -15,37 +12,25 @@ import java.util.Date; @Data public class RentHouseExcel { - @Excel(name = "房屋主键") - private String id; - - @Excel(name = "客户id") - private String customerId; - - @Excel(name = "小区id") - private String neighborHoodId; - - @Excel(name = "片区id,neighbor_hood_part.id,可为空。") - private String partId; - - @Excel(name = "所属楼栋id") - private String buildingId; + @Excel(name = "所属小区") + private String villageName; - @Excel(name = "所属单元id") - private String buildingUnitId; + @Excel(name = "所属楼栋") + private String buildName; - @Excel(name = "房屋名字后台插入时生成") - private String houseName; + @Excel(name = "单元号") + private String unitName; @Excel(name = "门牌号") - private String doorName; + private String homeName; - @Excel(name = "房屋类型,1楼房,2平房,3别墅") + @Excel(name = "类型", replace = {"楼房_1", "平房_2", "别墅_3"}) private String houseType; - @Excel(name = "存储字典value") + @Excel(name = "用途", replace = {"住宅_1", "商业_2", "办公_3", "工业_4", "仓储_5", "商住混用_6", "其他_7"}) private String purpose; - @Excel(name = "1:出租 0:自住 2:闲置") + @Excel(name = "房屋状态", replace = {"出租_1", "闲置_2", "自住_0"}) private Integer rentFlag; @Excel(name = "房主姓名") @@ -54,68 +39,7 @@ public class RentHouseExcel { @Excel(name = "房主电话") private String ownerPhone; - @Excel(name = "房主身份证号") + @Excel(name = "房主身份证") private String ownerIdCard; - @Excel(name = "排序") - private BigDecimal sort; - - @Excel(name = "删除标识 0未删除、1已删除") - private String delFlag; - - @Excel(name = "乐观锁") - private Integer revision; - - @Excel(name = "创建人") - private String createdBy; - - @Excel(name = "创建时间") - private Date createdTime; - - @Excel(name = "更新人") - private String updatedBy; - - @Excel(name = "更新时间") - private Date updatedTime; - - @Excel(name = "社区ID") - private String communityId; - - @Excel(name = "社区") - private String communityName; - - @Excel(name = "网格ID") - private String gridId; - - @Excel(name = "网格") - private String gridName; - - @Excel(name = "房屋小区ID") - private String villageId; - - @Excel(name = "房屋小区") - private String villageName; - - @Excel(name = "楼号ID") - private String buildId; - - @Excel(name = "楼号") - private String buildName; - - @Excel(name = "单元ID") - private String unitId; - - @Excel(name = "单元") - private String unitName; - - @Excel(name = "房屋ID") - private String homeId; - - @Excel(name = "房屋") - private String homeName; - - @Excel(name = "购房日期") - private String purchaseDate; - - } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java index 2a355f6..d945038 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentHouseServiceImpl.java @@ -97,7 +97,7 @@ public class RentHouseServiceImpl extends BaseServiceImpl Date: Thu, 12 May 2022 10:08:12 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=9A=84post=E5=92=8Cdelete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/rent/controller/RentContractFileController.java | 2 +- .../power/modules/rent/controller/RentTenantInfoController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractFileController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractFileController.java index 7ea49af..67f4f08 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractFileController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractFileController.java @@ -63,7 +63,7 @@ public class RentContractFileController { return new Result(); } - @PostMapping("delete") + @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentTenantInfoController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentTenantInfoController.java index 082e14e..2b664f8 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentTenantInfoController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentTenantInfoController.java @@ -76,7 +76,7 @@ public class RentTenantInfoController { return new Result(); } - @PostMapping("delete") + @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); From 2bb4005ad1865a831e29c5e8e5218b8e8fc9888b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Thu, 12 May 2022 10:10:15 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E8=BF=81=E5=87=BA?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=AD=BB=E4=BA=A1=E7=9B=B8=E5=85=B3=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../power/dto/change/ChangeDeathDTO.java | 127 ----------- .../power/dto/change/ChangeRelocationDTO.java | 204 ------------------ .../power/dto/change/ChangeWelfareDTO.java | 114 ---------- .../dto/change/CheckWelfareByIdCardDTO.java | 20 -- .../plugin/power/dto/change/form/.gitkeep | 0 .../plugin/power/dto/change/result/.gitkeep | 0 .../controller/ChangeDeathController.java | 81 ------- .../ChangeRelocationController.java | 95 -------- .../controller/ChangeWelfareController.java | 109 ---------- .../modules/change/dao/ChangeDeathDao.java | 16 -- .../change/dao/ChangeRelocationDao.java | 16 -- .../modules/change/dao/ChangeWelfareDao.java | 35 --- .../change/entity/ChangeDeathEntity.java | 84 -------- .../change/entity/ChangeRelocationEntity.java | 153 ------------- .../change/entity/ChangeWelfareEntity.java | 84 -------- .../change/excel/ChangeDeathExcel.java | 72 ------- .../change/excel/ChangeRelocationExcel.java | 127 ----------- .../change/excel/ChangeWelfareExcel.java | 75 ------- .../change/redis/ChangeDeathRedis.java | 30 --- .../change/redis/ChangeRelocationRedis.java | 30 --- .../change/redis/ChangeWelfareRedis.java | 30 --- .../change/service/ChangeDeathService.java | 79 ------- .../service/ChangeRelocationService.java | 88 -------- .../change/service/ChangeWelfareService.java | 107 --------- .../service/impl/ChangeDeathServiceImpl.java | 147 ------------- .../impl/ChangeRelocationServiceImpl.java | 171 --------------- .../impl/ChangeWelfareServiceImpl.java | 159 -------------- .../mapper/change/ChangeDeathDao.xml | 28 --- .../mapper/change/ChangeRelocationDao.xml | 39 ---- .../mapper/change/ChangeWelfareDao.xml | 41 ---- 30 files changed, 2361 deletions(-) delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeDeathDTO.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeRelocationDTO.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeWelfareDTO.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/CheckWelfareByIdCardDTO.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/form/.gitkeep delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/result/.gitkeep delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeDeathController.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeRelocationController.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeWelfareController.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeDeathDao.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeRelocationDao.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeWelfareDao.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeDeathEntity.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeRelocationEntity.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeWelfareEntity.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeDeathExcel.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeRelocationExcel.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeWelfareExcel.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeDeathRedis.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeRelocationRedis.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeWelfareRedis.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeDeathService.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeRelocationService.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeWelfareService.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeRelocationServiceImpl.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeWelfareServiceImpl.java delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeDeathDao.xml delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeRelocationDao.xml delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeWelfareDao.xml diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeDeathDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeDeathDTO.java deleted file mode 100644 index 7a50fc3..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeDeathDTO.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.epmet.plugin.power.dto.change; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import java.io.Serializable; -import java.util.Date; - - -/** - * 死亡名单表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-05 - */ -@Data -public class ChangeDeathDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - - /** - * 主键 - */ - private String id; - - /** - * epmet用户主键 - */ - @NotBlank(message = "用户ID不能为空") - private String userId; - - /** - * epmet网格ID - */ - private String gridId; - - /** - * 姓名 - */ - @NotBlank(message = "姓名不能为空") - private String name; - - /** - * 身份证 - */ - @NotBlank(message = "身份证不能为空") - private String idCard; - - /** - * 手机号 - */ - @NotBlank(message = "手机号不能为空") - private String mobile; - - /** - * 性别 0女 1男 - */ - @NotBlank(message = "性别不能为空") - private String gender; - - /** - * 类型 0 租客 1 房东 - */ - private String type; - - /** - * 加入时间 - */ - private String joinDate; - - /** - * 加入原因 - */ - private String joinReason; - - /** - * 移除时间 - */ - private String removeDate; - - /** - * 移除原因 - */ - private String removeReason; - - /** - * 删除标记 0:未删除,1:已删除 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - - /** - * 客户ID - */ - private String customerId; - - /** - * 是否保存为福利人员 - */ - private Boolean welfareFlag; - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeRelocationDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeRelocationDTO.java deleted file mode 100644 index d158b81..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeRelocationDTO.java +++ /dev/null @@ -1,204 +0,0 @@ -package com.epmet.plugin.power.dto.change; - -import com.alibaba.fastjson.annotation.JSONField; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - - -/** - * 合同表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-06 - */ -@Data -public class ChangeRelocationDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - private String id; - - /** - * 姓名 - */ - private String name; - - /** - * 性别 - */ - private String gender; - - /** - * 年龄 - */ - private String age; - - /** - * 组织PID - */ - private String pid; - - /** - * 组织ID - */ - private String agencyId; - - /** - * 组织名 - */ - private String agencyName; - - /** - * 组织ID - */ - private String gridId; - - /** - * 组织名 - */ - private String gridName; - - /** - * 房屋小区ID - */ - private String villageId; - - /** - * 房屋小区 - */ - private String villageName; - - /** - * 楼号ID - */ - private String buildId; - - /** - * 楼号 - */ - private String buildName; - - /** - * 单元ID - */ - private String unitId; - - /** - * 单元 - */ - private String unitName; - - /** - * 房屋ID - */ - private String homeId; - - /** - * 房屋 - */ - private String homeName; - - /** - * 外迁详细地址 - */ - private String address; - - /** - * 操作类型【客户外out,客户内in】 - */ - private String type; - - /** - * 原房主姓名 - */ - private String ownerName; - - /** - * 原网格信息 - */ - private String oldDept; - - /** - * 原房屋信息 - */ - private String oldAddress; - - /** - * 原房间号 - */ - private String oldHome; - - /** - * 浅出原因 - */ - private String reason; - - /** - * 删除标记 0:未删除,1:已删除 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - - /** - * 客户ID - */ - private String customerId; - - /** - * 迁出时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @JSONField(format = "yyyy-MM-dd") - private Date outOfTime; - - /** - * 身份证号 - */ - private String idCard; - - /** - * 手机号 - */ - private String mobile; - - /** - * epmet用户主键 - */ - private String icUserId; - - /** - * 是否保存为福利人员 - */ - private Boolean welfareFlag; - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeWelfareDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeWelfareDTO.java deleted file mode 100644 index 43f9d38..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeWelfareDTO.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.epmet.plugin.power.dto.change; - -import java.io.Serializable; -import java.util.Date; -import lombok.Data; - - -/** - * 福利表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-09 - */ -@Data -public class ChangeWelfareDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键 - */ - private String id; - - /** - * epmet用户主键 - */ - private String userId; - - /** - * epmet网格ID - */ - private String gridId; - - /** - * 姓名 - */ - private String name; - - /** - * 身份证 - */ - private String idCard; - - /** - * 手机号 - */ - private String mobile; - - /** - * 性别 0女 1男 - */ - private String gender; - - /** - * 类型 - */ - private String type; - - /** - * 加入时间 - */ - private String joinDate; - - /** - * 加入原因 - */ - private String joinReason; - - /** - * 移除时间 - */ - private String removeDate; - - /** - * 移除原因 - */ - private String removeReason; - - /** - * 删除标记 0:未删除,1:已删除 - */ - private String delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - - /** - * 客户ID - */ - private String customerId; - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/CheckWelfareByIdCardDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/CheckWelfareByIdCardDTO.java deleted file mode 100644 index 243e683..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/CheckWelfareByIdCardDTO.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.epmet.plugin.power.dto.change; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -/** - * @program: epmet-plugins - * @description: - * @author: wangtong - * @create: 2022-05-09 13:52 - **/ -@Data -public class CheckWelfareByIdCardDTO implements Serializable { - - - @NotBlank(message = "身份证不能为空") - private String idCard; -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/form/.gitkeep b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/form/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/result/.gitkeep b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/result/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeDeathController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeDeathController.java deleted file mode 100644 index 6320bf3..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeDeathController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.epmet.plugin.power.modules.change.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.plugin.power.dto.change.ChangeDeathDTO; -import com.epmet.plugin.power.modules.change.excel.ChangeDeathExcel; -import com.epmet.plugin.power.modules.change.service.ChangeDeathService; -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-05-05 - */ -@RestController -@RequestMapping("rentDeath") -public class ChangeDeathController { - - @Autowired - private ChangeDeathService changeDeathService; - - @RequestMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = changeDeathService.page(params); - return new Result>().ok(page); - } - - @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - ChangeDeathDTO data = changeDeathService.get(id); - return new Result().ok(data); - } - - @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody ChangeDeathDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - return changeDeathService.save(dto); - } - - @NoRepeatSubmit - @PostMapping("update") - public Result update(@RequestBody ChangeDeathDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - changeDeathService.update(dto); - return new Result(); - } - - @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - changeDeathService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = changeDeathService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ChangeDeathExcel.class); - } - - - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeRelocationController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeRelocationController.java deleted file mode 100644 index f020250..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeRelocationController.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.epmet.plugin.power.modules.change.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.plugin.power.dto.change.ChangeRelocationDTO; -import com.epmet.plugin.power.modules.change.excel.ChangeRelocationExcel; -import com.epmet.plugin.power.modules.change.service.ChangeRelocationService; -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-05-06 - */ -@RestController -@RequestMapping("changeRelocation") -public class ChangeRelocationController { - - @Autowired - private ChangeRelocationService changeRelocationService; - - @RequestMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = changeRelocationService.page(params); - return new Result>().ok(page); - } - - @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - ChangeRelocationDTO data = changeRelocationService.get(id); - return new Result().ok(data); - } - - @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody ChangeRelocationDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - changeRelocationService.save(dto); - return new Result(); - } - - @NoRepeatSubmit - @PostMapping("update") - public Result update(@RequestBody ChangeRelocationDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - changeRelocationService.update(dto); - return new Result(); - } - - @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - changeRelocationService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = changeRelocationService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ChangeRelocationExcel.class); - } - - /** - * @describe: 保存迁出信息 - * @author wangtong - * @date 2022/5/7 9:49 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - @NoRepeatSubmit - @PostMapping("saveOutOfInfo") - public Result saveOutOfInfo(@RequestBody ChangeRelocationDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - return changeRelocationService.saveOutOfInfo(dto); - } - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeWelfareController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeWelfareController.java deleted file mode 100644 index c3dc39c..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeWelfareController.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.epmet.plugin.power.modules.change.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.plugin.power.dto.change.ChangeWelfareDTO; -import com.epmet.plugin.power.dto.change.CheckWelfareByIdCardDTO; -import com.epmet.plugin.power.modules.change.excel.ChangeWelfareExcel; -import com.epmet.plugin.power.modules.change.service.ChangeWelfareService; -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-05-09 - */ -@RestController -@RequestMapping("changeWelfare") -public class ChangeWelfareController { - - @Autowired - private ChangeWelfareService changeWelfareService; - - @RequestMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = changeWelfareService.page(params); - return new Result>().ok(page); - } - - @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ - ChangeWelfareDTO data = changeWelfareService.get(id); - return new Result().ok(data); - } - - @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody ChangeWelfareDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - return changeWelfareService.save(dto); - } - - @NoRepeatSubmit - @PostMapping("update") - public Result update(@RequestBody ChangeWelfareDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - changeWelfareService.update(dto); - return new Result(); - } - - @RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - changeWelfareService.delete(ids); - return new Result(); - } - - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = changeWelfareService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, ChangeWelfareExcel.class); - } - - /** - * @describe: 移除福利人员 - * @author wangtong - * @date 2022/5/9 11:11 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - @NoRepeatSubmit - @PostMapping("removeWelfare") - public Result removeWelfare(@RequestBody ChangeWelfareDTO dto){ - return changeWelfareService.removeWelfare(dto); - } - - - /** - * @describe: 通过身份证号查询是否属于福利人员,是-true,否-false - * @author wangtong - * @date 2022/5/9 13:52 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - @NoRepeatSubmit - @GetMapping("checkWelfareByIdCard") - public Boolean checkWelfareByIdCard(CheckWelfareByIdCardDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - return changeWelfareService.checkWelfareByIdCard(dto); - } - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeDeathDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeDeathDao.java deleted file mode 100644 index ede0b21..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeDeathDao.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.epmet.plugin.power.modules.change.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * 死亡名单表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-05 - */ -@Mapper -public interface ChangeDeathDao extends BaseDao { - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeRelocationDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeRelocationDao.java deleted file mode 100644 index e49c9bb..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeRelocationDao.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.epmet.plugin.power.modules.change.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * 合同表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-06 - */ -@Mapper -public interface ChangeRelocationDao extends BaseDao { - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeWelfareDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeWelfareDao.java deleted file mode 100644 index c55ff77..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeWelfareDao.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.epmet.plugin.power.modules.change.dao; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.plugin.power.dto.change.ChangeWelfareDTO; -import com.epmet.plugin.power.modules.change.entity.ChangeWelfareEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -/** - * 福利表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-09 - */ -@Mapper -public interface ChangeWelfareDao extends BaseDao { - - /** - * @describe: 通过身份证号查询福利人员 - * @author wangtong - * @date 2022/5/9 13:59 - * @params [idCard] - * @return com.epmet.plugin.power.modules.change.entity.ChangeWelfareEntity - */ - ChangeWelfareEntity selectByIdCard(@Param("idCard") String idCard); - - /** - * @describe: 移除福利人员 - * @author wangtong - * @date 2022/5/9 14:36 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - void removeWelfare(ChangeWelfareDTO dto); -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeDeathEntity.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeDeathEntity.java deleted file mode 100644 index a0ed967..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeDeathEntity.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.epmet.plugin.power.modules.change.entity; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * 死亡名单表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-05 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("pli_change_death") -public class ChangeDeathEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * epmet用户主键 - */ - private String userId; - - /** - * epmet网格ID - */ - private String gridId; - - /** - * 姓名 - */ - private String name; - - /** - * 身份证 - */ - private String idCard; - - /** - * 手机号 - */ - private String mobile; - - /** - * 性别 0女 1男 - */ - private String gender; - - /** - * 类型 0 租客 1 房东 - */ - private String type; - - /** - * 加入时间 - */ - private String joinDate; - - /** - * 加入原因 - */ - private String joinReason; - - /** - * 移除时间 - */ - private String removeDate; - - /** - * 移除原因 - */ - private String removeReason; - - /** - * 客户ID - */ - private String customerId; - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeRelocationEntity.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeRelocationEntity.java deleted file mode 100644 index ed9cfb3..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeRelocationEntity.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.epmet.plugin.power.modules.change.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * 合同表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-06 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("pli_change_relocation") -public class ChangeRelocationEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 姓名 - */ - private String name; - - /** - * 性别 - */ - private String gender; - - /** - * 年龄 - */ - private String age; - - /** - * 组织PID - */ - private String pid; - - /** - * 组织ID - */ - private String agencyId; - - /** - * 组织名 - */ - private String agencyName; - - /** - * 房屋小区ID - */ - private String villageId; - - /** - * 房屋小区 - */ - private String villageName; - - /** - * 楼号ID - */ - private String buildId; - - /** - * 楼号 - */ - private String buildName; - - /** - * 单元ID - */ - private String unitId; - - /** - * 单元 - */ - private String unitName; - - /** - * 房屋ID - */ - private String homeId; - - /** - * 房屋 - */ - private String homeName; - - /** - * 外迁详细地址 - */ - private String address; - - /** - * 操作类型【客户外out,客户内in】 - */ - private String type; - - /** - * 原房主姓名 - */ - private String ownerName; - - /** - * 原网格信息 - */ - private String oldDept; - - /** - * 原房屋信息 - */ - private String oldAddress; - - /** - * 原房间号 - */ - private String oldHome; - - /** - * 浅出原因 - */ - private String reason; - - /** - * 客户ID - */ - private String customerId; - - /** - * 迁出时间 - */ - private Date outOfTime; - - /** - * 身份证号 - */ - private String idCard; - - /** - * 手机号 - */ - private String mobile; - - /** - * epmet用户主键 - */ - private String icUserId; - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeWelfareEntity.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeWelfareEntity.java deleted file mode 100644 index 04242c0..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeWelfareEntity.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.epmet.plugin.power.modules.change.entity; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * 福利表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-09 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("pli_change_welfare") -public class ChangeWelfareEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * epmet用户主键 - */ - private String userId; - - /** - * epmet网格ID - */ - private String gridId; - - /** - * 姓名 - */ - private String name; - - /** - * 身份证 - */ - private String idCard; - - /** - * 手机号 - */ - private String mobile; - - /** - * 性别 0女 1男 - */ - private String gender; - - /** - * 类型 - */ - private String type; - - /** - * 加入时间 - */ - private String joinDate; - - /** - * 加入原因 - */ - private String joinReason; - - /** - * 移除时间 - */ - private String removeDate; - - /** - * 移除原因 - */ - private String removeReason; - - /** - * 客户ID - */ - private String customerId; - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeDeathExcel.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeDeathExcel.java deleted file mode 100644 index 4839e38..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeDeathExcel.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.epmet.plugin.power.modules.change.excel; - -import cn.afterturn.easypoi.excel.annotation.Excel; -import lombok.Data; - -import java.util.Date; - -/** - * 死亡名单表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-05 - */ -@Data -public class ChangeDeathExcel { - -// @Excel(name = "主键") -// private String id; - -// @Excel(name = "epmet用户主键") -// private String userId; - - @Excel(name = "姓名") - private String name; - - @Excel(name = "身份证") - private String idCard; - - @Excel(name = "手机号") - private String mobile; - - @Excel(name = "性别",replace = { "男_1", "女_0"} ) - private String gender; - - @Excel(name = "类型",replace = { "房东_1", "租客_0"} ) - private String type; - - @Excel(name = "加入时间") - private String joinDate; - - @Excel(name = "加入原因") - private String joinReason; - -// @Excel(name = "移除时间") -// private String removeDate; -// -// @Excel(name = "移除原因") -// private String removeReason; - -// @Excel(name = "删除标记 0:未删除,1:已删除") -// private String delFlag; -// -// @Excel(name = "乐观锁") -// private Integer revision; -// -// @Excel(name = "创建人") -// private String createdBy; - - @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss") - private Date createdTime; - -// @Excel(name = "更新人") -// private String updatedBy; -// -// @Excel(name = "更新时间") -// private Date updatedTime; - -// @Excel(name = "客户ID") -// private String customerId; - - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeRelocationExcel.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeRelocationExcel.java deleted file mode 100644 index a750525..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeRelocationExcel.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.epmet.plugin.power.modules.change.excel; - -import cn.afterturn.easypoi.excel.annotation.Excel; -import lombok.Data; - -import java.util.Date; - -/** - * 合同表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-06 - */ -@Data -public class ChangeRelocationExcel { - -// @Excel(name = "主键") -// private String id; - - @Excel(name = "姓名") - private String name; - - @Excel(name = "所属网格") - private String agencyName; - - @Excel(name = "所属房屋") - private String oldAddress; - - @Excel(name = "手机号") - private String mobile; - - @Excel(name = "身份证号") - private String idCard; - - @Excel(name = "性别") - private String gender; - - @Excel(name = "年龄") - private String age; - - @Excel(name = "迁出时间", format = "yyyy-MM-dd") - private Date outOfTime; - - @Excel(name = "迁出原因") - private String reason; - - @Excel(name = "迁往何地") - private String address; - - @Excel(name = "户主姓名") - private String ownerName; - - - -// @Excel(name = "组织PID") -// private String pid; - -// @Excel(name = "组织ID") -// private String agencyId; - - - -// @Excel(name = "房屋小区ID") -// private String villageId; - -// @Excel(name = "房屋小区") -// private String villageName; - -// @Excel(name = "楼号ID") -// private String buildId; - -// @Excel(name = "楼号") -// private String buildName; - -// @Excel(name = "单元ID") -// private String unitId; - -// @Excel(name = "单元") -// private String unitName; - -// @Excel(name = "房屋ID") -// private String homeId; - -// @Excel(name = "房屋") -// private String homeName; - - -// @Excel(name = "操作类型",replace = { "客户外_out", "客户内_in"} ) -// private String type; -// -// -// -// @Excel(name = "原网格信息") -// private String oldDept; -// - - -// @Excel(name = "原房间号") -// private String oldHome; - - - -// @Excel(name = "删除标记 0:未删除,1:已删除") -// private String delFlag; -// -// @Excel(name = "乐观锁") -// private Integer revision; -// -// @Excel(name = "创建人") -// private String createdBy; - - - -// @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss") -// private Date createdTime; - -// @Excel(name = "更新人") -// private String updatedBy; -// -// @Excel(name = "更新时间") -// private Date updatedTime; -// -// @Excel(name = "客户ID") -// private String customerId; - - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeWelfareExcel.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeWelfareExcel.java deleted file mode 100644 index 7fe21f0..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeWelfareExcel.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.epmet.plugin.power.modules.change.excel; - -import cn.afterturn.easypoi.excel.annotation.Excel; -import lombok.Data; - -import java.util.Date; - -/** - * 福利表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-09 - */ -@Data -public class ChangeWelfareExcel { - - @Excel(name = "主键") - private String id; - - @Excel(name = "epmet用户主键") - private String userId; - - @Excel(name = "epmet网格ID") - private String gridId; - - @Excel(name = "姓名") - private String name; - - @Excel(name = "身份证") - private String idCard; - - @Excel(name = "手机号") - private String mobile; - - @Excel(name = "性别 0女 1男") - private String gender; - - @Excel(name = "类型") - private String type; - - @Excel(name = "加入时间") - private String joinDate; - - @Excel(name = "加入原因") - private String joinReason; - - @Excel(name = "移除时间") - private String removeDate; - - @Excel(name = "移除原因") - private String removeReason; - - @Excel(name = "删除标记 0:未删除,1:已删除") - private String delFlag; - - @Excel(name = "乐观锁") - private Integer revision; - - @Excel(name = "创建人") - private String createdBy; - - @Excel(name = "创建时间") - private Date createdTime; - - @Excel(name = "更新人") - private String updatedBy; - - @Excel(name = "更新时间") - private Date updatedTime; - - @Excel(name = "客户ID") - private String customerId; - - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeDeathRedis.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeDeathRedis.java deleted file mode 100644 index 4d0cebe..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeDeathRedis.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.epmet.plugin.power.modules.change.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-05-05 - */ -@Component -public class ChangeDeathRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeRelocationRedis.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeRelocationRedis.java deleted file mode 100644 index 09374eb..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeRelocationRedis.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.epmet.plugin.power.modules.change.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-05-06 - */ -@Component -public class ChangeRelocationRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeWelfareRedis.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeWelfareRedis.java deleted file mode 100644 index 31a4c26..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeWelfareRedis.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.epmet.plugin.power.modules.change.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-05-09 - */ -@Component -public class ChangeWelfareRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeDeathService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeDeathService.java deleted file mode 100644 index 5eb010c..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeDeathService.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.epmet.plugin.power.modules.change.service; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.Result; -import com.epmet.plugin.power.dto.change.ChangeDeathDTO; -import com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity; - -import java.util.List; -import java.util.Map; - -/** - * 死亡名单表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-05 - */ -public interface ChangeDeathService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2022-05-05 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2022-05-05 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ChangeDeathDTO - * @author generator - * @date 2022-05-05 - */ - ChangeDeathDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2022-05-05 - */ - Result save(ChangeDeathDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2022-05-05 - */ - void update(ChangeDeathDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2022-05-05 - */ - void delete(String[] ids); -} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeRelocationService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeRelocationService.java deleted file mode 100644 index bdbfc02..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeRelocationService.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.epmet.plugin.power.modules.change.service; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.Result; -import com.epmet.plugin.power.dto.change.ChangeRelocationDTO; -import com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity; - -import java.util.List; -import java.util.Map; - -/** - * 合同表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-06 - */ -public interface ChangeRelocationService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2022-05-06 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2022-05-06 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ChangeRelocationDTO - * @author generator - * @date 2022-05-06 - */ - ChangeRelocationDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2022-05-06 - */ - void save(ChangeRelocationDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2022-05-06 - */ - void update(ChangeRelocationDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2022-05-06 - */ - void delete(String[] ids); - - /** - * @describe: 保存迁出信息 - * @author wangtong - * @date 2022/5/7 9:49 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - Result saveOutOfInfo(ChangeRelocationDTO dto); -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeWelfareService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeWelfareService.java deleted file mode 100644 index 539b35d..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeWelfareService.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.epmet.plugin.power.modules.change.service; - -import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.Result; -import com.epmet.plugin.power.dto.change.ChangeWelfareDTO; -import com.epmet.plugin.power.dto.change.CheckWelfareByIdCardDTO; -import com.epmet.plugin.power.modules.change.entity.ChangeWelfareEntity; - -import java.util.List; -import java.util.Map; - -/** - * 福利表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-09 - */ -public interface ChangeWelfareService extends BaseService { - - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2022-05-09 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2022-05-09 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return ChangeWelfareDTO - * @author generator - * @date 2022-05-09 - */ - ChangeWelfareDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2022-05-09 - */ - Result save(ChangeWelfareDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2022-05-09 - */ - void update(ChangeWelfareDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2022-05-09 - */ - void delete(String[] ids); - - /** - * @describe: 移除福利人员 - * @author wangtong - * @date 2022/5/9 11:11 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ - Result removeWelfare(ChangeWelfareDTO dto); - - /** - * @describe: 通过身份证号查询是否属于福利人员,是-true,否-false - * @author wangtong - * @date 2022/5/9 13:54 - * @params [dto] - * @return java.lang.Boolean - */ - Boolean checkWelfareByIdCard(CheckWelfareByIdCardDTO dto); - - /** - * @describe: 保存福利人员 - * @author wangtong - * @date 2022/5/9 14:10 - * @params [] - * @return com.epmet.commons.tools.utils.Result - */ - Result saveWelfareInfo(ChangeWelfareDTO dto); -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java deleted file mode 100644 index 6afdd7a..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.epmet.plugin.power.modules.change.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.security.user.LoginUserUtil; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.form.RentTenantDataFormDTO; -import com.epmet.dto.result.RentTenantDataResultDTO; -import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.plugin.power.dto.change.ChangeDeathDTO; -import com.epmet.plugin.power.dto.change.ChangeWelfareDTO; -import com.epmet.plugin.power.modules.change.dao.ChangeDeathDao; -import com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity; -import com.epmet.plugin.power.modules.change.redis.ChangeDeathRedis; -import com.epmet.plugin.power.modules.change.service.ChangeDeathService; -import com.epmet.plugin.power.modules.change.service.ChangeWelfareService; -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.*; - -/** - * 死亡名单表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-05 - */ -@Service -public class ChangeDeathServiceImpl extends BaseServiceImpl implements ChangeDeathService { - - @Autowired - private ChangeDeathRedis changeDeathRedis; - - @Autowired - private EpmetUserOpenFeignClient epmetUserOpenFeignClient; - - @Autowired - LoginUserUtil loginUserUtil; - - @Autowired - private ChangeWelfareService changeWelfareService; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ChangeDeathDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ChangeDeathDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String) params.get(FieldConstant.ID_HUMP); - String name = (String) params.get("name"); - String idCard = (String) params.get("idCard"); - String mobile = (String) params.get("mobile"); - String startTime = (String) params.get("startTime"); - String endTime = (String) params.get("endTime"); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - wrapper.eq(StringUtils.isNotBlank(name), "NAME", name); - wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard); - wrapper.eq(StringUtils.isNotBlank(mobile), "MOBILE", mobile); - wrapper.ge(StringUtils.isNotBlank(startTime), "JOIN_DATE", startTime); - wrapper.le(StringUtils.isNotBlank(endTime), "JOIN_DATE", endTime); - - return wrapper; - } - - @Override - public ChangeDeathDTO get(String id) { - ChangeDeathEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ChangeDeathDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Result save(ChangeDeathDTO dto) { - RentTenantDataFormDTO formDTO = new RentTenantDataFormDTO(); - formDTO.setUserId(dto.getUserId()); - formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); - ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); - Result result = epmetUserOpenFeignClient.getRentResiUserInfo(formDTO); - - dto.setIdCard(result.getData().getIdCard()); - dto.setMobile(result.getData().getMobile()); - dto.setGridId(result.getData().getGridId()); - Map params = new HashMap<>(4); - params.put("idCard", dto.getIdCard()); - if (!list(params).isEmpty()) { - return new Result().error("该人员已经迁入死亡人口"); - } - - dto.setJoinDate(DateUtils.format(new Date())); - ChangeDeathEntity entity = ConvertUtils.sourceToTarget(dto, ChangeDeathEntity.class); - entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); - insert(entity); - - if(dto.getWelfareFlag() != null && dto.getWelfareFlag()){ - ChangeWelfareDTO formDto = new ChangeWelfareDTO(); - formDto.setUserId(dto.getUserId()); - formDto.setName(dto.getName()); - formDto.setIdCard(result.getData().getIdCard()); - formDto.setMobile(result.getData().getMobile()); - formDto.setGridId(result.getData().getGridId()); - formDto.setGender(dto.getGender()); - formDto.setJoinReason("迁入死亡人口选定"); - formDto.setCustomerId(dto.getCustomerId()); - formDto.setCustomerId(formDTO.getCustomerId()); - changeWelfareService.saveWelfareInfo(formDto); - } - return new Result(); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ChangeDeathDTO dto) { - ChangeDeathEntity entity = ConvertUtils.sourceToTarget(dto, ChangeDeathEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeRelocationServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeRelocationServiceImpl.java deleted file mode 100644 index 29becf1..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeRelocationServiceImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.epmet.plugin.power.modules.change.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.security.user.LoginUserUtil; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.form.RentTenantDataFormDTO; -import com.epmet.dto.result.RentTenantDataResultDTO; -import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.plugin.power.dto.change.ChangeRelocationDTO; -import com.epmet.plugin.power.dto.change.ChangeWelfareDTO; -import com.epmet.plugin.power.modules.change.dao.ChangeRelocationDao; -import com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity; -import com.epmet.plugin.power.modules.change.redis.ChangeRelocationRedis; -import com.epmet.plugin.power.modules.change.service.ChangeRelocationService; -import com.epmet.plugin.power.modules.change.service.ChangeWelfareService; -import com.epmet.plugin.power.utils.IdentityNoUtils; -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-05-06 - */ -@Service -public class ChangeRelocationServiceImpl extends BaseServiceImpl implements ChangeRelocationService { - - @Autowired - private ChangeRelocationRedis changeRelocationRedis; - - @Autowired - LoginUserUtil loginUserUtil; - - @Autowired - private EpmetUserOpenFeignClient epmetUserOpenFeignClient; - - @Autowired - private ChangeWelfareService changeWelfareService; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ChangeRelocationDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ChangeRelocationDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - String name = (String) params.get("name"); - String idCard = (String) params.get("idCard"); - String mobile = (String) params.get("mobile"); - String startTime = (String) params.get("startTime"); - String endTime = (String) params.get("endTime"); - - String gridId = (String) params.get("gridId"); - String villageId = (String) params.get("villageId"); - String buildId = (String) params.get("buildId"); - String unitId = (String) params.get("unitId"); - String homeId = (String) params.get("homeId"); - - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - wrapper.eq(StringUtils.isNotBlank(name), "NAME", name); - wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard); - wrapper.eq(StringUtils.isNotBlank(mobile), "MOBILE", mobile); - wrapper.ge(StringUtils.isNotBlank(startTime), "OUT_OF_TIME", startTime); - wrapper.le(StringUtils.isNotBlank(endTime), "OUT_OF_TIME", endTime); - - wrapper.eq(StringUtils.isNotBlank(gridId), "AGENCY_ID", gridId); - wrapper.eq(StringUtils.isNotBlank(villageId), "VILLAGE_ID", villageId); - wrapper.eq(StringUtils.isNotBlank(buildId), "BUILD_ID", buildId); - wrapper.eq(StringUtils.isNotBlank(unitId), "UNIT_ID", unitId); - wrapper.eq(StringUtils.isNotBlank(homeId), "HOME_ID", homeId); - - return wrapper; - } - - @Override - public ChangeRelocationDTO get(String id) { - ChangeRelocationEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ChangeRelocationDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(ChangeRelocationDTO dto) { - ChangeRelocationEntity entity = ConvertUtils.sourceToTarget(dto, ChangeRelocationEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ChangeRelocationDTO dto) { - ChangeRelocationEntity entity = ConvertUtils.sourceToTarget(dto, ChangeRelocationEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - - @Override - public Result saveOutOfInfo(ChangeRelocationDTO dto) { - RentTenantDataFormDTO formDTO = new RentTenantDataFormDTO(); - formDTO.setUserId(dto.getIcUserId()); - formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); - ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); - Result result = epmetUserOpenFeignClient.getRentResiUserInfo(formDTO); - - dto.setIdCard(result.getData().getIdCard()); - dto.setMobile(result.getData().getMobile()); - - ChangeRelocationEntity entity = ConvertUtils.sourceToTarget(dto, ChangeRelocationEntity.class); - entity.setPid(dto.getAgencyId()); - entity.setAgencyId(dto.getGridId()); - entity.setAgencyName(dto.getGridName()); - entity.setAge(IdentityNoUtils.getAge(result.getData().getIdCard()).toString()); - entity.setAddress(dto.getVillageName()+dto.getBuildName()+dto.getUnitName()+dto.getHomeName()); - insert(entity); - - if(dto.getWelfareFlag() != null && dto.getWelfareFlag()){ - ChangeWelfareDTO formDto = new ChangeWelfareDTO(); - formDto.setUserId(dto.getIcUserId()); - formDto.setName(dto.getName()); - formDto.setIdCard(result.getData().getIdCard()); - formDto.setMobile(result.getData().getMobile()); - formDto.setGridId(result.getData().getGridId()); - if(StringUtils.isNotBlank(dto.getGender())){ - if("女".equals(dto.getGender())){ - formDto.setGender("0"); - }else if("男".equals(dto.getGender())){ - formDto.setGender("1"); - } - } - formDto.setJoinReason("迁出人员选定"); - formDto.setCustomerId(dto.getCustomerId()); - formDto.setCustomerId(formDTO.getCustomerId()); - changeWelfareService.saveWelfareInfo(formDto); - } - return new Result(); - } - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeWelfareServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeWelfareServiceImpl.java deleted file mode 100644 index 671d8d7..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeWelfareServiceImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.epmet.plugin.power.modules.change.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.security.user.LoginUserUtil; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.form.RentTenantDataFormDTO; -import com.epmet.dto.result.RentTenantDataResultDTO; -import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.plugin.power.dto.change.ChangeWelfareDTO; -import com.epmet.plugin.power.dto.change.CheckWelfareByIdCardDTO; -import com.epmet.plugin.power.modules.change.dao.ChangeWelfareDao; -import com.epmet.plugin.power.modules.change.entity.ChangeWelfareEntity; -import com.epmet.plugin.power.modules.change.redis.ChangeWelfareRedis; -import com.epmet.plugin.power.modules.change.service.ChangeWelfareService; -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.*; - -/** - * 福利表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2022-05-09 - */ -@Service -public class ChangeWelfareServiceImpl extends BaseServiceImpl implements ChangeWelfareService { - - @Autowired - private ChangeWelfareRedis changeWelfareRedis; - - @Autowired - LoginUserUtil loginUserUtil; - - @Autowired - private EpmetUserOpenFeignClient epmetUserOpenFeignClient; - - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ChangeWelfareDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ChangeWelfareDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String) params.get(FieldConstant.ID_HUMP); - String name = (String) params.get("name"); - String idCard = (String) params.get("idCard"); - String mobile = (String) params.get("mobile"); - String startTime = (String) params.get("startTime"); - String endTime = (String) params.get("endTime"); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - wrapper.eq(StringUtils.isNotBlank(name), "NAME", name); - wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard); - wrapper.eq(StringUtils.isNotBlank(mobile), "MOBILE", mobile); - wrapper.ge(StringUtils.isNotBlank(startTime), "JOIN_DATE", startTime); - wrapper.le(StringUtils.isNotBlank(endTime), "JOIN_DATE", endTime); - - return wrapper; - } - - @Override - public ChangeWelfareDTO get(String id) { - ChangeWelfareEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ChangeWelfareDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Result save(ChangeWelfareDTO dto) { - - - RentTenantDataFormDTO formDTO = new RentTenantDataFormDTO(); - formDTO.setUserId(dto.getUserId()); - formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); - ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); - Result result = epmetUserOpenFeignClient.getRentResiUserInfo(formDTO); - - dto.setIdCard(result.getData().getIdCard()); - dto.setMobile(result.getData().getMobile()); - dto.setGridId(result.getData().getGridId()); - Map params = new HashMap<>(4); - params.put("idCard", dto.getIdCard()); - if (!list(params).isEmpty()) { - return new Result().error("该人员已经迁入福利人口"); - } - dto.setJoinDate(DateUtils.format(new Date())); - ChangeWelfareEntity entity = ConvertUtils.sourceToTarget(dto, ChangeWelfareEntity.class); - entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); - insert(entity); - return new Result(); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ChangeWelfareDTO dto) { - ChangeWelfareEntity entity = ConvertUtils.sourceToTarget(dto, ChangeWelfareEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - - @Override - public Result removeWelfare(ChangeWelfareDTO dto) { - if(StringUtils.isBlank(dto.getId())){ - return new Result().error("id不可为空"); - } - dto.setRemoveDate(DateUtils.format(new Date())); - baseDao.removeWelfare(dto); - return new Result().ok("移除成功"); - } - - @Override - public Boolean checkWelfareByIdCard(CheckWelfareByIdCardDTO dto) { - ChangeWelfareEntity entity = baseDao.selectByIdCard(dto.getIdCard()); - return entity == null? false: true; - } - - @Override - public Result saveWelfareInfo(ChangeWelfareDTO dto) { - Map params = new HashMap<>(4); - params.put("idCard", dto.getIdCard()); - if (!list(params).isEmpty()) { - return new Result().error("该人员已经迁入福利人口"); - } - dto.setJoinDate(DateUtils.format(new Date())); - ChangeWelfareEntity entity = ConvertUtils.sourceToTarget(dto, ChangeWelfareEntity.class); - insert(entity); - return new Result(); - } - -} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeDeathDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeDeathDao.xml deleted file mode 100644 index 40db6d7..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeDeathDao.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeRelocationDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeRelocationDao.xml deleted file mode 100644 index cb7657c..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeRelocationDao.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeWelfareDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeWelfareDao.xml deleted file mode 100644 index b0afb3c..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeWelfareDao.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - update pli_change_welfare - set REMOVE_DATE=#{removeDate}, - REMOVE_REASON=#{removeReason}, - del_flag='1' - where id=#{id} - - - - From 3dd73f9488bc2359f2339feb7eca89b3565090c0 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Thu, 12 May 2022 10:18:03 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=8D=A3=E8=AA=89=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/power/utils/IdentityNoUtils.java | 355 ------------------ 1 file changed, 355 deletions(-) delete mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/utils/IdentityNoUtils.java diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/utils/IdentityNoUtils.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/utils/IdentityNoUtils.java deleted file mode 100644 index 661d263..0000000 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/utils/IdentityNoUtils.java +++ /dev/null @@ -1,355 +0,0 @@ -package com.epmet.plugin.power.utils; - -import org.apache.commons.lang3.StringUtils; - -import java.io.Serializable; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.util.Date; -import java.util.Hashtable; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * 身份证号工具 - * - * @author yujintao - * @email yujintao@elink-cn.com - * @date 2019/9/7 13:11 - */ -public class IdentityNoUtils implements Serializable { - - /** - * 15位身份证号 - */ - private static final Integer FIFTEEN_ID_CARD = 15; - /** - * 18位身份证号 - */ - private static final Integer EIGHTEEN_ID_CARD = 18; - /** - * 数字格式校验 - */ - private static Pattern NUMBER_PATTERN = Pattern.compile("[0-9]*"); - /** - * 日期格式校验 - */ - private static Pattern DATE_PATTERN = Pattern.compile("^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$"); - /** - * 18位身份证中最后一位校验码 - */ - private final static char[] VERIFY_CODE = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}; - /** - * 18位身份证中,各个数字的生成校验码时的权值 - */ - private final static int[] VERIFY_CODE_WEIGHT = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; - - /** - * 根据身份证号获取性别 0女;1男 - * - * @param IDCard 完整身份证号码 - * @return java.lang.String - * @author work@yujt.net.cn - * @date 2019/9/20 14:26 - */ - public static String getSex(String IDCard) { - if (StringUtils.isNotBlank(IDCard)) { - if (IDCard.length() == FIFTEEN_ID_CARD) { - if (Integer.parseInt(IDCard.substring(14, 15)) % 2 == 0) { - return sexEnum.FEMALE.value; - } else { - return sexEnum.MALE.value; - } - } else if (IDCard.length() == EIGHTEEN_ID_CARD) { - if (Integer.parseInt(IDCard.substring(16).substring(0, 1)) % 2 == 0) { - return sexEnum.FEMALE.value; - } else { - return sexEnum.MALE.value; - } - } - } - return null; - } - - /** - * 根据身份证号获取年龄 - * - * @param IDCard 完整身份证号码 - * @return java.lang.Integer - * @author work@yujt.net.cn - * @date 2019/9/20 14:26 - */ - public static Integer getAge(String IDCard) { - int age; - LocalDate now = LocalDate.now(); - int nowYear = now.getYear(); - int nowMonth = now.getMonthValue(); - int cardYear = 0; - int cardMonth = 0; - if (StringUtils.isNotBlank(IDCard) && isValid(IDCard)) { - if (IDCard.length() == FIFTEEN_ID_CARD) { - // 身份证上的年份(15位身份证为1980年前的) - String uyear = "19" + IDCard.substring(6, 8); - cardYear = Integer.parseInt(uyear); - // 身份证上的月份 - String uyue = IDCard.substring(8, 10); - cardMonth = Integer.parseInt(uyue); - } else if (IDCard.length() == EIGHTEEN_ID_CARD) { - // 身份证上的年份 - String year = IDCard.substring(6).substring(0, 4); - cardYear = Integer.parseInt(year); - // 身份证上的月份 - String yue = IDCard.substring(10).substring(0, 2); - cardMonth = Integer.parseInt(yue); - } - } - // 当前月份大于用户出身的月份表示已过生日 - if (cardMonth <= nowMonth) { - age = nowYear - cardYear + 1; - // 当前用户还没过生 - } else { - age = nowYear - cardYear; - } - return age; - } - - /** - * 根据身份证号获取出生日期 - * - * @param IDCard 完整身份证号码 - * @return java.lang.String - * @author work@yujt.net.cn - * @date 2019/9/20 14:26 - */ - public static String getBirthday(String IDCard) { - String year = ""; - String month = ""; - String day = ""; - if (StringUtils.isNotBlank(IDCard)) { - //15位身份证号 - if (IDCard.length() == FIFTEEN_ID_CARD) { - // 身份证上的年份(15位身份证为1980年前的) - year = "19" + IDCard.substring(6, 8); - //身份证上的月份 - month = IDCard.substring(8, 10); - //身份证上的日期 - day = IDCard.substring(10, 12); - //18位身份证号 - } else if (IDCard.length() == EIGHTEEN_ID_CARD) { - // 身份证上的年份 - year = IDCard.substring(6).substring(0, 4); - // 身份证上的月份 - month = IDCard.substring(10).substring(0, 2); - //身份证上的日期 - day = IDCard.substring(12).substring(0, 2); - } - } - return year + "-" + month + "-" + day; - } - - /** - * 身份证验证是否有效 - * - * @param id 号码内容 - * @return boolean - * @author - * @date - */ - public static boolean isValid(String id) { - Boolean validResult = true; - //校验长度只能为15或18 - int len = id.length(); - if (len != FIFTEEN_ID_CARD && len != EIGHTEEN_ID_CARD) { - validResult = false; - } - //校验生日 - if (!validDate(id)) { - validResult = false; - } - return validResult; - } - - /** - * 校验生日 - * - * @param id - * @return - */ - private static boolean validDate(String id) { - try { - String birth = id.length() == FIFTEEN_ID_CARD ? "19" + id.substring(6, 12) : id.substring(6, 14); - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); - Date birthDate = sdf.parse(birth); - if (!birth.equals(sdf.format(birthDate))) { - return false; - } - } catch (ParseException e) { - return false; - } - return true; - } - - /** - * 验证身份证号码,验证通过返回null - * - * @param idStr 完整身份证号码 - * @return java.lang.String - * @author work@yujt.net.cn - * @date 2019/9/20 14:26 - */ - public static String IdentityNoVerification(String idStr) { - String iDCardNo = null; - //判断号码的长度 15位或18位 - if (idStr.length() != FIFTEEN_ID_CARD && idStr.length() != EIGHTEEN_ID_CARD) { - return "身份证号码长度应该为15位或18位"; - } - if (idStr.length() == EIGHTEEN_ID_CARD) { - iDCardNo = idStr.substring(0, 17); - } else if (idStr.length() == FIFTEEN_ID_CARD) { - iDCardNo = idStr.substring(0, 6) + "19" + idStr.substring(6, 15); - } - if (isStrNum(iDCardNo) == false) { - return "身份证15位号码都应为数字;18位号码除最后一位外,都应为数字"; - } - //判断出生年月 - int year = Integer.parseInt(iDCardNo.substring(6, 10)); - String strMonth = iDCardNo.substring(10, 12); - String strDay = iDCardNo.substring(12, 14); - - String birthDay = year + "-" + strMonth + "-" + strDay; - if (isStrDate(birthDay) == false) { - return "身份证生日无效"; - } - LocalDate now = LocalDate.now(); - if ((now.getYear() - year) > 150 || now.isBefore(LocalDate.parse(birthDay))) { - return "身份证生日不在有效范围"; - } - int month = Integer.parseInt(strMonth); - if (month > 12 || month == 0) { - return "身份证月份无效"; - } - int day = Integer.parseInt(strDay); - if (day > 31 || day == 0) { - return "身份证日期无效"; - } - //判断地区码 - Hashtable h = GetAreaCode(); - if (h.get(iDCardNo.substring(0, 2)) == null) { - return "身份证地区编码错误"; - } - //判断最后一位 - int theLastOne = 0; - for (int i = 0; i < 17; i++) { - theLastOne = theLastOne + Integer.parseInt(String.valueOf(iDCardNo.charAt(i))) * VERIFY_CODE_WEIGHT[i]; - } - int modValue = theLastOne % 11; - char strVerifyCode = VERIFY_CODE[modValue]; - iDCardNo = iDCardNo + strVerifyCode; - if (idStr.length() == EIGHTEEN_ID_CARD && !iDCardNo.equals(idStr)) { - return "身份证无效,不是合法的身份证号码"; - } - return null; - } - - /** - * 地区代码 - * - * @return Hashtable - */ - private static Hashtable GetAreaCode() { - Hashtable hashtable = new Hashtable<>(); - hashtable.put("11", "北京"); - hashtable.put("12", "天津"); - hashtable.put("13", "河北"); - hashtable.put("14", "山西"); - hashtable.put("15", "内蒙古"); - hashtable.put("21", "辽宁"); - hashtable.put("22", "吉林"); - hashtable.put("23", "黑龙江"); - hashtable.put("31", "上海"); - hashtable.put("32", "江苏"); - hashtable.put("33", "浙江"); - hashtable.put("34", "安徽"); - hashtable.put("35", "福建"); - hashtable.put("36", "江西"); - hashtable.put("37", "山东"); - hashtable.put("41", "河南"); - hashtable.put("42", "湖北"); - hashtable.put("43", "湖南"); - hashtable.put("44", "广东"); - hashtable.put("45", "广西"); - hashtable.put("46", "海南"); - hashtable.put("50", "重庆"); - hashtable.put("51", "四川"); - hashtable.put("52", "贵州"); - hashtable.put("53", "云南"); - hashtable.put("54", "西藏"); - hashtable.put("61", "陕西"); - hashtable.put("62", "甘肃"); - hashtable.put("63", "青海"); - hashtable.put("64", "宁夏"); - hashtable.put("65", "新疆"); - hashtable.put("71", "台湾"); - hashtable.put("81", "香港"); - hashtable.put("82", "澳门"); - hashtable.put("91", "国外"); - return hashtable; - } - - /** - * 判断字符串是否为数字 - * - * @param str - * @return boolean - * @author work@yujt.net.cn - * @date 2019/9/20 13:58 - */ - private static boolean isStrNum(String str) { - Matcher isNum = NUMBER_PATTERN.matcher(str); - if (isNum.matches()) { - return true; - } else { - return false; - } - } - - /** - * 判断字符串是否为日期格式 - * - * @param strDate - * @return boolean - * @author work@yujt.net.cn - * @date 2019/9/20 13:57 - */ - public static boolean isStrDate(String strDate) { - Matcher m = DATE_PATTERN.matcher(strDate); - if (m.matches()) { - return true; - } else { - return false; - } - } - - enum sexEnum { - /** - * 暂停 - */ - FEMALE("0"), - /** - * 正常 - */ - MALE("1"); - - private String value; - - sexEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } - -}