winter 1 год назад
Родитель
Сommit
13787073f2
3 измененных файлов: 7 добавлений и 5 удалений
  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 Просмотреть файл

@@ -190,6 +190,9 @@ public class WxRentContractController extends WxContractBaseController {
if (wxRentContract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode().intValue() && null == wxRentContract.getMonthAverageDays()) {
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);
}


+ 3
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -419,18 +419,17 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}
//查询rent_info 包括 shopId
String shopIdStr = "";
BigDecimal rentArea = new BigDecimal(0);
for (int i = 0; i < size; i++) {
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i);
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.updateTenantInfo(record);
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)) {
shopList.add(shopId);
shopIdStr = shopIdStr +","+ shopId;
}
}
record.setRentArea(rentArea.toPlainString());
setShops(record,shopList);
//关联客户
setCustomers(record);


+ 1
- 1
mallinkService/src/main/resources/mapper/WxShopUsersMapper.xml Просмотреть файл

@@ -52,7 +52,7 @@
<if test=" null != shopIds ">
and shop_id in
<foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")">
#{idItem}
#{sidItem}
</foreach>
</if>


Загрузка…
Отмена
Сохранить