Просмотр исходного кода

[租赁合同][修改][补录生成账单]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
373cd33281
1 измененных файлов: 16 добавлений и 0 удалений
  1. +16
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 16
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -165,6 +165,22 @@ public class WxRentContractServiceImpl implements WxRentContractService {
return new ResultData(ErrorCode.RENT_CONTRACT_WITH_SHOP_IS_FOUND);
}
wxRentContractMapper.insertSelective(record);
//建立账单
if (record.getMerchantId() != null && record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode())
&& record.getReceivePeriod() != null && record.getDeposit() > 0 && record.getPrice() > 0) {
WxBillRent wxBillRent = new WxBillRent();
wxBillRent.setMerchantId(record.getMerchantId());
List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(wxBillRent);
if (billRentList.size() == 0) {
WxMerchant wxMerchant = new WxMerchant();
wxMerchant.setId(record.getMerchantId());
wxMerchant.setTenantId(record.getTenantId());
//租金
buildRent(wxMerchant);
//押金
buildDeposit(wxMerchant);
}
}
} catch (Exception e) {
logger.error("保存租赁合同信息失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());


Загрузка…
Отмена
Сохранить