| | |
| | | omProductionOrdeInfoService); |
| | | |
| | | List<String> lists = getSubList(); |
| | | System.out.println("订阅内容:"+lists); |
| | | miloService.subscriptionFromOpcUa(lists,opcUaSubscription); |
| | | |
| | | } |
| | |
| | | lists.add(OPCElement.PACK_OP270_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP290_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP290_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP300_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP300_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP310_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP310_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP330_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP330_AngleResult);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP300A_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP300B_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP310A_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP310B_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP330A_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);//请求记录数据 |
| | |
| | | lists.add(OPCElement.PACK_OP350A_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP350B_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP360_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP365_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP370_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP390_RecordData);//请求记录数据 |
| | | lists.add(OPCElement.PACK_OP470_RecordData);//请求记录数据 |
| | |
| | | /** |
| | | * OP300 |
| | | */ |
| | | public static final String PACK_OP300_RecordData = "PACK.OP300.RecordData";//请求记录数据 |
| | | public static final String PACK_OP300A_RecordData = "PACK.OP300A.RecordData";//请求记录数据 |
| | | |
| | | public static final String PACK_OP300_AngleResult = "PACK.OP300.AngleResult";//请求拧紧数据 |
| | | public static final String PACK_OP300B_RecordData = "PACK.OP300B.RecordData";//请求记录数据 |
| | | |
| | | /** |
| | | * OP310 |
| | | */ |
| | | public static final String PACK_OP310_RecordData = "PACK.OP310.RecordData";//请求记录数据 |
| | | public static final String PACK_OP310A_RecordData = "PACK.OP310A.RecordData";//请求记录数据 |
| | | |
| | | public static final String PACK_OP310_AngleResult = "PACK.OP310.AngleResult";//请求拧紧数据 |
| | | public static final String PACK_OP310B_RecordData = "PACK.OP310B.RecordData";//请求记录数据 |
| | | |
| | | |
| | | public static final String PACK_OP320A_RecordData = "PACK.OP320A.RecordData";//请求记录数据 |
| | | |
| | |
| | | /** |
| | | * OP330 |
| | | */ |
| | | public static final String PACK_OP330_RecordData = "PACK.OP330.RecordData";//请求记录数据 |
| | | public static final String PACK_OP330A_RecordData = "PACK.OP330A.RecordData";//请求记录数据 |
| | | |
| | | public static final String PACK_OP330_AngleResult = "PACK.OP330.AngleResult";//请求拧紧数据 |
| | | public static final String PACK_OP330B_RecordData = "PACK.OP330B.RecordData";//请求记录数据 |
| | | |
| | | /** |
| | | * OP380 |
| | | */ |
| | |
| | | * OP360 |
| | | */ |
| | | public static final String PACK_OP360_RecordData = "PACK.OP360.RecordData";//请求记录数据 |
| | | |
| | | public static final String PACK_OP365_RecordData = "PACK.OP365.RecordData";//请求记录数据 |
| | | |
| | | /** |
| | | * OP370 |
| | | */ |
| | |
| | | public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | //新自动工站 |
| | | public List<String> automaticList = Arrays.asList("OP280", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470"); |
| | | public List<String> automaticList = Arrays.asList("OP280", "OP300A","OP300B", "OP320A","OP320B", "OP340A","OP340B", "OP350A","OP350B", "OP360","OP365","OP370", "OP390", "OP470"); |
| | | |
| | | //采集模组工位 ModuleCode |
| | | public List<String> moduleCodeList = Arrays.asList("OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); |
| | | public List<String> moduleCodeList = Arrays.asList("OP300A","OP300B","OP320A","OP320B","OP340A","OP340B","OP365", "OP350A", "OP350B", "OP330"); |
| | | |
| | | //区分模组型号工位 |
| | | public List<String> distinguishingModules = Arrays.asList("OP300","OP310", "OP340", "OP350", "OP330"); |
| | |
| | | //plc给我们一个模组码,拿模组码校验出型号 |
| | | if(distinguishingModules.stream().anyMatch(s -> s.equals(device))) { |
| | | //读模组码 |
| | | String moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue().toString(); |
| | | String productTye = thoroughfare + "." + device + ".ProductType"; |
| | | if (null != moduleCode && moduleCode.length() == 24) { |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(productTye).value(Integer.valueOf(moduleCode.substring(7, 8))).build()); |
| | | //进站保存数据 |
| | | // inSaveDate(thoroughfare,device) |
| | | //记录数据完成 |
| | | String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; |
| | | |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build()); |
| | | |
| | | |
| | | //请求工单 |
| | | } else { |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build()); |
| | | } |
| | | // String moduleCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".ModuleCode").getValue().toString(); |
| | | // String productTye = thoroughfare + "." + device + ".ProductType"; |
| | | // if (null != moduleCode && moduleCode.length() == 24) { |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(productTye).value(Integer.valueOf(moduleCode.substring(7, 8))).build()); |
| | | // //进站保存数据 |
| | | //// inSaveDate(thoroughfare,device) |
| | | // //记录数据完成 |
| | | // String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone"; |
| | | // |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(11).build()); |
| | | // |
| | | // |
| | | // //请求工单 |
| | | // } else { |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(12).build()); |
| | | // } |
| | | }else { |
| | | //pack 如果区分型号的话就要处理 |
| | | //记录数据完成 |
| | |
| | | package com.jcdm.main.restful.qingYan.service; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.JsonObject; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; |
| | | import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; |
| | | import com.jcdm.main.restful.qingYan.doman.ParentVO; |
| | | import com.jcdm.main.restful.qingYan.doman.PostEntity; |
| | | import com.jcdm.main.rm.repairData.domain.RmRepairData; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | @Autowired |
| | | private IOmProductionOrdeInfoService productionOrdeInfoService; |
| | | |
| | | String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback"; |
| | | |
| | | /** |
| | | * 导出点检任务列表 |
| | | */ |
| | | @PostMapping("/deviceResultFeedback") |
| | | public AjaxResult hdy(@RequestBody ParentVO parentVO) |
| | | { |
| | | HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute(); |
| | | return AjaxResult.success(execute.body()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/pushParamData") |
| | | public void receivingData(@RequestBody PostEntity postEntity) throws JsonProcessingException { |
| | |
| | | }, |
| | | content: '', |
| | | activeName: 'first', |
| | | url: "ws://192.168.1.103:8080/websocket/message/", |
| | | url: "ws://192.168.2.76:8080/websocket/message/", |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |