自动处理gamma部分写日志功能,部分字段为空的情况导致写入失败问题修改
人工交互gamma部分查看日志功能,部分字段为空的情况导致查看失败问题修改
This commit is contained in:
parent
7b2fda268d
commit
8fae16d715
|
@ -335,7 +335,11 @@ public class MyLogFormatUtil {
|
|||
public static List<String> getValuePoint(List<String> source, int num) {
|
||||
List<String> result = Lists.newLinkedList();
|
||||
for (String str : source) {
|
||||
result.add(String.format("%." + num + "f", Double.parseDouble(str)));
|
||||
if (StringUtils.isNotBlank(str)) {
|
||||
result.add(String.format("%." + num + "f", Double.parseDouble(str)));
|
||||
} else {
|
||||
result.add("null");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -2607,7 +2607,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
String data16 = "Name : %-15s Pass/Fail : %-9s Value : %-14s Test : %-16s";
|
||||
String qcName = middleData.QC_CHECK_QC_NAME.get(i);
|
||||
String qcResult = middleData.QC_CHECK_QC_RESULT.get(i).equals("0") ? "Fail" : "Pass";
|
||||
String qcValue = String.format("%.3f", Double.valueOf(middleData.QC_CHECK_QC_VALUE.get(i)));
|
||||
String qcValue = StringUtils.isBlank(middleData.QC_CHECK_QC_VALUE.get(i))?"null":String.format("%.3f", Double.valueOf(middleData.QC_CHECK_QC_VALUE.get(i)));
|
||||
String standard = middleData.QC_CHECK_QC_STANDARD.get(i);
|
||||
strBuffer.append(rowFormat(data16, qcName, qcResult, qcValue, standard));
|
||||
//换行
|
||||
|
|
Loading…
Reference in New Issue
Block a user