17 changed files with 1587 additions and 47 deletions
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.plugin.commons.enums; |
||||
|
|
||||
|
/** |
||||
|
* 唯一整件类型 |
||||
|
*/ |
||||
|
public enum IdCardTypeEnum { |
||||
|
|
||||
|
OTHERS("0", "其他"), |
||||
|
SFZH("1", "身份证号"), |
||||
|
PASSPORT("2", "护照"); |
||||
|
|
||||
|
private String type; |
||||
|
private String name; |
||||
|
|
||||
|
IdCardTypeEnum(String type, String name) { |
||||
|
this.type = type; |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,155 @@ |
|||||
|
package com.epmet.plugin.commons.utils; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
||||
|
import com.epmet.plugin.commons.enums.IdCardTypeEnum; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.time.DateTimeException; |
||||
|
import java.time.LocalDate; |
||||
|
import java.time.Period; |
||||
|
import java.util.regex.Matcher; |
||||
|
import java.util.regex.Pattern; |
||||
|
|
||||
|
/** |
||||
|
* 唯一整件正则工具 |
||||
|
*/ |
||||
|
public class IdCardRegexUtils { |
||||
|
|
||||
|
/** |
||||
|
* 15位身份证号的正则表达式 |
||||
|
*/ |
||||
|
private static final Pattern PATTERN_15_ID = Pattern.compile("^\\d{6}(?<year>\\d{2})(?<month>0[1-9]|1[0-2])(?<day>[0-2][0-9]|3[0-1])\\d{2}(?<sex>\\d)$"); |
||||
|
/** |
||||
|
* 18位身份证号的正则表达式 |
||||
|
*/ |
||||
|
private static final Pattern PATTERN_18_ID = Pattern.compile("^\\d{6}(?<year>\\d{4})(?<month>0[1-9]|1[0-2])(?<day>[0-2][0-9]|3[0-1])\\d{2}(?<sex>\\d)[0-9a-xA-X]$"); |
||||
|
|
||||
|
/** |
||||
|
* 9位护照 |
||||
|
*/ |
||||
|
private static final Pattern PATTERN_9_PASSPORT = Pattern.compile("^[a-zA-Z0-9]{8,9}$"); |
||||
|
|
||||
|
private String inputText; |
||||
|
|
||||
|
private Matcher matcher; |
||||
|
|
||||
|
private IdCardTypeEnum idCardType; |
||||
|
|
||||
|
private IdCardRegexUtils(IdCardTypeEnum idCardType, Matcher matcher, String inputText) { |
||||
|
this.idCardType = idCardType; |
||||
|
this.matcher = matcher; |
||||
|
this.inputText = inputText; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 正则解析结果 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public static class ParsedContent { |
||||
|
private String birthdayYear; |
||||
|
private String birthdayMonth; |
||||
|
private String birthdayDay; |
||||
|
private String sex; |
||||
|
private Integer age; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* desc:校验输入的证件号是否合法 |
||||
|
* @param input |
||||
|
* @return |
||||
|
*/ |
||||
|
public static boolean validateIdCard(String input){ |
||||
|
IdCardRegexUtils parse = IdCardRegexUtils.parse(input); |
||||
|
return parse != null; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 解析正则 |
||||
|
* @param input |
||||
|
* @return |
||||
|
*/ |
||||
|
public static IdCardRegexUtils parse(String input) { |
||||
|
if (input == null || input.trim().length() == 0) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
if (input.length() == 15) { |
||||
|
Matcher matcher = PATTERN_15_ID.matcher(input); |
||||
|
if (matcher.matches()) { |
||||
|
return new IdCardRegexUtils(IdCardTypeEnum.SFZH, matcher, input); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (input.length() == 18) { |
||||
|
Matcher matcher = PATTERN_18_ID.matcher(input); |
||||
|
if (matcher.matches()) { |
||||
|
return new IdCardRegexUtils(IdCardTypeEnum.SFZH, matcher, input); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (input.length() == 9 || input.length() == 8) { |
||||
|
Matcher matcher = PATTERN_9_PASSPORT.matcher(input); |
||||
|
if (matcher.matches()) { |
||||
|
return new IdCardRegexUtils(IdCardTypeEnum.PASSPORT, matcher, input); |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取解析结果 |
||||
|
* @return |
||||
|
*/ |
||||
|
public ParsedContent getParsedResult() { |
||||
|
if (matcher == null || idCardType == null) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
if (IdCardTypeEnum.SFZH == idCardType) { |
||||
|
//是身份证号,可以解析
|
||||
|
String year; |
||||
|
if (inputText.length() == 15) { |
||||
|
// 15位身份证号,years前需要拼上19
|
||||
|
year = "19".concat(matcher.group("year")); |
||||
|
} else { |
||||
|
year = matcher.group("year"); |
||||
|
} |
||||
|
String month = matcher.group("month"); |
||||
|
String day = matcher.group("day"); |
||||
|
String sex = matcher.group("sex"); |
||||
|
|
||||
|
// ------- 年龄Start----------
|
||||
|
Integer age; |
||||
|
try { |
||||
|
LocalDate birthday = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day)); |
||||
|
age = Period.between(birthday, LocalDate.now()).getYears(); |
||||
|
} catch (DateTimeException e) { |
||||
|
throw new EpmetException("身份证号解析年龄失败:" + ExceptionUtils.getErrorStackTrace(e)); |
||||
|
} |
||||
|
// ------- 年龄End----------
|
||||
|
return new ParsedContent(year, month, day, sex, age); |
||||
|
} |
||||
|
|
||||
|
// 其他类型暂时不可解析
|
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取类型枚举 |
||||
|
* @return |
||||
|
*/ |
||||
|
public IdCardTypeEnum getTypeEnum() { |
||||
|
return idCardType; |
||||
|
} |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
IdCardRegexUtils parse = IdCardRegexUtils.parse("370282198801303017"); |
||||
|
ParsedContent parsedResult = parse.getParsedResult(); |
||||
|
System.out.println(parsedResult); |
||||
|
} |
||||
|
} |
@ -0,0 +1,231 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.plugin.power.dto.rent; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 合同记录表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PliRentContractInfoLogDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 合同ID |
||||
|
*/ |
||||
|
private String contractId; |
||||
|
|
||||
|
/** |
||||
|
* 社区ID |
||||
|
*/ |
||||
|
private String communityId; |
||||
|
|
||||
|
/** |
||||
|
* 社区 |
||||
|
*/ |
||||
|
private String communityName; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区ID |
||||
|
*/ |
||||
|
private String villageId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区 |
||||
|
*/ |
||||
|
private String villageName; |
||||
|
|
||||
|
/** |
||||
|
* 楼号ID |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 楼号 |
||||
|
*/ |
||||
|
private String buildName; |
||||
|
|
||||
|
/** |
||||
|
* 单元ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 单元 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋 |
||||
|
*/ |
||||
|
private String homeName; |
||||
|
|
||||
|
/** |
||||
|
* 房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 状态:0未审核,1审核通过,2审核不通过(盈余字段) |
||||
|
*/ |
||||
|
private String state; |
||||
|
|
||||
|
/** |
||||
|
* 出租人姓名 |
||||
|
*/ |
||||
|
private String lessorName; |
||||
|
|
||||
|
/** |
||||
|
* 出租人身份证 |
||||
|
*/ |
||||
|
private String lessorIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 出租人手机 |
||||
|
*/ |
||||
|
private String lessorMobile; |
||||
|
|
||||
|
/** |
||||
|
* 出租人关系 |
||||
|
*/ |
||||
|
private String lessorRelation; |
||||
|
|
||||
|
/** |
||||
|
* 承租人姓名 |
||||
|
*/ |
||||
|
private String lesseeName; |
||||
|
|
||||
|
/** |
||||
|
* 承租人身份证 |
||||
|
*/ |
||||
|
private String lesseeIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 承租人手机 |
||||
|
*/ |
||||
|
private String lesseeMobile; |
||||
|
|
||||
|
/** |
||||
|
* 承租人工作单位 |
||||
|
*/ |
||||
|
private String lesseeUnit; |
||||
|
|
||||
|
/** |
||||
|
* 签署日期 |
||||
|
*/ |
||||
|
private String signDate; |
||||
|
|
||||
|
/** |
||||
|
* 审核日期 |
||||
|
*/ |
||||
|
private String reviewDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同开始日期 |
||||
|
*/ |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 出租人现居住地 |
||||
|
*/ |
||||
|
private String lessorLiveAddress; |
||||
|
|
||||
|
/** |
||||
|
* 承租人户籍地地址 |
||||
|
*/ |
||||
|
private String lesseeHouseAddress; |
||||
|
|
||||
|
/** |
||||
|
* 是否来源于PC端录入(0:否;1:是) |
||||
|
*/ |
||||
|
private String isPcInput; |
||||
|
|
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.plugin.power.modules.rent.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.plugin.power.dto.rent.PliRentContractInfoLogDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.excel.PliRentContractInfoLogExcel; |
||||
|
import com.epmet.plugin.power.modules.rent.service.PliRentContractInfoLogService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 合同记录表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("plirentcontractinfolog") |
||||
|
public class PliRentContractInfoLogController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PliRentContractInfoLogService pliRentContractInfoLogService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<PliRentContractInfoLogDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PliRentContractInfoLogDTO> page = pliRentContractInfoLogService.page(params); |
||||
|
return new Result<PageData<PliRentContractInfoLogDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<PliRentContractInfoLogDTO> get(@PathVariable("id") String id){ |
||||
|
PliRentContractInfoLogDTO data = pliRentContractInfoLogService.get(id); |
||||
|
return new Result<PliRentContractInfoLogDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody PliRentContractInfoLogDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
pliRentContractInfoLogService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody PliRentContractInfoLogDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
pliRentContractInfoLogService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
pliRentContractInfoLogService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PliRentContractInfoLogDTO> list = pliRentContractInfoLogService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PliRentContractInfoLogExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.plugin.power.modules.rent.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.plugin.power.dto.rent.PliRentContractInfoLogDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.PliRentContractInfoLogEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 合同记录表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PliRentContractInfoLogDao extends BaseDao<PliRentContractInfoLogEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 获取合同记录列表 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<com.epmet.plugin.power.dto.rent.PliRentContractInfoLogDTO> |
||||
|
* @author wgf |
||||
|
* @date 2022/11/30 8:18 |
||||
|
*/ |
||||
|
List<PliRentContractInfoLogDTO> getContractInfoList(Map<String, Object> params); |
||||
|
|
||||
|
} |
@ -0,0 +1,201 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
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 elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("pli_rent_contract_info_log") |
||||
|
public class PliRentContractInfoLogEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 合同ID |
||||
|
*/ |
||||
|
private String contractId; |
||||
|
|
||||
|
/** |
||||
|
* 社区ID |
||||
|
*/ |
||||
|
private String communityId; |
||||
|
|
||||
|
/** |
||||
|
* 社区 |
||||
|
*/ |
||||
|
private String communityName; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区ID |
||||
|
*/ |
||||
|
private String villageId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区 |
||||
|
*/ |
||||
|
private String villageName; |
||||
|
|
||||
|
/** |
||||
|
* 楼号ID |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 楼号 |
||||
|
*/ |
||||
|
private String buildName; |
||||
|
|
||||
|
/** |
||||
|
* 单元ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 单元 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋 |
||||
|
*/ |
||||
|
private String homeName; |
||||
|
|
||||
|
/** |
||||
|
* 房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 状态:0未审核,1审核通过,2审核不通过(盈余字段) |
||||
|
*/ |
||||
|
private String state; |
||||
|
|
||||
|
/** |
||||
|
* 出租人姓名 |
||||
|
*/ |
||||
|
private String lessorName; |
||||
|
|
||||
|
/** |
||||
|
* 出租人身份证 |
||||
|
*/ |
||||
|
private String lessorIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 出租人手机 |
||||
|
*/ |
||||
|
private String lessorMobile; |
||||
|
|
||||
|
/** |
||||
|
* 出租人关系 |
||||
|
*/ |
||||
|
private String lessorRelation; |
||||
|
|
||||
|
/** |
||||
|
* 承租人姓名 |
||||
|
*/ |
||||
|
private String lesseeName; |
||||
|
|
||||
|
/** |
||||
|
* 承租人身份证 |
||||
|
*/ |
||||
|
private String lesseeIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 承租人手机 |
||||
|
*/ |
||||
|
private String lesseeMobile; |
||||
|
|
||||
|
/** |
||||
|
* 承租人工作单位 |
||||
|
*/ |
||||
|
private String lesseeUnit; |
||||
|
|
||||
|
/** |
||||
|
* 签署日期 |
||||
|
*/ |
||||
|
private String signDate; |
||||
|
|
||||
|
/** |
||||
|
* 审核日期 |
||||
|
*/ |
||||
|
private String reviewDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同开始日期 |
||||
|
*/ |
||||
|
private String startDate; |
||||
|
|
||||
|
/** |
||||
|
* 合同结束日期 |
||||
|
*/ |
||||
|
private String endDate; |
||||
|
|
||||
|
/** |
||||
|
* 审核-原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 出租人现居住地 |
||||
|
*/ |
||||
|
private String lessorLiveAddress; |
||||
|
|
||||
|
/** |
||||
|
* 承租人户籍地地址 |
||||
|
*/ |
||||
|
private String lesseeHouseAddress; |
||||
|
|
||||
|
/** |
||||
|
* 是否来源于PC端录入(0:否;1:是) |
||||
|
*/ |
||||
|
private String isPcInput; |
||||
|
|
||||
|
} |
@ -0,0 +1,149 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.plugin.power.modules.rent.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 合同记录表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PliRentContractInfoLogExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "社区ID") |
||||
|
private String communityId; |
||||
|
|
||||
|
@Excel(name = "社区") |
||||
|
private String communityName; |
||||
|
|
||||
|
@Excel(name = "网格ID") |
||||
|
private String gridId; |
||||
|
|
||||
|
@Excel(name = "网格") |
||||
|
private String gridName; |
||||
|
|
||||
|
@Excel(name = "房屋小区ID") |
||||
|
private String villageId; |
||||
|
|
||||
|
@Excel(name = "房屋小区") |
||||
|
private String villageName; |
||||
|
|
||||
|
@Excel(name = "楼号ID") |
||||
|
private String buildId; |
||||
|
|
||||
|
@Excel(name = "楼号") |
||||
|
private String buildName; |
||||
|
|
||||
|
@Excel(name = "单元ID") |
||||
|
private String unitId; |
||||
|
|
||||
|
@Excel(name = "单元") |
||||
|
private String unitName; |
||||
|
|
||||
|
@Excel(name = "房屋ID") |
||||
|
private String homeId; |
||||
|
|
||||
|
@Excel(name = "房屋") |
||||
|
private String homeName; |
||||
|
|
||||
|
@Excel(name = "房主姓名") |
||||
|
private String 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 lessorRelation; |
||||
|
|
||||
|
@Excel(name = "承租人姓名") |
||||
|
private String lesseeName; |
||||
|
|
||||
|
@Excel(name = "承租人身份证") |
||||
|
private String lesseeIdCard; |
||||
|
|
||||
|
@Excel(name = "承租人手机") |
||||
|
private String lesseeMobile; |
||||
|
|
||||
|
@Excel(name = "承租人工作单位") |
||||
|
private String lesseeUnit; |
||||
|
|
||||
|
@Excel(name = "签署日期") |
||||
|
private String signDate; |
||||
|
|
||||
|
@Excel(name = "审核日期") |
||||
|
private String reviewDate; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "出租人现居住地") |
||||
|
private String lessorLiveAddress; |
||||
|
|
||||
|
@Excel(name = "承租人户籍地地址") |
||||
|
private String lesseeHouseAddress; |
||||
|
|
||||
|
@Excel(name = "是否来源于PC端录入(0:否;1:是)") |
||||
|
private String isPcInput; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
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 elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PliRentContractInfoLogRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,96 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
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.PliRentContractInfoLogDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.PliRentContractInfoLogEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 合同记录表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
public interface PliRentContractInfoLogService extends BaseService<PliRentContractInfoLogEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PliRentContractInfoLogDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-11-30 |
||||
|
*/ |
||||
|
PageData<PliRentContractInfoLogDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PliRentContractInfoLogDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-11-30 |
||||
|
*/ |
||||
|
List<PliRentContractInfoLogDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PliRentContractInfoLogDTO |
||||
|
* @author generator |
||||
|
* @date 2022-11-30 |
||||
|
*/ |
||||
|
PliRentContractInfoLogDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-11-30 |
||||
|
*/ |
||||
|
void save(PliRentContractInfoLogDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-11-30 |
||||
|
*/ |
||||
|
void update(PliRentContractInfoLogDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-11-30 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,118 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.plugin.power.modules.rent.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.plugin.power.dto.rent.PliRentContractInfoLogDTO; |
||||
|
import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; |
||||
|
import com.epmet.plugin.power.modules.rent.dao.PliRentContractInfoLogDao; |
||||
|
import com.epmet.plugin.power.modules.rent.entity.PliRentContractInfoLogEntity; |
||||
|
import com.epmet.plugin.power.modules.rent.redis.PliRentContractInfoLogRedis; |
||||
|
import com.epmet.plugin.power.modules.rent.service.PliRentContractInfoLogService; |
||||
|
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 elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-11-30 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PliRentContractInfoLogServiceImpl extends BaseServiceImpl<PliRentContractInfoLogDao, PliRentContractInfoLogEntity> implements PliRentContractInfoLogService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PliRentContractInfoLogRedis pliRentContractInfoLogRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
private LoginUserUtil loginUserUtil; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PliRentContractInfoLogDTO> page(Map<String, Object> params) { |
||||
|
// IPage<PliRentContractInfoLogEntity> page = baseDao.selectPage(
|
||||
|
// getPage(params, FieldConstant.CREATED_TIME, false),
|
||||
|
// getWrapper(params)
|
||||
|
// );
|
||||
|
// return getPageData(page, PliRentContractInfoLogDTO.class);
|
||||
|
|
||||
|
|
||||
|
params.put("customerId", loginUserUtil.getLoginUserCustomerId()); |
||||
|
if (StringUtils.isNotBlank((String) params.get("dataFlag"))) { |
||||
|
params.put("createdBy", loginUserUtil.getLoginUserId()); |
||||
|
} |
||||
|
IPage<PliRentContractInfoLogDTO> page = getPage(params); |
||||
|
List<PliRentContractInfoLogDTO> list = baseDao.getContractInfoList(params); |
||||
|
return new PageData<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PliRentContractInfoLogDTO> list(Map<String, Object> params) { |
||||
|
List<PliRentContractInfoLogEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PliRentContractInfoLogDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PliRentContractInfoLogEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PliRentContractInfoLogEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PliRentContractInfoLogDTO get(String id) { |
||||
|
PliRentContractInfoLogEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PliRentContractInfoLogDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PliRentContractInfoLogDTO dto) { |
||||
|
PliRentContractInfoLogEntity entity = ConvertUtils.sourceToTarget(dto, PliRentContractInfoLogEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PliRentContractInfoLogDTO dto) { |
||||
|
PliRentContractInfoLogEntity entity = ConvertUtils.sourceToTarget(dto, PliRentContractInfoLogEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD MZ varchar(1) DEFAULT NULL COMMENT '民族'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD IS_VACCINATION varchar(1) DEFAULT NULL COMMENT '是否接种:0否1是'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD FIRST_VAC_TIME varchar(64) DEFAULT NULL COMMENT '第一次接种时间'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD FIRST_VAC_SITE varchar(10) DEFAULT NULL COMMENT '第一次接种地点'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD SECOND_VAC_TIME varchar(64) DEFAULT NULL COMMENT '第二次接种时间'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD SECOND_VAC_SITE varchar(10) DEFAULT NULL COMMENT '第二次接种地点'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD THIRD_VAC_TIME varchar(64) DEFAULT NULL COMMENT '第三次接种时间'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD THIRD_VAC_SITE varchar(10) DEFAULT NULL COMMENT '第三次接种地点'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD UNINOCULATED_REASON varchar(255) DEFAULT NULL COMMENT '原因:禁忌症/拒绝接种/其他原因'; |
||||
|
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD NOTE varchar(255) DEFAULT NULL COMMENT '备注'; |
||||
|
|
||||
|
DROP TABLE IF EXISTS `pli_rent_contract_info_log`; |
||||
|
CREATE TABLE `pli_rent_contract_info_log` ( |
||||
|
`ID` varchar(32) NOT NULL COMMENT '主键', |
||||
|
`CONTRACT_ID` varchar(32) NOT NULL COMMENT '合同关系ID', |
||||
|
`COMMUNITY_ID` varchar(32) NOT NULL COMMENT '社区ID', |
||||
|
`COMMUNITY_NAME` varchar(32) DEFAULT NULL COMMENT '社区', |
||||
|
`GRID_ID` varchar(32) NOT NULL COMMENT '网格ID', |
||||
|
`GRID_NAME` varchar(32) DEFAULT NULL COMMENT '网格', |
||||
|
`VILLAGE_ID` varchar(32) DEFAULT NULL COMMENT '房屋小区ID', |
||||
|
`VILLAGE_NAME` varchar(32) DEFAULT NULL COMMENT '房屋小区', |
||||
|
`BUILD_ID` varchar(32) DEFAULT NULL COMMENT '楼号ID', |
||||
|
`BUILD_NAME` varchar(32) DEFAULT NULL COMMENT '楼号', |
||||
|
`UNIT_ID` varchar(32) DEFAULT NULL COMMENT '单元ID', |
||||
|
`UNIT_NAME` varchar(32) DEFAULT NULL COMMENT '单元', |
||||
|
`HOME_ID` varchar(32) DEFAULT NULL COMMENT '房屋ID', |
||||
|
`HOME_NAME` varchar(32) DEFAULT NULL COMMENT '房屋', |
||||
|
`OWNER_NAME` varchar(32) DEFAULT NULL COMMENT '房主姓名', |
||||
|
`STATE` varchar(32) DEFAULT '0' COMMENT '状态:0未审核,1审核通过,2审核不通过(盈余字段)', |
||||
|
`LESSOR_NAME` varchar(32) DEFAULT NULL COMMENT '出租人姓名', |
||||
|
`LESSOR_ID_CARD` varchar(32) DEFAULT NULL COMMENT '出租人身份证', |
||||
|
`LESSOR_MOBILE` varchar(32) DEFAULT NULL COMMENT '出租人手机', |
||||
|
`LESSOR_RELATION` varchar(32) DEFAULT NULL COMMENT '出租人关系', |
||||
|
`LESSEE_NAME` varchar(32) DEFAULT NULL COMMENT '承租人姓名', |
||||
|
`LESSEE_ID_CARD` varchar(32) DEFAULT NULL COMMENT '承租人身份证', |
||||
|
`LESSEE_MOBILE` varchar(32) DEFAULT NULL COMMENT '承租人手机', |
||||
|
`LESSEE_UNIT` varchar(255) DEFAULT NULL COMMENT '承租人工作单位', |
||||
|
`SIGN_DATE` varchar(32) DEFAULT NULL COMMENT '签署日期', |
||||
|
`REVIEW_DATE` varchar(32) DEFAULT NULL COMMENT '审核日期', |
||||
|
`START_DATE` varchar(32) DEFAULT NULL COMMENT '合同开始日期', |
||||
|
`END_DATE` varchar(32) DEFAULT NULL COMMENT '合同结束日期', |
||||
|
`REASON` varchar(255) DEFAULT NULL COMMENT '审核-原因', |
||||
|
`DEL_FLAG` varchar(1) DEFAULT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`LESSOR_LIVE_ADDRESS` varchar(255) DEFAULT NULL COMMENT '出租人现居住地', |
||||
|
`LESSEE_HOUSE_ADDRESS` varchar(255) DEFAULT NULL COMMENT '承租人户籍地地址', |
||||
|
`IS_PC_INPUT` varchar(1) DEFAULT NULL COMMENT '是否来源于PC端录入(0:否;1:是)', |
||||
|
PRIMARY KEY (`ID`) USING BTREE, |
||||
|
KEY `epdc_master_topic_USER_ID_IDX` (`HOME_NAME`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='合同记录表'; |
@ -0,0 +1,174 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.PliRentContractInfoLogDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.plugin.power.modules.rent.entity.PliRentContractInfoLogEntity" id="pliRentContractInfoLogMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="communityId" column="COMMUNITY_ID"/> |
||||
|
<result property="communityName" column="COMMUNITY_NAME"/> |
||||
|
<result property="gridId" column="GRID_ID"/> |
||||
|
<result property="gridName" column="GRID_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="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="lessorRelation" column="LESSOR_RELATION"/> |
||||
|
<result property="lesseeName" column="LESSEE_NAME"/> |
||||
|
<result property="lesseeIdCard" column="LESSEE_ID_CARD"/> |
||||
|
<result property="lesseeMobile" column="LESSEE_MOBILE"/> |
||||
|
<result property="lesseeUnit" column="LESSEE_UNIT"/> |
||||
|
<result property="signDate" column="SIGN_DATE"/> |
||||
|
<result property="reviewDate" column="REVIEW_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"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="lessorLiveAddress" column="LESSOR_LIVE_ADDRESS"/> |
||||
|
<result property="lesseeHouseAddress" column="LESSEE_HOUSE_ADDRESS"/> |
||||
|
<result property="isPcInput" column="IS_PC_INPUT"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="getContractInfoList" resultType="com.epmet.plugin.power.dto.rent.PliRentContractInfoLogDTO"> |
||||
|
SELECT |
||||
|
i.ID, |
||||
|
i.CONTRACT_ID, |
||||
|
i.COMMUNITY_ID, |
||||
|
i.COMMUNITY_NAME, |
||||
|
i.GRID_ID, |
||||
|
i.GRID_NAME, |
||||
|
i.VILLAGE_ID, |
||||
|
i.VILLAGE_NAME, |
||||
|
i.BUILD_ID, |
||||
|
i.BUILD_NAME, |
||||
|
i.UNIT_ID, |
||||
|
i.UNIT_NAME, |
||||
|
i.HOME_ID, |
||||
|
i.HOME_NAME, |
||||
|
i.OWNER_NAME, |
||||
|
i.STATE, |
||||
|
i.LESSOR_NAME, |
||||
|
i.LESSOR_ID_CARD, |
||||
|
i.LESSOR_MOBILE, |
||||
|
i.LESSOR_RELATION, |
||||
|
i.LESSEE_NAME, |
||||
|
i.LESSEE_ID_CARD, |
||||
|
i.LESSEE_MOBILE, |
||||
|
i.LESSEE_UNIT, |
||||
|
i.SIGN_DATE, |
||||
|
i.REVIEW_DATE, |
||||
|
i.START_DATE, |
||||
|
i.END_DATE, |
||||
|
i.REASON, |
||||
|
i.DEL_FLAG, |
||||
|
i.REVISION, |
||||
|
i.CREATED_BY, |
||||
|
i.CREATED_TIME, |
||||
|
i.UPDATED_BY, |
||||
|
i.UPDATED_TIME, |
||||
|
i.CUSTOMER_ID, |
||||
|
i.LESSOR_LIVE_ADDRESS, |
||||
|
i.LESSEE_HOUSE_ADDRESS, |
||||
|
i.IS_PC_INPUT, |
||||
|
IF( b.id IS NULL, '否', '是' ) AS isBlack |
||||
|
FROM pli_rent_contract_info_log i |
||||
|
left join pli_rent_contract_info c on c.ID = i.CONTRACT_ID and c.DEL_FLAG = '0' |
||||
|
LEFT JOIN pli_rent_blacklist b ON c.LESSEE_ID_CARD = b.ID_CARD AND b.DEL_FLAG = '0' |
||||
|
WHERE i.DEL_FLAG = '0' |
||||
|
<if test="isPcInput == 1 or isPcInput == '1'"> |
||||
|
AND i.IS_PC_INPUT = '1' |
||||
|
</if> |
||||
|
<if test="isPcInput == 2 or isPcInput == '2'"> |
||||
|
AND (i.IS_PC_INPUT != '1' or i.IS_PC_INPUT is null) |
||||
|
</if> |
||||
|
<if test="customerId != null and customerId != ''"> |
||||
|
AND i.CUSTOMER_ID = #{customerId} |
||||
|
</if> |
||||
|
<if test="gridId != null and gridId != ''"> |
||||
|
AND i.GRID_ID = #{gridId} |
||||
|
</if> |
||||
|
<if test="villageId != null and villageId != ''"> |
||||
|
AND i.VILLAGE_ID = #{villageId} |
||||
|
</if> |
||||
|
<if test="buildId != null and buildId != ''"> |
||||
|
AND i.BUILD_ID = #{buildId} |
||||
|
</if> |
||||
|
<if test="unitId != null and unitId != ''"> |
||||
|
AND i.UNIT_ID = #{unitId} |
||||
|
</if> |
||||
|
<if test="homeId != null and homeId != ''"> |
||||
|
AND i.HOME_ID = #{homeId} |
||||
|
</if> |
||||
|
<if test="state != null and state != ''"> |
||||
|
AND i.STATE = #{state} |
||||
|
</if> |
||||
|
<if test="lessorName != null and lessorName != ''"> |
||||
|
AND i.LESSOR_NAME = #{lessorName} |
||||
|
</if> |
||||
|
<if test="lessorIdCard != null and lessorIdCard != ''"> |
||||
|
AND i.LESSOR_ID_CARD = #{lessorIdCard} |
||||
|
</if> |
||||
|
<if test="lessorMobile != null and lessorMobile != ''"> |
||||
|
AND i.LESSOR_MOBILE = #{lessorMobile} |
||||
|
</if> |
||||
|
<if test="lesseeName != null and lesseeName != ''"> |
||||
|
AND i.LESSEE_NAME = #{lesseeName} |
||||
|
</if> |
||||
|
<if test="lesseeIdCard != null and lesseeIdCard != ''"> |
||||
|
AND i.LESSEE_ID_CARD = #{lesseeIdCard} |
||||
|
</if> |
||||
|
<if test="lesseeMobile != null and lesseeMobile != ''"> |
||||
|
AND i.LESSEE_MOBILE = #{lesseeMobile} |
||||
|
</if> |
||||
|
<if test="reviewStartTime != null and reviewStartTime != ''"> |
||||
|
AND i.REVIEW_DATE >= #{reviewStartTime} |
||||
|
</if> |
||||
|
<if test="reviewEndTime != null and reviewEndTime != ''"> |
||||
|
AND i.REVIEW_DATE <= #{reviewEndTime} |
||||
|
</if> |
||||
|
<if test="startTime != null and startTime != ''"> |
||||
|
AND i.SIGN_DATE >= #{startTime} |
||||
|
</if> |
||||
|
<if test="endTime != null and endTime != ''"> |
||||
|
AND i.SIGN_DATE <= #{endTime} |
||||
|
</if> |
||||
|
<if test="createdBy != null and createdBy != ''"> |
||||
|
AND i.CREATED_BY = #{createdBy} |
||||
|
</if> |
||||
|
<if test="endDate != null and endDate != ''"> |
||||
|
<if test="endDate == '0' or endDate == 0"> |
||||
|
AND DATE( i.END_DATE ) <= DATE_ADD( curdate(), INTERVAL 1 MONTH ) |
||||
|
AND DATE( i.END_DATE ) > CURDATE() |
||||
|
</if> |
||||
|
<if test="endDate == '1' or endDate == 1"> |
||||
|
AND DATE( i.END_DATE ) <= DATE_ADD( curdate(), INTERVAL 2 MONTH ) |
||||
|
AND DATE( i.END_DATE ) > CURDATE() |
||||
|
</if> |
||||
|
<if test="endDate == '2' or endDate == 2"> |
||||
|
AND DATE( i.END_DATE ) <= DATE_ADD( curdate(), INTERVAL 3 MONTH ) |
||||
|
AND DATE( i.END_DATE ) > CURDATE() |
||||
|
</if> |
||||
|
<if test="endDate == '3' or endDate == 3"> |
||||
|
AND DATE( i.END_DATE ) <= CURDATE() |
||||
|
</if> |
||||
|
</if> |
||||
|
order by i.CREATED_TIME desc |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue