|  |  |  | 
|---|
|  |  |  | package com.doumee.cloud.web; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cn.hutool.http.useragent.Platform; | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginNoRequired; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageData; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.core.utils.DateUtil; | 
|---|
|  |  |  | import com.doumee.dao.business.model.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.dao.web.reqeust.*; | 
|---|
|  |  |  | import com.doumee.dao.web.response.DriverHomeVO; | 
|---|
|  |  |  | import com.doumee.dao.web.response.LineUpVO; | 
|---|
|  |  |  | import com.doumee.dao.web.response.MemberVO; | 
|---|
|  |  |  | import com.doumee.dao.web.response.VisitRecordVO; | 
|---|
|  |  |  | import com.doumee.service.business.*; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/driverPlatform") | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | //@LoginNoRequired | 
|---|
|  |  |  | public class DriverPlatformController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse<PageData<PlatformBooks>> findPage (@RequestBody PageWrap<PlatformBooks> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | LoginUserInfo loginUserInfo = this.getLoginUser(token); | 
|---|
|  |  |  | pageWrap.getModel().setQueryDate(DateUtil.getBeforDay(new Date(),30)); | 
|---|
|  |  |  | pageWrap.getModel().setDriverPhone(loginUserInfo.getMobile()); | 
|---|
|  |  |  | pageWrap.getModel().setDriverId(loginUserInfo.getMemberId()); | 
|---|
|  |  |  | return ApiResponse.success(platformBooksService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(platformJobService.getLargeScreenData()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @ApiOperation("月台任务测试定时方法") | 
|---|
|  |  |  | @GetMapping("/testTimer") | 
|---|
|  |  |  | public ApiResponse testTimer(Integer type) { | 
|---|
|  |  |  | if(Constants.equalsInteger(type ,1)){ | 
|---|
|  |  |  | platformJobService.timeOutWork(); | 
|---|
|  |  |  | }else if(Constants.equalsInteger(type ,2)){ | 
|---|
|  |  |  | platformJobService.timeOutCallIn(); | 
|---|
|  |  |  | }else if(Constants.equalsInteger(type ,3)){ | 
|---|
|  |  |  | platformJobService.timeOutReport(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|