doum
22 小时以前 5ffe34a87c27f73bc92b2ac0c58e6894ec61792b
server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java
@@ -1,6 +1,8 @@
package com.doumee.api;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.utils.Constants;
import com.doumee.service.business.third.WmsService;
import com.doumee.service.business.third.model.ApiResponse;
import com.doumee.service.business.PlatformJobService;
import io.swagger.annotations.Api;
@@ -23,6 +25,9 @@
    @Autowired
    private PlatformJobService platformJobService;
    @Autowired
    private WmsService wmsService;
    @ApiOperation("月台停靠超时报警业务")
@@ -66,4 +71,39 @@
        return ApiResponse.success("月台今日作业外完成通知定时");
    }
    @ApiOperation("月台自动叫号")
    @PostMapping("/autoPlatformCallCar")
    public ApiResponse autoPlatformCallCar() {
        log.error("========月台自动叫号============开始"+System.currentTimeMillis()+"");
        if(Constants.IS_AUTOCALL_WORKING){
            log.error("========月台自动叫号============结束,上一轮作业未结束"+System.currentTimeMillis());
            return ApiResponse.success("月台自动叫号,上一轮作业未结束");
        }
        try {
            Constants.IS_AUTOCALL_WORKING =true;
            platformJobService.autoPlatformCallCar(wmsService);
            platformJobService.autoCallInParkCar(wmsService);
            log.error("========月台自动叫号============完成"+System.currentTimeMillis()+"");
        }catch (Exception e){
            e.printStackTrace();
            log.error("========月台自动叫号============异常"+System.currentTimeMillis()+e.getMessage());
        }finally {
            Constants.IS_AUTOCALL_WORKING =false;
            log.error("========月台自动叫号============结束"+System.currentTimeMillis());
        }
        return ApiResponse.success("月台自动叫号");
    }
//    @ApiOperation("月台自动叫号入园")
//    @PostMapping("/autoCallInParkCar")
//    public ApiResponse autoCallInParkCar() {
//        platformJobService.autoCallInParkCar(wmsService);
//        return ApiResponse.success("月台自动叫号入园");
//    }
}