jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -198,6 +198,7 @@ @Override public AjaxResult yzUpdateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) { Boolean b = true; String result = "1"; BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); @@ -206,44 +207,61 @@ List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList()); for (String s : collect) { if(s.equals("")){ return AjaxResult.error("æ«ææªå®æï¼ç¦æ¢æ§ç´§æä½ï¼"); // return AjaxResult.success("æ«ææªå®æï¼ç¦æ¢æ§ç´§æä½ï¼"); } } BsFormulaChildInfo listQuery = new BsFormulaChildInfo(); listQuery.setParamCode(bsFormulaChildInfo.getParamCode()); String paramCode = bsFormulaChildInfo.getTightenTheArray(); if(paramCode.contains("N")){ result = "3"; List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); bsFormulaChildInfos.get(0).setResults("NG"); bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); return AjaxResult.error("æ«æç»æNG,请éæ°æ«æï¼"); // return AjaxResult.success("æ«æç»æNG,请éæ°æ«æï¼"); }else { List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); bsFormulaChildInfos.get(0).setResults("OK"); bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort()); try { miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build()); } catch (Exception e) { throw new RuntimeException(e); if(bsFormulaChildInfos.get(0).getSpareField2()!=null&&bsFormulaChildInfos.get(0).getSpareField3()!=null){ String tightenArray = bsFormulaChildInfo.getTightenTheArray().replace("[", "").replace("]", "").replace(" ", ""); String[] tightenDataParts = tightenArray.split(","); b = TimeUtil.isNumberInRange(Double.parseDouble(tightenDataParts[0]),Double.parseDouble(bsFormulaChildInfos.get(0).getSpareField2()),Double.parseDouble(bsFormulaChildInfos.get(0).getSpareField3())); } if(b){ result = "3"; bsFormulaChildInfos.get(0).setResults("OK"); bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); String spareField4 = bsFormulaChildInfos.get(0).getSpareField4(); if (spareField4 != null && !spareField4.isEmpty()) { // æ§è¡æä½ if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){ try { Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort()); try { miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build()); } catch (Exception e) { throw new RuntimeException(e); } String spareField4 = bsFormulaChildInfos.get(0).getSpareField4(); if (spareField4 != null && !spareField4.isEmpty()) { // æ§è¡æä½ if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){ try { // WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT"); result = "2"; } catch (Exception e) { throw new RuntimeException(e); result = "2"; } catch (Exception e) { throw new RuntimeException(e); } } } }else { result = "3"; List<BsFormulaChildInfo> bsFormulaChildInfos1 = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); bsFormulaChildInfos1.get(0).setResults("NG"); String originalString = bsFormulaChildInfo.getTightenTheArray(); String modifiedString = originalString.replaceFirst("OK", "NG"); bsFormulaChildInfos1.get(0).setCollectData(modifiedString); bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos1.get(0)); // return AjaxResult.success("æ«æç»æNG,请éæ°æ«æï¼"); } } return AjaxResult.success(result); } jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/controller/DaParamCollectionController.java
@@ -45,9 +45,9 @@ * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 */ @GetMapping("/testput") public void testput() public void testput(@RequestBody DaParamCollection daParamCollection) { daParamCollectionService.pushGeelycvMesFeedback("0RSPB001139E3AE5B0000054","OP240"); daParamCollectionService.pushGeelycvMesFeedback("0RSPB0011A2E3AE5P0000001","OP460"); } /** jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -389,8 +389,8 @@ public void sendToFactoryMes(String stationCode,String productNum ){ String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; // String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; ParentVO vo =new ParentVO(); List<ChildVO> checkList = new ArrayList<>(); List<DaParamCollection> list = this.list(new LambdaQueryWrapper<DaParamCollection>() @@ -441,8 +441,8 @@ @Override public void pushGeelycvMesFeedback(String packID, String stationCode) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; // String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String totalResult = "0"; List<DaParamCollection> paramList = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>().eq(DaParamCollection::getSfcCode, packID).eq(DaParamCollection::getLocationCode, stationCode)); if(paramList.size() > 0){ jcdm-main/src/main/java/com/jcdm/main/da/testDeviceInterface/domain/DaTestDeviceInterface.java
@@ -5,6 +5,8 @@ import com.jcdm.common.annotation.Excel; import com.jcdm.common.core.domain.BaseEntity; import java.util.Date; /** * æµè¯è®¾å¤æ¥å£æ°æ®å¯¹è±¡ da_test_device_interface * @@ -66,6 +68,10 @@ @Excel(name = "å建ç¨æ·") private String createUser; private Date updateTime; private Date createTime; /** æ´æ¹ç¨æ· */ @Excel(name = "æ´æ¹ç¨æ·") private String updateUser; @@ -82,7 +88,28 @@ /** é¢çå段4 */ private String spareField4; public void setId(Long id) @Override public Date getUpdateTime() { return updateTime; } @Override public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public Date getCreateTime() { return createTime; } @Override public void setCreateTime(Date createTime) { this.createTime = createTime; } public void setId(Long id) { this.id = id; } @@ -245,6 +272,8 @@ return spareField4; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -127,7 +127,11 @@ omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum")); omProductionOrdeInfo.setStationCode(dataObject.getStr("stationCode")); omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode")); omProductionOrdeInfo.setProductCode(dataObject.getStr("model")); if(dataObject.getStr("model").equals("PE01A")){ omProductionOrdeInfo.setProductCode("1P102S"); }else { omProductionOrdeInfo.setProductCode(dataObject.getStr("model")); } omProductionOrdeInfo.setCreateTime(new Date()); omProductionOrdeInfo.setCreateUser("å·¥åMES"); @@ -139,6 +143,14 @@ return AjaxResult.success(dataObject.getStr("productNum")); } @GetMapping(value = "/jieBang/{id}") public AjaxResult jieBang(@PathVariable("id") Long id) { OmProductionOrdeInfo byId = omProductionOrdeInfoService.getById(id); byId.setTrolleyYard(""); return success(omProductionOrdeInfoService.saveOrUpdate(byId)); } /** * è·åç产工å详ç»ä¿¡æ¯ */ jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -198,6 +198,7 @@ // } if(testList.stream().anyMatch(s -> s.equals(device))){ String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build()); // Object packCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue(); // DaTestDeviceInterface deviceInterfaceOne = null; // @@ -214,7 +215,6 @@ // writeToOpc(RecordDataDoneAddress, (short) 22); // } // writeToOpc(RecordDataDoneAddress, (short) 21); miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build()); } jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java
@@ -12,9 +12,13 @@ // getWorkReportResultFeedback() https://imes-uat-group.geelycv-test.com } public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; // public static final String getRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration"; // // public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface"; public static final String getRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration"; public static final String postRealmName = "https://imes-group.geelycv.com/api/mom-open/restful/interface"; public static final String siteCode = "3983"; jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -1,6 +1,7 @@ package com.jcdm.main.restful.qingYan.service; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; @@ -9,6 +10,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.utils.StringUtils; import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo; import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService; import com.jcdm.main.constant.Constants; @@ -54,9 +56,9 @@ private IDaPassingStationCollectionService passingStationCollectionService; String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; // String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; // String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; /** * 导åºç¹æ£ä»»å¡å表 @@ -148,7 +150,17 @@ daTestDeviceInterface.setProductNum(parentVO.getProductNum()); daTestDeviceInterface.setTotalResult(parentVO.getTotalResult()); daTestDeviceInterface.setCheckList(s); daTestDeviceInterface.setCreateTime(new Date()); daTestDeviceInterfaceService.save(daTestDeviceInterface); if(parentVO.getStationCode().contains("OP480")){ if(StringUtils.isNotBlank(parentVO.getProductNum())){ OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, parentVO.getProductNum())); if(ObjectUtil.isNotNull(one)){ one.setTrolleyYard(""); omProductionOrdeInfoService.saveOrUpdate(one); } } } HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); return AjaxResult.success(execute.body()); } jcdm-ui/src/api/main/om/productionOrde/productionOrde.js
@@ -59,6 +59,14 @@ } // æ¥è¯¢ç产工åè¯¦ç» export function jieBang(id) { return request({ url: '/om/productionOrde/jieBang/' + id, method: 'get' }) } // æ¥è¯¢ç产工åè¯¦ç» export function getProductionOrde(id) { return request({ url: '/om/productionOrde/' + id, jcdm-ui/src/views/main/bs/formulaChild/index.vue
@@ -264,11 +264,17 @@ <el-form-item label="ç©æç¼ç " prop="materialCode"> <el-input v-model="form.materialCode" placeholder="请è¾å ¥ç©æç¼ç " /> </el-form-item> <!-- <el-form-item label="é æ¹ç¼ç " prop="formulaCode">--> <!-- <el-input v-model="form.formulaCode" placeholder="请è¾å ¥é æ¹ç¼ç " />--> <!-- </el-form-item>--> <el-form-item label="å¾ç" prop="picture"> <el-input v-model="form.picture" placeholder="请è¾å ¥å¾ç" /> <el-form-item label="ä¸é" prop="spareField2"> <el-input v-model="form.spareField2" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> <el-form-item label="ä¸é" prop="spareField3"> <el-input v-model="form.spareField3" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> <el-form-item label="åæ°å¼" prop="collectData"> <el-input v-model="form.collectData" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> <el-form-item label="ç¶æ" prop="results"> <el-input v-model="form.results" placeholder="请è¾å ¥å¤æ³¨" /> </el-form-item> <el-form-item label="å¤æ³¨" prop="remarks"> <el-input v-model="form.remarks" placeholder="请è¾å ¥å¤æ³¨" /> @@ -392,6 +398,8 @@ createUser: null, createTime: null, updateUser: null, collectData: null, results: null, updateTime: null, spareField1: null, spareField2: null, @@ -427,6 +435,7 @@ this.reset(); const id = row.id || this.ids getFormulaChild(id).then(response => { console.log(response.data) this.form = response.data; this.open = true; this.titleName = "ä¿®æ¹é æ¹é ç½®åä¿¡æ¯"; jcdm-ui/src/views/main/cfkb/Instructions/index.vue
ÎļþÒÑɾ³ý jcdm-ui/src/views/main/cfkb/Instructions/index1.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,169 @@ <template> <div class="app-container"> <el-row> <el-col :span="8"> <div> <div id="printMe"> <p style="margin-left: 30px">9900166410</p> <p style="margin-left: 30px">HW.001.001</p> <p style="margin-left: 30px">SW.001.001</p> <br> <br> <br> <br> <br> <span style="font-size: 20px;font-weight: bold;margin-left: 40px">GEELY</span><br> <span style="font-size: 10px;margin-left: 15px">COMMERCIAL VEHICLE</span><br> <span style="margin-left: 43px">H2155D</span><br> <span style="margin-left: 43px">993083</span><br> <span style="margin-left: 20px">9900166410</span><br> <span style="font-size: 10px;margin-right: 7px">0RSPBFAA1A2E3ADC40000027</span> <br> <br> <br> <br> <br> <div ref="canvasWrapper" id="canvasWrapper" style="display: flex;justify-content: center;margin-top: -30px"></div> <span style="font-size: 7px;word-break: break-all;display: flex;justify-content: center;">{{text1}}</span> </div> <el-button @click="print1">æå°</el-button> <el-button @click="test1">çæäºç»´ç </el-button> </div> </el-col> <el-col :span="8"> <div> <div style="text-align: center" id="printMe1"> <p>9900166410</p> <p>HW.001.001</p> <p>SW.001.001</p> </div> <el-button @click="print2">æå°</el-button> </div> </el-col> <el-col :span="8"> <div> <div id="printMe2"> <span style="font-size: 20px;font-weight: bold;margin-left: 40px">GEELY</span><br> <span style="font-size: 10px;margin-left: 15px">COMMERCIAL VEHICLE</span><br> <span style="margin-left: 43px">H2155D</span><br> <span style="margin-left: 43px">993083</span><br> <span style="margin-left: 20px">9900166410</span><br> <span style="font-size: 10px;margin-right: 7px">0RSPBFAA1A2E3ADC40000027</span> </div> <el-button @click="print3">æå°</el-button> </div> </el-col> </el-row> </div> </template> <script> import QRCode from "qrcodejs2"; export default { name: "Instructions", data() { return { text1: 'P9900166410#T0RSPBFAA1A2E3ADC40000027#V993983#SSW001.001#HHW001.001#NBMS#', text2: '1234', text3: '1234', }; }, created() { }, mounted() { this.test1() }, methods: { print1() { // æ°å¼é¡µé¢æå° let newStr = document.getElementById('printMe').innerHTML; let newWin = window.open('', '_blank'); newWin.document.body.innerHTML = newStr; newWin.print(); return false; }, test1(){ document.getElementById('canvasWrapper').innerHTML = ''; this.$nextTick(() => { let qrCode = new QRCode('canvasWrapper',{ width: 120, height: 120, text: this.text1, colorDark: '#000', colorLight: '#fff' }) }) }, print2() { // æ°å¼é¡µé¢æå° let newStr = document.getElementById('printMe1').innerHTML; let newWin = window.open('', '_blank'); newWin.document.body.innerHTML = newStr; newWin.print(); return false; }, print3() { // æ°å¼é¡µé¢æå° let newStr = document.getElementById('printMe2').innerHTML; let newWin = window.open('', '_blank'); newWin.document.body.innerHTML = newStr; newWin.print(); return false; }, }, } </script> <style scoped> .outerDiv { width: fit-content; min-width: 100%; /*width: 300px;*/ height: 50px; margin-bottom: 10px; } .innerDiv1 { /*width: 79%;*/ height: 100%; display: flex; align-items: center; border: 1px solid black; } .innerDiv2 { /*width: 20%;*/ width: 50px; height: 100%; display: flex; justify-content: center; align-items: center; border: 1px solid black; } .content_left { font-weight: bold; } .content_right { white-space: nowrap; padding-left: 5px; padding-right: 5px; } .container { display: flex; justify-content: center; align-items: center; height: 100px; /* 设置divçé«åº¦ï¼å¯æ ¹æ®å®é æ åµè°æ´ */ } .centered { text-align: center; } </style> jcdm-ui/src/views/main/kb/preInstalledTerminal/index.vue
@@ -530,10 +530,9 @@ } addTighteningParameters(param).then(response => {}); yzUpdateTighteningFormula(param).then(response => { console.log(response.msg) if(response.msg === "1"){ console.log(response) if(response.msg === "1" || response.msg === "3"){ self.getListFormulaChild() }else { const param = { workOrderNo: self.workpieceInformation.workOrderNo, @@ -547,6 +546,8 @@ self.headContent.sfcCode = ''; } }); // self.getListFormulaChild() } }; }, jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -147,6 +147,16 @@ @click="patchwork" >è¡¥æ</el-button> </el-col> <el-col :span="1.5"> <el-button type="warning" plain icon="el-icon-download" size="mini" :disabled="single" @click="jieBang" >解ç»</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> @@ -297,7 +307,7 @@ delProductionOrde, addProductionOrde, updateProductionOrde, receivingWorkOrders receivingWorkOrders, jieBang } from "@/api/main/om/productionOrde/productionOrde"; import QRCode from "qrcodejs2"; @@ -406,6 +416,13 @@ this.test1() }, methods: { jieBang(row){ const id = row.id || this.ids jieBang(id).then(response => { this.getList() this.$modal.msgSuccess("解ç»æå"); }); }, patchwork(row){ const id = row.id || this.ids getProductionOrde(id).then(response => {