Commit ffd06c9b authored by chenhao's avatar chenhao

x修改代码

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