| | |
| | | package com.ruoyi.sy.controller; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.utils.httpclient.SYCarClient; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.bytedeco.javacv.CanvasFrame; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PostMapping("/getArdSyCarNoRight") |
| | | @ApiOperation("获取未挂接权限的三一车辆") |
| | | public Map<String,Object> getArdSyCarNoRight(){ |
| | | ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
| | | HttpServletRequest request = attributes.getRequest(); |
| | | String userId = request.getHeader("token"); |
| | | String userId = SecurityUtils.getUserId(); |
| | | Map<String,Object> result = ardSyCarService.getArdSyCarNoRight(userId); |
| | | if(((String)result.get("code")).equals("500")){ |
| | | return error((String) result.get("data")); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取全部车辆模型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('sy:syCar:getAllCarModel')") |
| | | @PostMapping("/getAllCarModel") |
| | | @ApiOperation("获取全部车辆模型") |
| | | public Map<String,Object> getAllCarModel(){ |
| | | try{ |
| | | List<Map<String,String>> result = ardSyCarService.getAllCarModel(); |
| | | return toAjaxList(result); |
| | | } catch(Exception e){ |
| | | return toAjaxList(new ArrayList()); |
| | | } |
| | | } |
| | | |
| | | } |