Commit 83d8231d authored by chenhao's avatar chenhao

添加微型消防站的excle导出魔板

parent 9c226612
...@@ -1048,6 +1048,8 @@ if (excelDtoList != null && excelDtoList.size() > 0) { ...@@ -1048,6 +1048,8 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
data = initDutyCarTemplate(ids); data = initDutyCarTemplate(ids);
} else if (ExcelEnums.RYZB.getType().equals(excelDto.getType())) { } else if (ExcelEnums.RYZB.getType().equals(excelDto.getType())) {
data = initDutyPersonTemplate(ids); data = initDutyPersonTemplate(ids);
}else if(ExcelEnums.WXXFZB.getType().equals(excelDto.getType())){
data = initDutyDutyFireFightingTemplate(ids);
} }
// 获取日期 // 获取日期
List<Map<String, Object>> rangeDate = dutyPersonShiftService.getBaseMapper().genRangeDate(beginDate, endDate); List<Map<String, Object>> rangeDate = dutyPersonShiftService.getBaseMapper().genRangeDate(beginDate, endDate);
...@@ -1056,6 +1058,29 @@ if (excelDtoList != null && excelDtoList.size() > 0) { ...@@ -1056,6 +1058,29 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
exportDutyTemplate(response, excelDto.getClassUrl(), dayByMonth, excelDto, data, true); exportDutyTemplate(response, excelDto.getClassUrl(), dayByMonth, excelDto, data, true);
} }
private List<List<Object>> initDutyDutyFireFightingTemplate(String ids) {
List<List<Object>> data = new ArrayList<>();
// 根据id列表获取单位下的微型消防站集合
List<String> companyIdList = Lists.newArrayList();
if (!ValidationUtil.isEmpty(ids)) {
companyIdList = Lists.newArrayList(ids.split(","));
}
List<FirefightersDto> firefightersDtoList = fireTeamService.getFighterByTeamId(companyIdList);
if (!firefightersDtoList.isEmpty()) {
AtomicInteger row = new AtomicInteger(1);
firefightersDtoList.forEach(o -> {
ArrayList<Object> list = new ArrayList<>();
list.add(row.getAndIncrement());
list.add(o.getFireTeamName() + "@" + o.getFireTeamId());
list.add(o.getName() + "@" + o.getSequenceNbr());
list.add(o.getJobTitle() + "@" + o.getJobTitleCode());
data.add(list);
});
}
return data;
}
public void dutyInfoExport(HttpServletResponse response, String beginDate, String endDate, ExcelDto excelDto) public void dutyInfoExport(HttpServletResponse response, String beginDate, String endDate, ExcelDto excelDto)
throws ParseException { throws ParseException {
// 获取日期 // 获取日期
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment