|
|
@@ -11,6 +11,7 @@ import me.zhengjie.application.admin.controller.vo.NotaryOrderQueryRsp;
|
|
|
import me.zhengjie.application.admin.controller.vo.PartyEntity;
|
|
|
import me.zhengjie.application.admin.service.AdminOrderService;
|
|
|
import me.zhengjie.application.bank.controller.vo.FileVo;
|
|
|
+import me.zhengjie.application.bank.controller.vo.OrderDetailDto;
|
|
|
import me.zhengjie.base.AppBaseResponse;
|
|
|
import me.zhengjie.base.AppResultData;
|
|
|
import me.zhengjie.base.ResultCode;
|
|
|
@@ -39,171 +40,170 @@ import java.util.List;
|
|
|
@RequiredArgsConstructor
|
|
|
public class AdminOrderController {
|
|
|
|
|
|
- private final AdminOrderService adminOrderService;
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单 查询
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/query")
|
|
|
- public AppBaseResponse<List<NotaryOrderQueryRsp>> query(@RequestBody NotaryOrderQueryReq req) {
|
|
|
- return adminOrderService.query(req);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询 客户经理信息
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/customerInfo")
|
|
|
- public AppBaseResponse<NotaryOrderQueryRsp> getCustomerInfo(@RequestBody HashMap<String,String> map) {
|
|
|
- return adminOrderService.getCustomerInfo(map);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询订单详情
|
|
|
- *
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/info")
|
|
|
- public AppBaseResponse<AdminOrderVO> orderInfo(@RequestBody HashMap<String, String> map) {
|
|
|
- AppBaseResponse response = new AppBaseResponse();
|
|
|
- String businessNo = map.get("businessNo");
|
|
|
- String contractNo = map.get("contractNo");
|
|
|
- response.setData(new AppResultData<AdminOrderVO>(adminOrderService.info(businessNo, contractNo)));
|
|
|
- return response;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询订单详情
|
|
|
- *
|
|
|
- * @param map
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/orderDetail")
|
|
|
- public AppBaseResponse<AdminOrderVO> orderDetail(@RequestBody HashMap<String, String> map) {
|
|
|
- AppBaseResponse response = new AppBaseResponse();
|
|
|
- String businessNo = map.get("businessNo");
|
|
|
- String contractNo = map.get("contractNo");
|
|
|
- response.setData(new AppResultData<AdminOrderVO>(adminOrderService.info(businessNo, contractNo)));
|
|
|
- return response;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单 查询 当事人
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/partys")
|
|
|
- public AppBaseResponse<List<PartyEntity>> partys(@RequestBody HashMap<String,String> map) {
|
|
|
- return adminOrderService.partys(map);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 订单问询人列表
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/orderQueryUser")
|
|
|
- public AppBaseResponse<List<PartyEntity>> orderQueryUser(@RequestBody HashMap<String, String> map) {
|
|
|
- return adminOrderService.orderQueryUser(map);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单 退回
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/orderReturn")
|
|
|
- public AppBaseResponse orderReturn(@RequestBody NotaryOrderQueryReq req) {
|
|
|
- return adminOrderService.orderReturn(req);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单 驳回
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AnonymousPostMapping("/orderReject")
|
|
|
- public AppBaseResponse orderReject(@RequestBody NotaryOrderQueryReq req) {
|
|
|
- return adminOrderService.orderReject(req);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单 当事人 通过
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping("/partyPass")
|
|
|
- public AppBaseResponse partyPass(@RequestBody NotaryOrderQueryReq req) {
|
|
|
- return adminOrderService.partyPass(req);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单信息审核通过
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
- @AnonymousPostMapping("/checkInfoPass")
|
|
|
- public AppBaseResponse checkInfoPass(@RequestBody NotaryOrderQueryReq req) {
|
|
|
- return adminOrderService.checkInfoPass(req);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 公证订单 人体合身验证
|
|
|
- * @param file
|
|
|
- * @param idCard
|
|
|
- * @param name
|
|
|
- * @return
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequestMapping("/auth")
|
|
|
- public me.zhengjie.base.BaseResponse auth(@RequestParam MultipartFile file, @RequestParam String idCard, @RequestParam String name){
|
|
|
- me.zhengjie.base.BaseResponse response = new me.zhengjie.base.BaseResponse();
|
|
|
- byte[] fileByte = null;
|
|
|
- try {
|
|
|
- fileByte = file.getBytes();
|
|
|
- } catch (IOException e) {
|
|
|
- response.fail(ResultCode.LIVE_VIDEO_CONVERSION.code()+"","图像文件转码失败!");
|
|
|
- return response;
|
|
|
- }
|
|
|
- String imageBase64 = Base64.getEncoder().encodeToString(fileByte);
|
|
|
- String result = TencentUtil.FaceImageBody(idCard, name, imageBase64);
|
|
|
- JSONObject object = JSON.parseObject(result);
|
|
|
- Float sim = Float.parseFloat(object.getString("Sim"));
|
|
|
- log.info("认证入参:" + idCard + "/" + name);
|
|
|
- log.info("识别值:" + sim);
|
|
|
- if (sim > 70) { // 大于70 认为是同一个人
|
|
|
- response.success("认证成功");
|
|
|
- } else {
|
|
|
- response.fail(ResultCode.LIVE_VIDEO_INVALID.code()+"", ResultCode.LIVE_VIDEO_INVALID.message());
|
|
|
- }
|
|
|
- return response;
|
|
|
- }
|
|
|
- @RequestMapping("/preview")
|
|
|
- public AppBaseResponse previewNotarization(@RequestBody NotaryOrderQueryReq req){
|
|
|
- return adminOrderService.previewNotarization(req);
|
|
|
- }
|
|
|
-
|
|
|
- @AnonymousPostMapping("/bankCustomer")
|
|
|
- public AppBaseResponse bankCustomer(@RequestBody NotaryOrderQueryReq req){
|
|
|
- return adminOrderService.bankCustomer(req);
|
|
|
- }
|
|
|
-
|
|
|
- @AnonymousPostMapping("/uploadNotarization")
|
|
|
- public AppBaseResponse uploadNotarization(@RequestBody FileVo file) {
|
|
|
- return adminOrderService.uploadNotarization(file);
|
|
|
- }
|
|
|
-
|
|
|
- @AnonymousPostMapping("/getDocList")
|
|
|
- public AppBaseResponse getDocList(@RequestBody NotaryOrderQueryReq req){
|
|
|
- return adminOrderService.getDocList(req);
|
|
|
- }
|
|
|
+ private final AdminOrderService adminOrderService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单 查询
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/query")
|
|
|
+ public AppBaseResponse<List<NotaryOrderQueryRsp>> query(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.query(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询 客户经理信息
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/customerInfo")
|
|
|
+ public AppBaseResponse<NotaryOrderQueryRsp> getCustomerInfo(@RequestBody HashMap<String, String> map) {
|
|
|
+ return adminOrderService.getCustomerInfo(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询订单详情
|
|
|
+ *
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/info")
|
|
|
+ public AppBaseResponse<AdminOrderVO> orderInfo(@RequestBody HashMap<String, String> map) {
|
|
|
+ AppBaseResponse response = new AppBaseResponse();
|
|
|
+ String businessNo = map.get("businessNo");
|
|
|
+ String contractNo = map.get("contractNo");
|
|
|
+ response.setData(new AppResultData<AdminOrderVO>(adminOrderService.info(businessNo, contractNo)));
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询订单详情
|
|
|
+ *
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/orderDetail")
|
|
|
+ public AppBaseResponse<OrderDetailDto> orderDetail(@RequestBody HashMap<String, String> map) {
|
|
|
+ AppBaseResponse<OrderDetailDto> response = new AppBaseResponse<>();
|
|
|
+ String businessNo = map.get("businessNo");
|
|
|
+ OrderDetailDto orderDetail = adminOrderService.getOrderDetail(businessNo);
|
|
|
+ response.setResult(orderDetail);
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单 查询 当事人
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/partys")
|
|
|
+ public AppBaseResponse<List<PartyEntity>> partys(@RequestBody HashMap<String, String> map) {
|
|
|
+ return adminOrderService.partys(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单问询人列表
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/orderQueryUser")
|
|
|
+ public AppBaseResponse<List<PartyEntity>> orderQueryUser(@RequestBody HashMap<String, String> map) {
|
|
|
+ return adminOrderService.orderQueryUser(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单 退回
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/orderReturn")
|
|
|
+ public AppBaseResponse orderReturn(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.orderReturn(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单 驳回
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AnonymousPostMapping("/orderReject")
|
|
|
+ public AppBaseResponse orderReject(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.orderReject(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单 当事人 通过
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/partyPass")
|
|
|
+ public AppBaseResponse partyPass(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.partyPass(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单信息审核通过
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AnonymousPostMapping("/checkInfoPass")
|
|
|
+ public AppBaseResponse checkInfoPass(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.checkInfoPass(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证订单 人体合身验证
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ * @param idCard
|
|
|
+ * @param name
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping("/auth")
|
|
|
+ public me.zhengjie.base.BaseResponse auth(@RequestParam MultipartFile file, @RequestParam String idCard,
|
|
|
+ @RequestParam String name) {
|
|
|
+ me.zhengjie.base.BaseResponse response = new me.zhengjie.base.BaseResponse();
|
|
|
+ byte[] fileByte = null;
|
|
|
+ try {
|
|
|
+ fileByte = file.getBytes();
|
|
|
+ } catch (IOException e) {
|
|
|
+ response.fail(ResultCode.LIVE_VIDEO_CONVERSION.code() + "", "图像文件转码失败!");
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+ String imageBase64 = Base64.getEncoder().encodeToString(fileByte);
|
|
|
+ String result = TencentUtil.FaceImageBody(idCard, name, imageBase64);
|
|
|
+ JSONObject object = JSON.parseObject(result);
|
|
|
+ Float sim = Float.parseFloat(object.getString("Sim"));
|
|
|
+ log.info("认证入参:" + idCard + "/" + name);
|
|
|
+ log.info("识别值:" + sim);
|
|
|
+ if (sim > 70) { // 大于70 认为是同一个人
|
|
|
+ response.success("认证成功");
|
|
|
+ } else {
|
|
|
+ response.fail(ResultCode.LIVE_VIDEO_INVALID.code() + "", ResultCode.LIVE_VIDEO_INVALID.message());
|
|
|
+ }
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/preview")
|
|
|
+ public AppBaseResponse previewNotarization(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.previewNotarization(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ @AnonymousPostMapping("/bankCustomer")
|
|
|
+ public AppBaseResponse bankCustomer(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.bankCustomer(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ @AnonymousPostMapping("/uploadNotarization")
|
|
|
+ public AppBaseResponse uploadNotarization(@RequestBody FileVo file) {
|
|
|
+ return adminOrderService.uploadNotarization(file);
|
|
|
+ }
|
|
|
+
|
|
|
+ @AnonymousPostMapping("/getDocList")
|
|
|
+ public AppBaseResponse getDocList(@RequestBody NotaryOrderQueryReq req) {
|
|
|
+ return adminOrderService.getDocList(req);
|
|
|
+ }
|
|
|
}
|
|
|
-
|