| | |
| | | if(null != list && !list.isEmpty()) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | CollectionParamConfResult result = (CollectionParamConfResult) list.get(i); |
| | | String value = miloService. |
| | | Object value = miloService. |
| | | readFromOpcUa(result.getGatherAddress()) |
| | | .getValue().toString();//读参数值 |
| | | ParamCollectionParam paramCollectionParam = new ParamCollectionParam(); |
| | | paramCollectionParam.setParamCode(result.getParamCode()); |
| | | paramCollectionParam.setParamName(result.getParamName()); |
| | | paramCollectionParam.setWorkOrderNo(S_ORDER_CODE); |
| | | paramCollectionParam.setSfcCode(S_SFC_CODE); |
| | | paramCollectionParam.setProductCode(S_PRODUCT_CODE); |
| | | paramCollectionParam.setProductionLine(result.getProductionLine()); |
| | | paramCollectionParam.setLocationCode(result.getLocationCode()); |
| | | paramCollectionParam.setParamValue(value); |
| | | paramCollectionParam.setParamLower(result.getParamLower()); |
| | | paramCollectionParam.setParamUpper(result.getParamUpper()); |
| | | paramCollectionParam.setParamStandard(result.getParamCentral()); |
| | | paramCollectionParam.setCollectionTime(DateTool.getLocalTimeForDate()); |
| | | paramCollectionParam.setUnit(result.getUnit()); |
| | | paramCollectionService.add(paramCollectionParam); |
| | | .getValue();//读参数值 |
| | | if(null != value) { |
| | | ParamCollectionParam paramCollectionParam = new ParamCollectionParam(); |
| | | paramCollectionParam.setParamCode(result.getParamCode()); |
| | | paramCollectionParam.setParamName(result.getParamName()); |
| | | paramCollectionParam.setWorkOrderNo(S_ORDER_CODE); |
| | | paramCollectionParam.setSfcCode(S_SFC_CODE); |
| | | paramCollectionParam.setProductCode(S_PRODUCT_CODE); |
| | | paramCollectionParam.setProductionLine(result.getProductionLine()); |
| | | paramCollectionParam.setLocationCode(result.getLocationCode()); |
| | | paramCollectionParam.setParamValue(value.toString()); |
| | | paramCollectionParam.setParamLower(result.getParamLower()); |
| | | paramCollectionParam.setParamUpper(result.getParamUpper()); |
| | | paramCollectionParam.setParamStandard(result.getParamCentral()); |
| | | paramCollectionParam.setCollectionTime(DateTool.getLocalTimeForDate()); |
| | | paramCollectionParam.setUnit(result.getUnit()); |
| | | paramCollectionService.add(paramCollectionParam); |
| | | } |
| | | } |
| | | } |
| | | |