|
|
|
@@ -247,11 +247,29 @@ public class WxContractBaseController extends BaseController{ |
|
|
|
} |
|
|
|
|
|
|
|
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(), |
|
|
|
rentContract.getRentShopArea(),true); |
|
|
|
} |
|
|
|
|
|
|
|
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(), |
|
|
|
propertyContract.getRentShopArea(),false); |
|
|
|
} |
|
|
|
|