|  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.JSON; | 
|---|
|  |  |  | import com.github.pagehelper.PageHelper; | 
|---|
|  |  |  | import com.github.pagehelper.PageInfo; | 
|---|
|  |  |  | 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.ArdSyCarVo; | 
|---|
|  |  |  | import com.ruoyi.sy.domain.ArdSyUser; | 
|---|
|  |  |  | import com.ruoyi.sy.gps31.PositionContainer; | 
|---|
|  |  |  | import com.ruoyi.sy.gps31.PushClientImplAlarm; | 
|---|
|  |  |  | 
|---|
|  |  |  | ardSyCarController = this; | 
|---|
|  |  |  | ardSyCarController.sysConfigService = this.sysConfigService; | 
|---|
|  |  |  | ardSyCarController.iArdSyUserService = this.iArdSyUserService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | SysConfig config = new SysConfig(); | 
|---|
|  |  |  | config.setConfigKey("syCarPT"); | 
|---|
|  |  |  | List<SysConfig> sysConfigResult = sysConfigService.selectConfigList(config); | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('sy:syCar:list')") | 
|---|
|  |  |  | @GetMapping("/list") | 
|---|
|  |  |  | public TableDataInfo list(ArdSyCar ardSyCar) | 
|---|
|  |  |  | @ApiOperation("鏌ヨ涓変竴杞﹁締鍒楄〃") | 
|---|
|  |  |  | public AjaxResult list(ArdSyCar ardSyCar) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | startPage(); | 
|---|
|  |  |  | if(ardSyCar.getPageNum()==null || ardSyCar.getPageNum() == 0){ | 
|---|
|  |  |  | ardSyCar.setPageNum(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(ardSyCar.getPageSize()==null || ardSyCar.getPageSize() == 0){ | 
|---|
|  |  |  | ardSyCar.setPageSize(10); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PageHelper.startPage(ardSyCar.getPageNum(),ardSyCar.getPageSize()); | 
|---|
|  |  |  | List<ArdSyCar> list = ardSyCarService.selectArdSyCarList(ardSyCar); | 
|---|
|  |  |  | return getDataTable(list); | 
|---|
|  |  |  | String userId = SecurityUtils.getUserId(); | 
|---|
|  |  |  | Map<String,Object> result = ardSyCarService.getArdSyCarAll(userId); | 
|---|
|  |  |  | List<ArdSyCarVo> ardSyCarVoList = new ArrayList<>(); | 
|---|
|  |  |  | if(((String)result.get("code")).equals("200")){ | 
|---|
|  |  |  | List<Map<String,Object>> list1 = (List<Map<String, Object>>) result.get("data"); | 
|---|
|  |  |  | for (int i = 0; i < list.size(); i++) { | 
|---|
|  |  |  | ArdSyCar ardSyCar1 = list.get(i); | 
|---|
|  |  |  | String carId = ardSyCar1.getCarId(); | 
|---|
|  |  |  | for (int j = 0; j < list1.size(); j++) { | 
|---|
|  |  |  | String carId31 = (String) list1.get(j).get("carId"); | 
|---|
|  |  |  | if(carId.equals(carId31)){ | 
|---|
|  |  |  | ArdSyCarVo ardSyCarVo = new ArdSyCarVo(); | 
|---|
|  |  |  | ardSyCarVo.setCarId(carId); | 
|---|
|  |  |  | ardSyCarVo.setCarBrand(ardSyCar1.getCarBrand()); | 
|---|
|  |  |  | ardSyCarVo.setCarModel(ardSyCar1.getCarModel()); | 
|---|
|  |  |  | ardSyCarVo.setCarPicture(ardSyCar1.getCarPicture()); | 
|---|
|  |  |  | ardSyCarVo.setCarType(ardSyCar1.getCarType()); | 
|---|
|  |  |  | ardSyCarVo.setDeptId(ardSyCar1.getDeptId()); | 
|---|
|  |  |  | ardSyCarVo.setRemark(ardSyCar1.getRemark()); | 
|---|
|  |  |  | ardSyCarVo.setCarPlate((String) list1.get(j).get("carPlate")); | 
|---|
|  |  |  | ardSyCarVoList.add(ardSyCarVo); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return AjaxResult.success(new PageInfo<>(ardSyCarVoList)); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return AjaxResult.success(new PageInfo<>(list)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|