| @@ -294,5 +294,12 @@ public class WxCouponOrderBVo extends WxCouponOrder { | |||||
| @Excel(name = "配送状态", width = 50, orderNum = "18", replace = {"线上购买_0", "待自提_10", "待自提_14", "已自提_15", "待发货_20", "待收货_24", "已收货_25"}) | @Excel(name = "配送状态", width = 50, orderNum = "18", replace = {"线上购买_0", "待自提_10", "待自提_14", "已自提_15", "待发货_20", "待收货_24", "已收货_25"}) | ||||
| @io.swagger.annotations.ApiModelProperty(value="配送状态 0:默认(无) 1*:自提 2*:配送",name="shippingStatus") | @io.swagger.annotations.ApiModelProperty(value="配送状态 0:默认(无) 1*:自提 2*:配送",name="shippingStatus") | ||||
| private Integer shippingStatus; | private Integer shippingStatus; | ||||
| //券上架时间 | |||||
| @TableField(exist = false) | |||||
| private Date couponOnlineStartDate; | |||||
| @TableField(exist = false) | |||||
| private Date couponOnlineEndDate; | |||||
| } | } | ||||
| @@ -17,6 +17,7 @@ public interface WxShopMapper extends CommonMapper<WxShop, String> { | |||||
| List<WxShop> findList(WxShop wxShop); | List<WxShop> findList(WxShop wxShop); | ||||
| List<Long> findIdList(WxShop wxShop); | List<Long> findIdList(WxShop wxShop); | ||||
| Long findAreaSum(WxShop wxShop); | |||||
| List<Map<String,Object>> findListMap(WxShop record); | List<Map<String,Object>> findListMap(WxShop record); | ||||
| @@ -234,6 +234,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| String tenantId = paramsMap.get("tenantId"); | String tenantId = paramsMap.get("tenantId"); | ||||
| String parentTenantId = paramsMap.get("parentTenantId"); | String parentTenantId = paramsMap.get("parentTenantId"); | ||||
| Integer chart = Integer.valueOf(paramsMap.get("chart")); | Integer chart = Integer.valueOf(paramsMap.get("chart")); | ||||
| Integer chartByArea = Integer.valueOf(paramsMap.get("chartByArea")); | |||||
| String startdate = paramsMap.get("startdate"); | String startdate = paramsMap.get("startdate"); | ||||
| String enddate = paramsMap.get("enddate"); | String enddate = paramsMap.get("enddate"); | ||||
| @@ -258,7 +259,11 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| //出租率 | //出租率 | ||||
| if (chart.equals(EnumChart.CZL.getCode())) { | if (chart.equals(EnumChart.CZL.getCode())) { | ||||
| return getRentRate(tenantEntity); | |||||
| if (null != chartByArea) { | |||||
| return getRentRate(tenantEntity,false); | |||||
| }else { | |||||
| return getRentRate(tenantEntity,true); | |||||
| } | |||||
| } | } | ||||
| //租金收缴率 | //租金收缴率 | ||||
| if (chart.equals(EnumChart.ZJSJL.getCode())) { | if (chart.equals(EnumChart.ZJSJL.getCode())) { | ||||
| @@ -2683,17 +2688,29 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| * 出租率 | * 出租率 | ||||
| * @param tenantEntity | * @param tenantEntity | ||||
| */ | */ | ||||
| private ResultData getRentRate(TenantEntity tenantEntity) { | |||||
| private ResultData getRentRate(TenantEntity tenantEntity,boolean byArea) { | |||||
| HashMap<String, Object> datamap = new HashMap<>(); | HashMap<String, Object> datamap = new HashMap<>(); | ||||
| WxShop wxShop = new WxShop(); | |||||
| wxShop.updateTenantInfo(tenantEntity); | |||||
| wxShop.setStatus(EnumShopStatus.RENT.getCode()); | |||||
| List<WxShop> yczlist = wxShopMapper.findList(wxShop); | |||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | |||||
| List<WxShop> wczlist = wxShopMapper.findList(wxShop); | |||||
| //出租与未出租 | //出租与未出租 | ||||
| int yczsize = yczlist.size(); | |||||
| int wczsize = wczlist.size(); | |||||
| int yczsize = 0; | |||||
| int wczsize = 0; | |||||
| if (byArea) { | |||||
| WxShop wxShop = new WxShop(); | |||||
| wxShop.updateTenantInfo(tenantEntity); | |||||
| wxShop.setStatus(EnumShopStatus.RENT.getCode()); | |||||
| yczsize = wxShopMapper.findAreaSum(wxShop).intValue(); | |||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | |||||
| wczsize = wxShopMapper.findAreaSum(wxShop).intValue(); | |||||
| }else { | |||||
| WxShop wxShop = new WxShop(); | |||||
| wxShop.updateTenantInfo(tenantEntity); | |||||
| wxShop.setStatus(EnumShopStatus.RENT.getCode()); | |||||
| List<WxShop> yczlist = wxShopMapper.findList(wxShop); | |||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | |||||
| List<WxShop> wczlist = wxShopMapper.findList(wxShop); | |||||
| yczsize = yczlist.size(); | |||||
| wczsize = wczlist.size(); | |||||
| } | |||||
| int size = yczsize + wczsize; | int size = yczsize + wczsize; | ||||
| if (size == 0) { | if (size == 0) { | ||||
| datamap.put("yczsl", 0); | datamap.put("yczsl", 0); | ||||
| @@ -1280,7 +1280,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| List<Long> couponIds = null; | List<Long> couponIds = null; | ||||
| String title = StringUtils.trimToNull(wxCouponOrder.getTitle()); | String title = StringUtils.trimToNull(wxCouponOrder.getTitle()); | ||||
| if (null != wxCouponOrder.getCouponId() || null != title || null != wxCouponOrder.getType() || null != wxCouponOrder.getBusiness() || null != wxCouponOrder.getSourceType()) { | |||||
| if (null != wxCouponOrder.getCouponId() || null != title || null != wxCouponOrder.getType() || null != wxCouponOrder.getBusiness() || null != wxCouponOrder.getSourceType() | |||||
| || null != wxCouponOrder.getCouponOnlineStartDate() || null != wxCouponOrder.getCouponOnlineEndDate() ) { | |||||
| WxCoupon wxCouponQuery = new WxCoupon(); | WxCoupon wxCouponQuery = new WxCoupon(); | ||||
| wxCouponQuery.updateTenantInfo(wxCouponOrder); | wxCouponQuery.updateTenantInfo(wxCouponOrder); | ||||
| wxCouponQuery.setId(wxCouponOrder.getCouponId()); | wxCouponQuery.setId(wxCouponOrder.getCouponId()); | ||||
| @@ -1288,6 +1289,19 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| wxCouponQuery.setType(wxCouponOrder.getType()); | wxCouponQuery.setType(wxCouponOrder.getType()); | ||||
| wxCouponQuery.setBusiness(wxCouponOrder.getBusiness()); | wxCouponQuery.setBusiness(wxCouponOrder.getBusiness()); | ||||
| wxCouponQuery.setSourceType(wxCouponOrder.getSourceType()); | wxCouponQuery.setSourceType(wxCouponOrder.getSourceType()); | ||||
| if (null != wxCouponOrder.getCouponOnlineStartDate() || null != wxCouponOrder.getCouponOnlineEndDate() ) { | |||||
| WxCouponChannel wxCouponChannelQ = new WxCouponChannel(); | |||||
| wxCouponChannelQ.updateTenantInfo(wxCouponOrder); | |||||
| wxCouponChannelQ.setStartdate(wxCouponOrder.getCouponOnlineStartDate()); | |||||
| wxCouponChannelQ.setEnddate(wxCouponOrder.getCouponOnlineEndDate()); | |||||
| List<Long> ccIds = wxCouponChannelMapper.findCouponIdList(wxCouponChannelQ); | |||||
| if (null == ccIds || ccIds.size() <= 0 ) { | |||||
| wxCouponOrder.setId(-999L); | |||||
| return; | |||||
| }else { | |||||
| wxCouponQuery.setIds(ccIds); | |||||
| } | |||||
| } | |||||
| couponIds = wxCouponMapper.findIdList(wxCouponQuery); | couponIds = wxCouponMapper.findIdList(wxCouponQuery); | ||||
| if (null == couponIds || couponIds.size() <= 0) { | if (null == couponIds || couponIds.size() <= 0) { | ||||
| //throw new MallinkException(ErrorCode.USER_IS_EMPTY.getCode(),"根据券条件搜索不到券信息。"); | //throw new MallinkException(ErrorCode.USER_IS_EMPTY.getCode(),"根据券条件搜索不到券信息。"); | ||||
| @@ -162,6 +162,12 @@ | |||||
| from wx_shop | from wx_shop | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findAreaSum" parameterType="com.iformall.domain.po.WxShop" resultType="Long"> | |||||
| select ifnull(sum(build_area),0) | |||||
| from wx_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectBatchByIds" resultMap="BaseResultMap"> | <select id="selectBatchByIds" resultMap="BaseResultMap"> | ||||
| select | select | ||||