Browse Source

Merge branch 'dev_contract'

feature/hk_device
zhangyuan 3 years ago
parent
commit
8de38867cb
  1. 15
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/rent/RentTenantInfoDTO.java
  2. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractInfoController.java
  3. 15
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/entity/RentTenantInfoEntity.java
  4. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentContractInfoService.java
  5. 11
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java
  6. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/db/migration/V0.0.8__pli_rent_tenant_info_update.sql
  7. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml
  8. 5
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentTenantInfoDao.xml

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

@ -82,6 +82,21 @@ public class RentTenantInfoDTO implements Serializable {
)
private Date updatedTime;
/**
* 政治面貌
*/
private String politicalStatus;
/**
* 是否服兵役:1 :0
*/
private String isMilitary;
/**
* 国籍
*/
private String nation;
/**
* 头像列表
*/

3
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractInfoController.java

@ -50,7 +50,8 @@ public class RentContractInfoController {
public Result save(@RequestBody RentContractInfoDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
return rentContractInfoService.save(dto);
rentContractInfoService.save(dto);
return new Result();
}
@NoRepeatSubmit

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

@ -69,6 +69,21 @@ public class RentTenantInfoEntity extends BaseEpmetEntity {
*/
private String customerId;
/**
* 政治面貌
*/
private String politicalStatus;
/**
* 是否服兵役:1 :0
*/
private String isMilitary;
/**
* 国籍
*/
private String nation;
/**
* 头像列表
*/

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

@ -55,7 +55,7 @@ public interface RentContractInfoService extends BaseService<RentContractInfoEnt
* @author generator
* @date 2022-04-22
*/
Result save(RentContractInfoDTO dto);
void save(RentContractInfoDTO dto);
/**
* 审核

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

@ -69,6 +69,9 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
@Override
public PageData<RentContractInfoDTO> page(Map<String, Object> params) {
params.put("customerId", loginUserUtil.getLoginUserCustomerId());
if (StringUtils.isNotBlank((String) params.get("dataFlag"))) {
params.put("createdBy", loginUserUtil.getLoginUserId());
}
IPage<RentContractInfoDTO> page = getPage(params);
List<RentContractInfoDTO> list = baseDao.getContractInfoList(params);
return new PageData<>(list, page.getTotal());
@ -157,11 +160,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
@Override
@Transactional(rollbackFor = Exception.class)
public Result save(RentContractInfoDTO dto) {
public void save(RentContractInfoDTO dto) {
RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class);
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
insert(entity);
return updateTenantAndFile(entity.getId(), dto);
// 处理租客信息和合同信息
updateTenantAndFile(entity.getId(), dto);
}
@Override
@ -244,7 +248,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
baseDao.deleteBatchIds(Arrays.asList(ids));
}
private Result updateTenantAndFile(String contractId, RentContractInfoDTO dto) {
private void updateTenantAndFile(String contractId, RentContractInfoDTO dto) {
Map<String, Object> params = new HashMap<>(8);
params.put("contractId", contractId);
params.put("referenceId", contractId);
@ -327,7 +331,6 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
});
rentContractFileService.insertBatch(fileList);
}
return new Result();
}
}

3
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/db/migration/V0.0.8__pli_rent_tenant_info_update.sql

@ -0,0 +1,3 @@
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD POLITICAL_STATUS varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '政治面貌';
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD IS_MILITARY varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '是否服兵役【是:1 否:0】';
ALTER TABLE epmet_pli_power.pli_rent_tenant_info ADD NATION varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '国籍';

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

@ -95,6 +95,9 @@
<if test="endTime != null and endTime != ''">
AND i.SIGN_DATE &lt;= #{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 ) &lt;= DATE_ADD( curdate(), INTERVAL 1 MONTH )

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

@ -44,7 +44,10 @@
TYPE,
STATE,
CREATED_TIME,
UPDATED_TIME
UPDATED_TIME,
POLITICAL_STATUS,
IS_MILITARY,
NATION
FROM
pli_rent_tenant_info
WHERE

Loading…
Cancel
Save