文件转换读取SPC内容时,calibra_time不存在时读取失败问题修改
This commit is contained in:
parent
5290d50b65
commit
3e6585537e
|
@ -963,8 +963,11 @@ public class FileFtransitUtil {
|
||||||
|
|
||||||
int cal_s = (int) CalS;
|
int cal_s = (int) CalS;
|
||||||
int cal_ms = (int) ((CalS - cal_s) * 10);
|
int cal_ms = (int) ((CalS - cal_s) * 10);
|
||||||
String calibra_time = LocalDateTime.of(CalY, CalM, CalD, CalH, CalMin, cal_s, cal_ms)
|
String calibra_time = "";
|
||||||
.format(DateTimeFormatter.ofPattern(DateConstant.DATE_BIAS_TIME_MS));
|
if (CalY > 0 && CalM > 0 && CalD >= 0 && CalH >= 0 && CalMin >= 0 && cal_s >= 0 && cal_ms >= 0) {
|
||||||
|
calibra_time = LocalDateTime.of(CalY, CalM, CalD, CalH, CalMin, cal_s, cal_ms)
|
||||||
|
.format(DateTimeFormatter.ofPattern(DateConstant.DATE_BIAS_TIME_MS));
|
||||||
|
}
|
||||||
datas.setCalibra_time(calibra_time);
|
datas.setCalibra_time(calibra_time);
|
||||||
|
|
||||||
// g_Energy g_Resolution
|
// g_Energy g_Resolution
|
||||||
|
@ -1631,7 +1634,7 @@ public class FileFtransitUtil {
|
||||||
default: temp+="Jan"; break;
|
default: temp+="Jan"; break;
|
||||||
}
|
}
|
||||||
temp+=String.format("-%s", str.substring(2, 4)); // DD-MMM-YY
|
temp+=String.format("-%s", str.substring(2, 4)); // DD-MMM-YY
|
||||||
if(str.substring(0, 2) == "20") { // DD-MMM-YY*
|
if(str.substring(0, 2).equalsIgnoreCase("20")) { // DD-MMM-YY*
|
||||||
temp+="1";
|
temp+="1";
|
||||||
} else {
|
} else {
|
||||||
temp+="0";
|
temp+="0";
|
||||||
|
@ -1639,6 +1642,7 @@ public class FileFtransitUtil {
|
||||||
} else {
|
} else {
|
||||||
temp = StringPool.DASH;
|
temp = StringPool.DASH;
|
||||||
temp+="Jan";
|
temp+="Jan";
|
||||||
|
temp+= StringPool.DASH;
|
||||||
temp+="0";
|
temp+="0";
|
||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user