forked from rongchao/epmet-cloud-rizhao
28 changed files with 1973 additions and 4 deletions
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
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; |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.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.dto.ChangeDeathDTO; |
||||
|
import com.epmet.excel.ChangeDeathExcel; |
||||
|
import com.epmet.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<PageData<ChangeDeathDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<ChangeDeathDTO> page = changeDeathService.page(params); |
||||
|
return new Result<PageData<ChangeDeathDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
||||
|
public Result<ChangeDeathDTO> get(@PathVariable("id") String id){ |
||||
|
ChangeDeathDTO data = changeDeathService.get(id); |
||||
|
return new Result<ChangeDeathDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<ChangeDeathDTO> list = changeDeathService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, ChangeDeathExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,95 @@ |
|||||
|
package com.epmet.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.dto.ChangeRelocationDTO; |
||||
|
import com.epmet.excel.ChangeRelocationExcel; |
||||
|
import com.epmet.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); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @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); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,109 @@ |
|||||
|
package com.epmet.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.dto.ChangeWelfareDTO; |
||||
|
import com.epmet.dto.CheckWelfareByIdCardDTO; |
||||
|
import com.epmet.excel.ChangeWelfareExcel; |
||||
|
import com.epmet.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<PageData<ChangeWelfareDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<ChangeWelfareDTO> page = changeWelfareService.page(params); |
||||
|
return new Result<PageData<ChangeWelfareDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
||||
|
public Result<ChangeWelfareDTO> get(@PathVariable("id") String id){ |
||||
|
ChangeWelfareDTO data = changeWelfareService.get(id); |
||||
|
return new Result<ChangeWelfareDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<ChangeWelfareDTO> 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); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.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<ChangeDeathEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.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> { |
||||
|
|
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.ChangeWelfareDTO; |
||||
|
import com.epmet.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<ChangeWelfareEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @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); |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 死亡名单表 |
||||
|
* |
||||
|
* @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; |
||||
|
|
||||
|
} |
@ -0,0 +1,153 @@ |
|||||
|
package com.epmet.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; |
||||
|
|
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 福利表 |
||||
|
* |
||||
|
* @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; |
||||
|
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.epmet.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;
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,127 @@ |
|||||
|
package com.epmet.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;
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
package com.epmet.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; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.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; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.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; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.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; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.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.dto.ChangeDeathDTO; |
||||
|
import com.epmet.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<ChangeDeathEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<ChangeDeathDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-05 |
||||
|
*/ |
||||
|
PageData<ChangeDeathDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<ChangeDeathDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-05 |
||||
|
*/ |
||||
|
List<ChangeDeathDTO> list(Map<String, Object> 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); |
||||
|
} |
@ -0,0 +1,88 @@ |
|||||
|
package com.epmet.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.dto.ChangeRelocationDTO; |
||||
|
import com.epmet.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); |
||||
|
|
||||
|
/** |
||||
|
* @describe: 保存迁出信息 |
||||
|
* @author wangtong |
||||
|
* @date 2022/5/7 9:49 |
||||
|
* @params [dto] |
||||
|
* @return com.epmet.commons.tools.utils.Result |
||||
|
*/ |
||||
|
Result saveOutOfInfo(ChangeRelocationDTO dto); |
||||
|
} |
@ -0,0 +1,107 @@ |
|||||
|
package com.epmet.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.dto.ChangeWelfareDTO; |
||||
|
import com.epmet.dto.CheckWelfareByIdCardDTO; |
||||
|
import com.epmet.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<ChangeWelfareEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<ChangeWelfareDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
PageData<ChangeWelfareDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<ChangeWelfareDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
List<ChangeWelfareDTO> list(Map<String, Object> 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); |
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.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.dao.ChangeDeathDao; |
||||
|
import com.epmet.dto.ChangeDeathDTO; |
||||
|
import com.epmet.dto.ChangeWelfareDTO; |
||||
|
import com.epmet.dto.form.RentTenantDataFormDTO; |
||||
|
import com.epmet.dto.result.RentTenantDataResultDTO; |
||||
|
import com.epmet.entity.ChangeDeathEntity; |
||||
|
import com.epmet.entity.IcResiUserEntity; |
||||
|
import com.epmet.redis.ChangeDeathRedis; |
||||
|
import com.epmet.service.ChangeDeathService; |
||||
|
import com.epmet.service.ChangeWelfareService; |
||||
|
import com.epmet.service.IcResiUserService; |
||||
|
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<ChangeDeathDao, ChangeDeathEntity> implements ChangeDeathService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeDeathRedis changeDeathRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiUserServiceImpl icResiUserServiceImpl; |
||||
|
|
||||
|
@Autowired |
||||
|
LoginUserUtil loginUserUtil; |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeWelfareService changeWelfareService; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiUserService icResiUserService; |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeRelocationServiceImpl changeRelocationServiceImpl; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ChangeDeathDTO> page(Map<String, Object> params) { |
||||
|
IPage<ChangeDeathEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, ChangeDeathDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ChangeDeathDTO> list(Map<String, Object> params) { |
||||
|
List<ChangeDeathEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, ChangeDeathDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<ChangeDeathEntity> getWrapper(Map<String, Object> 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<ChangeDeathEntity> 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); |
||||
|
RentTenantDataResultDTO result = icResiUserServiceImpl.getRentResiUserInfo(formDTO); |
||||
|
|
||||
|
dto.setIdCard(result.getIdCard()); |
||||
|
dto.setMobile(result.getMobile()); |
||||
|
dto.setGridId(result.getGridId()); |
||||
|
Map<String, Object> 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.getIdCard()); |
||||
|
formDto.setMobile(result.getMobile()); |
||||
|
formDto.setGridId(result.getGridId()); |
||||
|
formDto.setGender(dto.getGender()); |
||||
|
formDto.setJoinReason("迁入死亡人口选定"); |
||||
|
formDto.setCustomerId(dto.getCustomerId()); |
||||
|
formDto.setCustomerId(formDTO.getCustomerId()); |
||||
|
changeWelfareService.saveWelfareInfo(formDto); |
||||
|
} |
||||
|
//更新epmet用户状态
|
||||
|
IcResiUserEntity userEntity = new IcResiUserEntity(); |
||||
|
userEntity.setId(dto.getUserId()); |
||||
|
userEntity.setStatus("2");//死亡
|
||||
|
icResiUserService.updateById(userEntity); |
||||
|
//推送MQ事件
|
||||
|
changeRelocationServiceImpl.editResiMq(formDTO.getCustomerId(), dto.getUserId()); |
||||
|
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)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,205 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg; |
||||
|
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.IdCardNoValidatorUtils; |
||||
|
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.constant.SystemMessageType; |
||||
|
import com.epmet.dao.ChangeRelocationDao; |
||||
|
import com.epmet.dto.ChangeRelocationDTO; |
||||
|
import com.epmet.dto.ChangeWelfareDTO; |
||||
|
import com.epmet.dto.form.RentTenantDataFormDTO; |
||||
|
import com.epmet.dto.form.SystemMsgFormDTO; |
||||
|
import com.epmet.dto.result.RentTenantDataResultDTO; |
||||
|
import com.epmet.entity.ChangeRelocationEntity; |
||||
|
import com.epmet.entity.IcResiUserEntity; |
||||
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
||||
|
import com.epmet.redis.ChangeRelocationRedis; |
||||
|
import com.epmet.service.ChangeRelocationService; |
||||
|
import com.epmet.service.ChangeWelfareService; |
||||
|
import com.epmet.service.IcResiUserService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocationDao, ChangeRelocationEntity> implements ChangeRelocationService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeRelocationRedis changeRelocationRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
LoginUserUtil loginUserUtil; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiUserServiceImpl icResiUserServiceImpl; |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeWelfareService changeWelfareService; |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiUserService icResiUserService; |
||||
|
|
||||
|
|
||||
|
|
||||
|
@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); |
||||
|
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<ChangeRelocationEntity> 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); |
||||
|
RentTenantDataResultDTO result = icResiUserServiceImpl.getRentResiUserInfo(formDTO); |
||||
|
|
||||
|
dto.setIdCard(result.getIdCard()); |
||||
|
dto.setMobile(result.getMobile()); |
||||
|
|
||||
|
ChangeRelocationEntity entity = ConvertUtils.sourceToTarget(dto, ChangeRelocationEntity.class); |
||||
|
entity.setPid(dto.getAgencyId()); |
||||
|
entity.setAgencyId(dto.getGridId()); |
||||
|
entity.setAgencyName(dto.getGridName()); |
||||
|
entity.setAge(IdCardNoValidatorUtils.getAge(result.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.getIdCard()); |
||||
|
formDto.setMobile(result.getMobile()); |
||||
|
formDto.setGridId(result.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); |
||||
|
} |
||||
|
//更新epmet用户状态
|
||||
|
IcResiUserEntity userEntity = new IcResiUserEntity(); |
||||
|
userEntity.setId(dto.getIcUserId()); |
||||
|
userEntity.setStatus("1");//转出(迁出)
|
||||
|
icResiUserService.updateById(userEntity); |
||||
|
//推送MQ事件
|
||||
|
editResiMq(dto.getCustomerId(), dto.getIcUserId()); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
public void editResiMq(String customerId, String userId) { |
||||
|
//推送MQ事件
|
||||
|
IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg(); |
||||
|
mqMsg.setCustomerId(customerId); |
||||
|
log.info("customer id is {}", customerId); |
||||
|
mqMsg.setIcResiUser(userId); |
||||
|
SystemMsgFormDTO form = new SystemMsgFormDTO(); |
||||
|
form.setMessageType(SystemMessageType.IC_RESI_USER_EDIT); |
||||
|
form.setContent(mqMsg); |
||||
|
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,158 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.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.dao.ChangeWelfareDao; |
||||
|
import com.epmet.dto.ChangeWelfareDTO; |
||||
|
import com.epmet.dto.CheckWelfareByIdCardDTO; |
||||
|
import com.epmet.dto.form.RentTenantDataFormDTO; |
||||
|
import com.epmet.dto.result.RentTenantDataResultDTO; |
||||
|
import com.epmet.entity.ChangeWelfareEntity; |
||||
|
import com.epmet.redis.ChangeWelfareRedis; |
||||
|
import com.epmet.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<ChangeWelfareDao, ChangeWelfareEntity> implements ChangeWelfareService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeWelfareRedis changeWelfareRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
LoginUserUtil loginUserUtil; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiUserServiceImpl icResiUserServiceImpl; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ChangeWelfareDTO> page(Map<String, Object> params) { |
||||
|
IPage<ChangeWelfareEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, ChangeWelfareDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ChangeWelfareDTO> list(Map<String, Object> params) { |
||||
|
List<ChangeWelfareEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, ChangeWelfareDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<ChangeWelfareEntity> getWrapper(Map<String, Object> 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<ChangeWelfareEntity> 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); |
||||
|
RentTenantDataResultDTO result = icResiUserServiceImpl.getRentResiUserInfo(formDTO); |
||||
|
|
||||
|
dto.setIdCard(result.getIdCard()); |
||||
|
dto.setMobile(result.getMobile()); |
||||
|
dto.setGridId(result.getGridId()); |
||||
|
Map<String, Object> 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<String, Object> 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(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
<?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.dao.ChangeDeathDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.ChangeDeathEntity" id="rentDeathMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="userId" column="USER_ID"/> |
||||
|
<result property="name" column="NAME"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="mobile" column="MOBILE"/> |
||||
|
<result property="gender" column="GENDER"/> |
||||
|
<result property="type" column="TYPE"/> |
||||
|
<result property="joinDate" column="JOIN_DATE"/> |
||||
|
<result property="joinReason" column="JOIN_REASON"/> |
||||
|
<result property="removeDate" column="REMOVE_DATE"/> |
||||
|
<result property="removeReason" column="REMOVE_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> |
@ -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.dao.ChangeRelocationDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.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> |
@ -0,0 +1,41 @@ |
|||||
|
<?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.dao.ChangeWelfareDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.ChangeWelfareEntity" id="changeWelfareMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="userId" column="USER_ID"/> |
||||
|
<result property="gridId" column="GRID_ID"/> |
||||
|
<result property="name" column="NAME"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="mobile" column="MOBILE"/> |
||||
|
<result property="gender" column="GENDER"/> |
||||
|
<result property="type" column="TYPE"/> |
||||
|
<result property="joinDate" column="JOIN_DATE"/> |
||||
|
<result property="joinReason" column="JOIN_REASON"/> |
||||
|
<result property="removeDate" column="REMOVE_DATE"/> |
||||
|
<result property="removeReason" column="REMOVE_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> |
||||
|
<select id="selectByIdCard" resultType="com.epmet.entity.ChangeWelfareEntity"> |
||||
|
select * from pli_change_welfare |
||||
|
where ID_CARD=#{idCard} |
||||
|
and del_flag='0' |
||||
|
</select> |
||||
|
<update id="removeWelfare"> |
||||
|
update pli_change_welfare |
||||
|
set REMOVE_DATE=#{removeDate}, |
||||
|
REMOVE_REASON=#{removeReason}, |
||||
|
del_flag='1' |
||||
|
where id=#{id} |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue