Browse Source

调整文件名,归类功能

develop
zhangyuan 4 years ago
parent
commit
fa1ef4a578
  1. 4
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeDeathDTO.java
  2. 164
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeRelocationDTO.java
  3. 38
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeDeathController.java
  4. 82
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeRelocationController.java
  5. 6
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeDeathDao.java
  6. 16
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeRelocationDao.java
  7. 6
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeDeathEntity.java
  8. 134
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeRelocationEntity.java
  9. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeDeathExcel.java
  10. 105
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeRelocationExcel.java
  11. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeDeathRedis.java
  12. 30
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeRelocationRedis.java
  13. 24
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeDeathService.java
  14. 78
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeRelocationService.java
  15. 46
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java
  16. 87
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeRelocationServiceImpl.java
  17. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeDeathDao.xml
  18. 39
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeRelocationDao.xml

4
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentDeathDTO.java → epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeDeathDTO.java

@ -1,4 +1,4 @@
package com.epmet.plugin.power.dto.rent; package com.epmet.plugin.power.dto.change;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -14,7 +14,7 @@ import javax.validation.constraints.NotBlank;
* @since v1.0.0 2022-05-05 * @since v1.0.0 2022-05-05
*/ */
@Data @Data
public class RentDeathDTO implements Serializable { public class ChangeDeathDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

164
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/change/ChangeRelocationDTO.java

@ -0,0 +1,164 @@
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-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 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;
}

38
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentDeathController.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeDeathController.java

@ -1,4 +1,4 @@
package com.epmet.plugin.power.modules.rent.controller; package com.epmet.plugin.power.modules.change.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
@ -9,9 +9,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.plugin.power.dto.rent.RentDeathDTO; import com.epmet.plugin.power.dto.change.ChangeDeathDTO;
import com.epmet.plugin.power.modules.rent.excel.RentDeathExcel; import com.epmet.plugin.power.modules.change.excel.ChangeDeathExcel;
import com.epmet.plugin.power.modules.rent.service.RentDeathService; import com.epmet.plugin.power.modules.change.service.ChangeDeathService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -28,37 +28,37 @@ import java.util.Map;
*/ */
@RestController @RestController
@RequestMapping("rentDeath") @RequestMapping("rentDeath")
public class RentDeathController { public class ChangeDeathController {
@Autowired @Autowired
private RentDeathService rentDeathService; private ChangeDeathService changeDeathService;
@RequestMapping("page") @RequestMapping("page")
public Result<PageData<RentDeathDTO>> page(@RequestParam Map<String, Object> params){ public Result<PageData<ChangeDeathDTO>> page(@RequestParam Map<String, Object> params){
PageData<RentDeathDTO> page = rentDeathService.page(params); PageData<ChangeDeathDTO> page = changeDeathService.page(params);
return new Result<PageData<RentDeathDTO>>().ok(page); return new Result<PageData<ChangeDeathDTO>>().ok(page);
} }
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET})
public Result<RentDeathDTO> get(@PathVariable("id") String id){ public Result<ChangeDeathDTO> get(@PathVariable("id") String id){
RentDeathDTO data = rentDeathService.get(id); ChangeDeathDTO data = changeDeathService.get(id);
return new Result<RentDeathDTO>().ok(data); return new Result<ChangeDeathDTO>().ok(data);
} }
@NoRepeatSubmit @NoRepeatSubmit
@PostMapping("save") @PostMapping("save")
public Result save(@RequestBody RentDeathDTO dto){ public Result save(@RequestBody ChangeDeathDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
return rentDeathService.save(dto); return changeDeathService.save(dto);
} }
@NoRepeatSubmit @NoRepeatSubmit
@PostMapping("update") @PostMapping("update")
public Result update(@RequestBody RentDeathDTO dto){ public Result update(@RequestBody ChangeDeathDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
rentDeathService.update(dto); changeDeathService.update(dto);
return new Result(); return new Result();
} }
@ -66,14 +66,14 @@ public class RentDeathController {
public Result delete(@RequestBody String[] ids){ public Result delete(@RequestBody String[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
rentDeathService.delete(ids); changeDeathService.delete(ids);
return new Result(); return new Result();
} }
@GetMapping("export") @GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<RentDeathDTO> list = rentDeathService.list(params); List<ChangeDeathDTO> list = changeDeathService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, RentDeathExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, ChangeDeathExcel.class);
} }

82
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/controller/ChangeRelocationController.java

@ -0,0 +1,82 @@
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<PageData<ChangeRelocationDTO>> page(@RequestParam Map<String, Object> params){
PageData<ChangeRelocationDTO> page = changeRelocationService.page(params);
return new Result<PageData<ChangeRelocationDTO>>().ok(page);
}
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET})
public Result<ChangeRelocationDTO> get(@PathVariable("id") String id){
ChangeRelocationDTO data = changeRelocationService.get(id);
return new Result<ChangeRelocationDTO>().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<String, Object> params, HttpServletResponse response) throws Exception {
List<ChangeRelocationDTO> list = changeRelocationService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ChangeRelocationExcel.class);
}
}

6
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentDeathDao.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeDeathDao.java

@ -1,7 +1,7 @@
package com.epmet.plugin.power.modules.rent.dao; package com.epmet.plugin.power.modules.change.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.modules.rent.entity.RentDeathEntity; import com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
@ -11,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
* @since v1.0.0 2022-05-05 * @since v1.0.0 2022-05-05
*/ */
@Mapper @Mapper
public interface RentDeathDao extends BaseDao<RentDeathEntity> { public interface ChangeDeathDao extends BaseDao<ChangeDeathEntity> {
} }

16
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/dao/ChangeRelocationDao.java

@ -0,0 +1,16 @@
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<ChangeRelocationEntity> {
}

6
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentDeathEntity.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeDeathEntity.java

@ -1,4 +1,4 @@
package com.epmet.plugin.power.modules.rent.entity; package com.epmet.plugin.power.modules.change.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -16,8 +16,8 @@ import java.util.Date;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
@TableName("pli_rent_death") @TableName("pli_change_death")
public class RentDeathEntity extends BaseEpmetEntity { public class ChangeDeathEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

134
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/entity/ChangeRelocationEntity.java

@ -0,0 +1,134 @@
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;
}

4
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/excel/RentDeathExcel.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeDeathExcel.java

@ -1,4 +1,4 @@
package com.epmet.plugin.power.modules.rent.excel; package com.epmet.plugin.power.modules.change.excel;
import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data; import lombok.Data;
@ -12,7 +12,7 @@ import java.util.Date;
* @since v1.0.0 2022-05-05 * @since v1.0.0 2022-05-05
*/ */
@Data @Data
public class RentDeathExcel { public class ChangeDeathExcel {
@Excel(name = "主键") @Excel(name = "主键")
private String id; private String id;

105
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/excel/ChangeRelocationExcel.java

@ -0,0 +1,105 @@
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 gender;
@Excel(name = "年龄")
private String age;
@Excel(name = "组织PID")
private String pid;
@Excel(name = "组织ID")
private String agencyId;
@Excel(name = "组织名")
private String agencyName;
@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 address;
@Excel(name = "操作类型【客户外out,客户内in】")
private String type;
@Excel(name = "原房主姓名")
private String ownerName;
@Excel(name = "原网格信息")
private String oldDept;
@Excel(name = "原房屋信息")
private String oldAddress;
@Excel(name = "原房间号")
private String oldHome;
@Excel(name = "浅出原因")
private String reason;
@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;
}

4
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/redis/RentDeathRedis.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeDeathRedis.java

@ -1,4 +1,4 @@
package com.epmet.plugin.power.modules.rent.redis; package com.epmet.plugin.power.modules.change.redis;
import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
* @since v1.0.0 2022-05-05 * @since v1.0.0 2022-05-05
*/ */
@Component @Component
public class RentDeathRedis { public class ChangeDeathRedis {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;

30
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/redis/ChangeRelocationRedis.java

@ -0,0 +1,30 @@
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;
}
}

24
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentDeathService.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeDeathService.java

@ -1,10 +1,10 @@
package com.epmet.plugin.power.modules.rent.service; package com.epmet.plugin.power.modules.change.service;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.plugin.power.dto.rent.RentDeathDTO; import com.epmet.plugin.power.dto.change.ChangeDeathDTO;
import com.epmet.plugin.power.modules.rent.entity.RentDeathEntity; import com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -15,37 +15,37 @@ import java.util.Map;
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-05 * @since v1.0.0 2022-05-05
*/ */
public interface RentDeathService extends BaseService<RentDeathEntity> { public interface ChangeDeathService extends BaseService<ChangeDeathEntity> {
/** /**
* 默认分页 * 默认分页
* *
* @param params * @param params
* @return PageData<RentDeathDTO> * @return PageData<ChangeDeathDTO>
* @author generator * @author generator
* @date 2022-05-05 * @date 2022-05-05
*/ */
PageData<RentDeathDTO> page(Map<String, Object> params); PageData<ChangeDeathDTO> page(Map<String, Object> params);
/** /**
* 默认查询 * 默认查询
* *
* @param params * @param params
* @return java.util.List<RentDeathDTO> * @return java.util.List<ChangeDeathDTO>
* @author generator * @author generator
* @date 2022-05-05 * @date 2022-05-05
*/ */
List<RentDeathDTO> list(Map<String, Object> params); List<ChangeDeathDTO> list(Map<String, Object> params);
/** /**
* 单条查询 * 单条查询
* *
* @param id * @param id
* @return RentDeathDTO * @return ChangeDeathDTO
* @author generator * @author generator
* @date 2022-05-05 * @date 2022-05-05
*/ */
RentDeathDTO get(String id); ChangeDeathDTO get(String id);
/** /**
* 默认保存 * 默认保存
@ -55,7 +55,7 @@ public interface RentDeathService extends BaseService<RentDeathEntity> {
* @author generator * @author generator
* @date 2022-05-05 * @date 2022-05-05
*/ */
Result save(RentDeathDTO dto); Result save(ChangeDeathDTO dto);
/** /**
* 默认更新 * 默认更新
@ -65,7 +65,7 @@ public interface RentDeathService extends BaseService<RentDeathEntity> {
* @author generator * @author generator
* @date 2022-05-05 * @date 2022-05-05
*/ */
void update(RentDeathDTO dto); void update(ChangeDeathDTO dto);
/** /**
* 批量删除 * 批量删除

78
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/ChangeRelocationService.java

@ -0,0 +1,78 @@
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.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<ChangeRelocationEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ChangeRelocationDTO>
* @author generator
* @date 2022-05-06
*/
PageData<ChangeRelocationDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ChangeRelocationDTO>
* @author generator
* @date 2022-05-06
*/
List<ChangeRelocationDTO> list(Map<String, Object> 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);
}

46
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentDeathServiceImpl.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java

@ -1,4 +1,4 @@
package com.epmet.plugin.power.modules.rent.service.impl; package com.epmet.plugin.power.modules.change.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -15,11 +15,11 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.form.RentTenantDataFormDTO; import com.epmet.dto.form.RentTenantDataFormDTO;
import com.epmet.dto.result.RentTenantDataResultDTO; import com.epmet.dto.result.RentTenantDataResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.plugin.power.dto.rent.RentDeathDTO; import com.epmet.plugin.power.dto.change.ChangeDeathDTO;
import com.epmet.plugin.power.modules.rent.dao.RentDeathDao; import com.epmet.plugin.power.modules.change.dao.ChangeDeathDao;
import com.epmet.plugin.power.modules.rent.entity.RentDeathEntity; import com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity;
import com.epmet.plugin.power.modules.rent.redis.RentDeathRedis; import com.epmet.plugin.power.modules.change.redis.ChangeDeathRedis;
import com.epmet.plugin.power.modules.rent.service.RentDeathService; import com.epmet.plugin.power.modules.change.service.ChangeDeathService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -34,10 +34,10 @@ import java.util.*;
* @since v1.0.0 2022-05-05 * @since v1.0.0 2022-05-05
*/ */
@Service @Service
public class RentDeathServiceImpl extends BaseServiceImpl<RentDeathDao, RentDeathEntity> implements RentDeathService { public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, ChangeDeathEntity> implements ChangeDeathService {
@Autowired @Autowired
private RentDeathRedis rentDeathRedis; private ChangeDeathRedis changeDeathRedis;
@Autowired @Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@ -46,22 +46,22 @@ public class RentDeathServiceImpl extends BaseServiceImpl<RentDeathDao, RentDeat
LoginUserUtil loginUserUtil; LoginUserUtil loginUserUtil;
@Override @Override
public PageData<RentDeathDTO> page(Map<String, Object> params) { public PageData<ChangeDeathDTO> page(Map<String, Object> params) {
IPage<RentDeathEntity> page = baseDao.selectPage( IPage<ChangeDeathEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false), getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params) getWrapper(params)
); );
return getPageData(page, RentDeathDTO.class); return getPageData(page, ChangeDeathDTO.class);
} }
@Override @Override
public List<RentDeathDTO> list(Map<String, Object> params) { public List<ChangeDeathDTO> list(Map<String, Object> params) {
List<RentDeathEntity> entityList = baseDao.selectList(getWrapper(params)); List<ChangeDeathEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, RentDeathDTO.class); return ConvertUtils.sourceToTarget(entityList, ChangeDeathDTO.class);
} }
private QueryWrapper<RentDeathEntity> getWrapper(Map<String, Object> params){ private QueryWrapper<ChangeDeathEntity> getWrapper(Map<String, Object> params){
String id = (String) params.get(FieldConstant.ID_HUMP); String id = (String) params.get(FieldConstant.ID_HUMP);
String name = (String) params.get("name"); String name = (String) params.get("name");
String idCard = (String) params.get("idCard"); String idCard = (String) params.get("idCard");
@ -69,7 +69,7 @@ public class RentDeathServiceImpl extends BaseServiceImpl<RentDeathDao, RentDeat
String startTime = (String) params.get("startTime"); String startTime = (String) params.get("startTime");
String endTime = (String) params.get("endTime"); String endTime = (String) params.get("endTime");
QueryWrapper<RentDeathEntity> wrapper = new QueryWrapper<>(); QueryWrapper<ChangeDeathEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(name), "NAME", name); wrapper.eq(StringUtils.isNotBlank(name), "NAME", name);
wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard); wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard);
@ -81,14 +81,14 @@ public class RentDeathServiceImpl extends BaseServiceImpl<RentDeathDao, RentDeat
} }
@Override @Override
public RentDeathDTO get(String id) { public ChangeDeathDTO get(String id) {
RentDeathEntity entity = baseDao.selectById(id); ChangeDeathEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, RentDeathDTO.class); return ConvertUtils.sourceToTarget(entity, ChangeDeathDTO.class);
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result save(RentDeathDTO dto) { public Result save(ChangeDeathDTO dto) {
RentTenantDataFormDTO formDTO = new RentTenantDataFormDTO(); RentTenantDataFormDTO formDTO = new RentTenantDataFormDTO();
formDTO.setUserId(dto.getUserId()); formDTO.setUserId(dto.getUserId());
formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); formDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId());
@ -105,7 +105,7 @@ public class RentDeathServiceImpl extends BaseServiceImpl<RentDeathDao, RentDeat
} }
dto.setJoinDate(DateUtils.format(new Date())); dto.setJoinDate(DateUtils.format(new Date()));
RentDeathEntity entity = ConvertUtils.sourceToTarget(dto, RentDeathEntity.class); ChangeDeathEntity entity = ConvertUtils.sourceToTarget(dto, ChangeDeathEntity.class);
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
insert(entity); insert(entity);
return new Result(); return new Result();
@ -113,8 +113,8 @@ public class RentDeathServiceImpl extends BaseServiceImpl<RentDeathDao, RentDeat
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void update(RentDeathDTO dto) { public void update(ChangeDeathDTO dto) {
RentDeathEntity entity = ConvertUtils.sourceToTarget(dto, RentDeathEntity.class); ChangeDeathEntity entity = ConvertUtils.sourceToTarget(dto, ChangeDeathEntity.class);
updateById(entity); updateById(entity);
} }

87
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeRelocationServiceImpl.java

@ -0,0 +1,87 @@
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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.plugin.power.modules.change.dao.ChangeRelocationDao;
import com.epmet.plugin.power.dto.change.ChangeRelocationDTO;
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 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<ChangeRelocationDao, ChangeRelocationEntity> implements ChangeRelocationService {
@Autowired
private ChangeRelocationRedis changeRelocationRedis;
@Override
public PageData<ChangeRelocationDTO> page(Map<String, Object> params) {
IPage<ChangeRelocationEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ChangeRelocationDTO.class);
}
@Override
public List<ChangeRelocationDTO> list(Map<String, Object> params) {
List<ChangeRelocationEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ChangeRelocationDTO.class);
}
private QueryWrapper<ChangeRelocationEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ChangeRelocationEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
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));
}
}

4
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentDeathDao.xml → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeDeathDao.xml

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.RentDeathDao"> <mapper namespace="com.epmet.plugin.power.modules.change.dao.ChangeDeathDao">
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentDeathEntity" id="rentDeathMap"> <resultMap type="com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity" id="rentDeathMap">
<result property="id" column="ID"/> <result property="id" column="ID"/>
<result property="userId" column="USER_ID"/> <result property="userId" column="USER_ID"/>
<result property="name" column="NAME"/> <result property="name" column="NAME"/>

39
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/change/ChangeRelocationDao.xml

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.plugin.power.modules.change.dao.ChangeRelocationDao">
<resultMap type="com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity" id="changeRelocationMap">
<result property="id" column="ID"/>
<result property="name" column="NAME"/>
<result property="gender" column="GENDER"/>
<result property="age" column="AGE"/>
<result property="pid" column="PID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="agencyName" column="AGENCY_NAME"/>
<result property="villageId" column="VILLAGE_ID"/>
<result property="villageName" column="VILLAGE_NAME"/>
<result property="buildId" column="BUILD_ID"/>
<result property="buildName" column="BUILD_NAME"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="homeId" column="HOME_ID"/>
<result property="homeName" column="HOME_NAME"/>
<result property="address" column="ADDRESS"/>
<result property="type" column="TYPE"/>
<result property="ownerName" column="OWNER_NAME"/>
<result property="oldDept" column="OLD_DEPT"/>
<result property="oldAddress" column="OLD_ADDRESS"/>
<result property="oldHome" column="OLD_HOME"/>
<result property="reason" column="REASON"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="customerId" column="CUSTOMER_ID"/>
</resultMap>
</mapper>
Loading…
Cancel
Save