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 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
|
* 徐工汉云..............以下.............上饶江铜.............退库拆码垛
|
*/
|
@Component
|
public class OneLouHangJiaScheduler {
|
|
@Autowired
|
private OneLouHangJiaHandler oneLouHangJiaHandler;
|
@Autowired
|
private WrkMastStaService wrkMastStaService;
|
|
@Scheduled(cron = "0/3 * * * * ? ")
|
private void execute(){//退库拆码垛
|
// int[] staNos =new int[]{118,119};
|
int[] staNos =new int[]{118};
|
for (int staNo : staNos){
|
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;
|
}
|
}
|
}
|
|
}
|