|
@@ -6,14 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import me.zhengjie.application.bank.controller.vo.Order;
|
|
|
|
|
-import me.zhengjie.application.bank.controller.vo.Sms;
|
|
|
|
|
|
|
+import me.zhengjie.application.bank.controller.vo.*;
|
|
|
import me.zhengjie.application.bank.service.*;
|
|
import me.zhengjie.application.bank.service.*;
|
|
|
import me.zhengjie.dao.mybatis.entity.*;
|
|
import me.zhengjie.dao.mybatis.entity.*;
|
|
|
import me.zhengjie.domain.order.OrderBizCodeMessage;
|
|
import me.zhengjie.domain.order.OrderBizCodeMessage;
|
|
|
import me.zhengjie.dao.jdbc.OrderDao;
|
|
import me.zhengjie.dao.jdbc.OrderDao;
|
|
|
-import me.zhengjie.application.bank.controller.vo.OrderDetailDto;
|
|
|
|
|
-import me.zhengjie.application.bank.controller.vo.OrderDto;
|
|
|
|
|
import me.zhengjie.base.AppBaseResponse;
|
|
import me.zhengjie.base.AppBaseResponse;
|
|
|
import me.zhengjie.base.plus.QueryWrapperUtil;
|
|
import me.zhengjie.base.plus.QueryWrapperUtil;
|
|
|
import me.zhengjie.base.util.DateFormatUtils;
|
|
import me.zhengjie.base.util.DateFormatUtils;
|
|
@@ -41,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -94,25 +92,25 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
@Override
|
|
@Override
|
|
|
public int checkOrder(Sms sms) {
|
|
public int checkOrder(Sms sms) {
|
|
|
|
|
|
|
|
- AppBorrowerEntity borrowerEntity = new AppBorrowerEntity();
|
|
|
|
|
|
|
+ BorrowerEntity borrowerEntity = new BorrowerEntity();
|
|
|
borrowerEntity.setUsername(sms.getUserName());
|
|
borrowerEntity.setUsername(sms.getUserName());
|
|
|
borrowerEntity.setIdCard(sms.getIdCode());
|
|
borrowerEntity.setIdCard(sms.getIdCode());
|
|
|
borrowerEntity.setPhone(sms.getPhone());
|
|
borrowerEntity.setPhone(sms.getPhone());
|
|
|
- QueryWrapper<AppBorrowerEntity> borrowerQuery = QueryWrapperUtil.convertQuery(borrowerEntity);
|
|
|
|
|
|
|
+ QueryWrapper<BorrowerEntity> borrowerQuery = QueryWrapperUtil.convertQuery(borrowerEntity);
|
|
|
long borrower = borrowerService.count(borrowerQuery);
|
|
long borrower = borrowerService.count(borrowerQuery);
|
|
|
|
|
|
|
|
- AppMortgageEntity mortgageEntity = new AppMortgageEntity();
|
|
|
|
|
|
|
+ MortgageEntity mortgageEntity = new MortgageEntity();
|
|
|
mortgageEntity.setUsername(sms.getUserName());
|
|
mortgageEntity.setUsername(sms.getUserName());
|
|
|
mortgageEntity.setIdCard(sms.getIdCode());
|
|
mortgageEntity.setIdCard(sms.getIdCode());
|
|
|
mortgageEntity.setPhone(sms.getPhone());
|
|
mortgageEntity.setPhone(sms.getPhone());
|
|
|
- QueryWrapper<AppMortgageEntity> mortgageQuery = QueryWrapperUtil.convertQuery(mortgageEntity);
|
|
|
|
|
|
|
+ QueryWrapper<MortgageEntity> mortgageQuery = QueryWrapperUtil.convertQuery(mortgageEntity);
|
|
|
long mortgage = mortgageService.count(mortgageQuery);
|
|
long mortgage = mortgageService.count(mortgageQuery);
|
|
|
|
|
|
|
|
- AppGuaranteeEntity guaranteeEntity = new AppGuaranteeEntity();
|
|
|
|
|
|
|
+ GuaranteeEntity guaranteeEntity = new GuaranteeEntity();
|
|
|
guaranteeEntity.setUsername(sms.getUserName());
|
|
guaranteeEntity.setUsername(sms.getUserName());
|
|
|
guaranteeEntity.setIdCard(sms.getIdCode());
|
|
guaranteeEntity.setIdCard(sms.getIdCode());
|
|
|
guaranteeEntity.setPhone(sms.getPhone());
|
|
guaranteeEntity.setPhone(sms.getPhone());
|
|
|
- QueryWrapper<AppGuaranteeEntity> guaranteeQuery = QueryWrapperUtil.convertQuery(guaranteeEntity);
|
|
|
|
|
|
|
+ QueryWrapper<GuaranteeEntity> guaranteeQuery = QueryWrapperUtil.convertQuery(guaranteeEntity);
|
|
|
long guarantee = guaranteeService.count(guaranteeQuery);
|
|
long guarantee = guaranteeService.count(guaranteeQuery);
|
|
|
return (int) (borrower + mortgage + guarantee);
|
|
return (int) (borrower + mortgage + guarantee);
|
|
|
}
|
|
}
|
|
@@ -135,7 +133,7 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public AppBaseResponse saveOrder(AppBorrowerEntity borrower, SysUserEntity entity) {
|
|
|
|
|
|
|
+ public AppBaseResponse saveOrder(BorrowerEntity borrower, SysUserEntity entity) {
|
|
|
AppBaseResponse response = new AppBaseResponse();
|
|
AppBaseResponse response = new AppBaseResponse();
|
|
|
// 设置主订单信息并保存
|
|
// 设置主订单信息并保存
|
|
|
NotaryOrderEntity orderEntity = NotaryOrderEntity.builder().build();
|
|
NotaryOrderEntity orderEntity = NotaryOrderEntity.builder().build();
|
|
@@ -215,23 +213,23 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
private boolean isSubOrderCompleted(String businessNo){
|
|
private boolean isSubOrderCompleted(String businessNo){
|
|
|
- QueryWrapper<AppBorrowerEntity> borrowerWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
+ QueryWrapper<BorrowerEntity> borrowerWrapper = new QueryWrapper<>();
|
|
|
borrowerWrapper.eq("business_no", businessNo);
|
|
borrowerWrapper.eq("business_no", businessNo);
|
|
|
- AppBorrowerEntity borrowerEntity = borrowerService.getOne(borrowerWrapper);
|
|
|
|
|
|
|
+ BorrowerEntity borrowerEntity = borrowerService.getOne(borrowerWrapper);
|
|
|
if(borrowerEntity == null){
|
|
if(borrowerEntity == null){
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- QueryWrapper<AppMortgageEntity> mortgageWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
+ QueryWrapper<MortgageEntity> mortgageWrapper = new QueryWrapper<>();
|
|
|
mortgageWrapper.eq("business_no", businessNo);
|
|
mortgageWrapper.eq("business_no", businessNo);
|
|
|
- AppMortgageEntity mortgageEntity = mortgageService.getOne(mortgageWrapper);
|
|
|
|
|
|
|
+ MortgageEntity mortgageEntity = mortgageService.getOne(mortgageWrapper);
|
|
|
if(mortgageEntity == null){
|
|
if(mortgageEntity == null){
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- QueryWrapper<AppGuaranteeEntity> guaranteeWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
+ QueryWrapper<GuaranteeEntity> guaranteeWrapper = new QueryWrapper<>();
|
|
|
guaranteeWrapper.eq("business_no", businessNo);
|
|
guaranteeWrapper.eq("business_no", businessNo);
|
|
|
- AppGuaranteeEntity guaranteeEntity = guaranteeService.getOne(guaranteeWrapper);
|
|
|
|
|
|
|
+ GuaranteeEntity guaranteeEntity = guaranteeService.getOne(guaranteeWrapper);
|
|
|
if(guaranteeEntity == null){
|
|
if(guaranteeEntity == null){
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
@@ -240,21 +238,21 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void updateStatus(String businessNo, String status, String message) {
|
|
public void updateStatus(String businessNo, String status, String message) {
|
|
|
- UpdateWrapper<AppBorrowerEntity> borrowerWrapper = new UpdateWrapper<>();
|
|
|
|
|
|
|
+ UpdateWrapper<BorrowerEntity> borrowerWrapper = new UpdateWrapper<>();
|
|
|
borrowerWrapper.eq("business_no", businessNo);
|
|
borrowerWrapper.eq("business_no", businessNo);
|
|
|
- AppBorrowerEntity borrower = new AppBorrowerEntity();
|
|
|
|
|
|
|
+ BorrowerEntity borrower = new BorrowerEntity();
|
|
|
borrower.setStatus(status);
|
|
borrower.setStatus(status);
|
|
|
borrowerService.update(borrower, borrowerWrapper);
|
|
borrowerService.update(borrower, borrowerWrapper);
|
|
|
|
|
|
|
|
- UpdateWrapper<AppMortgageEntity> mortgageWrapper = new UpdateWrapper<>();
|
|
|
|
|
|
|
+ UpdateWrapper<MortgageEntity> mortgageWrapper = new UpdateWrapper<>();
|
|
|
mortgageWrapper.eq("business_no", businessNo);
|
|
mortgageWrapper.eq("business_no", businessNo);
|
|
|
- AppMortgageEntity mortgage = new AppMortgageEntity();
|
|
|
|
|
|
|
+ MortgageEntity mortgage = new MortgageEntity();
|
|
|
mortgage.setStatus(status);
|
|
mortgage.setStatus(status);
|
|
|
mortgageService.update(mortgage, mortgageWrapper);
|
|
mortgageService.update(mortgage, mortgageWrapper);
|
|
|
|
|
|
|
|
- UpdateWrapper<AppGuaranteeEntity> guaranteeWrapper = new UpdateWrapper<>();
|
|
|
|
|
|
|
+ UpdateWrapper<GuaranteeEntity> guaranteeWrapper = new UpdateWrapper<>();
|
|
|
guaranteeWrapper.eq("business_no", businessNo);
|
|
guaranteeWrapper.eq("business_no", businessNo);
|
|
|
- AppGuaranteeEntity guarantee = new AppGuaranteeEntity();
|
|
|
|
|
|
|
+ GuaranteeEntity guarantee = new GuaranteeEntity();
|
|
|
guarantee.setStatus(status);
|
|
guarantee.setStatus(status);
|
|
|
guaranteeService.update(guarantee, guaranteeWrapper);
|
|
guaranteeService.update(guarantee, guaranteeWrapper);
|
|
|
|
|
|
|
@@ -278,7 +276,7 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
public OrderDto getOrderById(String id) {
|
|
public OrderDto getOrderById(String id) {
|
|
|
OrderDto order = new OrderDto();
|
|
OrderDto order = new OrderDto();
|
|
|
if (id.startsWith("10")) {
|
|
if (id.startsWith("10")) {
|
|
|
- AppBorrowerEntity entity = borrowerService.getById(id);
|
|
|
|
|
|
|
+ BorrowerEntity entity = borrowerService.getById(id);
|
|
|
if (entity == null) {
|
|
if (entity == null) {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -300,7 +298,7 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
order.setType("1");
|
|
order.setType("1");
|
|
|
order.setBusinessNo(entity.getBusinessNo());
|
|
order.setBusinessNo(entity.getBusinessNo());
|
|
|
} else if (id.startsWith("11")) {
|
|
} else if (id.startsWith("11")) {
|
|
|
- AppMortgageEntity entity = mortgageService.getById(id);
|
|
|
|
|
|
|
+ MortgageEntity entity = mortgageService.getById(id);
|
|
|
if (entity == null) {
|
|
if (entity == null) {
|
|
|
return order;
|
|
return order;
|
|
|
}
|
|
}
|
|
@@ -324,7 +322,7 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
order.setType("2");
|
|
order.setType("2");
|
|
|
order.setBusinessNo(entity.getBusinessNo());
|
|
order.setBusinessNo(entity.getBusinessNo());
|
|
|
} else if (id.startsWith("12")) {
|
|
} else if (id.startsWith("12")) {
|
|
|
- AppGuaranteeEntity entity = guaranteeService.getById(id);
|
|
|
|
|
|
|
+ GuaranteeEntity entity = guaranteeService.getById(id);
|
|
|
if (entity == null) {
|
|
if (entity == null) {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
@@ -350,25 +348,25 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
public boolean sameBorrowerMortgage(String orderId, String type) {
|
|
public boolean sameBorrowerMortgage(String orderId, String type) {
|
|
|
|
|
|
|
|
if(StatusEnum.NotaryNoteEnum.BORROWER_NOTE.name().equals(type)){
|
|
if(StatusEnum.NotaryNoteEnum.BORROWER_NOTE.name().equals(type)){
|
|
|
- AppBorrowerEntity borrower = borrowerService.getById(orderId);
|
|
|
|
|
- AppMortgageEntity morgate = new AppMortgageEntity();
|
|
|
|
|
|
|
+ BorrowerEntity borrower = borrowerService.getById(orderId);
|
|
|
|
|
+ MortgageEntity morgate = new MortgageEntity();
|
|
|
morgate.setBusinessNo(borrower.getBusinessNo());
|
|
morgate.setBusinessNo(borrower.getBusinessNo());
|
|
|
morgate.setIdCard(borrower.getIdCard());
|
|
morgate.setIdCard(borrower.getIdCard());
|
|
|
- QueryWrapper<AppMortgageEntity> morgateQuery = QueryWrapperUtil.convertQuery(morgate);
|
|
|
|
|
|
|
+ QueryWrapper<MortgageEntity> morgateQuery = QueryWrapperUtil.convertQuery(morgate);
|
|
|
long m = mortgageService.count(morgateQuery);
|
|
long m = mortgageService.count(morgateQuery);
|
|
|
return m > 0;
|
|
return m > 0;
|
|
|
}else{
|
|
}else{
|
|
|
- AppMortgageEntity morgate = mortgageService.getById(orderId);
|
|
|
|
|
- AppBorrowerEntity borrower = new AppBorrowerEntity();
|
|
|
|
|
|
|
+ MortgageEntity morgate = mortgageService.getById(orderId);
|
|
|
|
|
+ BorrowerEntity borrower = new BorrowerEntity();
|
|
|
borrower.setBusinessNo(morgate.getBusinessNo());
|
|
borrower.setBusinessNo(morgate.getBusinessNo());
|
|
|
borrower.setIdCard(morgate.getIdCard());
|
|
borrower.setIdCard(morgate.getIdCard());
|
|
|
- QueryWrapper<AppBorrowerEntity> borrowerQuery = QueryWrapperUtil.convertQuery(borrower);
|
|
|
|
|
|
|
+ QueryWrapper<BorrowerEntity> borrowerQuery = QueryWrapperUtil.convertQuery(borrower);
|
|
|
long m = borrowerService.count(borrowerQuery);
|
|
long m = borrowerService.count(borrowerQuery);
|
|
|
return m > 0;
|
|
return m > 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public AppMortgageEntity getMortgageEntity(AppMortgageEntity entity) {
|
|
|
|
|
|
|
+ public MortgageEntity getMortgageEntity(MortgageEntity entity) {
|
|
|
return mortgageService.getOne(entity);
|
|
return mortgageService.getOne(entity);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -505,18 +503,18 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
public void updateOrderStatus(String orderId) {
|
|
public void updateOrderStatus(String orderId) {
|
|
|
Long id = Long.parseLong(orderId);
|
|
Long id = Long.parseLong(orderId);
|
|
|
if (orderId.startsWith("10")) {
|
|
if (orderId.startsWith("10")) {
|
|
|
- AppBorrowerEntity entity = new AppBorrowerEntity();
|
|
|
|
|
|
|
+ BorrowerEntity entity = new BorrowerEntity();
|
|
|
entity.setId(id);
|
|
entity.setId(id);
|
|
|
entity.setStatus("2");
|
|
entity.setStatus("2");
|
|
|
borrowerService.updateById(entity);
|
|
borrowerService.updateById(entity);
|
|
|
entity = borrowerService.getById(id);
|
|
entity = borrowerService.getById(id);
|
|
|
// 判断是否在流程中
|
|
// 判断是否在流程中
|
|
|
- AppMortgageEntity mortgage = new AppMortgageEntity();
|
|
|
|
|
|
|
+ MortgageEntity mortgage = new MortgageEntity();
|
|
|
mortgage.setBusinessNo(entity.getBusinessNo());
|
|
mortgage.setBusinessNo(entity.getBusinessNo());
|
|
|
mortgage.setStatus("1");
|
|
mortgage.setStatus("1");
|
|
|
long mcount = mortgageService.count(mortgage);
|
|
long mcount = mortgageService.count(mortgage);
|
|
|
|
|
|
|
|
- AppGuaranteeEntity guarantee = new AppGuaranteeEntity();
|
|
|
|
|
|
|
+ GuaranteeEntity guarantee = new GuaranteeEntity();
|
|
|
guarantee.setBusinessNo(entity.getBusinessNo());
|
|
guarantee.setBusinessNo(entity.getBusinessNo());
|
|
|
guarantee.setStatus("1");
|
|
guarantee.setStatus("1");
|
|
|
long gcount = guaranteeService.count(guarantee);
|
|
long gcount = guaranteeService.count(guarantee);
|
|
@@ -530,18 +528,18 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else if (orderId.startsWith("11")) {
|
|
} else if (orderId.startsWith("11")) {
|
|
|
- AppMortgageEntity entity = mortgageService.getById(id);
|
|
|
|
|
|
|
+ MortgageEntity entity = mortgageService.getById(id);
|
|
|
entity.setId(id);
|
|
entity.setId(id);
|
|
|
entity.setStatus("2");
|
|
entity.setStatus("2");
|
|
|
mortgageService.updateById(entity);
|
|
mortgageService.updateById(entity);
|
|
|
|
|
|
|
|
// 判断是否在流程中
|
|
// 判断是否在流程中
|
|
|
- AppBorrowerEntity borrower = new AppBorrowerEntity();
|
|
|
|
|
|
|
+ BorrowerEntity borrower = new BorrowerEntity();
|
|
|
borrower.setBusinessNo(entity.getBusinessNo());
|
|
borrower.setBusinessNo(entity.getBusinessNo());
|
|
|
borrower.setStatus("1");
|
|
borrower.setStatus("1");
|
|
|
long bcount = borrowerService.count(borrower);
|
|
long bcount = borrowerService.count(borrower);
|
|
|
|
|
|
|
|
- AppGuaranteeEntity guarantee = new AppGuaranteeEntity();
|
|
|
|
|
|
|
+ GuaranteeEntity guarantee = new GuaranteeEntity();
|
|
|
guarantee.setBusinessNo(entity.getBusinessNo());
|
|
guarantee.setBusinessNo(entity.getBusinessNo());
|
|
|
guarantee.setStatus("1");
|
|
guarantee.setStatus("1");
|
|
|
long gcount = guaranteeService.count(guarantee);
|
|
long gcount = guaranteeService.count(guarantee);
|
|
@@ -555,18 +553,18 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else if (orderId.startsWith("12")) {
|
|
} else if (orderId.startsWith("12")) {
|
|
|
- AppGuaranteeEntity entity = guaranteeService.getById(id);
|
|
|
|
|
|
|
+ GuaranteeEntity entity = guaranteeService.getById(id);
|
|
|
entity.setId(id);
|
|
entity.setId(id);
|
|
|
entity.setStatus("2");
|
|
entity.setStatus("2");
|
|
|
guaranteeService.updateById(entity);
|
|
guaranteeService.updateById(entity);
|
|
|
// 这里就更新主订单状态
|
|
// 这里就更新主订单状态
|
|
|
// 判断是否在流程中
|
|
// 判断是否在流程中
|
|
|
- AppBorrowerEntity borrower = new AppBorrowerEntity();
|
|
|
|
|
|
|
+ BorrowerEntity borrower = new BorrowerEntity();
|
|
|
borrower.setBusinessNo(entity.getBusinessNo());
|
|
borrower.setBusinessNo(entity.getBusinessNo());
|
|
|
borrower.setStatus("1");
|
|
borrower.setStatus("1");
|
|
|
long bcount = borrowerService.count(borrower);
|
|
long bcount = borrowerService.count(borrower);
|
|
|
|
|
|
|
|
- AppMortgageEntity mortgage = new AppMortgageEntity();
|
|
|
|
|
|
|
+ MortgageEntity mortgage = new MortgageEntity();
|
|
|
mortgage.setBusinessNo(entity.getBusinessNo());
|
|
mortgage.setBusinessNo(entity.getBusinessNo());
|
|
|
mortgage.setStatus("1");
|
|
mortgage.setStatus("1");
|
|
|
long mcount = mortgageService.count(mortgage);
|
|
long mcount = mortgageService.count(mortgage);
|
|
@@ -607,18 +605,22 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public Object parseOrder(String orderType, String content, SysUserEntity user) {
|
|
|
|
|
|
|
+ public Object parseOrder(String orderType, MultipartFile file, SysUserEntity user) {
|
|
|
BankEntity bank = bankMapper.selectById(user.getOrgId().split("_")[1]);
|
|
BankEntity bank = bankMapper.selectById(user.getOrgId().split("_")[1]);
|
|
|
- OrderOCRParser orderOCRParser = orderOCRParserFactory.generateOrderOCRParser(bank.getUscc());
|
|
|
|
|
- if (orderOCRParser != null) {
|
|
|
|
|
- String result = TencentServiceUtil.readInfoWithOCR(content);
|
|
|
|
|
- if (OrderConstant.ORDER_TYPE_BORROWER.equals(orderType)) {
|
|
|
|
|
- return orderOCRParser.parseBorrower(result);
|
|
|
|
|
- } else if (OrderConstant.ORDER_TYPE_MORTGAGE.equals(orderType)) {
|
|
|
|
|
- return orderOCRParser.parseMortgage(result);
|
|
|
|
|
- } else if (OrderConstant.ORDER_TYPE_GUARANTEE.equals(orderType)) {
|
|
|
|
|
- return orderOCRParser.parseGuarantee(result);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ OrderOCRParser orderOCRParser = orderOCRParserFactory.generateOrderOCRParser(bank.getUscc());
|
|
|
|
|
+ if (orderOCRParser != null) {
|
|
|
|
|
+ String result = TencentServiceUtil.readInfoWithOCR(file);
|
|
|
|
|
+ if (OrderConstant.ORDER_TYPE_BORROWER.equals(orderType)) {
|
|
|
|
|
+ return orderOCRParser.parseBorrower(result);
|
|
|
|
|
+ } else if (OrderConstant.ORDER_TYPE_MORTGAGE.equals(orderType)) {
|
|
|
|
|
+ return orderOCRParser.parseMortgage(result);
|
|
|
|
|
+ } else if (OrderConstant.ORDER_TYPE_GUARANTEE.equals(orderType)) {
|
|
|
|
|
+ return orderOCRParser.parseGuarantee(result);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|