From 68f0c8f92fb7c82dc447b9aaed2d23760c546f25 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期五, 17 五月 2024 20:22:20 +0800 Subject: [PATCH] - --- jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml | 10 ++-- jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java | 2 jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java | 44 +++++++++++++++++----- jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue | 4 +- jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java | 2 - jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java | 2 + jcdm-ui/src/views/main/kb/stationTerminal/index.vue | 22 +++++----- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 12 +++--- jcdm-main/src/main/java/com/jcdm/main/plcserver/util/TimeUtil.java | 5 +- 9 files changed, 64 insertions(+), 39 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 a854bc1..3e24f7f 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 @@ -116,7 +116,7 @@ .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/sendDemo/push").permitAll() - .antMatchers("/jcdmMes/deviceResultFeedback").permitAll() + .antMatchers("/jcdmMes/**").permitAll() .antMatchers("/da/testDeviceInterface/**").permitAll() .antMatchers("/main/paramCollection/**").permitAll() // 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇� diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java b/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java index f6ce656..6978765 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/passingStationCollection/domain/DaPassingStationCollection.java @@ -1,5 +1,6 @@ package com.jcdm.main.da.passingStationCollection.domain; +import com.baomidou.mybatisplus.annotation.TableField; import com.jcdm.common.annotation.Excel; import com.jcdm.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -91,6 +92,7 @@ @Excel(name = "鑺傛媿鏃堕棿") private String beatTime; + @TableField(exist = false) private Long[] ids; public Long[] getIds() { diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java index 12a64d3..52d205c 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java @@ -65,7 +65,6 @@ lists.add(OPCElement.PACK_OP230_RecordData);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP240_RecordData);//璇锋眰璁板綍鏁版嵁. lists.add(OPCElement.PACK_OP240_AngleResult);//璇锋眰璁板綍鏁版嵁 -// lists.add(OPCElement.PACK_OP2502_RecordData);//璇锋眰璁板綍鏁版嵁. lists.add(OPCElement.PACK_OP2501_AngleResult);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP2502_AngleResult);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP2503_AngleResult);//璇锋眰璁板綍鏁版嵁 @@ -80,7 +79,6 @@ lists.add(OPCElement.PACK_OP310A_RecordData);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP310B_RecordData);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP330_RecordData);//璇锋眰璁板綍鏁版嵁 -// lists.add(OPCElement.PACK_OP330B_RecordData);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP380_RecordData);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP380_AngleResult);//璇锋眰璁板綍鏁版嵁 lists.add(OPCElement.PACK_OP400_RecordData);//璇锋眰璁板綍鏁版嵁 diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java index b4679e5..1452680 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java @@ -45,7 +45,7 @@ public List<String> automaticList = Arrays.asList("OP280","OP310A","OP310B", "OP300A","OP300B", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470"); //閲囬泦妯$粍宸ヤ綅 ModuleCode - public List<String> moduleCodeList = Arrays.asList("OP300A","OP300B","OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); + public List<String> moduleCodeList = Arrays.asList("OP300A","OP310A","OP310B","OP300B","OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); //鍖哄垎妯$粍鍨嬪彿宸ヤ綅 public List<String> distinguishingModules = Arrays.asList("OP300","OP310", "OP340", "OP350", "OP330"); @@ -189,12 +189,12 @@ miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(Integer.valueOf(recordDataDoneValue)).build()); }else { //鎵嬪姩宸ヤ綅 - if(device.contains("OP330")){ - String str = device.substring(0,5); - WebSocketUsers.sendMessageToUserByText(map.get(str), "END"); - }else { +// if(device.contains("OP330")){ +// String str = device.substring(0,5); +// WebSocketUsers.sendMessageToUserByText(map.get(str), "END"); +// }else { WebSocketUsers.sendMessageToUserByText(map.get(device), "END"); - } +// } if(testList.stream().anyMatch(s -> s.equals(device))){ String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; // Object packCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue(); diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/util/TimeUtil.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/util/TimeUtil.java index 1f37a20..51c1225 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/util/TimeUtil.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/util/TimeUtil.java @@ -12,8 +12,9 @@ public static void main(String[] args) { String dateString = "Tue May 14 18:25:18 CST 2024"; // System.out.println(test(dateString)); - - System.out.println(test( stringProcessing("DateTime{utcTime=133601559184960000, javaDate=Tue May 14 18:25:18 CST 2024}"))); + String str = "OP330"; + System.out.println(str.substring(0,5)); +// System.out.println(test( stringProcessing("DateTime{utcTime=133601559184960000, javaDate=Tue May 14 18:25:18 CST 2024}"))); } public static String stringProcessing(String dateTimeStr){ diff --git a/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java b/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java index d588819..9e5c973 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java +++ b/jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java @@ -20,9 +20,7 @@ import com.jcdm.main.da.testDeviceInterface.service.IDaTestDeviceInterfaceService; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; -import com.jcdm.main.restful.qingYan.doman.ChildVO; -import com.jcdm.main.restful.qingYan.doman.ParentVO; -import com.jcdm.main.restful.qingYan.doman.PostEntity; +import com.jcdm.main.restful.qingYan.doman.*; import org.aspectj.weaver.loadtime.Aj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -53,6 +51,8 @@ @Autowired private IBsFormulaChildInfoService bsFormulaChildInfoService; + + private IDaPassingStationCollectionService passingStationCollectionService; String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; @@ -155,9 +155,30 @@ @GetMapping("/productionWorkOrderRequest") public AjaxResult productionWorkOrderRequest(){ List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list(); - - return AjaxResult.success(list); + List<RestFulOrder> restFulOrders = new ArrayList<>(); + for (OmProductionOrdeInfo omProductionOrdeInfo : list) { + RestFulOrder order = new RestFulOrder(); + order.setProductionOrderNum(omProductionOrdeInfo.getWorkOrderNo()); + order.setProductNum(omProductionOrdeInfo.getProductNum()); + order.setMaterialCode(omProductionOrdeInfo.getMaterialCode()); + order.setStationCode(omProductionOrdeInfo.getStationCode()); +// order.setPlanQty(omProductionOrdeInfo.getPlanQty()); + restFulOrders.add(order); + } + return AjaxResult.success(restFulOrders); } + + @GetMapping("/getQualityData") + public AjaxResult getQualityData(){ + List<DaPassingStationCollection> qualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "1")); + List<DaPassingStationCollection> unQualified = daPassingStationCollectionService.list(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getOutRsSign, "2")); + Map<String,Integer> map = new HashMap<>(); + map.put("qualified",qualified.size()); + map.put("unQualified",unQualified.size()); + return AjaxResult.success(map); + } + + @GetMapping("/productionOrderComponentRequest") public AjaxResult productionOrderComponentRequest(BsFormulaChildInfo bsFormulaChildInfo){ @@ -166,11 +187,14 @@ .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getProcessesCode()) .eq(BsFormulaChildInfo::getOperationType, "2") ); - List<String> materialCode = list.stream().map(BsFormulaChildInfo::getMaterialCode).collect(Collectors.toList()); - List<String> operationSteps = list.stream().map(BsFormulaChildInfo::getOperationSteps).collect(Collectors.toList()); - map.put("materialCode",materialCode); - map.put("operationSteps",operationSteps); - return AjaxResult.success(map); + List<ProductionOrderComponentRequest> requests = new ArrayList<>(); + for (BsFormulaChildInfo info : list) { + ProductionOrderComponentRequest request = new ProductionOrderComponentRequest(); + request.setMaterialCode(info.getMaterialCode()); + request.setOperationSteps(info.getOperationSteps()); + requests.add(request); + } + return AjaxResult.success(requests); } diff --git a/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml b/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml index 3eca8e2..d5d6350 100644 --- a/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml +++ b/jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml @@ -19,8 +19,8 @@ <result property="outRsSign" column="out_rs_sign" /> <result property="outMsgSign" column="out_msg_sign" /> <result property="collectionTime" column="collection_time" /> - <result property="spareField1" column="spare_field_1" /> - <result property="spareField2" column="spare_field_2" /> + <result property="spareField1" column="spare_field1" /> + <result property="spareField2" column="spare_field2" /> <result property="createUser" column="create_user" /> <result property="createTime" column="create_time" /> <result property="updateUser" column="update_user" /> @@ -29,7 +29,7 @@ </resultMap> <sql id="selectDaPassingStationCollectionVo"> - select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, inbound_time, outbound_time, in_rs_sign, in_msg_sign, out_rs_sign, out_msg_sign, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, beat_time from da_passing_station_collection + select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, inbound_time, outbound_time, in_rs_sign, in_msg_sign, out_rs_sign, out_msg_sign, collection_time, spare_field1, spare_field2, create_user, create_time, update_user, update_time, beat_time from da_passing_station_collection </sql> <select id="selectDaPassingStationCollectionList" parameterType="DaPassingStationCollection" resultMap="DaPassingStationCollectionResult"> @@ -71,8 +71,8 @@ <if test="outRsSign != null">out_rs_sign,</if> <if test="outMsgSign != null">out_msg_sign,</if> <if test="collectionTime != null">collection_time,</if> - <if test="spareField1 != null">spare_field_1,</if> - <if test="spareField2 != null">spare_field_2,</if> + <if test="spareField1 != null">spare_field1,</if> + <if test="spareField2 != null">spare_field2,</if> <if test="createUser != null">create_user,</if> <if test="createTime != null">create_time,</if> <if test="updateUser != null">update_user,</if> diff --git a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue index b4bc0a7..2eddd7a 100644 --- a/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/heatingFilmTerminal/index.vue @@ -607,7 +607,7 @@ } else if (event.data === "END") { const param = { workOrderNo: self.workpieceInformation.workOrderNo, - productCode: self.workpieceInformation.productCode, + productCode: "1P102S", locationCode: self.headContent.processesCode, productBarcode: self.headContent.sfcCode, } @@ -665,7 +665,7 @@ this.headContent.moduleB = scanValue; this.$message('鎵爜璇嗗埆浜у搧搴忓垪鍙�'+scanValue); this.getList() - this.cakeLamp.InPlace = 1 + // this.cakeLamp.InPlace = 1 this.cakeLamp.scanFinish = 1 this.cakeLamp.startWork = 1 } diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue index d76b681..7c194ab 100644 --- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue @@ -89,18 +89,17 @@ <el-col></el-col> <span style="width: 130px;" class="head-font">棰勮鎬绘垚鍙� : {{headContent.yzSfcCode}}</span> </el-row> - <el-row v-show="showInput" style="margin-top: 20px"> - <el-button @click="bindYzSfc" type="primary">缁戝畾</el-button> - - </el-row> +<!-- <el-row v-show="showInput" style="margin-top: 20px">--> +<!-- <el-button @click="bindYzSfc" type="primary">缁戝畾</el-button>--> +<!-- </el-row>--> <el-row v-show="onLineBinDing" style="margin-top: 20px"> <el-col></el-col> <span style="width: 130px;" class="head-font">灏忚溅鐮� : {{headContent.cardCode}}</span> </el-row> - <el-row v-show="onLineBinDing" style="margin-top: 20px"> - <el-button @click="bindcardCode" type="primary">缁戝畾</el-button> - </el-row> +<!-- <el-row v-show="onLineBinDing" style="margin-top: 20px">--> +<!-- <el-button @click="bindcardCode" type="primary">缁戝畾</el-button>--> +<!-- </el-row>--> </el-card> </el-col> @@ -445,7 +444,7 @@ }, methods: { bindcardCode(){ - this.$message('鍙互缁戝畾锛�'); + this.$message('缁戝畾鎴愬姛锛�'); let param = { productNum: this.headContent.sfcCode, trolleyYard: this.headContent.cardCode, @@ -464,9 +463,8 @@ locationCode: this.headContent.processesCode, yzSfcCode: this.headContent.yzSfcCode } - this.$message('鍙互缁戝畾锛�'); replaceAssemblyCode(param).then(response => { - + this.$message('缁戝畾鎴愬姛锛�'); }); } }, @@ -711,8 +709,10 @@ if(this.headContent.sfcCode !== ''){ if(scanValue.includes("P9900173252")){ this.headContent.yzSfcCode = scanValue - }else if(scanValue.includes("RSP01TE")){ + this.bindYzSfc(); + }else if(scanValue.includes("0RSP1TE")){ this.headContent.cardCode = scanValue + this.bindcardCode(); }else { this.$message('鎵弿鐗╂枡缂栫爜'+scanValue); console.log(scanValue) -- Gitblit v1.9.3