| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.stylefeng.guns.modular.crossCity.server.ILineShiftDriverService; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.DriverShiftListWarpper; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.LineShiftItemWarpper; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.ScanOrderDetailWarpper; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.SystemException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 【202601】城际专线排班控制器 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 【202604】获取司机城际专线排班列表 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryMyDriverShiftList") |
| | | @ApiOperation(value = "【202604】获取司机城际专线排班列表", tags = {"司机端-首页"}, notes = "获取司机在今天之后(包含今天)的城际专线排班信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "日期(yyyy-MM-dd),默认无", name = "date", required = false, dataType = "String"), |
| | | @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "页条数", name = "size", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<LineShiftItemWarpper>> queryMyDriverShiftList(String date, int pageNum, int size, HttpServletRequest request) { |
| | | try { |
| | | Integer driverId = driverService.getUserIdFormRedis(request); |
| | | if (null == driverId) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | List<LineShiftItemWarpper> result = lineShiftDriverService.queryMyDriverShiftList(driverId, date, pageNum, size); |
| | | return ResultUtil.success(result); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 验证日期有效性 |
| | | * @param dateStr |
| | | * @return |