| | |
| | | daParamCollectionMapper.insertDaParamCollection(saveData); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void jrmSaveCampaignTimeParameters(DaParamCollection daParamCollection) { |
| | | DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf(); |
| | | daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode()); |
| | | daCollectionParamConf.setCollectParameterId("OUTT"); |
| | | List<DaCollectionParamConf> daCollectionParamConfs = daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf); |
| | | DaParamCollection saveData = new DaParamCollection(); |
| | | saveData.setWorkOrderNo(daParamCollection.getWorkOrderNo()); |
| | | saveData.setProductCode(daParamCollection.getProductCode()); |
| | | saveData.setLocationCode(daParamCollection.getLocationCode()); |
| | | saveData.setSfcCode(daParamCollection.getProductBarcode()); |
| | | saveData.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId()); |
| | | saveData.setParamName(daCollectionParamConfs.get(0).getCollectParameterName()); |
| | | saveData.setCollectionTime(new Date()); |
| | | saveData.setParamValue(DateUtil.formatDateTime(new Date())); |
| | | daParamCollectionMapper.insertDaParamCollection(saveData); |
| | | |
| | | //更新过站记录表出站时间 |
| | | DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection(); |
| | | daPassingStationCollection.setWorkOrderNo(daParamCollection.getWorkOrderNo()); |
| | | daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode()); |
| | | List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection); |
| | | daPassingStationCollections.get(0).setOutboundTime(new Date()); |
| | | int i = daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0)); |
| | | |
| | | // OPCUaSubscription.SaveParamData(daParamCollection.getProductBarcode(),"OP",daParamCollection.getLocationCode(),daParamCollection.getWorkOrderNo(),daParamCollection.getProductCode()); |
| | | |
| | | //给opc发21 |
| | | try { |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | String strA = daParamCollection.getLocationCode() + "A"; |
| | | String strB = daParamCollection.getLocationCode() + "B"; |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strA+".RecordDataDone").value(21).build()); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strB+".RecordDataDone").value(21).build()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |