Browse Source

评分修改

anderx 1 year ago
parent
commit
14cc3cefcb

+ 0 - 1
pom.xml

@@ -461,7 +461,6 @@
 			<version>0.2.15</version>
 			<scope>compile</scope>
 		</dependency>
-		<!-- 图片识别-->
 <!--		<dependency>-->
 <!--			<groupId>net.sourceforge.tess4j</groupId>-->
 <!--			<artifactId>tess4j</artifactId>-->

+ 15 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -9,6 +9,7 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.model.User;
 import com.goafanti.common.service.DistrictGlossoryService;
+import com.goafanti.common.service.ImageService;
 import com.goafanti.common.service.IndustryCategoryService;
 import com.goafanti.common.service.PovertyService;
 import com.goafanti.common.utils.*;
@@ -96,6 +97,8 @@ public class PublicController extends CertifyApiController {
 	private OrderProjectService orderProjectService;
 	@Resource
 	private UserOutboundService userOutboundService;
+	@Resource
+	private ImageService imageService;
 
 	@Value(value = "${patentTemplate}")
 	private String					patentTemplate		= null;
@@ -988,4 +991,16 @@ public class PublicController extends CertifyApiController {
 		System.out.println(in);
 		return new Result<>().data(userOutboundService.pushCallCompleted(in));
 	}
+
+
+//	/**
+//	 *
+//	 *
+//	 */
+//	@PostMapping("/OCR")
+//	@ResponseBody
+//	public Result ImageOCR(@RequestParam(value = "file", required = false) MultipartFile file) {
+//
+//		return new Result<>().data(imageService.ImageOCR(file));
+//	}
 }

+ 4 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1538,6 +1538,7 @@
             </if>
         </if>
         <if test="shiroType==2">
+            and a.clue_process in (1)
             <if test="aid !=null">
                 and a.aid= #{aid}
             </if>
@@ -1548,6 +1549,9 @@
         <if test="startTime  !=null and endTime != null">
             and a.clue_time between #{startTime} and #{endTime}
         </if>
+        <if test="userName!=null">
+            and a.nickname like concat('%',#{userName},'%')
+        </if>
     </sql>
     <select id="selectUserClueCount" resultType="java.lang.Integer">
         select count(*) from `user` a

+ 29 - 0
src/main/java/com/goafanti/common/service/ImageService.java

@@ -0,0 +1,29 @@
+package com.goafanti.common.service;
+
+import org.springframework.stereotype.Service;
+
+@Service
+public class ImageService {
+
+    private static final String DATA_PATH = "D:\\tessdata";
+    private static final String LANGUAGE = "chi_sim";
+
+
+//    public Object ImageOCR(MultipartFile file) {
+//        String result = null;
+//        try {
+//            byte[] bytes = file.getBytes();
+//            BufferedImage image = ImageIO.read(new ByteArrayInputStream(bytes));
+//            ITesseract instance = new Tesseract();
+//            instance.setDatapath(DATA_PATH);
+//            instance.setLanguage(LANGUAGE);
+//            result = instance.doOCR(image);
+//            System.out.println(result);
+//            result=result.replaceAll("\\r|\\n","-").replaceAll(" ","");
+//            System.out.println(result);
+//        } catch (IOException | TesseractException e) {
+//            throw new RuntimeException(e);
+//        }
+//        return result;
+//    }
+}

+ 9 - 0
src/main/java/com/goafanti/customer/bo/InputUserClueList.java

@@ -7,9 +7,18 @@ public class InputUserClueList {
     private String aid;
     private String startTime;
     private String endTime;
+    private String userName;
     private Integer pageSize;
     private Integer pageNo;
 
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
     public String getStartTime() {
         return startTime;
     }

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -1,8 +1,8 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-static.host=//static.jishutao.com/1.3.29
-#static.host=//172.16.1.187/1.3.29
+#static.host=//static.jishutao.com/1.3.29
+static.host=//172.16.1.187/1.3.29
 
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20241122?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false