| @@ -190,6 +190,9 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| if (wxRentContract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode().intValue() && null == wxRentContract.getMonthAverageDays()) { | if (wxRentContract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode().intValue() && null == wxRentContract.getMonthAverageDays()) { | ||||
| return new ResultData(Result.ERROR,"请填写月平均天数"); | return new ResultData(Result.ERROR,"请填写月平均天数"); | ||||
| } | } | ||||
| WxRentContract contract = wxRentContractService.selectById(wxRentContract.getId()); | |||||
| wxRentContract.setRentArea(contract.getRentArea()); | |||||
| return wxRentContractService.update(wxRentContract, user,user.getName(),EnumFromType.OTHER.getCode(),oldDate,false,true); | return wxRentContractService.update(wxRentContract, user,user.getName(),EnumFromType.OTHER.getCode(),oldDate,false,true); | ||||
| } | } | ||||
| @@ -419,18 +419,17 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| //查询rent_info 包括 shopId | //查询rent_info 包括 shopId | ||||
| String shopIdStr = ""; | String shopIdStr = ""; | ||||
| BigDecimal rentArea = new BigDecimal(0); | |||||
| for (int i = 0; i < size; i++) { | for (int i = 0; i < size; i++) { | ||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | ||||
| WxRentContract wxRentContract = new WxRentContract(); | |||||
| wxRentContract.updateTenantInfo(record); | |||||
| Long shopId = rentInfoObject.getLong("id"); | Long shopId = rentInfoObject.getLong("id"); | ||||
| //wxRentContract.setShopId(shopId); | |||||
| String shopNumber = rentInfoObject.getString("shopNumber"); | |||||
| rentArea = rentArea.add(new BigDecimal(rentInfoObject.getString("rentArea"))); | |||||
| if (!shopList.contains(shopId)) { | if (!shopList.contains(shopId)) { | ||||
| shopList.add(shopId); | shopList.add(shopId); | ||||
| shopIdStr = shopIdStr +","+ shopId; | shopIdStr = shopIdStr +","+ shopId; | ||||
| } | } | ||||
| } | } | ||||
| record.setRentArea(rentArea.toPlainString()); | |||||
| setShops(record,shopList); | setShops(record,shopList); | ||||
| //关联客户 | //关联客户 | ||||
| setCustomers(record); | setCustomers(record); | ||||
| @@ -52,7 +52,7 @@ | |||||
| <if test=" null != shopIds "> | <if test=" null != shopIds "> | ||||
| and shop_id in | and shop_id in | ||||
| <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | ||||
| #{idItem} | |||||
| #{sidItem} | |||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||