wuyouming666
2024-01-22 2883c25a71cb080258f5e17430ff5ee37c0061c2
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -30,19 +30,21 @@
        String A01glassid2 = spianService.queGlassid("DB103.142", 14).toString();
        String A02glassid1 = spianService.queGlassid("DB103.156", 14).toString();
        String B01glassid = spianService.queGlassid("DB103.184", 14).toString();
        String B02glassid = spianService.queGlassid("DB103.198", 14).toString();
        String B02glassid = spianService.queGlassid("DB103.212", 14).toString();
        List<Short> DeviceList = S7control.getinstance().ReadWord("DB103.0", 10);
        if (types == 0) {// 终止进片任务
            List<StorageTask> cageList = homeMapper.SelectTaskByState(types);
            for (StorageTask storageTask : cageList) {
                // 判断出片任务位置并清除对应玻璃id
                if ((storageTask.getGlassId() == A01glassid1 || storageTask.getGlassId() == A01glassid2)&&DeviceList.get(4)==0) {
                if ((storageTask.getGlassId().equals(A01glassid1)|| storageTask.getGlassId().equals(A01glassid2))&&DeviceList.get(4)==0) {
                    outSliceServive.StopTask(storageTask.getGlassId(), types);
                    ClearGlassId("DB101.10.0");
                } else if (storageTask.getGlassId() == B01glassid&&DeviceList.get(2)==0) {
                }
                if (storageTask.getGlassId().equals(B01glassid)&&DeviceList.get(2)==0) {
                    outSliceServive.StopTask(storageTask.getGlassId(), types);
                    ClearGlassId("DB101.10.2");
                } else if (storageTask.getGlassId() == B02glassid&&DeviceList.get(3)==0) {
                }
                if (storageTask.getGlassId().equals(B02glassid)&&DeviceList.get(3)==0) {
                    ClearGlassId("DB101.10.3");
                    outSliceServive.StopTask(storageTask.getGlassId(), types);
                }
@@ -56,7 +58,6 @@
            }
            for (StorageTask cageList : cageLists) {
                if (cageList.getTaskType().equals("1")) {
                    System.out.println(DeviceList.get(5));
                    if(cageList.getGlassId().equals(A02glassid1)&&DeviceList.get(5)==0){
                        outSliceServive.StopTask(cageList.getGlassId(), types);