| | |
| | | package com.ruoyi.sy.controller; |
| | | |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | import java.util.*; |
| | | import javax.annotation.PostConstruct; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.client.ARDCarGPSLogInClient; |
| | | import com.ruoyi.client.ARDCarSYGPSClient; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.sy.domain.ArdSyUser; |
| | |
| | | |
| | | @Autowired |
| | | private IArdSyUserService iArdSyUserService; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Autowired |
| | | private ISysDeptService sysDeptService; |
| | | |
| | | |
| | | private ArdSyCarController ardSyCarController; |
| | |
| | | break; |
| | | } |
| | | } |
| | | // for(Map<String,String> m : list0){ |
| | | // for(Map<String,String> ma : list1){ |
| | | //根据userId查询部门Id |
| | | SysUser sysUser = sysUserService.selectUserById(usersId); |
| | | Long deptId = sysUser.getDeptId(); |
| | | //根据当前deptId或者当前及所属下级的所有deptId |
| | | List<Long> deptList = sysDeptService.deptIdBySub(deptId); |
| | | //根据dept集合查询出所有对应的车辆列表 |
| | | List<ArdSyCar> carList = ardSyCarService.carIdByDeptList(deptList); |
| | | //对比把匹配到的数据添加到list中 |
| | | for(Map<String,String> m : list){ |
| | | String carId = m.get("carId"); |
| | | for (int i = 0; i < carList.size(); i++) { |
| | | ArdSyCar ardSyCar = carList.get(i); |
| | | if(carId.equals(ardSyCar.getCarId())){ |
| | | m.put("carModel",ardSyCar.getCarModel()); |
| | | m.put("carTypeArd",ardSyCar.getCarType()); |
| | | m.put("carBrand",ardSyCar.getCarBrand()); |
| | | m.put("carPicture",ardSyCar.getCarPicture()); |
| | | } |
| | | } |
| | | // for(Map<String,String> ma :){ |
| | | // if(m.get("carId").equals(ma.get("carId"))){ |
| | | // m.put("stateCn", ma.get("carState")); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | // Collections.sort((List)result0.get("list"),new Comparator<Map<String, Object>>() { |
| | | // @Override |
| | | // public int compare(Map<String, Object> o1, Map<String, Object> o2) { |