|
@ -497,7 +497,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
List<IcPsTripReportRecordErrorExcel> fileList = new ArrayList<>(); |
|
|
List<IcPsTripReportRecordErrorExcel> fileList = new ArrayList<>(); |
|
|
IcPsTripReportRecordErrorExcel excel = null; |
|
|
IcPsTripReportRecordErrorExcel excel = null; |
|
|
//1.读取Excel数据
|
|
|
//1.读取Excel数据
|
|
|
ExcelImportResult<IcPsTripReportRecordExcel> testExcelImportResult = ExcelPoiUtils.importExcel1(inputStream, 0, 3, IcPsTripReportRecordExcel.class); |
|
|
ExcelImportResult<IcPsTripReportRecordExcel> testExcelImportResult = ExcelPoiUtils.importExcel1(inputStream, 0, 2, IcPsTripReportRecordExcel.class); |
|
|
//2.存在错误行数据时存入错误数据集合中
|
|
|
//2.存在错误行数据时存入错误数据集合中
|
|
|
if (CollectionUtils.isNotEmpty(testExcelImportResult.getFailList())) { |
|
|
if (CollectionUtils.isNotEmpty(testExcelImportResult.getFailList())) { |
|
|
for (IcPsTripReportRecordExcel entity : testExcelImportResult.getFailList()) { |
|
|
for (IcPsTripReportRecordExcel entity : testExcelImportResult.getFailList()) { |
|
@ -522,8 +522,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
StringBuffer errMsg = new StringBuffer(""); |
|
|
StringBuffer errMsg = new StringBuffer(""); |
|
|
IcPsTripReportRecordExcel obj = iterator.next(); |
|
|
IcPsTripReportRecordExcel obj = iterator.next(); |
|
|
//返回方式为其他时需要填写"其他返回方式"
|
|
|
//返回方式为其他时需要填写"其他返回方式"
|
|
|
if (CollectionUtils.isEmpty(obj.getTraffic()) || |
|
|
if ("其他".equals(obj.getTrafficType()) && StringUtils.isBlank(obj.getTrafficTypeExplain())) { |
|
|
("其他".equals(obj.getTraffic().get(0).getTrafficType()) && StringUtils.isBlank(obj.getTraffic().get(0).getTrafficTypeExplain()))) { |
|
|
|
|
|
errMsg.append("返回方式为其他时,请补充“其他返回方式”;"); |
|
|
errMsg.append("返回方式为其他时,请补充“其他返回方式”;"); |
|
|
bl.set(true); |
|
|
bl.set(true); |
|
|
} |
|
|
} |
|
@ -567,17 +566,9 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
e.setAgencyId(staffInfo.getAgencyId()); |
|
|
e.setAgencyId(staffInfo.getAgencyId()); |
|
|
e.setPids(staffInfo.getAgencyPIds()); |
|
|
e.setPids(staffInfo.getAgencyPIds()); |
|
|
e.setUserType(IcResiUserConstant.USER_TYPE_IMPORT); |
|
|
e.setUserType(IcResiUserConstant.USER_TYPE_IMPORT); |
|
|
if (!CollectionUtils.isEmpty(l.getSource())) { |
|
|
if (trafficTypeMap.getData().containsKey(l.getTrafficType())) { |
|
|
e.setSourceAddress(l.getSource().get(0).getSourceAddress()); |
|
|
e.setTrafficType(trafficTypeMap.getData().get(l.getTrafficType())); |
|
|
e.setSourceDetailAddress(l.getSource().get(0).getSourceDetailAddress()); |
|
|
e.setTrafficTypeExplain(l.getTrafficTypeExplain()); |
|
|
} |
|
|
|
|
|
if (!CollectionUtils.isEmpty(l.getPresent())) { |
|
|
|
|
|
e.setPresentAddress(l.getPresent().get(0).getPresentAddress()); |
|
|
|
|
|
e.setDetailAddress(l.getPresent().get(0).getDetailAddress()); |
|
|
|
|
|
} |
|
|
|
|
|
if (!CollectionUtils.isEmpty(l.getTraffic()) && trafficTypeMap.getData().containsKey(l.getTraffic().get(0).getTrafficType())) { |
|
|
|
|
|
e.setTrafficType(trafficTypeMap.getData().get(l.getTraffic().get(0).getTrafficType())); |
|
|
|
|
|
e.setTrafficTypeExplain(l.getTraffic().get(0).getTrafficTypeExplain()); |
|
|
|
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(l.getSojournHistory())) { |
|
|
if (StringUtils.isNotBlank(l.getSojournHistory())) { |
|
|
e.setSojournHistory(sojournHistoryMap.getData().get(l.getSojournHistory())); |
|
|
e.setSojournHistory(sojournHistoryMap.getData().get(l.getSojournHistory())); |
|
|