来源品位赋值
This commit is contained in:
@@ -54,6 +54,7 @@ import com.zt.plat.module.qms.business.bus.liteflow.slot.SampleEntrustContext;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigAssayMethodProjectExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfAdd;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfInfo;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodConfItem;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.ConfigSubSampleMethodExtendRespVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.BaseSampleDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.ConfigAssayMethodDO;
|
||||
@@ -446,9 +447,11 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
|
||||
//扩展配置信息
|
||||
String configInfomation = configSubSampleMethodDO.getConfigInfomation();
|
||||
List<ConfigSubSampleMethodConfItem> getParamList = null;
|
||||
if (StringUtils.isNotBlank(configInfomation)) {
|
||||
ConfigSubSampleMethodConfInfo configSubSampleMethodConfInfo = JSON.parseObject(configInfomation, ConfigSubSampleMethodConfInfo.class);
|
||||
ConfigSubSampleMethodConfAdd addAssayTask = configSubSampleMethodConfInfo.getAddAssayTask();
|
||||
getParamList = configSubSampleMethodConfInfo.getGetParam();
|
||||
if (addAssayTask != null) {//需要添加任务
|
||||
|
||||
List<Long> conditionProjectIdList = addAssayTask.getConditionProjectIdList();
|
||||
@@ -647,6 +650,20 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
businessAssayParameterDataDO.setValue(configAssayMethodProjectParameterDO.getDefaultValue());
|
||||
}
|
||||
|
||||
if (getParamList != null) {
|
||||
List<String> targetParameterList = getParamList.stream().filter(f -> f.getTarget().getProject().contains(configAssayMethodProjectDO.getSimpleName())).map(m -> m.getTarget().getParameter()).collect(Collectors.toList());
|
||||
String forecastResult = businessSampleEntrustDetailDO.getForecastResult();
|
||||
if (StringUtils.isNotBlank(forecastResult)) {
|
||||
JSONArray array = JSON.parseArray(forecastResult);
|
||||
for (int forecIndex = 0; forecIndex < array.size(); forecIndex++) {
|
||||
JSONObject item = array.getJSONObject(forecIndex);
|
||||
if (targetParameterList.contains(item.getString("simpleName"))) {
|
||||
businessAssayParameterDataDO.setValue(item.getString("value"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||
}
|
||||
@@ -667,7 +684,21 @@ public class SampleEntrustGenSampleDataCmp extends NodeComponent {
|
||||
if (StringUtils.isNotBlank(configAssayMethodProjectParameterDO.getDefaultValue())) {
|
||||
businessAssayParameterDataDO.setValue(configAssayMethodProjectParameterDO.getDefaultValue());
|
||||
}
|
||||
|
||||
|
||||
if (getParamList != null) {
|
||||
List<String> targetParameterList = getParamList.stream().filter(f -> f.getTarget().getProject().contains(configAssayMethodProjectDO.getSimpleName())).map(m -> m.getTarget().getParameter()).collect(Collectors.toList());
|
||||
String forecastResult = businessSampleEntrustDetailDO.getForecastResult();
|
||||
if (StringUtils.isNotBlank(forecastResult)) {
|
||||
JSONArray array = JSON.parseArray(forecastResult);
|
||||
for (int forecIndex = 0; forecIndex < array.size(); forecIndex++) {
|
||||
JSONObject item = array.getJSONObject(forecIndex);
|
||||
if (targetParameterList.contains(item.getString("simpleName"))) {
|
||||
businessAssayParameterDataDO.setValue(item.getString("value"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
businessAssayParameterDataDOList.add(businessAssayParameterDataDO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user