自动化立体仓库 - WCS系统
#
yxFwq
2024-11-28 44de068cf2e04fc3e9c6fa7f44e0c1a4d241f989
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
package com.zy.asrs.utils;
 
import com.alibaba.fastjson.JSON;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.SlaveType;
import com.zy.core.model.ErrMsg;
import com.zy.core.model.Task;
import com.zy.core.thread.LedThread;
import lombok.extern.slf4j.Slf4j;
 
@Slf4j
public class LedErrorThreadUtil {
 
    /**
     * 检测货架码
     */
    public static void ledErrorThread(String msg,Integer ledId,String area){
        try{
            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, ledId);
            if (ledThread != null) {
                ErrMsg errMsg1 = new ErrMsg();
                errMsg1.setErrMsg(msg);
                errMsg1.setArea(area);
                MessageQueue.offer(SlaveType.Led, ledId, new Task(5, errMsg1));
            }
        } catch (Exception e){
            log.error("入库失败!电视机信息更新失败!!!ledId:{};msg:{}",ledId, msg);
        }
    }
 
 
}