#
whycq
2023-06-28 cf2e4086d44e51bcd7407133d460dda498b45eff
#
2个文件已修改
2个文件已添加
82 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Monitor.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Roles.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -12,6 +12,8 @@
import com.zy.asrs.mapper.WrkChargeMapper;
import com.zy.asrs.mapper.WrkMastMapper;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.Monitor;
import com.zy.asrs.utils.Roles;
import com.zy.asrs.utils.Utils;
import com.zy.common.model.LocTypeDto;
import com.zy.common.model.MatDto;
@@ -115,6 +117,7 @@
                }
                Short workNo = staProtocol.getWorkNo();
                Monitor.ledError(100,"测试");
                // 判断是否满足入库条件
                if (staProtocol.isAutoing() && staProtocol.isLoading()
                        && staProtocol.isInEnable()
src/main/java/com/zy/asrs/utils/Monitor.java
New file
@@ -0,0 +1,21 @@
package com.zy.asrs.utils;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.SlaveType;
import com.zy.core.model.Task;
import com.zy.core.thread.LedThread;
public class Monitor {
    public Monitor() {
    }
    public static Boolean ledError(Integer ledId,String errorMsg) {
        LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, ledId);
        if (ledThread != null) {
            MessageQueue.offer(SlaveType.Led, ledId, new Task(3, errorMsg));
        }
        return true;
    }
}
src/main/java/com/zy/asrs/utils/Roles.java
New file
@@ -0,0 +1,57 @@
package com.zy.asrs.utils;
public class Roles {
    public Roles() {}
    // 组托入库判断
    public static Boolean pakinRole(Boolean autoing, Boolean loading, Boolean inEnable,Boolean emptyMk, Boolean pakMk,Short workNo) {
        if (!autoing) {
            System.out.println("输送线无物");
            return false;
        } else if (!loading) {
            System.out.println("输送线无物");
            return false;
        } else if (!inEnable){
            System.out.println("输送线不能入");
            return false;
        } else if (emptyMk) {
            System.out.println("有空板信号");
            return false;
        } else if (!pakMk) {
            System.out.println("锁定标记为False");
            return false;
        } else if (workNo == 0 || (workNo >= 9990 && workNo <= 9999)) {
            System.out.println("当前工作号异常");
            return false;
        } else {
            return true;
        }
    }
    // 拣料、并板、盘点再入库 工作号判断 判断
    public static Boolean pickRole(Boolean autoing, Boolean loading, Boolean inEnable, Boolean pakMk,Short staNo, Short siteId, Short workNo) {
        if (!autoing) {
            System.out.println("输送线无物");
            return false;
        } else if (!loading) {
            System.out.println("输送线无物");
            return false;
        } else if (!inEnable){
            System.out.println("输送线不能入");
            return false;
        }  else if (!pakMk) {
            System.out.println("锁定标记为False");
            return false;
        } else if (workNo <= 0 || (workNo >= 9990 && workNo != 9996)) {
            System.out.println("当前工作号异常");
            return false;
        } else if (!staNo.equals(siteId)) {
            System.out.println("当前站点与目标站不匹配");
            return false;
        } else {
            System.out.println("*****");
            return true;
        }
    }
}
src/main/webapp/views/console.html
@@ -1215,7 +1215,6 @@
            method: 'POST',
            success: function (res) {
                if (res.code === 200){
                    console.log(res)
                    var barcodes = res.data;
                    for (var i = 0; i < barcodes.length; i++){
                        $("#barcode-"+barcodes[i].barcodeId).html(barcodes[i].codeValue ? barcodes[i].codeValue : "--");