|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginNoRequired; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.haikang.model.cars.response.CarsAlarmResultListResponse; | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.CarsJobAndContractByJobIdDTO; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.join.PlatformJobJoinMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Platform; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Random; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @create 2024/10/28 13:42 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Api(tags = "【看板大屏】园区物流运行调度看板") | 
|---|
|  |  |  | @Api(tags = "【看板大屏】园区物流运行调度看板真实") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRunAct") | 
|---|
|  |  |  | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRun") | 
|---|
|  |  |  | public class PlatformJobRunActController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("运输任务分析") | 
|---|
|  |  |  | @GetMapping("/transportMeasure") | 
|---|
|  |  |  | 
|---|
|  |  |  | List<TransportMeasureVO> list = boardService.transportMeasure(queryType); | 
|---|
|  |  |  | return ApiResponse.success(list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("汽车状态、经纬度集合数据") | 
|---|
|  |  |  | @GetMapping("/carsList") | 
|---|
|  |  |  | 
|---|
|  |  |  | BoardCarsListVO data = boardService.platformJobCarsList(); | 
|---|
|  |  |  | return ApiResponse.success(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("汽车告警事件集合数据") | 
|---|
|  |  |  | @GetMapping("/carsEventList") | 
|---|
|  |  |  | public ApiResponse<List<CarsAlarmResultListResponse>> carsEventList() { | 
|---|
|  |  |  | List<CarsAlarmResultListResponse> data = boardService.carsEventList(); | 
|---|
|  |  |  | return ApiResponse.success(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("根据车牌号查询作业信息和合同信息集合") | 
|---|
|  |  |  | @PostMapping("/getCarsJobDetails") | 
|---|
|  |  |  | public ApiResponse<CarsJobAndContractVO> getCarsJobDetails(@RequestBody CarsJobAndContractDTO param) { | 
|---|
|  |  |  | CarsJobAndContractVO data = boardService.getCarsJobDetails(param); | 
|---|
|  |  |  | return ApiResponse.success(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("根据作业编码查询作业信息和合同信息集合") | 
|---|
|  |  |  | @PostMapping("/getJobDetailsById") | 
|---|
|  |  |  | public ApiResponse<CarsJobAndContractVO> getJobDetailsById(@RequestBody CarsJobAndContractByJobIdDTO param) { | 
|---|
|  |  |  | CarsJobAndContractVO data = boardService.getJobDetailsById(param); | 
|---|
|  |  |  | return ApiResponse.success(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | 
|---|
|  |  |  | ,Constants.PlatformJobStatus.WORKING.getKey() | 
|---|
|  |  |  | ,Constants.PlatformJobStatus.TRANSFERING.getKey() | 
|---|
|  |  |  | ,Constants.PlatformJobStatus.EXCEPTION.getKey() | 
|---|
|  |  |  | ,Constants.PlatformJobStatus.DONE.getKey() | 
|---|
|  |  |  | //                                ,Constants.PlatformJobStatus.DONE.getKey() | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | .orderByDesc(PlatformJob::getSignNum) | 
|---|
|  |  |  | .last(" limit 20 ") | 
|---|
|  |  |  | //                        .last(" limit 20 ") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return ApiResponse.success(list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("今日入库量统计") | 
|---|
|  |  |  | @GetMapping("/totalInList") | 
|---|
|  |  |  | public ApiResponse<List<GeneralVO>> totalInList() { | 
|---|
|  |  |  | List<GeneralVO> list = new ArrayList<>(); | 
|---|
|  |  |  | for (int i = 1; i < 4; i++) { | 
|---|
|  |  |  | Random random = new Random(); | 
|---|
|  |  |  | GeneralVO data = new GeneralVO(); | 
|---|
|  |  |  | data.setName("厂区名称_"+i); | 
|---|
|  |  |  | data.setNum(BigDecimal.valueOf(random.nextInt(1000))); | 
|---|
|  |  |  | list.add(data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<GeneralVO> list = boardService.todayTotalInList(); | 
|---|
|  |  |  | return ApiResponse.success(list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|