|
@@ -465,7 +465,8 @@ public class CustomExcelImportUtil {
|
|
|
//String path = "C:\\Users\\cyz\\Downloads\\老版维保计划\\noperson";
|
|
|
//File dirFile = new File("C:\\Users\\cyz\\Downloads\\老版维保计划\\noperson");
|
|
|
String[] files = {"C:\\Users\\LTKJ\\Downloads\\2022.1.28保养任务 终版 导入.xls"};
|
|
|
- for(String fileStr:files){
|
|
|
+ DateUtils.strToLocalDate("2022-09-23", DateUtils.PATTERN_YMD);
|
|
|
+ /*for(String fileStr:files){
|
|
|
System.out.println(fileStr);
|
|
|
InputStream inputstream = new FileInputStream(fileStr);
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
@@ -475,7 +476,7 @@ public class CustomExcelImportUtil {
|
|
|
System.out.println(item.toString());
|
|
|
});
|
|
|
System.out.println("处理数量:" + list.size());
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
public static List<SbModel> importModelList(InputStream inputstream) throws IOException, InvalidFormatException {
|
|
@@ -1086,11 +1087,17 @@ public class CustomExcelImportUtil {
|
|
|
}
|
|
|
checkStandard.setLastDate(DateUtils.strToLocalDate((getCellValue(row.getCell(25))), DateUtils.PATTERN_YMD));
|
|
|
checkStandard.setRequirement(getCellValue(row.getCell(26)));
|
|
|
- checkStandard.setRemark(getCellValue(row.getCell(27)));
|
|
|
+ //checkStandard.setRemark(getCellValue(row.getCell(27)));
|
|
|
|
|
|
// 检定日期和检定周期
|
|
|
- record.setCheckDate(DateUtils.strToLocalDate((getCellValue(row.getCell(28))), DateUtils.PATTERN_YMD));
|
|
|
- record.setCheckPeriod(Integer.valueOf(getCellValue(row.getCell(29))));
|
|
|
+ String tempInfo = getCellValue(row.getCell(27));
|
|
|
+ if(StringUtils.isNotBlank(tempInfo)){
|
|
|
+ record.setCheckDate(DateUtils.strToLocalDate(tempInfo, DateUtils.PATTERN_YMD));
|
|
|
+ }
|
|
|
+ tempInfo = getCellValue(row.getCell(28));
|
|
|
+ if(StringUtils.isNotBlank(tempInfo)){
|
|
|
+ record.setCheckPeriod(Integer.valueOf(tempInfo));
|
|
|
+ }
|
|
|
checkStandard.setCreatedUserId("1");
|
|
|
record.setCheckStandard(checkStandard);
|
|
|
record.setPartInfo(partInfo);
|
|
@@ -1108,6 +1115,7 @@ public class CustomExcelImportUtil {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static List<SbInfoMeasureVO> importSbInfoMeasureList(InputStream inputstream) throws IOException, InvalidFormatException {
|
|
|
if (inputstream == null) {
|
|
|
return Collections.emptyList();
|