From bdb4046a1ed5358a94cc9ce846f2a1ec88e5d5ec Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期二, 18 六月 2024 10:51:57 +0800
Subject: [PATCH] -

---
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java |   42 +++++++++++++++++++++++++++++-------------
 1 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
index 8350814..a83227a 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -214,16 +214,16 @@
     public AjaxResult yzUpdateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) {
         Boolean b = true;
         String result = "1";
-        BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo();
-        getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode());
-        getMaterTwo.setOperationType("2");
-        List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo);
-        List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList());
-        for (String s : collect) {
-            if(s.equals("")){
-//                return AjaxResult.success("鎵弿鏈畬鎴愶紝绂佹鎷х揣鎿嶄綔锛�");
-            }
-        }
+//        BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo();
+//        getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode());
+//        getMaterTwo.setOperationType("2");
+//        List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo);
+//        List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList());
+//        for (String s : collect) {
+//            if(s.equals("")){
+////                return AjaxResult.success("鎵弿鏈畬鎴愶紝绂佹鎷х揣鎿嶄綔锛�");
+//            }
+//        }
         BsFormulaChildInfo listQuery = new BsFormulaChildInfo();
         listQuery.setParamCode(bsFormulaChildInfo.getParamCode());
         listQuery.setProcessesCode(bsFormulaChildInfo.getLocationCode());
@@ -319,7 +319,7 @@
 //                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strA+".RecordDataDone").value(21).build());
 //                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strB+".RecordDataDone").value(21).build());
                         String locationCode = bsFormulaChildInfo.getLocationCode();
-                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+locationCode+".RecordDataDone").value(21).build());
+//                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+locationCode+".RecordDataDone").value(21).build());
                     } catch (Exception e) {
                         throw new RuntimeException(e);
                     }
@@ -373,6 +373,22 @@
     }
 
     @Override
+    public AjaxResult checkMaterialCode(BsFormulaChildInfo bsFormulaChildInfo) {
+        String result = "1";
+        BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo();
+        getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode());
+        getMaterTwo.setOperationType("2");
+        List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo);
+        List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList());
+        for (String s : collect) {
+            if(s.equals("")){
+                result = "2";
+            }
+        }
+        return AjaxResult.success(result);
+    }
+
+    @Override
     public BsFormulaChildInfo releaseCheck(BsFormulaChildInfo bsFormulaChildInfo) {
         return bsFormulaChildInfoMapper.releaseCheck(bsFormulaChildInfo);
     }
@@ -415,7 +431,7 @@
                 if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){
                     try {
                         result = "3";
-                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
+//                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
                     } catch (Exception e) {
                         throw new RuntimeException(e);
                     }
@@ -563,7 +579,7 @@
     //                        List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
     //                        daPassingStationCollections.get(0).setOutboundTime(new Date());
     //                        daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
-                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
+//                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
                             WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT");
                         } catch (Exception e) {
                             throw new RuntimeException(e);

--
Gitblit v1.9.3