|
|
|
@ -168,16 +168,18 @@ public class MesSendEquipParamsCmdStepService2 extends BaseStepService {
|
|
|
|
|
MesProductionPsOutContext productionPsOutContext = (null != productionPsOutContextOp && productionPsOutContextOp.isPresent()) ? productionPsOutContextOp.get() : null;
|
|
|
|
|
|
|
|
|
|
//搜集发送规则并去重
|
|
|
|
|
List<String> matchRuleList = (equipmentProdParamCfgList.stream().filter(o -> null != o).map(o -> o.getMatchRule().toLowerCase()).collect(Collectors.toList())).stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList());
|
|
|
|
|
List<String> matchRuleList = (equipmentProdParamCfgList.stream().filter(o -> null != o).map(o -> o.getMatchRule().toUpperCase()).collect(Collectors.toList())).stream().filter(o -> !StringUtils.isEmpty(o)).distinct().collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
for (String matchRule : matchRuleList) {
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(matchRule)) continue;
|
|
|
|
|
|
|
|
|
|
Optional<MesEquipmentProdParamCfg> equipmentProdParamCfgOp = equipmentProdParamCfgList.stream().filter(o -> (null != o && o.getMatchRule().toLowerCase().equals(matchRule) && evMap.containsKey(o.getEquipVariableId()))).findFirst();
|
|
|
|
|
Optional<MesEquipmentProdParamCfg> equipmentProdParamCfgOp = equipmentProdParamCfgList.stream().filter(o -> (null != o && o.getMatchRule().toUpperCase().equals(matchRule) && evMap.containsKey(o.getEquipVariableId()))).findFirst();
|
|
|
|
|
|
|
|
|
|
if (null == equipmentProdParamCfgOp || !equipmentProdParamCfgOp.isPresent()) continue;
|
|
|
|
|
|
|
|
|
|
evMap.remove(equipmentProdParamCfgOp.get().getId());
|
|
|
|
|
|
|
|
|
|
//数据转换
|
|
|
|
|
String matchValue = transferValue(matchRule, reqBean, prodRuleContext, productionProcessContext, productResult, productionPartContext, productionPsInContext, productionPsOutContext);
|
|
|
|
|
|
|
|
|
|