From 8cfe20288690f2ba46c804f41f39e8aa48c2dea0 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期六, 15 六月 2024 09:08:30 +0800
Subject: [PATCH] 上传逻辑大版本更新

---
 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 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 2f3d4ae..8350814 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
@@ -18,6 +18,8 @@
 import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
 import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
 import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
+import com.jcdm.main.da.paramCollectionTemp.domain.DaParamCollectionTemp;
+import com.jcdm.main.da.paramCollectionTemp.service.IDaParamCollectionTempService;
 import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
 import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
 import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
@@ -71,6 +73,9 @@
 
     @Autowired
     private IDaPassingStationCollectionService daPassingStationCollectionService;
+
+    @Autowired
+    private IDaParamCollectionTempService daParamCollectionTempService;
 
     Map<String, Session> map = WebSocketUsers.getUsers();
 
@@ -327,6 +332,47 @@
     }
 
     @Override
+    public AjaxResult jrmWorkpieceRelease(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);
+        }
+        String[] split = bsFormulaChildInfo.getProductBarcode().split(",");
+        try {
+            for (int i = 0; i < split.length; i++) {
+                daParamCollectionService.pushGeelycvMesFeedback(split[i], bsFormulaChildInfo.getLocationCode());
+                String barCode = bsFormulaChildInfo.getProductBarcode();
+                String locationCode = bsFormulaChildInfo.getLocationCode();
+                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();
+    }
+
+    @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);
+        }
+        return AjaxResult.success();
+    }
+
+    @Override
     public BsFormulaChildInfo releaseCheck(BsFormulaChildInfo bsFormulaChildInfo) {
         return bsFormulaChildInfoMapper.releaseCheck(bsFormulaChildInfo);
     }
@@ -391,6 +437,16 @@
         daParamCollection.setCollectionTime(new Date());
         daParamCollection.setSfcCode(bsFormulaChildInfo.getSfcBarcode());
         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());
+        daParamCollectionTemp.setSfcCode(bsFormulaChildInfo.getSfcBarcode());
+        daParamCollectionTempService.save(daParamCollectionTemp);
     }
 
     public void jrmAddParameterCollection(BsFormulaChildInfo bsFormulaChildInfo){
@@ -413,6 +469,19 @@
             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);
     }
 
     @Override

--
Gitblit v1.9.3