Browse Source

Merge branch 'dev' into test

test
zhangyuan 3 years ago
parent
commit
337ffa9bf8
  1. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/controller/RentContractInfoController.java
  2. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/RentContractInfoService.java
  3. 8
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

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

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);
/**
* 审核

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

@ -160,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
@ -247,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);
@ -330,7 +331,6 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
});
rentContractFileService.insertBatch(fileList);
}
return new Result();
}
}

Loading…
Cancel
Save