|
|
|
@@ -393,6 +393,18 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
//删除预账单,重新生成 |
|
|
|
wxBillPropertyMapper.deleteBillByContract(record); |
|
|
|
//重新生成 |
|
|
|
WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(wxPropertyContract.getId()); |
|
|
|
if (null == propertyContract) { |
|
|
|
return new ResultData(Result.ERROR,"id无效"); |
|
|
|
} |
|
|
|
record.setRentalStartDate(propertyContract.getRentalStartDate()); |
|
|
|
record.setRentalEndDate(propertyContract.getRentalEndDate()); |
|
|
|
record.setRentStartType(propertyContract.getRentStartType()); |
|
|
|
record.setStartDate(propertyContract.getStartDate()); |
|
|
|
record.setAdjustPeriod(propertyContract.getAdjustPeriod()); |
|
|
|
record.setCreateType(propertyContract.getCreateType()); |
|
|
|
record.setShopIds(propertyContract.getShopIds()); |
|
|
|
record.setFeeStandards(propertyContract.getFeesStardarsList()); |
|
|
|
List<WxBillProperty> billList = buildProperty(new WxMerchant(),userId,record,EnumIsPreview.YES.getCode(),true); |
|
|
|
record.setPreviewBillRentList(billList); |
|
|
|
} |
|
|
|
@@ -540,15 +552,30 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
return JSONObject.toJSONString(shopInfo); |
|
|
|
} |
|
|
|
|
|
|
|
public List<WxBillProperty> buildRentMonth(WxMerchant wxMerchant, Long userId, WxPropertyContract wxPropertyContract, int receivePeriod, Integer lease, Date rentalStartDate, String price, Integer isPreview,boolean saveDb) { |
|
|
|
public List<WxBillProperty> buildRentMonth(WxMerchant wxMerchant, Long userId,WxPropertyContract wxPropertyContract, int receivePeriod, Integer lease, Date rentalStartDate, String price, Integer isPreview,boolean saveDb) { |
|
|
|
String adjustRatio = wxPropertyContract.getAdjustRatio(); |
|
|
|
String rentInfo = wxPropertyContract.getRentInfo(); |
|
|
|
Map<String, Object> shopInfo = new HashMap<>(); |
|
|
|
if (rentInfo != null) { |
|
|
|
JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); |
|
|
|
for (int i = 0, size = rentInfoArray.size(); i < size; i++) { |
|
|
|
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); |
|
|
|
shopInfo.put(rentInfoObject.getString("shopNumber"), rentInfoObject.get("buildArea")); |
|
|
|
if (wxPropertyContract.getCreateType().intValue() == EnumPropertyCreateType.BY_SHOP.getCode().intValue()) { |
|
|
|
List<Long> shopids = wxPropertyContract.shopIdsByShop(); |
|
|
|
WxShop sq = new WxShop(); |
|
|
|
sq.updateTenantInfo(wxPropertyContract); |
|
|
|
sq.setIds(shopids); |
|
|
|
List<WxShop> shs = wxShopMapper.findList(sq); |
|
|
|
if (null != shs && shs.size() > 0 ) { |
|
|
|
for (int i = 0 ; i < shs.size() ; i ++) { |
|
|
|
WxShop s = shs.get(i); |
|
|
|
shopInfo.put(s.getShopNumber(), s.getOperationArea()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
String rentInfo = wxPropertyContract.getRentInfo(); |
|
|
|
if (rentInfo != null) { |
|
|
|
JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); |
|
|
|
for (int i = 0, size = rentInfoArray.size(); i < size; i++) { |
|
|
|
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); |
|
|
|
shopInfo.put(rentInfoObject.getString("shopNumber"), rentInfoObject.get("buildArea")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -813,11 +840,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
WxBillFeesStandardsListVo bfsvo = unFixedList.get(j); |
|
|
|
WxFeesStandards feeStandars = bfsvo.getFeeStandards(); |
|
|
|
if(EnumFeesStandardsCalcuteUnit.MM.getCode().intValue() == feeStandars.getCalcuteUnit().intValue()) { |
|
|
|
bfsvo.setTotal(feeStandars.calcuteTotalMoney(wxPropertyContract.getDecimalSize(), start, end,wxPropertyContract.getRentArea())); |
|
|
|
bfsvo.setTotal(feeStandars.calcuteTotalMoney(wxPropertyContract.getDecimalSize(), start, end,wxPropertyContract.getRentArea(),false)); |
|
|
|
}else if (EnumFeesStandardsCalcuteUnit.HU.getCode().intValue() == feeStandars.getCalcuteUnit().intValue()) { |
|
|
|
bfsvo.setTotal(feeStandars.calcuteTotalMoney(wxPropertyContract.getDecimalSize(), start, end,"1")); |
|
|
|
bfsvo.setTotal(feeStandars.calcuteTotalMoney(wxPropertyContract.getDecimalSize(), start, end,"1",false)); |
|
|
|
}else { |
|
|
|
bfsvo.setTotal(feeStandars.calcuteTotalMoney(wxPropertyContract.getDecimalSize(), start, end,"1")); |
|
|
|
bfsvo.setTotal(feeStandars.calcuteTotalMoney(wxPropertyContract.getDecimalSize(), start, end,"1",false)); |
|
|
|
} |
|
|
|
bfsvo.setStart(start); |
|
|
|
bfsvo.setEnd(end); |
|
|
|
|