*
lsh
2025-03-20 20d07cb3380f9fc6553b710fa35f6bc969a95445
src/main/java/com/zy/asrs/controller/MonitorController.java
@@ -57,14 +57,14 @@
            for (DevpSlave.Sta inSta : devp.getDriveSta()) {
                if (inSta.getStaNo().equals(palletizingNo)){
                    SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 2);
                    StaProtocol staProtocol = devpThread.getStation().get(inSta);
                    if (staProtocol == null) {
                    StaProtocol staProtocolPall = devpThread.getStation().get(palletizingNo);
                    if (staProtocolPall == null) {
                        continue;
                    } else {
                        staProtocol = staProtocol.clone();
                        staProtocolPall = staProtocolPall.clone();
                    }
                    if (!staProtocol.isAutoing() || !staProtocol.isLoading() || staProtocol.getWorkNo() != 0 || !staProtocol.isPakMk()){
                    if (!staProtocolPall.isAutoing() || !staProtocolPall.isLoading() || staProtocolPall.getWorkNo() != 0 || !staProtocolPall.isPakMk()){
                        return R.error("未就绪!!!");
                    }
@@ -77,7 +77,7 @@
                    if (!Cools.isEmpty(barcode)) {
//                    log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode);
                        if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode)) {
                        if ("NG".endsWith(barcode) || "NoRead".equals(barcode) || "00000000".equals(barcode) || "000000".equals(barcode)) {
                            barcode = "";
                        }
                    } else {
@@ -88,6 +88,9 @@
        }
//        Calendar calendar = Calendar.getInstance();
//        calendar.setTime(now);
        if (Cools.isEmpty(barcode) || barcode.equals("")){
            return R.error("未就绪!!!托盘条码为空!!!请检查!!!");
        }
        return R.ok(
                Cools.add("barcode", barcode).add("Date",now)
        );
@@ -356,9 +359,10 @@
    @GetMapping("/led/useInfo")
    public R monitorLedUseInfo(@RequestParam("ledId") Integer ledId) {
        Integer count1 = wrkDetlService.count1();
        Integer count11 = wrkDetlService.count11();
        Integer count3 = wrkDetlService.count3();
        Map<String, Object> map = new HashMap<>();
        map.put("count1", count1);
        map.put("count1", count1+count11);
        map.put("count2", count3);
        return R.ok().add(map);
    }