From 4e83fa344f6cba81412fb354e7f32a88a8f34fde Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期二, 09 七月 2024 09:39:11 +0800
Subject: [PATCH] -切换大模组代码更改

---
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java |  122 +++++++---------------------------------
 1 files changed, 22 insertions(+), 100 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 3221f31..38654eb 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
@@ -338,6 +338,8 @@
 //                        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();
+                        WebSocketUsers.sendMessageToUserByText(map.get(locationCode), "OUT");
+
 //                        miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+locationCode+".RecordDataDone").value(21).build());
                     } catch (Exception e) {
                         throw new RuntimeException(e);
@@ -353,54 +355,12 @@
     @Override
     public AjaxResult jrmWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
         this.clearCollectDataAndResultsByProcessesCode(bsFormulaChildInfo);
-//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
-//                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
-//                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
-//        for (BsFormulaChildInfo info : list) {
-//            info.setCollectData("");
-//            info.setResults("");
-//            bsFormulaChildInfoService.saveOrUpdate(info);
-//        }
-        String[] split = bsFormulaChildInfo.getProductBarcode().split(",");
-        try {
-            for (int i = 0; i < split.length; i++) {
-                daParamCollectionService.pushGeelycvMesFeedback(split[i], bsFormulaChildInfo.getLocationCode());
-
-                String barCode = split[i];
-                String locationCode = bsFormulaChildInfo.getLocationCode();
-
-                if(StringUtils.isNotBlank(locationCode)&&StringUtils.isNotBlank(barCode)){
-                    DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
-                    daPassingStationCollection.setOutRsSign("1");
-                    daPassingStationCollection.setOutboundTime(new Date());
-                    daPassingStationCollection.setSfcCode(barCode);
-                    daPassingStationCollection.setLocationCode(locationCode);
-                    int updateDaPassingStation = daPassingStationCollectionService.updateDaPassingStationCollectionBySfcCodeAndLocationCode(daPassingStationCollection);
-                    logger.info("鍔犵儹鑶滀汉宸ュ伐浣嶆洿鏂拌繃绔欒褰晆pdateDaPassingStationCollectionBySfcCodeAndLocationCode:鏇存柊浜唟}鏉℃暟鎹�-鏇存柊鏉′欢pack鐮亄}-宸ヤ綅{}",updateDaPassingStation,barCode,locationCode);
-                }
-
-//                DaPassingStationCollection passingStationCollectionOne = daPassingStationCollectionService.getOne(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getSfcCode, barCode).eq(DaPassingStationCollection::getLocationCode, locationCode));
-//                if (passingStationCollectionOne != null) {
-//                    passingStationCollectionOne.setOutRsSign("1");
-//                    passingStationCollectionOne.setOutboundTime(new Date());
-//                    daPassingStationCollectionService.saveOrUpdate(passingStationCollectionOne);
-//                }
-            }
-        }catch (Exception e){
-        }
+        daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode());
         return AjaxResult.success();
     }
 
     @Override
     public AjaxResult clearWorkpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
-//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
-//                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
-//                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
-//        for (BsFormulaChildInfo info : list) {
-//            info.setCollectData("");
-//            info.setResults("");
-//            bsFormulaChildInfoService.saveOrUpdate(info);
-//        }
         this.clearCollectDataAndResultsByProcessesCode(bsFormulaChildInfo);
         return AjaxResult.success();
     }
@@ -518,71 +478,33 @@
 
     public void jrmAddParameterCollection(BsFormulaChildInfo bsFormulaChildInfo){
         String scanBarCode = bsFormulaChildInfo.getSfcBarcode();
-        String[] modeleSplit = scanBarCode.split(",");
-//        for (String modele : modeleSplit) {
-            DaParamCollection daParamCollection = new DaParamCollection();
-            daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode());
-            daParamCollection.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
-            daParamCollection.setLocationCode(bsFormulaChildInfo.getLocationCode());
-            daParamCollection.setParamValue(bsFormulaChildInfo.getParamValue());
-            daParamCollection.setProductCode(bsFormulaChildInfo.getProductCode());
-            daParamCollection.setCollectionTime(new Date());
-            if(bsFormulaChildInfo.getParamCode().contains("B")){
-                daParamCollection.setSfcCode(modeleSplit[1]);
-            }else {
-                daParamCollection.setSfcCode(modeleSplit[0]);
-            }
-//            daParamCollection.setSfcCode(modele);
-            daParamCollectionMapper.insertDaParamCollection(daParamCollection);
-//        }
+        DaParamCollection daParamCollection = new DaParamCollection();
+        daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode());
+        daParamCollection.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
+        daParamCollection.setLocationCode(bsFormulaChildInfo.getLocationCode());
+        daParamCollection.setParamValue(bsFormulaChildInfo.getParamValue());
+        daParamCollection.setProductCode(bsFormulaChildInfo.getProductCode());
+        daParamCollection.setCollectionTime(new Date());
+        daParamCollection.setSfcCode(scanBarCode);
+        daParamCollectionMapper.insertDaParamCollection(daParamCollection);
 
-            DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
-            daParamCollectionTemp.setParamCode(bsFormulaChildInfo.getParamCode());
-            daParamCollectionTemp.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
-            daParamCollectionTemp.setLocationCode(bsFormulaChildInfo.getLocationCode());
-            daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
-            daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
-            daParamCollectionTemp.setCollectionTime(new Date());
-            if(bsFormulaChildInfo.getParamCode().contains("B")){
-                daParamCollectionTemp.setSfcCode(modeleSplit[1]);
-            }else {
-                daParamCollectionTemp.setSfcCode(modeleSplit[0]);
-            }
-            daParamCollectionTempService.save(daParamCollectionTemp);
+        DaParamCollectionTemp daParamCollectionTemp = new DaParamCollectionTemp();
+        daParamCollectionTemp.setParamCode(bsFormulaChildInfo.getParamCode());
+        daParamCollectionTemp.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo());
+        daParamCollectionTemp.setLocationCode(bsFormulaChildInfo.getLocationCode());
+        daParamCollectionTemp.setParamValue(bsFormulaChildInfo.getParamValue());
+        daParamCollectionTemp.setProductCode(bsFormulaChildInfo.getProductCode());
+        daParamCollectionTemp.setCollectionTime(new Date());
+        daParamCollection.setSfcCode(scanBarCode);
+
+        daParamCollectionTempService.save(daParamCollectionTemp);
     }
 
     @Override
     public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) {
         this.clearCollectDataAndResultsByProcessesCode(bsFormulaChildInfo);
-//        List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
-//                .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode())
-//                .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()));
-//        for (BsFormulaChildInfo info : list) {
-//            info.setCollectData("");
-//            info.setResults("");
-//            bsFormulaChildInfoService.saveOrUpdate(info);
-//        }
         try {
             daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode());
-//            String barCode = bsFormulaChildInfo.getProductBarcode();
-//            String locationCode = bsFormulaChildInfo.getLocationCode();
-//
-//            if(StringUtils.isNotBlank(locationCode)&&StringUtils.isNotBlank(barCode)){
-//                DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
-//                daPassingStationCollection.setOutRsSign("1");
-//                daPassingStationCollection.setOutboundTime(new Date());
-//                daPassingStationCollection.setSfcCode(barCode);
-//                daPassingStationCollection.setLocationCode(locationCode);
-//                int updateDaPassingStation = daPassingStationCollectionService.updateDaPassingStationCollectionBySfcCodeAndLocationCode(daPassingStationCollection);
-//                logger.info("鏅�氫汉宸ュ伐浣嶆洿鏂拌繃绔欒褰晆pdateDaPassingStationCollectionBySfcCodeAndLocationCode:鏇存柊浜唟}鏉℃暟鎹�-鏇存柊鏉′欢pack鐮亄}-宸ヤ綅{}",updateDaPassingStation,barCode,locationCode);
-//            }
-
-//            DaPassingStationCollection passingStationCollectionOne = daPassingStationCollectionService.getOne(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getSfcCode, barCode).eq(DaPassingStationCollection::getLocationCode, locationCode));
-//            if (passingStationCollectionOne != null) {
-//                passingStationCollectionOne.setOutRsSign("1");
-//                passingStationCollectionOne.setOutboundTime(new Date());
-//                daPassingStationCollectionService.saveOrUpdate(passingStationCollectionOne);
-//            }
         }catch (Exception e){
         }
         return AjaxResult.success();

--
Gitblit v1.9.3