¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.join.PlatformJobJoinMapper; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformBooks; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.PlatformWmsJob; |
| | | import com.doumee.dao.web.reqeust.CarsJobAndContractDTO; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/28 13:42 |
| | | */ |
| | | |
| | | @Api(tags = "ãçæ¿å¤§å±ãååºç©æµè¿è¡è°åº¦çæ¿çå®") |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRunAct") |
| | | public class PlatformJobRunActController extends BaseController { |
| | | |
| | | @Autowired |
| | | private PlatformJobJoinMapper platformJobJoinMapper; |
| | | @Autowired |
| | | private BoardService boardService; |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("æ¥è¯¢æ¬æãæ¬å¹´ç累计åºåºé,åºå
¥åºä»»å¡éãåºå
¥åºä½ä¸æçç»è®¡æ°æ®") |
| | | @GetMapping("/centerData") |
| | | public ApiResponse<PlatformJobRunBoardNewVO> centerData() { |
| | | PlatformJobRunBoardNewVO data = boardService.platformJobCenterData(); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("è¿è¾ä»»å¡åæ") |
| | | @GetMapping("/transportMeasure") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "queryType", value = "æ¥è¯¢ç±»åï¼0=å¨ï¼1=æï¼2=å¹´ï¼", required = true), |
| | | }) |
| | | public ApiResponse<List<TransportMeasureVO>> transportMeasure(@RequestParam Integer queryType) { |
| | | List<TransportMeasureVO> list = boardService.transportMeasure(queryType); |
| | | return ApiResponse.success(list); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("æ±½è½¦ç¶æãç»çº¬åº¦éåæ°æ®") |
| | | @GetMapping("/carsList") |
| | | public ApiResponse<BoardCarsListVO> carsList() { |
| | | BoardCarsListVO data = boardService.platformJobCarsList(); |
| | | 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("彿¥è¿è¾ä»»å¡") |
| | | @GetMapping("/platformJobList") |
| | | public ApiResponse<List<PlatformJob>> platformJobList() { |
| | | List<PlatformJob> list = platformJobJoinMapper.selectJoinList(PlatformJob.class, |
| | | new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(PlatformBooks::getId,PlatformJob::getBookId) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName) |
| | | .selectAs(PlatformWmsJob::getRepertotyAddress,PlatformJob::getRepertotyAddress) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode) |
| | | .leftJoin(PlatformBooks.class,PlatformBooks::getJobId,PlatformJob::getId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus |
| | | ,Constants.PlatformJobStatus.WAIT_CALL.getKey() |
| | | ,Constants.PlatformJobStatus.CALLED.getKey() |
| | | ,Constants.PlatformJobStatus.IN_WAIT.getKey() |
| | | ,Constants.PlatformJobStatus.WORKING.getKey() |
| | | ,Constants.PlatformJobStatus.TRANSFERING.getKey() |
| | | ,Constants.PlatformJobStatus.EXCEPTION.getKey() |
| | | ,Constants.PlatformJobStatus.DONE.getKey() |
| | | ) |
| | | .orderByDesc(PlatformJob::getSignNum) |
| | | .last(" limit 20 ") |
| | | ); |
| | | return ApiResponse.success(list); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("åºå
¥åºä»»å¡é") |
| | | @GetMapping("/jobData") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "queryType", value = "æ¥è¯¢ç±»åï¼0=åºåºï¼1=å
¥åºï¼", required = true), |
| | | }) |
| | | public ApiResponse<JobDataVO> jobData(@RequestParam Integer queryType) { |
| | | Random random = new Random(); |
| | | JobDataVO jobDataVO = new JobDataVO(); |
| | | jobDataVO.setPlanTaskNum(BigDecimal.valueOf(random.nextInt(1000))); |
| | | jobDataVO.setFinishTaskNum(BigDecimal.valueOf(jobDataVO.getPlanTaskNum().intValue())); |
| | | return ApiResponse.success(jobDataVO); |
| | | } |
| | | @LoginNoRequired |
| | | @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); |
| | | } |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("åºåæ
åµ") |
| | | @GetMapping("/stockList") |
| | | public ApiResponse< BoardStockListVO > stockList() { |
| | | BoardStockListVO list = boardService.stockList(); |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | } |