| | |
| | | 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.business.vo.LargeScreenDataVO; |
| | | 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 |
| | |
| | | |
| | | @Autowired |
| | | private PlatformReasonService platformReasonService; |
| | | |
| | | @Autowired |
| | | private PlatformWmsJobService platformWmsJobService; |
| | | |
| | | |
| | | |
| | |
| | | return ApiResponse.success(platformBooksService.apply(platformBooksApplyDTO)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("物流车预约修改") |
| | | @PostMapping("/applyEdit") |
| | | public ApiResponse<Integer> applyEdit (@RequestBody PlatformBooksApplyDTO platformBooksApplyDTO , @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | platformBooksApplyDTO.setUserId(loginUserInfo.getMemberId()); |
| | | platformBooksApplyDTO.setDriverId(loginUserInfo.getMemberId()); |
| | | return ApiResponse.success(platformBooksService.edit(platformBooksApplyDTO)); |
| | | } |
| | | |
| | | @ApiOperation("物流车预约记录") |
| | | @PostMapping("/page") |
| | | 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)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /******************************************************司机任务接口************************************************************************/ |
| | | @ApiOperation("任务确认") |
| | | @PostMapping("/confirmTask") |
| | | public ApiResponse confirmTask (@RequestBody ConfirmTaskDTO confirmTaskDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | confirmTaskDTO.setLoginUserInfo(getLoginUser(token)); |
| | | platformJobService.confirmTask(confirmTaskDTO); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | @ApiOperation("任务签到") |
| | | @PostMapping("/signIn") |
| | |
| | | return ApiResponse.success(platformJobService.lineUpDetail(lineUpDetailDTO)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("WMS运输单详情") |
| | | @GetMapping("/wmsJobDetail") |
| | | public ApiResponse<PlatformWmsJob> wmsJobDetail(@RequestParam Integer id) { |
| | | return ApiResponse.success(platformWmsJobService.findByDetailId(id)); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("签到大屏数据") |
| | | @GetMapping("/getLargeScreenData") |
| | | public ApiResponse<LargeScreenDataVO> getLargeScreenData() { |
| | | 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("操作成功"); |
| | | } |
| | | |
| | | } |