|
|
@ -1303,6 +1303,36 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
BigDecimal row49All = row49.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
row49.add(row49All.toString()); |
|
|
|
dailyReportAppVo.setRow49(row49); |
|
|
|
List<ParameterVo> dynamicRows = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
List<DailyParameterVo> parameterVoList = baseMapper.selectByParameters(useOrgSid); |
|
|
|
parameterVoList.removeAll(Collections.singleton(null)); |
|
|
|
for (int i = 0; i < parameterVoList.size(); i++) { |
|
|
|
DailyParameterVo dailyParameterVo = parameterVoList.get(i); |
|
|
|
String tableName = Arrays.asList(dailyParameterVo.getTableNameKey().split("\\.")).get(1); |
|
|
|
ParameterVo parameterVo = new ParameterVo(); |
|
|
|
parameterVo.setName(dailyParameterVo.getColText()); |
|
|
|
|
|
|
|
List<String> columnNames = dailyReportVoList.stream().map(v-> { |
|
|
|
String columnName = ""; |
|
|
|
try { |
|
|
|
Field field = v.getClass().getDeclaredField(dailyParameterVo.getColName()); |
|
|
|
field.setAccessible(true); |
|
|
|
columnName = (String) field.get(v); |
|
|
|
} catch (NoSuchFieldException | IllegalAccessException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(columnName)){ |
|
|
|
return "-"; |
|
|
|
}else{ |
|
|
|
return columnName; |
|
|
|
} |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
parameterVo.setRow(columnNames); |
|
|
|
dynamicRows.add(parameterVo); |
|
|
|
} |
|
|
|
dailyReportAppVo.setDynamicRows(dynamicRows); |
|
|
|
return rb.success().setData(dailyReportAppVo); |
|
|
|
} |
|
|
|
} |
|
|
|