| @@ -51,14 +51,16 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| @Autowired | @Autowired | ||||
| WxBillRentMapper wxBillRentMapper; | WxBillRentMapper wxBillRentMapper; | ||||
| @Autowired | @Autowired | ||||
| WxCouponOrderMapper wxCouponOrderMapper; | WxCouponOrderMapper wxCouponOrderMapper; | ||||
| @Autowired | @Autowired | ||||
| WxCouponChannelMapper wxCouponChannelMapper; | WxCouponChannelMapper wxCouponChannelMapper; | ||||
| @Override | |||||
| public Map<String, Object> queryRunningMobile(String tenantId) { | |||||
| //出租与未出租*********************************************** | |||||
| private Map<String, Object> shopRunning(String tenantId){ | |||||
| WxShop wxShop = new WxShop(); | WxShop wxShop = new WxShop(); | ||||
| wxShop.setTenantId(tenantId); | wxShop.setTenantId(tenantId); | ||||
| wxShop.setStatus(EnumShopStatus.RENT.getCode()); | wxShop.setStatus(EnumShopStatus.RENT.getCode()); | ||||
| @@ -66,9 +68,6 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | ||||
| List<WxShop> unrentedList = wxShopMapper.findList(wxShop); | List<WxShop> unrentedList = wxShopMapper.findList(wxShop); | ||||
| HashMap<String, Object> dataMap = new HashMap<>(); | |||||
| //出租与未出租*********************************************** | |||||
| HashMap<String, Object> shopMap = new HashMap<>(); | HashMap<String, Object> shopMap = new HashMap<>(); | ||||
| int rentedCount = rentedList.size(); | int rentedCount = rentedList.size(); | ||||
| int unrentedCount = unrentedList.size(); | int unrentedCount = unrentedList.size(); | ||||
| @@ -86,10 +85,12 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| shopMap.put("rentedPercent", rentedPercent + "%"); | shopMap.put("rentedPercent", rentedPercent + "%"); | ||||
| shopMap.put("unrentedPercent", unrentedPercent + "%"); | shopMap.put("unrentedPercent", unrentedPercent + "%"); | ||||
| } | } | ||||
| return shopMap; | |||||
| } | |||||
| dataMap.put("shop",shopMap); | |||||
| //租金*********************************************** | |||||
| private Map<String, Object> rentRunning(String tenantId) { | |||||
| //租金*********************************************** | |||||
| HashMap<String, Object> rentMap = new HashMap<>(); | HashMap<String, Object> rentMap = new HashMap<>(); | ||||
| Map<String, Object> params = new HashMap<>(); | Map<String, Object> params = new HashMap<>(); | ||||
| params.put("tenantId", tenantId); | params.put("tenantId", tenantId); | ||||
| @@ -117,10 +118,12 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| rentMap.put("arrearsAmount", 0); | rentMap.put("arrearsAmount", 0); | ||||
| rentMap.put("receivedPercent", "--"); | rentMap.put("receivedPercent", "--"); | ||||
| } | } | ||||
| return rentMap; | |||||
| } | |||||
| dataMap.put("rent",rentMap); | |||||
| //上报解单*********************************************** | |||||
| private Map<String, Object> reportRunning(String tenantId) { | |||||
| //上报*********************************************** | |||||
| HashMap<String, Object> reportMap = new HashMap<>(); | HashMap<String, Object> reportMap = new HashMap<>(); | ||||
| WxMerchant wxMerchant = new WxMerchant(); | WxMerchant wxMerchant = new WxMerchant(); | ||||
| wxMerchant.setTenantId(tenantId); | wxMerchant.setTenantId(tenantId); | ||||
| @@ -145,11 +148,12 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| int reportTotal = tradeList.stream().mapToInt(WxMerchantTradeDaily::getTradeAmt).sum(); | int reportTotal = tradeList.stream().mapToInt(WxMerchantTradeDaily::getTradeAmt).sum(); | ||||
| reportMap.put("reportTotal", reportTotal); | reportMap.put("reportTotal", reportTotal); | ||||
| dataMap.put("report",reportMap); | |||||
| return reportMap; | |||||
| } | |||||
| //今日车流量*********************************************** | |||||
| //今日车流量*********************************************** | |||||
| private Map<String, Object> carRunning(String tenantId) { | |||||
| HashMap<String, Object> carMap = new HashMap<>(); | HashMap<String, Object> carMap = new HashMap<>(); | ||||
| HashMap<Object, Object> paramsCar = new HashMap<>(); | HashMap<Object, Object> paramsCar = new HashMap<>(); | ||||
| paramsCar.put("tenantId", tenantId); | paramsCar.put("tenantId", tenantId); | ||||
| @@ -203,10 +207,12 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| carMap.put("increasedPercentWeek", "--"); | carMap.put("increasedPercentWeek", "--"); | ||||
| } | } | ||||
| dataMap.put("car",carMap); | |||||
| return carMap; | |||||
| } | |||||
| //今日券数据*********************************************** | |||||
| private Map<String, Object> couponRunning(String tenantId) { | |||||
| //今日券数据*********************************************** | |||||
| HashMap<String, Object> couponMap = new HashMap<>(); | HashMap<String, Object> couponMap = new HashMap<>(); | ||||
| Calendar cal = Calendar.getInstance(); | Calendar cal = Calendar.getInstance(); | ||||
| cal.setTime(new Date()); | cal.setTime(new Date()); | ||||
| @@ -228,21 +234,37 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| long couponCount = wxCouponChannelMapper.countCoupon(wxCouponChannel); | long couponCount = wxCouponChannelMapper.countCoupon(wxCouponChannel); | ||||
| couponMap.put("couponCount", couponCount); | couponMap.put("couponCount", couponCount); | ||||
| dataMap.put("coupon",couponMap); | |||||
| return couponMap; | |||||
| } | |||||
| //客流*********************************************** | |||||
| //今日客流*********************************************** | |||||
| private Map<String, Object> visitorRunning(String tenantId) { | |||||
| HashMap<String, Object> visitorMap = new HashMap<>(); | HashMap<String, Object> visitorMap = new HashMap<>(); | ||||
| visitorMap.put("todayCount", 8888); | visitorMap.put("todayCount", 8888); | ||||
| visitorMap.put("increasedPercent", "5%"); | visitorMap.put("increasedPercent", "5%"); | ||||
| visitorMap.put("increasedPercentWeek", "5%"); | visitorMap.put("increasedPercentWeek", "5%"); | ||||
| dataMap.put("visitor",visitorMap); | |||||
| return visitorMap; | |||||
| } | |||||
| //移动端首页 | |||||
| @Override | |||||
| public Map<String, Object> queryRunningMobile(String tenantId) { | |||||
| HashMap<String, Object> dataMap = new HashMap<>(); | |||||
| dataMap.put("shop",shopRunning(tenantId)); | |||||
| dataMap.put("rent",rentRunning(tenantId)); | |||||
| dataMap.put("report",reportRunning(tenantId)); | |||||
| dataMap.put("car",carRunning(tenantId)); | |||||
| dataMap.put("coupon",couponRunning(tenantId)); | |||||
| dataMap.put("visitor",visitorRunning(tenantId)); | |||||
| return dataMap; | return dataMap; | ||||
| } | } | ||||
| @Override | @Override | ||||
| public Map<String, Object> queryRunning(String tenantId) { | public Map<String, Object> queryRunning(String tenantId) { | ||||
| WxShop wxShop = new WxShop(); | WxShop wxShop = new WxShop(); | ||||