Browse Source

Merge remote-tracking branch 'origin/master'

Reiskuchen 5 năm trước cách đây
mục cha
commit
ef8e335b8a

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ScreenshotServiceImpl.java

@@ -528,9 +528,10 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
     public static boolean isDocument(List<String> textContents) {
         boolean find = false;
         for (int i = 0; i < textContents.size() && i <= 2; i++) {//出现在前三行
-            String text = textContents.get(i);
+            String text = textContents.get(i).trim();
             if (text.endsWith("Word")
                     || text.endsWith("Excel")
+                    || text.endsWith("Ecel")
                     || text.endsWith("Power Point")
                     || text.endsWith("Adobe Reader")) {
                 find = true;

+ 9 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/CheckPicUtil.java

@@ -92,7 +92,7 @@ public class CheckPicUtil {
      */
     public static Map<String,Object>  generalPicTextContentMap (String path,String token) {
         // 请求url
-        String url = "https://aip.baidubce.com/rest/2.0/ocr/v1/general";
+        String url = "https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic";
         try {
             // 本地文件路径
             String filePath = path;
@@ -109,12 +109,15 @@ public class CheckPicUtil {
             List<String> wordsList = new ArrayList<>();
             JSONObject object = JSONArray.parseObject(result);
             JSONArray resultArray = object.getJSONArray("words_result");
-            for (int i = 0; i < resultArray.size(); i++) {
-                JSONObject json  = resultArray.getJSONObject(i);
-                String words = (String)json.get("words");
-                System.out.println("words"+i+":"+words);
-                wordsList.add(words);
+            if (resultArray != null) {//超过上限会返回错误json数据,{"error_code":17,"error_msg":"Open api daily request limit reached"}
+                for (int i = 0; i < resultArray.size(); i++) {
+                    JSONObject json  = resultArray.getJSONObject(i);
+                    String words = (String)json.get("words");
+                    System.out.println("words"+i+":"+words);
+                    wordsList.add(words);
+                }
             }
+
             System.out.println(wordsList);
             Map<String,Object> map = new HashMap<>();
             map.put("wordsList",wordsList);

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/ImageCompare.java

@@ -83,7 +83,7 @@ public class ImageCompare {
         for (MatOfPoint matOfPoint : mat2_list)
         {
             Rect rect = Imgproc.boundingRect(matOfPoint);
-            if (rect.width >= 280 && rect.height >= 280) {
+            if ((rect.width >= 640 && rect.height >= 480) || (rect.width >= 480 && rect.height >= 640)) {
 //                System.out.println("位置==["+rect.x +","+ rect.y+"], 大小=" +rect.width+"x"+rect.height+", 包含点=" + matOfPoint.toList().size());
                 Imgproc.rectangle(mat_result1, rect.tl(), rect.br(), new Scalar(0, 0, 255),2);
                 Imgproc.rectangle(mat_result2, rect.tl(), rect.br(), new Scalar(0, 0, 255),2);

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -16,7 +16,8 @@
                     <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">登录</el-button>
                 </el-form-item>
                 <div class="toRegister">
-                    <el-link type="primary" @click="jumpTo">立即注册</el-link>
+                    <el-link type="primary" style="margin-right:5px;" :underline="false"><a style="color:#409EFF;text-decoration:none" href="http://gsgj.ttkuaiban.com/download/WorkTime.exe" download="工时管家">客户端下载</a></el-link>
+                    <el-link type="primary" @click="jumpTo" :underline="false">立即注册</el-link>
                 </div>
             </el-form>
         </div>