Commit ffd06c9b authored by chenhao's avatar chenhao

x修改代码

parent 1b73e96b
......@@ -177,6 +177,9 @@ public class ExcelServiceImpl {
@Autowired
FirefightersWorkexperienceServiceImpl ifirefightersWorkexperienceService;
@Autowired
IDutyFireFightingService dutyFireFightingService;
public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException {
String url = excelDto.getClassUrl();
Class<?> clz = Class.forName(url);
......@@ -934,7 +937,7 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
dutyPersonService.saveImportData(dataList);
}else if (ExcelEnums.WXXFZB.getType().equals(dutyType)) {
initDutyFireFightingData(sheet, dataList, dayByMonth);
dutyPersonService.saveImportData(dataList);
dutyFireFightingService.saveImportData(dataList);
}
}
}
......@@ -1056,18 +1059,21 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
if (row == null) {
continue;
}
Cell cell = row.getCell(1);
Cell cell = row.getCell(4);
if(cell ==null ){
continue;
}
cell = row.getCell(1);
if(cell !=null ){
String[] split = cell.toString().split("@");
dutyFireFightingDto.setTeamId(split[1]);
dutyFireFightingDto.setTeamName(split[0]);
}
cell = row.getCell(2);
if (cell != null) {
String[] splitStr = cell.toString().split("@");
dutyFireFightingDto.setUserName(MAINTENANCE_PERSON);
dutyFireFightingDto.setUserId(MAINTENANCE_PERSON);
dutyFireFightingDto.setUserName(splitStr[0]);
dutyFireFightingDto.setUserId(splitStr[1]);
}
cell = row.getCell(3);
if (cell != null) {
......@@ -1200,8 +1206,7 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
exportDutyTemplate(response, excelDto.getClassUrl(), dayByMonth, excelDto, data, false,false);
}
@Autowired
IDutyFireFightingService dutyFireFightingService;
private List<List<Object>> initDutyDutyFireFightingTemplate(String beginDate, String endDate,
List<String> dayByMonth) 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