diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java index 77866572e..56e8bfae9 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java @@ -14,6 +14,7 @@ import com.iformall.domain.po.WxAllBill; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxPropertyContract; import com.iformall.domain.po.WxRentContract; +import com.iformall.domain.po.WxShop; import com.iformall.domain.po.WxUserDataRule; import com.iformall.domain.po.base.BaseEntity.SortField; import com.iformall.enums.*; @@ -153,6 +154,27 @@ public class WxPropertyContractController extends WxContractBaseController { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "adjustPeriod不能为空"); } wxPropertyContract.setShopIds(","+wxPropertyContract.getShopIds()+","); + + if (StringUtils.isNotBlank(wxPropertyContract.getShopIds())) { + String[] sids = wxPropertyContract.getShopIds().split(","); + if (null != sids && sids.length > 0 ) { + List shopIdList = new ArrayList(); + for (int i = 0 ; i < sids.length ; i++) { + if (StringUtils.isNotBlank(sids[i])) { + shopIdList.add(Long.parseLong(sids[i])); } + } + if (shopIdList.size() > 0) { + WxShop wxShop = new WxShop(); + wxShop.updateTenantInfo(wxPropertyContract); + wxShop.setIds(shopIdList); + List sunumbers = wxShopService.getShopNumberList(wxShop); + if (null != sunumbers && sunumbers.size() > 0 ) { + wxPropertyContract.setShopNumbers(StringUtils.join(sunumbers)); + } + } + } + } + }else { WxRentContract rentContract = rentContractService.getSimpleDeatil(wxPropertyContract.getRentContractId()); if (null == rentContract) { @@ -174,6 +196,7 @@ public class WxPropertyContractController extends WxContractBaseController { wxPropertyContract.setMerchantId(rentContract.getMerchantId()); wxPropertyContract.setSignDate(rentContract.getSignDate()); wxPropertyContract.setRentInfo(rentContract.getRentInfo()); + wxPropertyContract.setShopNumbers(rentContract.getRentInfoShopNumber()); } WxMerchant merchant = wxMerchantService.selectById(wxPropertyContract.getMerchantId()); diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java index 379698003..1e86e00be 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java @@ -43,7 +43,6 @@ public class WxPropertyContract extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="审批流1合同2账单3终止审批",name="businessType") private Integer businessType; - @TableField(exist = false) @SortColumn(column = "shopNumber") private String shopNumber; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 254b815b3..a99f55555 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -851,6 +851,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { wxBillDeposit.updateTenantInfo(wxRentContract); //wxBillDeposit.setIsDel(0); wxBillDeposit.setMerchantId(wxRentContract.getMerchantId()); + wxBillDeposit.setShopNumber(wxRentContract.getRentInfoShopNumber()); if (null != user) { //wxBillDeposit.setUserId(user.getId()); } @@ -1321,6 +1322,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (null != wxRentContract.shopIdsByRentInfo() && wxRentContract.shopIdsByRentInfo().size() == 1) { wxBillRent.setShopId(wxRentContract.shopIdsByRentInfo().get(0)); } + wxBillRent.setShopNumber(wxRentContract.getRentInfoShopNumber()); wxBillRent.setRentArea(wxRentContract.getRentArea()); wxBillRent.setCreatetime(date); wxBillRent.setCreateBy(user.getId()); @@ -1384,6 +1386,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { manage.setUpdateByName(wxBillRent.getUpdateByName()); manage.setRentShopType(wxBillRent.getRentShopType()); manage.setRentArea(wxBillRent.getRentArea()); + manage.setShopNumber(wxBillRent.getShopNumber()); if (feeType.getCode().intValue() == EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode().intValue()){ manage.setEnergyFeesId(EnumBillAllType.RENT_BUSSINESS_MANAGE.getEnergyFeesId()); manage.setBillType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode());