Ver a proveniência

fix

release_toaliyun_real
winter há 1 ano
ascendente
cometimento
382f664fa1
1 ficheiros alterados com 18 adições e 0 eliminações
  1. +18
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxContractBaseController.java

+ 18
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxContractBaseController.java Ver ficheiro

@@ -247,11 +247,29 @@ public class WxContractBaseController extends BaseController{
} }
protected void rentContractValidShop(WxRentContract rentContract) throws Exception { protected void rentContractValidShop(WxRentContract rentContract) throws Exception {
//当前的不能<=0
Map<Long, BigDecimal> rentAreaMap = rentContract.getRentShopArea();
for (Iterator<Long> it = rentAreaMap.keySet().iterator();it.hasNext();) {
Long shopId= it.next();
BigDecimal ra = rentAreaMap.get(shopId);
if (ra.compareTo(new BigDecimal(0)) <= 0 ) {
throw new MallinkException(Result.ERROR, "房间面积不能为0。");
}
}
contractValidShop(rentContract,rentContract.getId(),rentContract.getRentalStartDate(),rentContract.getRentalEndDate(),rentContract.shopIdsByRentInfo(), contractValidShop(rentContract,rentContract.getId(),rentContract.getRentalStartDate(),rentContract.getRentalEndDate(),rentContract.shopIdsByRentInfo(),
rentContract.getRentShopArea(),true); rentContract.getRentShopArea(),true);
} }
protected void propertyContractValidShop(WxPropertyContract propertyContract) throws Exception { protected void propertyContractValidShop(WxPropertyContract propertyContract) throws Exception {
//当前的不能<=0
Map<Long, BigDecimal> rentAreaMap = propertyContract.getRentShopArea();
for (Iterator<Long> it = rentAreaMap.keySet().iterator();it.hasNext();) {
Long shopId= it.next();
BigDecimal ra = rentAreaMap.get(shopId);
if (ra.compareTo(new BigDecimal(0)) <= 0 ) {
throw new MallinkException(Result.ERROR, "房间面积不能为0。");
}
}
contractValidShop(propertyContract,propertyContract.getId(),propertyContract.getRentalStartDate(),propertyContract.getRentalEndDate(),propertyContract.shopIdsByShop(), contractValidShop(propertyContract,propertyContract.getId(),propertyContract.getRentalStartDate(),propertyContract.getRentalEndDate(),propertyContract.shopIdsByShop(),
propertyContract.getRentShopArea(),false); propertyContract.getRentShopArea(),false);
} }


Carregando…
Cancelar
Guardar