Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
13787073f2
3 changed files with 7 additions and 5 deletions
  1. +3
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +3
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/resources/mapper/WxShopUsersMapper.xml

+ 3
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java View File

@@ -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);
} }


+ 3
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -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);


+ 1
- 1
mallinkService/src/main/resources/mapper/WxShopUsersMapper.xml View File

@@ -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>


Loading…
Cancel
Save