Browse Source

补充业务逻辑

dev_power_axis
zhangyuan 3 years ago
parent
commit
b69d2d4d17
  1. 2
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractFileDTO.java
  2. 29
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java
  3. 11
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentTenantInfoDTO.java
  4. 0
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/form/.gitkeep
  5. 0
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/result/.gitkeep
  6. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentContractFileDao.java
  7. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentTenantInfoDao.java
  8. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java
  9. 15
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractInfoEntity.java
  10. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentTenantInfoEntity.java
  11. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentContractFileService.java
  12. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentTenantInfoService.java
  13. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentBlacklistServiceImpl.java
  14. 16
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractFileServiceImpl.java
  15. 129
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java
  16. 11
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java
  17. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentBlacklistDao.xml
  18. 16
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractFileDao.xml
  19. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml
  20. 18
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentTenantInfoDao.xml

2
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractFileDTO.java

@ -32,7 +32,7 @@ public class RentContractFileDTO implements Serializable {
private String fileUrl;
/**
* 文件类型
* 文件类型 0图片1 文件合同
*/
private String fileType;

29
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentContractInfoDTO.java

@ -1,8 +1,10 @@
package com.epmet.plugin.power.dto.rent;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.util.List;
/**
@ -31,6 +33,16 @@ public class RentContractInfoDTO implements Serializable {
*/
private String gridName;
/**
* 房屋小区ID
*/
private String villageId;
/**
* 房屋小区
*/
private String villageName;
/**
* 楼号ID
*/
@ -106,6 +118,11 @@ public class RentContractInfoDTO implements Serializable {
*/
private String signDate;
/**
* 审核日期
*/
private String reviewDate;
/**
* 合同开始日期
*/
@ -151,4 +168,14 @@ public class RentContractInfoDTO implements Serializable {
*/
private Date updatedTime;
/**
* 租客列表
*/
private List<RentTenantInfoDTO> tenantList;
/**
* 附件列表
*/
private List<RentContractFileDTO> fileList;
}

11
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentTenantInfoDTO.java

@ -2,6 +2,8 @@ package com.epmet.plugin.power.dto.rent;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
@ -47,9 +49,9 @@ public class RentTenantInfoDTO implements Serializable {
private String yfzgx;
/**
* 照片
* 人员类型 0房东 1租客
*/
private String img;
private String type;
/**
* 删除标记 0未删除1已删除
@ -81,4 +83,9 @@ public class RentTenantInfoDTO implements Serializable {
*/
private Date updatedTime;
/**
* 头像列表
*/
private List<RentContractFileDTO> imgList;
}

0
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/form/.gitkeep

0
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/result/.gitkeep

14
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentContractFileDao.java

@ -4,6 +4,8 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.Map;
/**
* 附件表
*
@ -12,5 +14,15 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface RentContractFileDao extends BaseDao<RentContractFileEntity> {
/**
* 物理删除
*
* @param params
* @return void
* @author zhy
* @date 2022/4/24 14:08
*/
void deletePhysical(Map<String, Object> params);
}

14
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/dao/RentTenantInfoDao.java

@ -4,6 +4,8 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.Map;
/**
* 租客表
*
@ -12,5 +14,15 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface RentTenantInfoDao extends BaseDao<RentTenantInfoEntity> {
/**
* 物理删除
*
* @param params
* @return void
* @author zhy
* @date 2022/4/24 14:08
*/
void deletePhysical(Map<String, Object> params);
}

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractFileEntity.java

@ -32,7 +32,7 @@ public class RentContractFileEntity extends BaseEpmetEntity {
private String fileUrl;
/**
* 文件类型
* 文件类型 0图片1 文件合同
*/
private String fileType;

15
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentContractInfoEntity.java

@ -31,6 +31,16 @@ public class RentContractInfoEntity extends BaseEpmetEntity {
*/
private String gridName;
/**
* 房屋小区ID
*/
private String villageId;
/**
* 房屋小区
*/
private String villageName;
/**
* 楼号ID
*/
@ -106,6 +116,11 @@ public class RentContractInfoEntity extends BaseEpmetEntity {
*/
private String signDate;
/**
* 审核日期
*/
private String reviewDate;
/**
* 合同开始日期
*/

13
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentTenantInfoEntity.java

@ -1,12 +1,15 @@
package com.epmet.plugin.power.modules.rent.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import com.epmet.plugin.power.dto.rent.RentContractFileDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* 租客表
@ -47,8 +50,14 @@ public class RentTenantInfoEntity extends BaseEpmetEntity {
private String yfzgx;
/**
* 照片
* 人员类型 0房东 1租客
*/
private String img;
private String type;
/**
* 头像列表
*/
@TableField(exist = false)
private List<RentContractFileDTO> imgList;
}

10
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentContractFileService.java

@ -75,4 +75,14 @@ public interface RentContractFileService extends BaseService<RentContractFileEnt
* @date 2022-04-22
*/
void delete(String[] ids);
/**
* 物理删除
*
* @param params
* @return void
* @author zhy
* @date 2022/4/24 14:08
*/
void deletePhysical(Map<String, Object> params);
}

10
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentTenantInfoService.java

@ -75,4 +75,14 @@ public interface RentTenantInfoService extends BaseService<RentTenantInfoEntity>
* @date 2022-04-22
*/
void delete(String[] ids);
/**
* 物理删除
*
* @param params
* @return void
* @author zhy
* @date 2022/4/24 14:08
*/
void deletePhysical(Map<String, Object> params);
}

10
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentBlacklistServiceImpl.java

@ -50,9 +50,19 @@ public class RentBlacklistServiceImpl extends BaseServiceImpl<RentBlacklistDao,
private QueryWrapper<RentBlacklistEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
String name = (String)params.get("name");
String idCard = (String)params.get("idCard");
String mobile = (String)params.get("mobile");
String startTime = (String)params.get("startTime");
String endTime = (String)params.get("endTime");
QueryWrapper<RentBlacklistEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(name), "NAME", name);
wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard);
wrapper.eq(StringUtils.isNotBlank(mobile), "MOBILE", mobile);
wrapper.ge(StringUtils.isNotBlank(startTime), "JOIN_DATE", startTime);
wrapper.le(StringUtils.isNotBlank(endTime), "JOIN_DATE", endTime);
return wrapper;
}

16
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractFileServiceImpl.java

@ -3,11 +3,11 @@ package com.epmet.plugin.power.modules.rent.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.plugin.power.modules.rent.dao.RentContractFileDao;
import com.epmet.plugin.power.dto.rent.RentContractFileDTO;
import com.epmet.plugin.power.modules.rent.dao.RentContractFileDao;
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;
@ -48,8 +48,8 @@ public class RentContractFileServiceImpl extends BaseServiceImpl<RentContractFil
return ConvertUtils.sourceToTarget(entityList, RentContractFileDTO.class);
}
private QueryWrapper<RentContractFileEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
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);
@ -84,4 +84,12 @@ public class RentContractFileServiceImpl extends BaseServiceImpl<RentContractFil
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deletePhysical(Map<String, Object> params) {
if (!params.isEmpty()) {
baseDao.deletePhysical(params);
}
}
}

129
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

@ -3,20 +3,28 @@ 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.constant.NumConstant;
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.RentContractFileDTO;
import com.epmet.plugin.power.dto.rent.RentContractInfoDTO;
import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO;
import com.epmet.plugin.power.modules.rent.dao.RentContractInfoDao;
import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity;
import com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity;
import com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity;
import com.epmet.plugin.power.modules.rent.redis.RentContractInfoRedis;
import com.epmet.plugin.power.modules.rent.service.RentContractFileService;
import com.epmet.plugin.power.modules.rent.service.RentContractInfoService;
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.HashMap;
import java.util.List;
import java.util.Map;
@ -32,6 +40,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
@Autowired
private RentContractInfoRedis rentContractInfoRedis;
@Autowired
private RentTenantInfoService rentTenantInfoService;
@Autowired
private RentContractFileService rentContractFileService;
@Override
public PageData<RentContractInfoDTO> page(Map<String, Object> params) {
IPage<RentContractInfoEntity> page = baseDao.selectPage(
@ -48,11 +62,48 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
return ConvertUtils.sourceToTarget(entityList, RentContractInfoDTO.class);
}
private QueryWrapper<RentContractInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<RentContractInfoEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String gridId = (String) params.get("gridId");
String villageId = (String) params.get("villageId");
String buildId = (String) params.get("buildId");
String unitId = (String) params.get("unitId");
String homeId = (String) params.get("homeId");
String state = (String) params.get("state");
String lessorName = (String) params.get("lessorName");
String lessorIdCard = (String) params.get("lessorIdCard");
String lessorMobile = (String) params.get("lessorMobile");
String lesseeName = (String) params.get("lesseeName");
String lesseeIdCard = (String) params.get("lesseeIdCard");
String lesseeMobile = (String) params.get("lesseeMobile");
String startTime = (String) params.get("startTime");
String endTime = (String) params.get("endTime");
String reviewStartTime = (String) params.get("reviewStartTime");
String reviewEndTime = (String) params.get("reviewEndTime");
String signStartTime = (String) params.get("signStartTime");
String signEndTime = (String) params.get("signEndTime");
String endDate = (String) params.get("endDate");
QueryWrapper<RentContractInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(gridId), "GRID_ID", gridId);
wrapper.eq(StringUtils.isNotBlank(villageId), "VILLAGE_ID", villageId);
wrapper.eq(StringUtils.isNotBlank(buildId), "BUILD_ID", buildId);
wrapper.eq(StringUtils.isNotBlank(unitId), "UNIT_ID", unitId);
wrapper.eq(StringUtils.isNotBlank(homeId), "HOME_ID", homeId);
wrapper.eq(StringUtils.isNotBlank(state), "STATE", state);
wrapper.eq(StringUtils.isNotBlank(lessorName), "LESSOR_NAME", lessorName);
wrapper.eq(StringUtils.isNotBlank(lessorIdCard), "LESSOR_ID_CARD", lessorIdCard);
wrapper.eq(StringUtils.isNotBlank(lessorMobile), "LESSOR_MOBILE", lessorMobile);
wrapper.eq(StringUtils.isNotBlank(lesseeName), "LESSEE_NAME", lesseeName);
wrapper.eq(StringUtils.isNotBlank(lesseeIdCard), "LESSEE_ID_CARD", lesseeIdCard);
wrapper.eq(StringUtils.isNotBlank(lesseeMobile), "LESSEE_MOBILE", lesseeMobile);
wrapper.ge(StringUtils.isNotBlank(reviewStartTime), "REVIEW_DATE", reviewStartTime);
wrapper.le(StringUtils.isNotBlank(reviewEndTime), "REVIEW_DATE", reviewEndTime);
wrapper.ge(StringUtils.isNotBlank(signStartTime), "SIGN_DATE", signStartTime);
wrapper.le(StringUtils.isNotBlank(signEndTime), "SIGN_DATE", signEndTime);
wrapper.eq(StringUtils.isNotBlank(endDate), "END_DATE", endDate);
return wrapper;
}
@ -60,7 +111,29 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
@Override
public RentContractInfoDTO get(String id) {
RentContractInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, RentContractInfoDTO.class);
RentContractInfoDTO dto = ConvertUtils.sourceToTarget(entity, RentContractInfoDTO.class);
Map<String, Object> params = new HashMap<>(4);
params.put("contractId", id);
// 取出租客信息
List<RentTenantInfoDTO> tenantList = rentTenantInfoService.list(params);
tenantList.forEach(item -> {
// 租客信息补充照片信息
params.put("referenceId", item.getId());
params.put("fileType", NumConstant.ZERO_STR);
List<RentContractFileDTO> imgList = rentContractFileService.list(params);
item.setImgList(imgList);
});
dto.setTenantList(tenantList);
params.put("referenceId", dto.getId());
params.put("fileType", NumConstant.ONE_STR);
// 取出合同文件信息
List<RentContractFileDTO> fileList = rentContractFileService.list(params);
dto.setFileList(fileList);
return dto;
}
@Override
@ -68,6 +141,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
public void save(RentContractInfoDTO dto) {
RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class);
insert(entity);
updateTenantAndFile(entity.getId(), dto);
}
@Override
@ -75,6 +149,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
public void update(RentContractInfoDTO dto) {
RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class);
updateById(entity);
updateTenantAndFile(entity.getId(), dto);
}
@Override
@ -84,4 +159,48 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
baseDao.deleteBatchIds(Arrays.asList(ids));
}
private void updateTenantAndFile(String contractId, RentContractInfoDTO dto) {
Map<String, Object> params = new HashMap<>(8);
params.put("contractId", contractId);
params.put("referenceId", contractId);
// 删除租客和合同文件
rentTenantInfoService.deletePhysical(params);
rentContractFileService.deletePhysical(params);
if (!dto.getTenantList().isEmpty()) {
List<RentTenantInfoEntity> tenantList = ConvertUtils.sourceToTarget(dto.getTenantList(), RentTenantInfoEntity.class);
tenantList.forEach(tenant -> {
if (StringUtils.isNotBlank(tenant.getId())) {
// 如果是修改,先删除之前的头像
params.put("referenceId", tenant.getId());
params.put("fileType", NumConstant.ZERO_STR);
rentContractFileService.deletePhysical(params);
}
tenant.setContractId(contractId);
tenant.setType(NumConstant.ONE_STR);
});
rentTenantInfoService.insertBatch(tenantList);
// 处理租客头像
dto.getTenantList().forEach(tenant -> {
if (!tenant.getImgList().isEmpty()) {
List<RentContractFileEntity> imgList = ConvertUtils.sourceToTarget(tenant.getImgList(), RentContractFileEntity.class);
imgList.forEach(img -> {
img.setReferenceId(tenant.getId());
img.setFileType(NumConstant.ZERO_STR);
});
rentContractFileService.insertBatch(imgList);
}
});
}
if (!dto.getFileList().isEmpty()) {
List<RentContractFileEntity> fileList = ConvertUtils.sourceToTarget(dto.getFileList(), RentContractFileEntity.class);
fileList.forEach(item -> {
item.setReferenceId(contractId);
item.setFileType(NumConstant.ONE_STR);
});
rentContractFileService.insertBatch(fileList);
}
}
}

11
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentTenantInfoServiceImpl.java

@ -48,8 +48,8 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao
return ConvertUtils.sourceToTarget(entityList, RentTenantInfoDTO.class);
}
private QueryWrapper<RentTenantInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
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);
@ -84,4 +84,11 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deletePhysical(Map<String, Object> params) {
if (!params.isEmpty()) {
baseDao.deletePhysical(params);
}
}
}

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentBlacklistDao.xml

@ -1,7 +1,7 @@
<?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">
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.RentBlacklistDao">
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentBlacklistEntity" id="rentBlacklistMap">
<result property="id" column="ID"/>

16
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractFileDao.xml

@ -1,7 +1,7 @@
<?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">
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.RentContractFileDao">
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity" id="rentContractFileMap">
<result property="id" column="ID"/>
@ -16,5 +16,17 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deletePhysical">
DELETE
FROM
pli_rent_contract_file
<where>
<if test="referenceId != null and referenceId != ''">
AND REFERENCE_ID = #{referenceId}
</if>
<if test="fileType != null and fileType != ''">
AND FILE_TYPE = #{fileType}
</if>
</where>
</delete>
</mapper>

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml

@ -1,7 +1,7 @@
<?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">
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.RentContractInfoDao">
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity" id="rentContractInfoMap">
<result property="id" column="ID"/>

18
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentTenantInfoDao.xml

@ -1,7 +1,7 @@
<?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">
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.RentTenantInfoDao">
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentTenantInfoEntity" id="rentTenantInfoMap">
<result property="id" column="ID"/>
@ -10,7 +10,7 @@
<result property="idCard" column="ID_CARD"/>
<result property="mobile" column="MOBILE"/>
<result property="yfzgx" column="YFZGX"/>
<result property="img" column="IMG"/>
<result property="type" column="TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
@ -19,5 +19,17 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deletePhysical">
DELETE
FROM
pli_rent_tenant_info
<where>
<if test="contractId != null and contractId != ''">
AND CONTRACT_ID = #{contractId}
</if>
<if test="type != null and type != ''">
AND TYPE = #{type}
</if>
</where>
</delete>
</mapper>
Loading…
Cancel
Save