|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
@@ -145,6 +146,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); |
|
|
|
String rentPrice = rentInfoObject.getString("rentPrice"); |
|
|
|
String price = wxPropertyContract.getPrice(); |
|
|
|
if (StringUtils.isBlank(price)) { |
|
|
|
price = "0"; |
|
|
|
} |
|
|
|
if(rentPrice == null){ |
|
|
|
if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) { |
|
|
|
Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()); |
|
|
|
@@ -158,6 +162,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) { |
|
|
|
if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())) { |
|
|
|
String price = wxPropertyContract.getPrice(); |
|
|
|
if (StringUtils.isBlank(price)) { |
|
|
|
price = "0"; |
|
|
|
} |
|
|
|
Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()) * 100; |
|
|
|
BigDecimal rentPrice = new BigDecimal(price).divide(new BigDecimal(rentArea),wxPropertyContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP); |
|
|
|
if (rentPrice.compareTo(new BigDecimal(0)) > 0) { |
|
|
|
@@ -329,6 +336,18 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
logger.error("保存物业合同信息失败,e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (record.getCreateType().intValue() == EnumPropertyCreateType.BY_SHOP.getCode().intValue()) { |
|
|
|
List<Long> shopIds = record.shopIdsByShop(); |
|
|
|
WxShop shopq = new WxShop(); |
|
|
|
shopq.updateTenantInfo(record); |
|
|
|
shopq.setIds(shopIds); |
|
|
|
List<WxShop> sh = wxShopService.selectList(shopq); |
|
|
|
if (null != sh) { |
|
|
|
record.setRentInfo(JSON.toJSONString(sh)); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(Result.SUCCESS, "保存物业合同信息成功", record); |
|
|
|
} |
|
|
|
|
|
|
|
|