Browse Source

1. 修复小票出错后没有将t_done字段设置为1的bug

semi 4 years ago
parent
commit
e8be0d01fe

+ 4 - 7
src/main/java/com/pavis/ai/kwp/ioc/service/impl/OcrTripServiceImpl.java

@@ -83,14 +83,11 @@ public class OcrTripServiceImpl extends ServiceImpl<OcrTripMapper, OcrTrip> impl
             if (!StringUtils.equals(Constants.OP_CODE_OCR_SUCCESS, ret.getCode())) {
                 // OCR识别错误
                 tripLog.setTError(ret.getCode() + ":" + ret.getMessage());
-                tripLog.setTTimeConsume("-1");
-                tripLog.setTDone(false);
-            } else {
-                tripLog.setTStartTime(ret.getStart());
-                tripLog.setTFinishTime(ret.getEnd());
-                tripLog.setTTimeConsume(DateTimeUtils.calculateTimeConsume(tripLog.getTStartTime(), tripLog.getTFinishTime()));
-                tripLog.setTDone(true);
             }
+            tripLog.setTDone(true);
+            tripLog.setTStartTime(ret.getStart());
+            tripLog.setTFinishTime(ret.getEnd());
+            tripLog.setTTimeConsume(DateTimeUtils.calculateTimeConsume(tripLog.getTStartTime(), tripLog.getTFinishTime()));
             tripLogMapper.updateById(tripLog);
         }
 

+ 2 - 2
src/main/resources/application-dev.yml

@@ -10,10 +10,10 @@ spring:
     #    driver-class-name: com.mysql.jdbc.Driver
     #    username: root
     #    password: Semi.1001
-    url: jdbc:mysql://localhost:3306/ocr_dev?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT
+    url: jdbc:mysql://192.168.0.202:13386/p?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT
     driver-class-name: com.mysql.jdbc.Driver
     username: root
-    password: Semi.1001
+    password: a
   #    url: jdbc:mysql://106.12.166.85:3309/ocr_test?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT
   #    driver-class-name: com.mysql.jdbc.Driver
   #    username: root