| | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.DriverOnlineMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private DriverOnlineMapper driverOnlineMapper; |
| | | @ResponseBody |
| | | @PostMapping("/getSumData") |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end){ |
| | |
| | | ne1.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | List<TDriver> tDrivers = tDriverService.selectList(ne1); |
| | | String keys = ""; |
| | | for(TDriver driver : tDrivers){ |
| | | keys += "DRIVER" + driver.getId() + ","; |
| | | // String keys = ""; |
| | | // for(TDriver driver : tDrivers){ |
| | | // keys += "DRIVER" + driver.getId() + ","; |
| | | // } |
| | | // String value = redisUtil.getValues(keys.substring(0, keys.length() - 1)); |
| | | int size = 0; |
| | | for(TDriver tDriver : tDrivers){ |
| | | Map<String, Object> d = new HashMap<>(); |
| | | String value1 = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value1)){ |
| | | continue; |
| | | } |
| | | size++; |
| | | } |
| | | String value = redisUtil.getValues(keys.substring(0, keys.length() - 1)); |
| | | JSONArray jsonArray = JSON.parseArray(value); |
| | | int size = driverOnlineService.queryOnlineDriverCount(null, null); |
| | | // int size = driverOnlineService.queryOnlineDriverCount(null, null); |
| | | map1.put("netcardriver", size); //在线司机 |
| | | |
| | | Wrapper<TOrderTaxi> travelTime1 = new EntityWrapper<TOrderTaxi>().between("travelTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | travelTime1.eq("companyId", companyId); |