|
|
@@ -1,5 +1,7 @@ |
|
|
package com.iformall.controller.contract; |
|
|
package com.iformall.controller.contract; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.iformall.annotation.SystemControllerLog; |
|
|
import com.iformall.annotation.SystemControllerLog; |
|
|
import com.iformall.annotation.UserDataRuleAnnotation; |
|
|
import com.iformall.annotation.UserDataRuleAnnotation; |
|
|
@@ -9,9 +11,12 @@ import com.iformall.common.ResultData; |
|
|
import com.iformall.controller.base.BaseController; |
|
|
import com.iformall.controller.base.BaseController; |
|
|
import com.iformall.domain.po.MallUserInfo; |
|
|
import com.iformall.domain.po.MallUserInfo; |
|
|
import com.iformall.domain.po.WxBillProperty; |
|
|
import com.iformall.domain.po.WxBillProperty; |
|
|
|
|
|
import com.iformall.domain.po.WxMallBuilding; |
|
|
|
|
|
import com.iformall.domain.po.WxMallFloor; |
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
import com.iformall.domain.po.WxPropertyContract; |
|
|
import com.iformall.domain.po.WxPropertyContract; |
|
|
import com.iformall.domain.po.WxRentContract; |
|
|
import com.iformall.domain.po.WxRentContract; |
|
|
|
|
|
import com.iformall.domain.po.WxShop; |
|
|
import com.iformall.domain.po.base.BaseEntity.SortField; |
|
|
import com.iformall.domain.po.base.BaseEntity.SortField; |
|
|
import com.iformall.enums.EnumContractOperationType; |
|
|
import com.iformall.enums.EnumContractOperationType; |
|
|
import com.iformall.enums.EnumContractType; |
|
|
import com.iformall.enums.EnumContractType; |
|
|
@@ -25,10 +30,16 @@ import com.iformall.enums.EnumRentStartType; |
|
|
import com.iformall.exception.MallinkException; |
|
|
import com.iformall.exception.MallinkException; |
|
|
import com.iformall.mapper.WxPropertyContractMapper; |
|
|
import com.iformall.mapper.WxPropertyContractMapper; |
|
|
import com.iformall.service.WxBillPropertyService; |
|
|
import com.iformall.service.WxBillPropertyService; |
|
|
|
|
|
import com.iformall.service.WxMallBuildingService; |
|
|
|
|
|
import com.iformall.service.WxMallFloorService; |
|
|
import com.iformall.service.WxPropertyContractService; |
|
|
import com.iformall.service.WxPropertyContractService; |
|
|
import com.iformall.service.WxRentPropertyContractService; |
|
|
import com.iformall.service.WxRentPropertyContractService; |
|
|
|
|
|
import com.iformall.service.WxShopService; |
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -37,6 +48,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
@@ -58,6 +70,12 @@ public class WxPropertyContractController extends WxContractBaseController { |
|
|
private WxPropertyContractMapper wxPropertyContractMapper; |
|
|
private WxPropertyContractMapper wxPropertyContractMapper; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxRentPropertyContractService wxRentPropertyContractService; |
|
|
private WxRentPropertyContractService wxRentPropertyContractService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
WxMallBuildingService buildingService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
WxMallFloorService floorService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private WxShopService wxShopService; |
|
|
|
|
|
|
|
|
@UserDataRuleAnnotation("property_contract_list") |
|
|
@UserDataRuleAnnotation("property_contract_list") |
|
|
@GetMapping("/list") |
|
|
@GetMapping("/list") |
|
|
@@ -84,6 +102,57 @@ public class WxPropertyContractController extends WxContractBaseController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
wpc.setFlowHas(hasFlow); |
|
|
wpc.setFlowHas(hasFlow); |
|
|
|
|
|
|
|
|
|
|
|
String renInfo = wpc.getRentInfo(); |
|
|
|
|
|
if (!StringUtils.isBlank(renInfo)) { |
|
|
|
|
|
JSONArray arrays = JSONArray.parseArray(renInfo); |
|
|
|
|
|
if ( null != arrays) { |
|
|
|
|
|
List<Long> floorIds = new ArrayList<Long>(); |
|
|
|
|
|
List<Long> buildIds = new ArrayList<Long>(); |
|
|
|
|
|
List<Long> shopIds = new ArrayList<Long>(); |
|
|
|
|
|
for (int i = 0 ; i < arrays.size(); i ++) { |
|
|
|
|
|
JSONObject o = arrays.getJSONObject(i); |
|
|
|
|
|
floorIds.add(Long.parseLong(o.getString("floor"))); |
|
|
|
|
|
buildIds.add(Long.parseLong(o.getString("building"))); |
|
|
|
|
|
shopIds.add(Long.parseLong(o.getString("id"))); |
|
|
|
|
|
} |
|
|
|
|
|
String floorName = ""; |
|
|
|
|
|
String buildingName = ""; |
|
|
|
|
|
String shopNumber = ""; |
|
|
|
|
|
WxMallBuilding bq = new WxMallBuilding(); |
|
|
|
|
|
bq.setIds(buildIds); |
|
|
|
|
|
PageInfo<WxMallBuilding> bpage = buildingService.listAsPage(bq, 1, 1000); |
|
|
|
|
|
if (null != bpage && null != bpage.getList()) { |
|
|
|
|
|
for (WxMallBuilding wmb : bpage.getList()) { |
|
|
|
|
|
buildingName = buildingName +"," + wmb.getBuildingName(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxMallFloor fq = new WxMallFloor(); |
|
|
|
|
|
fq.setIds(floorIds); |
|
|
|
|
|
PageInfo<WxMallFloor> fpage = floorService.listAsPage(fq, 1, 1000); |
|
|
|
|
|
if (null != fpage && null != fpage.getList()) { |
|
|
|
|
|
for (WxMallFloor wmf : fpage.getList()) { |
|
|
|
|
|
floorName = floorName +"," + wmf.getFloorName(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxShop ws = new WxShop(); |
|
|
|
|
|
ws.setIds(shopIds); |
|
|
|
|
|
PageInfo<WxShop> spage = wxShopService.listAsPage(ws, 1, 1000); |
|
|
|
|
|
if (null != spage && null != spage.getList()) { |
|
|
|
|
|
for (WxShop shop : spage.getList()) { |
|
|
|
|
|
shopNumber = shopNumber+","+shop.getShopNumber(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
wpc.setFloorName(floorName); |
|
|
|
|
|
wpc.setBuildingName(buildingName); |
|
|
|
|
|
wpc.setShopNumber(shopNumber); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|