From 537bfb7e43c78d5b3b98ba8a135b638f0461ea60 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期日, 20 十月 2024 15:50:30 +0800
Subject: [PATCH] 优化

---
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 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 aa89119..43593d8 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
@@ -528,17 +528,19 @@
     @Override
     public AjaxResult updateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) {
         Boolean b = true;
-        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.error("鎵爜鏈畬鎴愶紝绂佹鎷х揣鎿嶄綔锛�");
+        if(!"OP100".equals(bsFormulaChildInfo.getLocationCode())){
+            BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo();
+            getMaterTwo.setProductCode(bsFormulaChildInfo.getProductCode());
+            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.error("鎵爜鏈畬鎴愶紝绂佹鎷х揣鎿嶄綔锛�");
+                }
             }
         }
-
         //娣诲姞鎷х揣鍙傛暟-鍙傛暟閲囬泦琛�
         DaParamCollection daParamCollection = new DaParamCollection();
         daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode());
@@ -590,7 +592,7 @@
     //                        List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
     //                        daPassingStationCollections.get(0).setOutboundTime(new Date());
     //                        daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
-                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare +"."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build());
+                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare +"."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(11).build());
                             WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT");
                         } catch (Exception e) {
                             throw new RuntimeException(e);

--
Gitblit v1.9.3