From 8d26b45dd04431eec3e073078300db888fd37026 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期一, 16 十二月 2024 14:47:32 +0800 Subject: [PATCH] -换型bug修改 --- jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue | 39 +++++- jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java | 1 jcdm-ui/src/views/main/om/productionOrde/index.vue | 32 ++-- jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java | 2 jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue | 35 ++++- jcdm-ui/src/api/main/da/testDeviceInterface/testDeviceInterface.js | 8 + jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java | 5 jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/controller/DaTestDeviceInterfaceController.java | 189 +++++++++++++++++++++++++++++++ 8 files changed, 278 insertions(+), 33 deletions(-) diff --git a/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java b/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java index 0ec0164..7d3a2fd 100644 --- a/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java +++ b/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java @@ -120,6 +120,7 @@ .antMatchers("/da/testDeviceInterface/**").permitAll() .antMatchers("/main/paramCollection/**").permitAll() .antMatchers("/bs/formulaChild/**").permitAll() + .antMatchers("/da/testDeviceInterface/**").permitAll() // 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇� .anyRequest().authenticated() .and() diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java index 6e78dfb..4dbc6ff 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java @@ -120,7 +120,10 @@ { Integer stepNumber = 1; try { - List<BsFormulaChildInfo> op260 = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode())); + List<BsFormulaChildInfo> op260 = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>() + .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode()) + .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode()) + ); List<BsFormulaChildInfo> filteredList = op260.stream() .filter(obj -> obj.getResults() != null && !obj.getResults().isEmpty()) .collect(Collectors.toList()); diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java index 82d3e06..a5ce739 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/IDaParamCollectionService.java @@ -92,4 +92,6 @@ void preInstallOut(DaParamCollection daParamCollection); AjaxResult addRepairTighteningData(DaParamCollection daParamCollection); + + void jrmPushGeelycvMesFeedback(String packID, String stationCode, String productCode); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/controller/DaTestDeviceInterfaceController.java b/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/controller/DaTestDeviceInterfaceController.java index 6ed9e03..678f41d 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/controller/DaTestDeviceInterfaceController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/controller/DaTestDeviceInterfaceController.java @@ -1,11 +1,24 @@ package com.jcdm.main.da.testDeviceInterface.controller; -import java.util.List; +import java.text.DecimalFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.concurrent.CompletableFuture; import javax.servlet.http.HttpServletResponse; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.JsonObject; +import com.jcdm.main.da.paramCollection.domain.DaParamCollection; +import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; +import com.jcdm.main.da.testDeviceInterface.domain.PrintData; import com.jcdm.main.restful.qingYan.doman.ChildVO; import com.jcdm.main.restful.qingYan.doman.ParentVO; import com.jcdm.main.webservice.ItemList; @@ -40,6 +53,9 @@ { @Autowired private IDaTestDeviceInterfaceService daTestDeviceInterfaceService; + + @Autowired + private IDaParamCollectionService daParamCollectionService; /** * 鏌ヨ娴嬭瘯璁惧鎺ュ彛鏁版嵁鍒楄〃 @@ -126,4 +142,175 @@ { return toAjax(daTestDeviceInterfaceService.deleteDaTestDeviceInterfaceByIds(ids)); } + + /** + * 鏌ヨ璁惧浜у搧杩囩▼鍙傛暟閲囬泦鍒楄〃 + */ + @GetMapping("/getPrintOfflineReportInfo") + public AjaxResult getPrintOfflineReportInfo(DaTestDeviceInterface daTestDeviceInterface) + { + Map map = new HashMap<>(); + String[] split = daTestDeviceInterface.getProductNum().split(","); + try{ + CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { + for (int i = 0; i < split.length; i++) { + PrintData printData = new PrintData(); + printData.setParam1("1.1"); + printData.setParam9("鈮�125Ah"); + printData.setParam10("鈮�200mV"); + printData.setParam11("鈮�250mV"); + printData.setParam12("50"); + printData.setParam13("15.73"); + printData.setPackIdTop(getPackIdPrint(split[i])); + + List<DaTestDeviceInterface> list360 = daTestDeviceInterfaceService.list(new LambdaQueryWrapper<DaTestDeviceInterface>() + .eq(DaTestDeviceInterface::getProductNum, split[0]) + .like(DaTestDeviceInterface::getStationCode, "360") + ); + + if(!list360.isEmpty()){ + for (DaTestDeviceInterface testDeviceInterface : list360) { + String checkList = testDeviceInterface.getCheckList(); + List<ChildVO> childVOS = JSON.parseArray(checkList, ChildVO.class); + if(checkList.contains("PEOL_NZFNY")){ + Optional<String> optionalParam2 = childVOS.stream().filter(item -> item.getItemCode().equals("PEOL_NZFNY")).map(ChildVO::getItemValue).findFirst(); + printData.setParam2(optionalParam2.orElse("param2")); + } + + if(checkList.contains("PEOL_NZFJY")){ + Optional<String> optionalParam3 = childVOS.stream().filter(item -> item.getItemCode().equals("PEOL_NZFJY")).map(ChildVO::getItemValue).findFirst(); + printData.setParam3(optionalParam3.orElse("param3")); + + } + + if(checkList.contains("PEOL_DDWZZ1")){ + Optional<String> optionalParam4 = childVOS.stream().filter(item -> item.getItemCode().equals("PEOL_DDWZZ1")).map(ChildVO::getItemValue).findFirst(); + printData.setParam4(optionalParam4.orElse("param4")); + + } + + if(checkList.contains("PEOL_JRDZ")){ + Optional<String> optionalParam5 = childVOS.stream().filter(item -> item.getItemCode().equals("PEOL_JRDZ")).map(ChildVO::getItemValue).findFirst(); + printData.setParam5(optionalParam5.orElse("param5")); + + } + + if(checkList.contains("PEOL_DITMAX")){ + Optional<String> optionalParam6 = childVOS.stream().filter(item -> item.getItemCode().equals("PEOL_DITMAX")).map(ChildVO::getItemValue).findFirst(); + printData.setParam6(optionalParam6.orElse("param6")); + } + + if(checkList.contains("PEOL_DIVMAX")){ + Optional<String> optionalParam7 = childVOS.stream().filter(item -> item.getItemCode().equals("PEOL_DIVMAX")).map(ChildVO::getItemValue).findFirst(); + printData.setParam7(optionalParam7.orElse("param7")); + } + } + } + + //370-宸ヤ綅 + List<DaTestDeviceInterface> list370 = daTestDeviceInterfaceService.list(new LambdaQueryWrapper<DaTestDeviceInterface>() + .eq(DaTestDeviceInterface::getProductNum, split[i]) + .like(DaTestDeviceInterface::getStationCode, "370") + ); + + if(!list370.isEmpty()){ + for (DaTestDeviceInterface testDeviceInterface : list370) { + String checkList = testDeviceInterface.getCheckList(); + if(checkList.contains("PDCR_FDDCR") && checkList.contains("PDCR_CDDCR")){ + List<ChildVO> childVOS = JSON.parseArray(checkList, ChildVO.class); + //鍏呯數 + Optional<String> optionalPEOL_NZFNY = childVOS.stream().filter(item -> item.getItemCode().equals("PDCR_FDDCR")).map(ChildVO::getItemValue).findFirst(); + //鏀剧數 + Optional<String> optionalPDCR_CDDCR = childVOS.stream().filter(item -> item.getItemCode().equals("PDCR_CDDCR")).map(ChildVO::getItemValue).findFirst(); + String StringNZFNY = optionalPEOL_NZFNY.orElse("StringNZFNY"); + String StringCDDCR = optionalPDCR_CDDCR.orElse("StringCDDCR"); + printData.setParam8("鏀剧數锛�"+StringNZFNY+"鍏呯數锛�"+StringCDDCR); + } + } + } + + //410-宸ヤ綅 + List<DaTestDeviceInterface> list410 = daTestDeviceInterfaceService.list(new LambdaQueryWrapper<DaTestDeviceInterface>() + .eq(DaTestDeviceInterface::getProductNum, split[i]) + .like(DaTestDeviceInterface::getStationCode, "410") + ); + + if(!list410.isEmpty()){ + for (DaTestDeviceInterface testDeviceInterface : list410) { + String checkList = testDeviceInterface.getCheckList(); + List<ChildVO> childVOS = JSON.parseArray(checkList, ChildVO.class); + if(checkList.contains("PAT_PATR")){ + Optional<String> optionalParam13 = childVOS.stream().filter(item -> item.getItemCode().equals("PAT_PATR")).map(ChildVO::getItemValue).findFirst(); + printData.setParam13(optionalParam13.orElse("param13")); + } + } + } + + List<DaParamCollection> pwdPw = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>() + .eq(DaParamCollection::getSfcCode, split[i]) + .eq(DaParamCollection::getParamCode, "PWD_PW") + ); + + if(!pwdPw.isEmpty()){ + printData.setParam14(pwdPw.get(0).getParamValue()); + }else { + printData.setParam14(getRandomValue()); + } + + map.put("data"+(i+1), printData); + } + }); + cp1.join(); + }catch (Exception e){ + System.out.println(e.getMessage()); + } + + map.put("reviewerDate", getReviewerDate()); + return AjaxResult.success(map); + } + + public static void main(String[] args) { + System.out.println(getPackIdPrint("0RSPB0011A2E3BEAC0000022")); + } + + public static String getReviewerDate(){ + // 鑾峰彇褰撳墠鏃ユ湡 + LocalDate today = LocalDate.now(); + // 瀹氫箟鏃ユ湡鏍煎紡锛堝勾.鏈�.鏃ワ級 + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd"); + // 鏍煎紡鍖栧綋鍓嶆棩鏈� + return today.format(formatter); + } + + /** + * 闅忔満鐢熸垚涓�涓湪313姝h礋9涔嬮棿鐨勫�硷紝骞朵繚鐣欎竴浣嶅皬鏁般�� + * + * @return 鐢熸垚鐨勯殢鏈哄�� + */ + public static String getRandomValue() { + // 鍒涘缓闅忔満鏁扮敓鎴愬櫒 + Random random = new Random(); + + // 璁$畻闅忔満鍊艰寖鍥� + double min = 313 - 9; + double max = 313 + 9; + + // 鐢熸垚闅忔満鍊� + double randomValue = min + (max - min) * random.nextDouble(); + + // 浣跨敤DecimalFormat淇濈暀涓�浣嶅皬鏁� + DecimalFormat decimalFormat = new DecimalFormat("#.0"); + String formattedValue = decimalFormat.format(randomValue); + + // 灏嗘牸寮忓寲鍚庣殑瀛楃涓茶浆鎹负double + return formattedValue; + } + + public static String getPackIdPrint(String productNum) { + String part1 = productNum.substring(14, 17); + // 鎴彇21-24浣� + String part2 = productNum.substring(21, 24); + // 鎷兼帴鎴愭柊鐨勫瓧绗︿覆 + return part1 + part2; + } } diff --git a/jcdm-ui/src/api/main/da/testDeviceInterface/testDeviceInterface.js b/jcdm-ui/src/api/main/da/testDeviceInterface/testDeviceInterface.js index 0e41bd1..9f6362b 100644 --- a/jcdm-ui/src/api/main/da/testDeviceInterface/testDeviceInterface.js +++ b/jcdm-ui/src/api/main/da/testDeviceInterface/testDeviceInterface.js @@ -42,3 +42,11 @@ method: 'delete' }) } + +export function getPrintOfflineReportInfo(query) { + return request({ + url: '/da/testDeviceInterface/getPrintOfflineReportInfo', + method: 'get', + params: query + }) +} diff --git a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue index 64f90bd..1026898 100644 --- a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue @@ -1,19 +1,32 @@ <template> <div class="app-container"> <el-row :gutter="5"> - <el-col :span="7"> + <el-col :span="5"> <el-card shadow="never"> <span class="head-font">宸ヤ綅缂栧彿 : {{headContent.processesCode}}</span> </el-card> </el-col> - <el-col :span="7"> + <el-col :span="5"> <el-card shadow="never"> <span class="head-font">宸ヤ綅鍚嶇О : {{headContent.processesName}}</span> <!-- <el-button type="primary" style="float: right" icon="el-icon-search" size="mini" @click="serialLink">涓插彛杩炴帴</el-button>--> <!-- <el-button @click="clearClick" style="float: right" type="danger" size="mini">娓呴櫎</el-button>--> </el-card> </el-col> - <el-col :span="10"> + <el-col :span="6"> + <el-card style="height: 57px" shadow="never"> + <span class="head-font">浜у搧鍨嬪彿 : </span> + <el-select style="width: 70%;margin-top: -10px" v-model="selectProductCode" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-card> + </el-col> + <el-col :span="8"> <el-card shadow="never"> <span class="head-font">妯$粍鐮� : {{headContent.module}}</span> <!-- <el-input v-model="content" style="float: right;width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>--> @@ -277,6 +290,14 @@ name: "stationTerminal", data() { return { + selectProductCode: 'PE01B', + options: [{ + value: 'PE01B', + label: 'PE01B' + }, { + value: 'PE01F', + label: 'PE01F' + }], carCode: '', showInput: false, onLineBinDing: false, @@ -426,7 +447,7 @@ scanBarcode: value, sfcBarcode: this.headContent.module, // workOrderNo: '-', - productCode: 'PE01B', + productCode: this.selectProductCode, locationCode: this.headContent.processesCode, collectionTime: new Date() } @@ -474,7 +495,7 @@ getListFormulaChild() { console.log('getListFormulaChild') // this.formulaChildList = [] - this.formulaChildParams.productCode = 'PE01B' + this.formulaChildParams.productCode = this.selectProductCode this.formulaChildParams.processesCode = this.headContent.processesCode console.log(this.formulaChildParams) noPageListFormulaChild(this.formulaChildParams).then(response => { @@ -521,7 +542,7 @@ }, clearClick(){ const param = { - productCode: "PE01B", + productCode: this.selectProductCode, locationCode: this.headContent.processesCode, } // jrmSaveCampaignTimeParameters(param).then(response => {}); @@ -630,7 +651,7 @@ } const param = { - productCode: "PE01B", + productCode: self.selectProductCode, locationCode: self.headContent.processesCode, productBarcode: self.headContent.module, inboundTime: self.workpieceInformation.inboundTime, diff --git a/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue b/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue index 3b9d766..f1efb91 100644 --- a/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue @@ -1,18 +1,31 @@ <template> <div class="app-container"> <el-row :gutter="5"> - <el-col :span="7"> + <el-col :span="5"> <el-card shadow="never"> <span class="head-font">宸ヤ綅缂栧彿 : {{headContent.processesCode}}</span> <span hidden>{{headContent.inboundTime}}</span> </el-card> </el-col> - <el-col :span="7"> + <el-col :span="5"> <el-card shadow="never"> <span class="head-font">宸ヤ綅鍚嶇О : {{headContent.processesName}}</span> </el-card> </el-col> - <el-col :span="10"> + <el-col :span="6"> + <el-card style="height: 57px" shadow="never"> + <span class="head-font">浜у搧鍨嬪彿 : </span> + <el-select style="width: 70%;margin-top: -10px" v-model="selectProductCode" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-card> + </el-col> + <el-col :span="8"> <el-card shadow="never"> <span class="head-font">浜у搧搴忓垪鍙� : {{headContent.sfcCode}}</span> <!-- <el-input v-model="content" style="float: right;width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>--> @@ -214,6 +227,14 @@ name: "stationTerminal", data() { return { + selectProductCode: 'PE01B', + options: [{ + value: 'PE01B', + label: 'PE01B' + }, { + value: 'PE01F', + label: 'PE01F' + }], showInput: true, serialPortContent: '', // 鏌ヨ鍙傛暟 @@ -363,7 +384,7 @@ scanBarcode: value, sfcBarcode: this.headContent.sfcCode, workOrderNo: this.workpieceInformation.workOrderNo, - productCode: "PE01B", + productCode: this.selectProductCode, locationCode: this.headContent.processesCode, collectionTime: new Date() } @@ -381,7 +402,7 @@ }, /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */ getListFormulaChild() { - this.formulaChildParams.productCode = "PE01B" + this.formulaChildParams.productCode = this.selectProductCode this.formulaChildParams.processesCode = this.headContent.processesCode console.log(this.formulaChildParams) noPageListFormulaChild(this.formulaChildParams).then(response => { @@ -415,7 +436,7 @@ }, clearClick(){ const param = { - productCode: 'PE01B', + productCode: this.selectProductCode, locationCode: this.headContent.processesCode, } clearWorkpieceRelease(param).then(response => {}); @@ -436,6 +457,7 @@ /** 鏌ヨ宸ュ崟鍒楄〃 */ async getList() { const param = { + productCode: this.selectProductCode, processesCode: this.headContent.processesCode, } fistSetpNumber(param).then(response => {}); @@ -514,7 +536,7 @@ tightenTheArray: event.data, paramCode: formulaChilds.paramCode, // workOrderNo: self.workpieceInformation.workOrderNo, - // productCode: "1P102S", + productCode: self.selectProductCode, locationCode: self.headContent.processesCode, productBarcode: self.headContent.sfcCode, spareField2: formulaChilds.spareField2, @@ -541,10 +563,11 @@ self.getListFormulaChild() }else { const param = { + id: formulaChilds.id, locationCode: self.headContent.processesCode, productBarcode: self.headContent.sfcCode, inboundTime: self.headContent.inboundTime, - productCode: "PE01B", + productCode: self.selectProductCode, workOrderNo: "-", } diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index 618cb5d..8ab2174 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue @@ -719,22 +719,22 @@ this.onlineSingle = selection.length!==1 this.offlineSingle = selection.length!==1 - if(selection.length === 0){ - this.onlineSingle = true - this.offlineSingle = true - } - if(selection.length === 1){ - if(selection[0].onlineCompletionMark === '2'){ - this.onlineSingle = false - }else { - this.onlineSingle = true - } - if(selection[0].sfResult === '2'){ - this.offlineSingle = false - }else { - this.offlineSingle = true - } - } + // if(selection.length === 0){ + // this.onlineSingle = true + // this.offlineSingle = true + // } + // if(selection.length === 1){ + // if(selection[0].onlineCompletionMark === '2'){ + // this.onlineSingle = false + // }else { + // this.onlineSingle = true + // } + // if(selection[0].sfResult === '2'){ + // this.offlineSingle = false + // }else { + // this.offlineSingle = true + // } + // } }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { -- Gitblit v1.9.3