国内海外清单 标准的导入导出
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ public class IExportServiceImpl implements IExportService {
|
||||
tsUsers.forEach(tsUser -> {
|
||||
tsUserMap.put(tsUser.getAccount(),tsUser.getUname());
|
||||
});
|
||||
List<importExcelDTO> res= ExcelImportUtilByWk.readExcelpublic(importExcelDTO.class,file);
|
||||
List<importExcelDTO> res= ExcelImportUtilByWk.readExcelpublic(importExcelDTO.class,file,stringBuilder);
|
||||
if (null!=res) {
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
int i = 1;
|
||||
|
||||
+5
-2
@@ -34,7 +34,7 @@ public class ExcelImportUtilByWk {
|
||||
* @param file 上传的Excel文件
|
||||
* @return 读取结果列表,读取失败时返回null
|
||||
*/
|
||||
public static <T> List<T> readExcelpublic(Class<T> tClass,MultipartFile file) {
|
||||
public static <T> List<T> readExcelpublic(Class<T> tClass,MultipartFile file,StringBuilder stringBuilder) {
|
||||
|
||||
Workbook workbook = null;
|
||||
|
||||
@@ -105,7 +105,10 @@ public class ExcelImportUtilByWk {
|
||||
String value = convertCellValueToString(cell);
|
||||
Date date= DateUtils.stringToDate(TrainFormDate.dealWithTimeZoneyyyy(value,mapExcel.get(a).exportFormat()),mapExcel.get(a).exportFormat());
|
||||
// Date date= DateUtils.stringToDate(value,mapExcel.get(a).exportFormat());
|
||||
if (null==date){
|
||||
if (null!=value && !"".equals(value) && null==date){
|
||||
stringBuilder.append("第"+rowNum+"行第"+a+"列,日期格式存在问题请检查;");
|
||||
}
|
||||
if (null==date && null!=value){
|
||||
nums++;
|
||||
}
|
||||
map.get(a).set(o, date);
|
||||
|
||||
Reference in New Issue
Block a user