Browse Source

合同审核权限版,与上线版本保持一致,20200507

jessie 5 năm trước cách đây
mục cha
commit
8ad98126af

+ 1 - 1
pom.xml

@@ -12,7 +12,7 @@
     <artifactId>cr</artifactId>
     <version>0.0.1</version>
     <name>cr</name>
-    <description>合同审核系统</description>
+    <description>合同审核系统 权限版本。</description>
 
     <properties>
         <java.version>1.8</java.version>

+ 10 - 4
src/main/java/com/pavis/ai/app/cr/controller/Controller.java

@@ -11,10 +11,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 /**
@@ -60,4 +57,13 @@ public class Controller {
             }
         }
     }
+
+    @ApiOperation("测试接口1")
+    @GetMapping("/cr")
+    public ResultBody get() {
+        // ResData resData = new ResData();
+        // resData.setReqId("01");
+        // sendService.send(resData);
+        return ResultBody.ok().data(System.currentTimeMillis());
+    }
 }

+ 59 - 59
src/main/java/com/pavis/ai/app/cr/controller/TestController.java

@@ -1,59 +1,59 @@
-package com.pavis.ai.app.cr.controller;
-
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.pavis.ai.app.cr.common.http.ResultBody;
-import com.pavis.ai.app.cr.common.utils.IgnoreUtils;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @author guanhuijuan
- * @create 2020-03-04 14:03
- * @desc
- **/
-@Slf4j
-@RestController
-@RequestMapping("/api")
-public class TestController {
-
-    // @Autowired
-    // private SendService sendService;
-
-    @ApiOperation("测试接口1")
-    @GetMapping("/cr")
-    public ResultBody get()  {
-        // ResData resData = new ResData();
-        // resData.setReqId("01");
-        // sendService.send(resData);
-        return ResultBody.ok().data(System.currentTimeMillis());
-    }
-
-    @ApiOperation("测试接口1")
-    @PostMapping("/cr/test/{id}")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "id", value = "唯一标识id", required = false, dataType = "string", paramType = "path")
-    })
-    public ResultBody testOne(@PathVariable("id") String id)  {
-        // ResData resData = new ResData();
-        // resData.setReqId("01");
-        // sendService.send(resData);
-        return ResultBody.ok().data(id);
-    }
-
-    @ApiOperation("测试接口2")
-    @PostMapping("/cr/data")
-    public ResultBody testTwo(@RequestBody ResultBody resultBody)  {
-        System.err.println("tes<>"+ JSON.toJSONString(resultBody));
-        return ResultBody.ok().data(resultBody);
-    }
-
-
-}
+// package com.pavis.ai.app.cr.controller;
+//
+//
+// import com.alibaba.fastjson.JSON;
+// import com.alibaba.fastjson.JSONObject;
+// import com.pavis.ai.app.cr.common.http.ResultBody;
+// import com.pavis.ai.app.cr.common.utils.IgnoreUtils;
+// import io.swagger.annotations.ApiImplicitParam;
+// import io.swagger.annotations.ApiImplicitParams;
+// import io.swagger.annotations.ApiOperation;
+// import lombok.extern.slf4j.Slf4j;
+// import org.apache.commons.lang3.StringUtils;
+// import org.springframework.beans.BeanUtils;
+// import org.springframework.beans.factory.annotation.Autowired;
+// import org.springframework.web.bind.annotation.*;
+//
+// /**
+//  * @author guanhuijuan
+//  * @create 2020-03-04 14:03
+//  * @desc
+//  **/
+// @Slf4j
+// @RestController
+// @RequestMapping("/api")
+// public class TestController {
+//
+//     // @Autowired
+//     // private SendService sendService;
+//
+//     @ApiOperation("测试接口1")
+//     @GetMapping("/cr")
+//     public ResultBody get()  {
+//         // ResData resData = new ResData();
+//         // resData.setReqId("01");
+//         // sendService.send(resData);
+//         return ResultBody.ok().data(System.currentTimeMillis());
+//     }
+//
+//     @ApiOperation("测试接口1")
+//     @PostMapping("/cr/test/{id}")
+//     @ApiImplicitParams({
+//             @ApiImplicitParam(name = "id", value = "唯一标识id", required = false, dataType = "string", paramType = "path")
+//     })
+//     public ResultBody testOne(@PathVariable("id") String id)  {
+//         // ResData resData = new ResData();
+//         // resData.setReqId("01");
+//         // sendService.send(resData);
+//         return ResultBody.ok().data(id);
+//     }
+//
+//     @ApiOperation("测试接口2")
+//     @PostMapping("/cr/data")
+//     public ResultBody testTwo(@RequestBody ResultBody resultBody)  {
+//         System.err.println("tes<>"+ JSON.toJSONString(resultBody));
+//         return ResultBody.ok().data(resultBody);
+//     }
+//
+//
+// }

+ 5 - 1
src/main/java/com/pavis/ai/app/cr/service/InternalSendService.java

@@ -12,7 +12,6 @@ import java.util.Map;
  * @desc 内部算法调用。
  **/
 // 测试
-// @FeignClient(value = "internalSendService",url = "http://192.168.1.60:9955")
 @FeignClient(value = "internalSendService",url = "http://192.168.1.60:9955")
 // 线上
 // @FeignClient(value = "internalSendService",url = "http://alg:9955")
@@ -22,4 +21,9 @@ public interface InternalSendService {
             consumes = MediaType.MULTIPART_FORM_DATA_VALUE,
             produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
     String cr(Map<String, ?> params);
+
+    // @PostMapping(value = "/handel_v",
+    //         consumes = MediaType.MULTIPART_FORM_DATA_VALUE,
+    //         produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    // String cr(Map<String, ?> params);
 }

+ 1 - 1
src/main/java/com/pavis/ai/app/cr/service/UploadService.java

@@ -1,6 +1,6 @@
 package com.pavis.ai.app.cr.service;
 
-import com.pavis.ai.app.cr.form.ResData;
+import com.pavis.ai.app.crocr.form.ResData;
 import org.springframework.web.multipart.MultipartFile;
 
 /**