| | |
| | | public class OPCUaSubscription implements SubscriptionCallback { |
| | | |
| | | //自动工位 |
| | | public List<String> automaticList = Arrays.asList("OP230","OP300","OP280", "OP320", "OP340", "OP350", "OP360","OP370", "OP390", "OP470", "OP530", "OP540"); |
| | | public List<String> automaticList = Arrays.asList("OP300","OP280", "OP320", "OP340", "OP350", "OP360","OP370", "OP390", "OP470", "OP530", "OP540"); |
| | | |
| | | public static MiloService miloService; |
| | | |
| | |
| | | |
| | | public IDaPassingStationCollectionService daPassingStationCollectionService; |
| | | |
| | | public IDaCollectionParamConfService collectionParamConfService; |
| | | public static IDaCollectionParamConfService collectionParamConfService; |
| | | |
| | | public IDaParamCollectionService daParamCollectionService; |
| | | public static IDaParamCollectionService daParamCollectionService; |
| | | |
| | | public OPCUaSubscription(MiloService miloService, |
| | | IDaPassingStationCollectionService daPassingStationCollectionService, |
| | |
| | | //保存拧紧数据 |
| | | else if (("AngleResult").equals(tab)) { |
| | | if("1".equals(tabVlaue)||"2".equals(tabVlaue)){ |
| | | // String Torque = thoroughfare + "." + device + ".Torque"; |
| | | // String Angle = thoroughfare + "." + device + ".Angle"; |
| | | // String Result = thoroughfare + "." + device + ".Result"; |
| | | // String Result1 = thoroughfare + "." + device + ".Result1"; |
| | | // List<String> list = new ArrayList(); |
| | | // list.add(Torque); |
| | | // list.add(Angle); |
| | | // list.add(Result); |
| | | // list.add(Result1); |
| | | List<String> list = new ArrayList<>(); |
| | | String[] suffixes = {"Torque", "Angle", "Result", "Result1"}; |
| | | |
| | |
| | | //2、保存过站采集数据 |
| | | saveStationInfo(PACKCodeParam,thoroughfare,device); |
| | | //3、保存参数采集数据 |
| | | SaveParamData(PACKCodeParam,thoroughfare,device); |
| | | SaveParamData(PACKCodeParam,thoroughfare,device,"",""); |
| | | |
| | | result = "21"; |
| | | |
| | |
| | | daPassingStationCollectionService.insertDaPassingStationCollection(daPassingStationCollection); |
| | | } |
| | | |
| | | public void SaveParamData(String packCode,String thoroughfare,String device) throws Exception { |
| | | public static void SaveParamData(String packCode,String thoroughfare,String device,String workOrderNo,String productType) throws Exception { |
| | | List<DaCollectionParamConf> list; |
| | | DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf(); |
| | | daCollectionParamConf.setGatherAddress(thoroughfare+ "." + device); |
| | |
| | | //ParamCollection.setState("合格"); |
| | | ParamCollection.setType(list.get(i).getCollectParameterType()); |
| | | ParamCollection.setCollectionTime(new Date()); |
| | | daParamCollectionService.insertDaParamCollection(ParamCollection); |
| | | ParamCollection.setWorkOrderNo(workOrderNo); |
| | | ParamCollection.setProductCode(productType); |
| | | daParamCollectionlist.add(ParamCollection); |
| | | // daParamCollectionService.insertDaParamCollection(ParamCollection); |
| | | } |
| | | } |
| | | // daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist); |
| | | daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist); |
| | | } |
| | | |
| | | } |