doum
22 小时以前 5ffe34a87c27f73bc92b2ac0c58e6894ec61792b
server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java
@@ -1,6 +1,7 @@
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;
@@ -75,9 +76,25 @@
    @ApiOperation("月台自动叫号")
    @PostMapping("/autoPlatformCallCar")
    public ApiResponse autoPlatformCallCar() {
        platformJobService.autoPlatformCallCar(wmsService);
        platformJobService.autoCallInParkCar(wmsService);
        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("月台自动叫号");
    }