master
周文涛 2 years ago
parent 03eed5fa84
commit 2d16bbd0c0

@ -37,6 +37,7 @@ import javax.annotation.Resource;
import java.awt.*; import java.awt.*;
import java.io.File; import java.io.File;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List; import java.util.List;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -145,9 +146,11 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
//ocrIdentifyDetail.setStatus(taskStatus); //ocrIdentifyDetail.setStatus(taskStatus);
ocrIdentifyDetail.setStatus(""); ocrIdentifyDetail.setStatus("");
ocrIdentifyDetail.setMessage(message); ocrIdentifyDetail.setMessage(message);
ocrIdentifyDetail.setOcrTime(new BigDecimal(ocrTime).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()); ocrIdentifyDetail.setOcrTime(new BigDecimal(ocrTime).setScale(2, RoundingMode.HALF_UP).doubleValue());
ocrIdentifyDetail.setNluTime(new BigDecimal(nluTime).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()); ocrIdentifyDetail.setNluTime(new BigDecimal(nluTime).setScale(2, RoundingMode.HALF_UP).doubleValue());
ocrIdentifyDetail.setSemanticResult(semanticResult.getJSONObject("semantic_result").toJSONString()); if (semanticResult!=null && semanticResult.getJSONObject("semantic_result")!=null) {
ocrIdentifyDetail.setSemanticResult(semanticResult.getJSONObject("semantic_result").toJSONString());
}
ocrIdentifyDetailService.save(ocrIdentifyDetail); ocrIdentifyDetailService.save(ocrIdentifyDetail);
} }
//=================== //===================

Loading…
Cancel
Save