| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WrkMastSta; |
| | | import com.zy.asrs.service.WrkMastStaService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.OneLouHangJiaHandler; |
| | | import com.zy.asrs.task.handler.RailwayPlatformHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by Monkey D. Luffy on 2023.09.17 |
| | | * 徐工汉云..............以下.............上饶江铜.............退库拆码垛 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class OneLouHangJiaScheduler { |
| | | |
| | | @Autowired |
| | | private OneLouHangJiaHandler oneLouHangJiaHandler; |
| | | @Autowired |
| | | private WrkMastStaService wrkMastStaService; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | // @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){//退库拆码垛 |
| | | int[] staNos =new int[]{147}; |
| | | // int[] staNos =new int[]{118,119}; |
| | | int[] staNos =new int[]{118}; |
| | | for (int staNo : staNos){ |
| | | ReturnT<String> result = oneLouHangJiaHandler.start(staNo); |
| | | if (result.getCode()==200){ |
| | | break; |
| | | try{ |
| | | WrkMastSta wrkMastSta = wrkMastStaService.selectOne(new EntityWrapper<WrkMastSta>().eq("sta_end",staNo) |
| | | .eq("type", 2).eq("wrk_sts", 0).eq("wrk_type", 2)); |
| | | if (!Cools.isEmpty(wrkMastSta)){ |
| | | break; |
| | | } |
| | | ReturnT<String> result = oneLouHangJiaHandler.start(147,staNo); |
| | | if (result.getCode()==200){ |
| | | break; |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("退库拆码垛"+staNo+"站点处理失败,异常信息:"+e); |
| | | } |
| | | } |
| | | } |