自动化立体仓库 - WMS系统
LSH
2024-03-25 bcdcebacdd2b58397c5f00f28983ad36e67ce9fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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;
            }
        }
    }
 
}