Pu Zhibing
2025-04-17 f4e12a183070e9fc1db174dfb7f1c9a59f7763a1
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/HomeController.java
@@ -21,6 +21,7 @@
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.*;
@@ -86,13 +87,13 @@
    }
    @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){
@@ -151,12 +152,14 @@
//        }
//        String value = redisUtil.getValues(keys.substring(0, keys.length() - 1));
        int size = 0;
//        List<Map<String, Object>> list = driverOnlineMapper.queryOnlineDriver(null, null, 1, 9999);
        System.err.println("执行queryOnlineDriver========》"+tDrivers);
        for(TDriver tDriver : tDrivers){
            Map<String, Object> d = new HashMap<>();
            String value1 = redisUtil.getValue("DRIVER" + tDriver.getId());
            if(ToolUtil.isEmpty(value1)){
                continue;
            }
            System.err.println("添加-"+value1);
            size++;
        }
//        int size = driverOnlineService.queryOnlineDriverCount(null, null);
@@ -397,7 +400,7 @@
        if(companyId == null && user.getRoleType() != 1){
            companyId = user.getObjectId();
        }
        Wrapper<TDriver> ne = new EntityWrapper<TDriver>().eq("authState", 2).eq("state", 2).ne("flag", 3);
        Wrapper<TDriver> ne = new EntityWrapper<TDriver>().eq("authState", 2).ne("state", 1).ne("flag", 3);
        if(companyId != null){
            ne.eq("companyId", companyId).or().eq("franchiseeId", companyId);
        }