严智鑫
2024-10-12 84ea4ef19e5a4945f336dfdd788081510477dfc1
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/CacheGlassTask.java
@@ -94,7 +94,7 @@
    public static String engineerId = "";
    @Scheduled(fixedDelay = 1000)
    //@Scheduled(fixedDelay = 1000)
    public void plcHomeEdgTask() {
        Date startDate = new Date();
        log.info("本次任务开始执行时间:{}", startDate);
@@ -124,8 +124,9 @@
            log.info("2、获取到的请求字不为0,将确认字不为0,直接结束");
            return;
        }
        if ("1".equals(taskRequestTypeValue)) {
            log.info("2、进片请求,且确认字为0,执行进片任务");
        boolean result = edgStorageCageDetailsService.inToVerify(glassIdeValue);
        if ("1".equals(taskRequestTypeValue)&&result) {
            log.info("2、进片请求,且确认字为0,执行进片任务,扫码重复ID验证【有重复=false,无重复=true】:{}",result);
            inTo(glassIdeValue, confirmationWrodAddress, currentSlot);
        } else if ("2".equals(taskRequestTypeValue)) {
            //09空闲 :1      10空闲 :2        都空闲:3    其他0
@@ -137,8 +138,8 @@
            //加笼子里面是否有玻璃,有先出,无玻璃先进
            boolean outFlase = outTo(Integer.parseInt(out08Glassstate),
                    Integer.parseInt(out10Glassstate), confirmationWrodAddress, glassIdeValue, Integer.parseInt(currentSlot));
            log.info("出片任务是否完成:{},且玻璃id:{}不为空则执行进片任务", outFlase, glassIdeValue);
            if (!outFlase && StringUtils.isNotBlank(glassIdeValue)) {
            log.info("出片任务是否完成:{},且玻璃id:{}不为空则执行进片任务,扫码重复ID验证【有重复=false,无重复=true】:{}", outFlase, glassIdeValue,result);
            if (!outFlase && StringUtils.isNotBlank(glassIdeValue)&&result) {
                inTo(glassIdeValue, confirmationWrodAddress, currentSlot);
            }
        }
@@ -210,13 +211,6 @@
        S7object.getinstance().plccontrol.writeWord(confirmationWrodAddress, 1);
        log.info("7、发送确认字完成");
        Damage damage=new Damage();
        damage.setGlassId(glassInfo.getGlassId());
        damage.setWorkingProcedure("切割");
        damage.setLine(1001);
        damage.setType(1);
        damage.setRemark("进卧式理片");
        damageService.insertDamage(damage);
    }
@@ -665,7 +659,7 @@
            damage.setWorkingProcedure("切割");
            damage.setLine(1001);
            damage.setType(1);
            damage.setRemark("进卧式理片");
            damage.setRemark("过卧式理片");
            damageService.insertDamage(damage);
            return Boolean.TRUE;
        }