|
|
@ -576,7 +576,7 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
public ResultBean<DailyReportAppVo> list2(String date) { |
|
|
|
ResultBean<DailyReportAppVo> rb = ResultBean.fireFail(); |
|
|
|
DailyReportAppVo dailyReportAppVo = new DailyReportAppVo(); |
|
|
|
dailyReportAppVo.setTitle("集团(事业部)"+date+"日报"); |
|
|
|
dailyReportAppVo.setTitle("集团(事业部)" + date + "日报"); |
|
|
|
List<BrandVo> rows1 = baseMapper.list2(date); |
|
|
|
rows1.removeAll(Collections.singleton(null)); |
|
|
|
dailyReportAppVo.setRow1(rows1); |
|
|
@ -819,7 +819,7 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
ResultBean<DailyReportAppVo> rb = ResultBean.fireFail(); |
|
|
|
DailyReportAppVo dailyReportAppVo = new DailyReportAppVo(); |
|
|
|
List<BrandVo> rows1 = baseMapper.list3(date, busOrgSid); |
|
|
|
dailyReportAppVo.setTitle("事业部(分公司)"+date+"日报"); |
|
|
|
dailyReportAppVo.setTitle("事业部(分公司)" + date + "日报"); |
|
|
|
rows1.removeAll(Collections.singleton(null)); |
|
|
|
dailyReportAppVo.setRow1(rows1); |
|
|
|
List<DailyReportVo> dailyReportVoList = baseMapper.selectReport3(date, busOrgSid); |
|
|
@ -1060,11 +1060,15 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
public ResultBean<DailyReportAppVo> list4(String date, String useOrgSid) { |
|
|
|
ResultBean<DailyReportAppVo> rb = ResultBean.fireFail(); |
|
|
|
DailyReportAppVo dailyReportAppVo = new DailyReportAppVo(); |
|
|
|
dailyReportAppVo.setTitle("分公司"+date+"日报"); |
|
|
|
dailyReportAppVo.setTitle("分公司" + date + "日报"); |
|
|
|
List<BrandVo> rows1 = baseMapper.selectByBrand2(useOrgSid, date); |
|
|
|
rows1.removeAll(Collections.singleton(null)); |
|
|
|
dailyReportAppVo.setRow1(rows1); |
|
|
|
List<String> brandList = rows1.stream().map(v -> v.getLinkSid()).collect(Collectors.toList()); |
|
|
|
brandList.removeAll(Collections.singleton(null)); |
|
|
|
if(brandList.isEmpty()){ |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
List<DailyReportVo> dailyReportVoList = baseMapper.selectReport4(brandList, useOrgSid, date); |
|
|
|
//燃料
|
|
|
|
List<String> row2 = dailyReportVoList.stream().map(v -> v.getFuelTypeValue()).collect(Collectors.toList()); |
|
|
@ -1314,7 +1318,7 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
ParameterVo parameterVo = new ParameterVo(); |
|
|
|
parameterVo.setName(dailyParameterVo.getColText()); |
|
|
|
|
|
|
|
List<String> columnNames = dailyReportVoList.stream().map(v-> { |
|
|
|
List<String> columnNames = dailyReportVoList.stream().map(v -> { |
|
|
|
String columnName = ""; |
|
|
|
try { |
|
|
|
Field field = v.getClass().getDeclaredField(dailyParameterVo.getColName()); |
|
|
@ -1323,9 +1327,9 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
} catch (NoSuchFieldException | IllegalAccessException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(columnName)){ |
|
|
|
if (StringUtils.isBlank(columnName)) { |
|
|
|
return "-"; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
return columnName; |
|
|
|
} |
|
|
|
}).collect(Collectors.toList()); |
|
|
@ -1334,6 +1338,54 @@ public class DailyReportService extends MybatisBaseService<DailyReportMapper, Da |
|
|
|
dynamicRows.add(parameterVo); |
|
|
|
} |
|
|
|
dailyReportAppVo.setDynamicRows(dynamicRows); |
|
|
|
if (!dynamicRows.isEmpty()) { |
|
|
|
for (int i = 0; i < dynamicRows.size(); i++) { |
|
|
|
if (i > 6) { |
|
|
|
break; |
|
|
|
} else { |
|
|
|
ParameterVo parameterVo = dynamicRows.get(i); |
|
|
|
switch (i) { |
|
|
|
case 0: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow101(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow102(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow103(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow104(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow105(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow106(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
case 6: |
|
|
|
if (parameterVo != null) { |
|
|
|
dailyReportAppVo.setRow107(parameterVo); |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(dailyReportAppVo); |
|
|
|
} |
|
|
|
} |
|
|
|