36 changed files with 2254 additions and 0 deletions
@ -0,0 +1,104 @@ |
|||||
|
package com.epmet.plugin.power.dto.rent; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 黑名单表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentBlacklistDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* epmet用户主键 |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
package com.epmet.plugin.power.dto.rent; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentContractFileDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 引用ID |
||||
|
*/ |
||||
|
private String referenceId; |
||||
|
|
||||
|
/** |
||||
|
* 文件地址 |
||||
|
*/ |
||||
|
private String fileUrl; |
||||
|
|
||||
|
/** |
||||
|
* 文件类型 |
||||
|
*/ |
||||
|
private String fileType; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0:未删除,1:删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,154 @@ |
|||||
|
package com.epmet.plugin.power.dto.rent; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentContractInfoDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 楼号ID |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 楼号 |
||||
|
*/ |
||||
|
private String buildName; |
||||
|
|
||||
|
/** |
||||
|
* 单元ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 单元 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋 |
||||
|
*/ |
||||
|
private String homeName; |
||||
|
|
||||
|
/** |
||||
|
* 房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 状态:0未审核,1审核通过,2审核不通过 |
||||
|
*/ |
||||
|
private String state; |
||||
|
|
||||
|
/** |
||||
|
* 出租人姓名 |
||||
|
*/ |
||||
|
private String lessorName; |
||||
|
|
||||
|
/** |
||||
|
* 出租人身份证 |
||||
|
*/ |
||||
|
private String lessorIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 出租人手机 |
||||
|
*/ |
||||
|
private String lessorMobile; |
||||
|
|
||||
|
/** |
||||
|
* 承租人姓名 |
||||
|
*/ |
||||
|
private String lesseeName; |
||||
|
|
||||
|
/** |
||||
|
* 承租人身份证 |
||||
|
*/ |
||||
|
private String lesseeIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 承租人手机 |
||||
|
*/ |
||||
|
private String lesseeMobile; |
||||
|
|
||||
|
/** |
||||
|
* 签署日期 |
||||
|
*/ |
||||
|
private String signDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同开始日期 |
||||
|
*/ |
||||
|
private String startDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同结束日期 |
||||
|
*/ |
||||
|
private String endDate; |
||||
|
|
||||
|
/** |
||||
|
* 审核-原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.plugin.power.dto.rent; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 租客表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentTenantInfoDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 合同ID |
||||
|
*/ |
||||
|
private String contractId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 身份证 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 与房主关系 |
||||
|
*/ |
||||
|
private String yfzgx; |
||||
|
|
||||
|
/** |
||||
|
* 照片 |
||||
|
*/ |
||||
|
private String img; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.plugin.power.dto.rent.RentBlacklistDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.excel.RentBlacklistExcel; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentBlacklistService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("rentBlacklist") |
||||
|
public class RentBlacklistController { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentBlacklistService rentBlacklistService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<RentBlacklistDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<RentBlacklistDTO> page = rentBlacklistService.page(params); |
||||
|
return new Result<PageData<RentBlacklistDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<RentBlacklistDTO> get(@PathVariable("id") String id){ |
||||
|
RentBlacklistDTO data = rentBlacklistService.get(id); |
||||
|
return new Result<RentBlacklistDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody RentBlacklistDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
rentBlacklistService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody RentBlacklistDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
rentBlacklistService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
rentBlacklistService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<RentBlacklistDTO> list = rentBlacklistService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, RentBlacklistExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractFileDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.excel.RentContractFileExcel; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentContractFileService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("rentContractFile") |
||||
|
public class RentContractFileController { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentContractFileService rentContractFileService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<RentContractFileDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<RentContractFileDTO> page = rentContractFileService.page(params); |
||||
|
return new Result<PageData<RentContractFileDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<RentContractFileDTO> get(@PathVariable("id") String id){ |
||||
|
RentContractFileDTO data = rentContractFileService.get(id); |
||||
|
return new Result<RentContractFileDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody RentContractFileDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
rentContractFileService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody RentContractFileDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
rentContractFileService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
rentContractFileService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<RentContractFileDTO> list = rentContractFileService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, RentContractFileExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.excel.RentContractInfoExcel; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentContractInfoService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("rentContractInfo") |
||||
|
public class RentContractInfoController { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentContractInfoService rentContractInfoService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<RentContractInfoDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<RentContractInfoDTO> page = rentContractInfoService.page(params); |
||||
|
return new Result<PageData<RentContractInfoDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<RentContractInfoDTO> get(@PathVariable("id") String id){ |
||||
|
RentContractInfoDTO data = rentContractInfoService.get(id); |
||||
|
return new Result<RentContractInfoDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody RentContractInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
rentContractInfoService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody RentContractInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
rentContractInfoService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
rentContractInfoService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<RentContractInfoDTO> list = rentContractInfoService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, RentContractInfoExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.excel.RentTenantInfoExcel; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentTenantInfoService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("rentTenantInfo") |
||||
|
public class RentTenantInfoController { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentTenantInfoService rentTenantInfoService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<RentTenantInfoDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<RentTenantInfoDTO> page = rentTenantInfoService.page(params); |
||||
|
return new Result<PageData<RentTenantInfoDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<RentTenantInfoDTO> get(@PathVariable("id") String id){ |
||||
|
RentTenantInfoDTO data = rentTenantInfoService.get(id); |
||||
|
return new Result<RentTenantInfoDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody RentTenantInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
rentTenantInfoService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody RentTenantInfoDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
rentTenantInfoService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
rentTenantInfoService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<RentTenantInfoDTO> list = rentTenantInfoService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, RentTenantInfoExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentBlacklistEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 黑名单表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface RentBlacklistDao extends BaseDao<RentBlacklistEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface RentContractFileDao extends BaseDao<RentContractFileEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface RentContractInfoDao extends BaseDao<RentContractInfoEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 租客表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface RentTenantInfoDao extends BaseDao<RentTenantInfoEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 黑名单表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("pli_rent_blacklist") |
||||
|
public class RentBlacklistEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* epmet用户主键 |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
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; |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("pli_rent_contract_file") |
||||
|
public class RentContractFileEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 引用ID |
||||
|
*/ |
||||
|
private String referenceId; |
||||
|
|
||||
|
/** |
||||
|
* 文件地址 |
||||
|
*/ |
||||
|
private String fileUrl; |
||||
|
|
||||
|
/** |
||||
|
* 文件类型 |
||||
|
*/ |
||||
|
private String fileType; |
||||
|
|
||||
|
} |
@ -0,0 +1,124 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("pli_rent_contract_info") |
||||
|
public class RentContractInfoEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 楼号ID |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 楼号 |
||||
|
*/ |
||||
|
private String buildName; |
||||
|
|
||||
|
/** |
||||
|
* 单元ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 单元 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋 |
||||
|
*/ |
||||
|
private String homeName; |
||||
|
|
||||
|
/** |
||||
|
* 房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 状态:0未审核,1审核通过,2审核不通过 |
||||
|
*/ |
||||
|
private String state; |
||||
|
|
||||
|
/** |
||||
|
* 出租人姓名 |
||||
|
*/ |
||||
|
private String lessorName; |
||||
|
|
||||
|
/** |
||||
|
* 出租人身份证 |
||||
|
*/ |
||||
|
private String lessorIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 出租人手机 |
||||
|
*/ |
||||
|
private String lessorMobile; |
||||
|
|
||||
|
/** |
||||
|
* 承租人姓名 |
||||
|
*/ |
||||
|
private String lesseeName; |
||||
|
|
||||
|
/** |
||||
|
* 承租人身份证 |
||||
|
*/ |
||||
|
private String lesseeIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 承租人手机 |
||||
|
*/ |
||||
|
private String lesseeMobile; |
||||
|
|
||||
|
/** |
||||
|
* 签署日期 |
||||
|
*/ |
||||
|
private String signDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同开始日期 |
||||
|
*/ |
||||
|
private String startDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同结束日期 |
||||
|
*/ |
||||
|
private String endDate; |
||||
|
|
||||
|
/** |
||||
|
* 审核-原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 租客表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("pli_rent_tenant_info") |
||||
|
public class RentTenantInfoEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 合同ID |
||||
|
*/ |
||||
|
private String contractId; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 身份证 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 与房主关系 |
||||
|
*/ |
||||
|
private String yfzgx; |
||||
|
|
||||
|
/** |
||||
|
* 照片 |
||||
|
*/ |
||||
|
private String img; |
||||
|
|
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.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-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentBlacklistExcel { |
||||
|
|
||||
|
@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 = "性别 0女 1男") |
||||
|
private String gender; |
||||
|
|
||||
|
@Excel(name = "类型 0 租客 1 房东") |
||||
|
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; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.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-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentContractFileExcel { |
||||
|
|
||||
|
@Excel(name = "ID") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "引用ID") |
||||
|
private String referenceId; |
||||
|
|
||||
|
@Excel(name = "文件地址") |
||||
|
private String fileUrl; |
||||
|
|
||||
|
@Excel(name = "文件类型") |
||||
|
private String fileType; |
||||
|
|
||||
|
@Excel(name = "删除标识 0:未删除,1:删除") |
||||
|
private Integer 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; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,99 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.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-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentContractInfoExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "网格ID") |
||||
|
private String gridId; |
||||
|
|
||||
|
@Excel(name = "网格") |
||||
|
private String gridName; |
||||
|
|
||||
|
@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 ownerName; |
||||
|
|
||||
|
@Excel(name = "状态:0未审核,1审核通过,2审核不通过") |
||||
|
private String state; |
||||
|
|
||||
|
@Excel(name = "出租人姓名") |
||||
|
private String lessorName; |
||||
|
|
||||
|
@Excel(name = "出租人身份证") |
||||
|
private String lessorIdCard; |
||||
|
|
||||
|
@Excel(name = "出租人手机") |
||||
|
private String lessorMobile; |
||||
|
|
||||
|
@Excel(name = "承租人姓名") |
||||
|
private String lesseeName; |
||||
|
|
||||
|
@Excel(name = "承租人身份证") |
||||
|
private String lesseeIdCard; |
||||
|
|
||||
|
@Excel(name = "承租人手机") |
||||
|
private String lesseeMobile; |
||||
|
|
||||
|
@Excel(name = "签署日期") |
||||
|
private String signDate; |
||||
|
|
||||
|
@Excel(name = "合同开始日期") |
||||
|
private String startDate; |
||||
|
|
||||
|
@Excel(name = "合同结束日期") |
||||
|
private String endDate; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.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-04-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RentTenantInfoExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "合同ID") |
||||
|
private String contractId; |
||||
|
|
||||
|
@Excel(name = "姓名") |
||||
|
private String name; |
||||
|
|
||||
|
@Excel(name = "身份证") |
||||
|
private String idCard; |
||||
|
|
||||
|
@Excel(name = "手机号") |
||||
|
private String mobile; |
||||
|
|
||||
|
@Excel(name = "与房主关系") |
||||
|
private String yfzgx; |
||||
|
|
||||
|
@Excel(name = "照片") |
||||
|
private String img; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 黑名单表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class RentBlacklistRedis { |
||||
|
@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.plugin.power.modules.rent.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class RentContractFileRedis { |
||||
|
@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.plugin.power.modules.rent.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class RentContractInfoRedis { |
||||
|
@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.plugin.power.modules.rent.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 租客表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class RentTenantInfoRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.plugin.power.dto.rent.RentBlacklistDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentBlacklistEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 黑名单表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
public interface RentBlacklistService extends BaseService<RentBlacklistEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<RentBlacklistDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
PageData<RentBlacklistDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<RentBlacklistDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
List<RentBlacklistDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return RentBlacklistDTO |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
RentBlacklistDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void save(RentBlacklistDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void update(RentBlacklistDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractFileDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
public interface RentContractFileService extends BaseService<RentContractFileEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<RentContractFileDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
PageData<RentContractFileDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<RentContractFileDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
List<RentContractFileDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return RentContractFileDTO |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
RentContractFileDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void save(RentContractFileDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void update(RentContractFileDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
public interface RentContractInfoService extends BaseService<RentContractInfoEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<RentContractInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
PageData<RentContractInfoDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<RentContractInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
List<RentContractInfoDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return RentContractInfoDTO |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
RentContractInfoDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void save(RentContractInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void update(RentContractInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 租客表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-04-22 |
||||
|
*/ |
||||
|
public interface RentTenantInfoService extends BaseService<RentTenantInfoEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<RentTenantInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
PageData<RentTenantInfoDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<RentTenantInfoDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
List<RentTenantInfoDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return RentTenantInfoDTO |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
RentTenantInfoDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void save(RentTenantInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void update(RentTenantInfoDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-04-22 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.plugin.power.modules.rent.dao.RentBlacklistDao; |
||||
|
import com.epmet.plugin.power.dto.rent.RentBlacklistDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentBlacklistEntity; |
||||
|
import com.epmet.plugin.power.modules.rent.redis.RentBlacklistRedis; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentBlacklistService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class RentBlacklistServiceImpl extends BaseServiceImpl<RentBlacklistDao, RentBlacklistEntity> implements RentBlacklistService { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentBlacklistRedis rentBlacklistRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<RentBlacklistDTO> page(Map<String, Object> params) { |
||||
|
IPage<RentBlacklistEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, RentBlacklistDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<RentBlacklistDTO> list(Map<String, Object> params) { |
||||
|
List<RentBlacklistEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, RentBlacklistDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<RentBlacklistEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<RentBlacklistEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public RentBlacklistDTO get(String id) { |
||||
|
RentBlacklistEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, RentBlacklistDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(RentBlacklistDTO dto) { |
||||
|
RentBlacklistEntity entity = ConvertUtils.sourceToTarget(dto, RentBlacklistEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(RentBlacklistDTO dto) { |
||||
|
RentBlacklistEntity entity = ConvertUtils.sourceToTarget(dto, RentBlacklistEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.plugin.power.modules.rent.dao.RentContractFileDao; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractFileDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity; |
||||
|
import com.epmet.plugin.power.modules.rent.redis.RentContractFileRedis; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentContractFileService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class RentContractFileServiceImpl extends BaseServiceImpl<RentContractFileDao, RentContractFileEntity> implements RentContractFileService { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentContractFileRedis rentContractFileRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<RentContractFileDTO> page(Map<String, Object> params) { |
||||
|
IPage<RentContractFileEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, RentContractFileDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<RentContractFileDTO> list(Map<String, Object> params) { |
||||
|
List<RentContractFileEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, RentContractFileDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<RentContractFileEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<RentContractFileEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public RentContractFileDTO get(String id) { |
||||
|
RentContractFileEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, RentContractFileDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(RentContractFileDTO dto) { |
||||
|
RentContractFileEntity entity = ConvertUtils.sourceToTarget(dto, RentContractFileEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(RentContractFileDTO dto) { |
||||
|
RentContractFileEntity entity = ConvertUtils.sourceToTarget(dto, RentContractFileEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.plugin.power.modules.rent.dao.RentContractInfoDao; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity; |
||||
|
import com.epmet.plugin.power.modules.rent.redis.RentContractInfoRedis; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentContractInfoService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInfoDao, RentContractInfoEntity> implements RentContractInfoService { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentContractInfoRedis rentContractInfoRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<RentContractInfoDTO> page(Map<String, Object> params) { |
||||
|
IPage<RentContractInfoEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, RentContractInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<RentContractInfoDTO> list(Map<String, Object> params) { |
||||
|
List<RentContractInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, RentContractInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<RentContractInfoEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<RentContractInfoEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public RentContractInfoDTO get(String id) { |
||||
|
RentContractInfoEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, RentContractInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(RentContractInfoDTO dto) { |
||||
|
RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(RentContractInfoDTO dto) { |
||||
|
RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.plugin.power.modules.rent.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.plugin.power.modules.rent.dao.RentTenantInfoDao; |
||||
|
import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity; |
||||
|
import com.epmet.plugin.power.modules.rent.redis.RentTenantInfoRedis; |
||||
|
import com.epmet.plugin.power.modules.rent.service.RentTenantInfoService; |
||||
|
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-04-22 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao, RentTenantInfoEntity> implements RentTenantInfoService { |
||||
|
|
||||
|
@Autowired |
||||
|
private RentTenantInfoRedis rentTenantInfoRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<RentTenantInfoDTO> page(Map<String, Object> params) { |
||||
|
IPage<RentTenantInfoEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, RentTenantInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<RentTenantInfoDTO> list(Map<String, Object> params) { |
||||
|
List<RentTenantInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, RentTenantInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<RentTenantInfoEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<RentTenantInfoEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public RentTenantInfoDTO get(String id) { |
||||
|
RentTenantInfoEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, RentTenantInfoDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(RentTenantInfoDTO dto) { |
||||
|
RentTenantInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentTenantInfoEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(RentTenantInfoDTO dto) { |
||||
|
RentTenantInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentTenantInfoEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
<?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.rent.modules.rent.dao.RentBlacklistDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentBlacklistEntity" id="rentBlacklistMap"> |
||||
|
<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"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,20 @@ |
|||||
|
<?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.rent.modules.rent.dao.RentContractFileDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity" id="rentContractFileMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="referenceId" column="REFERENCE_ID"/> |
||||
|
<result property="fileUrl" column="FILE_URL"/> |
||||
|
<result property="fileType" column="FILE_TYPE"/> |
||||
|
<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"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,37 @@ |
|||||
|
<?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.rent.modules.rent.dao.RentContractInfoDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity" id="rentContractInfoMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="gridId" column="GRID_ID"/> |
||||
|
<result property="gridName" column="GRID_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="ownerName" column="OWNER_NAME"/> |
||||
|
<result property="state" column="STATE"/> |
||||
|
<result property="lessorName" column="LESSOR_NAME"/> |
||||
|
<result property="lessorIdCard" column="LESSOR_ID_CARD"/> |
||||
|
<result property="lessorMobile" column="LESSOR_MOBILE"/> |
||||
|
<result property="lesseeName" column="LESSEE_NAME"/> |
||||
|
<result property="lesseeIdCard" column="LESSEE_ID_CARD"/> |
||||
|
<result property="lesseeMobile" column="LESSEE_MOBILE"/> |
||||
|
<result property="signDate" column="SIGN_DATE"/> |
||||
|
<result property="startDate" column="START_DATE"/> |
||||
|
<result property="endDate" column="END_DATE"/> |
||||
|
<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"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,23 @@ |
|||||
|
<?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.rent.modules.rent.dao.RentTenantInfoDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity" id="rentTenantInfoMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="contractId" column="CONTRACT_ID"/> |
||||
|
<result property="name" column="NAME"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="mobile" column="MOBILE"/> |
||||
|
<result property="yfzgx" column="YFZGX"/> |
||||
|
<result property="img" column="IMG"/> |
||||
|
<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"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue