| | |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private DriverOnlineMapper driverOnlineMapper; |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSumData") |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end){ |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end) throws Exception { |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(companyId == null && user.getRoleType() != 1){ |
| | |
| | | // } |
| | | // 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()); |
| | | List<Map<String, Object>> list = driverOnlineMapper.queryOnlineDriver(null, null, 1, 9999); |
| | | for (Map<String, Object> stringObjectMap : list) { |
| | | String value1 = redisUtil.getValue("DRIVER" + stringObjectMap.get("id")); |
| | | if(ToolUtil.isEmpty(value1)){ |
| | | continue; |
| | | } |
| | | size++; |
| | | System.err.println("添加-"+value1); |
| | | i++; |
| | | } |
| | | // int size = driverOnlineService.queryOnlineDriverCount(null, null); |
| | | map1.put("netcardriver", size); //在线司机 |