| | |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.system.timer.LoadingConfigTimer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private LocMastService locMastService; |
| | | |
| | | @Resource |
| | | private LoadingConfigTimer loadingConfigTimer; |
| | | |
| | | // 立体库跑库程序,生产勿用 ,一个巷道放一个托盘 |
| | | // @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | public synchronized void autoMoveLoc() { |
| | | for(int i = 1; i <= 3; i++ ){ |
| | | if(!loadingConfigTimer.getAutoMoveLocTest().equals("Y") ){ |
| | | return; |
| | | } |
| | | for(int i = 1; i <= 2; i++ ){ |
| | | // 源库位 |
| | | LocMast sourceLocMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("crn_no", i)); |
| | | if(sourceLocMast != null) { |
| | | // 获取一个移动的目标库位 |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("crn_no", i).eq("loc_type3", "0") |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("crn_no", i).isNull("loc_type3") |
| | | .eq("loc_sts","O").orderBy("lev1").orderBy("bay1").orderBy("row1")); |
| | | |
| | | if (locMast != null) { |