|
|
@@ -185,7 +185,8 @@ public class TrialSummaryClassificationConfigurationController extends BladeCont
|
|
|
for (WbsTreePrivate wbsTreePrivate : wbsTreePrivates) {
|
|
|
SelectedTabVO vo = new SelectedTabVO();
|
|
|
vo.setPKeyId(wbsTreePrivate.getPKeyId());
|
|
|
- vo.setTabName(ObjectUtil.isNotEmpty(wbsTreePrivate.getFullName()) ? wbsTreePrivate.getFullName() : wbsTreePrivate.getNodeName());
|
|
|
+ // 与后管保持一致
|
|
|
+ vo.setTabName(wbsTreePrivate.getNodeName());
|
|
|
vo.setInitTabId(Long.parseLong(wbsTreePrivate.getInitTableId()));
|
|
|
vo.setInitTableName(wbsTreePrivate.getInitTableName());
|
|
|
list.add(vo);
|
|
|
@@ -229,6 +230,7 @@ public class TrialSummaryClassificationConfigurationController extends BladeCont
|
|
|
map.put("elementName", TrialTableDataInfo.getElementName(obj.getElementKey()));
|
|
|
map.put("trialTabId",TrialTableDataInfo.LONG_ID+"");
|
|
|
map.put("elementId",TrialTableDataInfo.getElementId(obj.getElementKey())+"");
|
|
|
+ map.put("trialTabName",TrialTableDataInfo.TBN);
|
|
|
r.add( map);
|
|
|
}else {
|
|
|
WbsTreePrivate trialTab = wbsTreePrivateServiceImpl.getBaseMapper().getByPKeyId(obj.getTrialTabId());
|
|
|
@@ -240,6 +242,7 @@ public class TrialSummaryClassificationConfigurationController extends BladeCont
|
|
|
map.put("elementName", element.getEName());
|
|
|
map.put("trialTabId",obj.getTrialTabId()+"");
|
|
|
map.put("elementId",obj.getElementId()+"");
|
|
|
+ map.put("trialTabName",trialTab.getInitTableName());
|
|
|
r.add(map);
|
|
|
}
|
|
|
}
|
|
|
@@ -260,6 +263,17 @@ public class TrialSummaryClassificationConfigurationController extends BladeCont
|
|
|
TrialSummaryClassificationConfiguration classificationConfiguration = iTrialSummaryClassificationConfigurationService.getById(dto.getClassId());
|
|
|
if (classificationConfiguration != null && ObjectUtil.isNotEmpty(classificationConfiguration.getExcelId())) {
|
|
|
List<TrialSummaryReflectionSaveDTO.ReflectionBean> reflectionBeanList = dto.getReflectionBeanList();
|
|
|
+ Set<Long> elementIds = reflectionBeanList.stream().map(TrialSummaryReflectionSaveDTO.ReflectionBean::getElementId).collect(Collectors.toSet());
|
|
|
+ if (!elementIds.isEmpty()) {
|
|
|
+ List<WbsFormElement> elementList = TrialTableDataInfo.getElementList();
|
|
|
+ List<WbsFormElement> list = wbsFormElementService.list(Wrappers.<WbsFormElement>lambdaQuery().select(WbsFormElement::getId, WbsFormElement::getEKey)
|
|
|
+ .in(WbsFormElement::getId, elementIds));
|
|
|
+ if (list != null && !list.isEmpty()) {
|
|
|
+ elementList.addAll(list);
|
|
|
+ }
|
|
|
+ Map<Long, String> elementMap = elementList.stream().collect(Collectors.toMap(WbsFormElement::getId, WbsFormElement::getEKey));
|
|
|
+ reflectionBeanList.forEach(bean -> bean.setElementKey(elementMap.get(bean.getElementId())));
|
|
|
+ }
|
|
|
Set<TrialSummaryReflectionSaveDTO.ReflectionBean> collect = new HashSet<>(reflectionBeanList);
|
|
|
Set<TrialSummaryReflectionSaveDTO.ReflectionBean> updateList = collect.stream().filter(bean -> ObjectUtil.isNotEmpty(bean.getId())).collect(Collectors.toSet());
|
|
|
Set<TrialSummaryReflectionSaveDTO.ReflectionBean> insertList = collect.stream().filter(bean -> ObjectUtil.isEmpty(bean.getId())).collect(Collectors.toSet());
|
|
|
@@ -272,12 +286,15 @@ public class TrialSummaryClassificationConfigurationController extends BladeCont
|
|
|
}
|
|
|
// 批量更新已有记录
|
|
|
if (!updateList.isEmpty()) {
|
|
|
- String sqlUpdate = "UPDATE m_trial_summary_excel_tab_reflection SET trial_tab_id = ?, element_id = ? WHERE id = ?";
|
|
|
+ String sqlUpdate = "UPDATE m_trial_summary_excel_tab_reflection SET trial_tab_id = ?, element_id = ?, trial_tab_name = ?, element_key = ?, html_key_name = ? WHERE id = ?";
|
|
|
List<Object[]> updateBatchArgs = new ArrayList<>();
|
|
|
for (TrialSummaryReflectionSaveDTO.ReflectionBean reflectionBean : updateList) {
|
|
|
Object[] paramsUpdate = {
|
|
|
reflectionBean.getTrialTabId(),
|
|
|
reflectionBean.getElementId(),
|
|
|
+ reflectionBean.getTrialTabName(),
|
|
|
+ reflectionBean.getElementKey(),
|
|
|
+ reflectionBean.getHtmlKeyName(),
|
|
|
reflectionBean.getId()
|
|
|
};
|
|
|
updateBatchArgs.add(paramsUpdate);
|