Explorar el Código

兼容邮储产品

sakuya hace 3 años
padre
commit
73358207e8

+ 3 - 4
eladmin-system/src/main/java/me/zhengjie/application/admin/job/GenerateNotarizationJob.java

@@ -70,8 +70,8 @@ public class GenerateNotarizationJob {
      * @param orderFile
      */
     private void signNotarization(OrderFileEntity orderFile) throws Exception{
-        BorrowerEntity borrower = contractOrderRepository.getBorrowerWithBizNoAndContractNo(orderFile.getBusinessNo(), orderFile.getContractNo());
-        SysUserEntity notaryUser = userDao.selectById(borrower.getNotaryUserId());
+        ContractOrderEntity order = contractOrderRepository.getContractOrderWithBizNo(orderFile.getBusinessNo());
+        SysUserEntity notaryUser = userDao.selectById(order.getNotaryUserId());
         NotaryOfficeEntity notaryOffice = notaryOfficeMapper.selectById(notaryUser.getOrgId().split("_")[1]);
         //
         UploadSignInfoVO notaryUserInfo = new UploadSignInfoVO();
@@ -101,9 +101,8 @@ public class GenerateNotarizationJob {
      * @param orderFile
      */
     private void downloadNotarization(OrderFileEntity orderFile) throws Exception {
-        String orderType = StepStatusEnum.getType(orderFile.getContractId());
         CFCACertUtil.proxySwitchOn = "dev".equals(AppConfigInfo.APP_ENV_TYPE);
-        String uplaodPath = orderFile.getBusinessNo() + "/" + orderType + "/";
+        String uplaodPath = orderFile.getBusinessNo() + "/";
         String path = uplaodPath + "notary-signed-" + orderFile.getBusinessNo() + "/";
         String filePath = CFCACertUtil.download(path, orderFile.getAxqContractNo());
         saveAuthNorizationUrlById(filePath, orderFile.getId());

+ 0 - 1
eladmin-system/src/main/java/me/zhengjie/application/admin/service/impl/AdminOrderServiceImpl.java

@@ -659,7 +659,6 @@ public class AdminOrderServiceImpl implements AdminOrderService {
 		FileInfoEntity fileInfoEntity = fileInfoService.getById(file.getImageId());
 		OrderFileEntity notaryOrderFile = new OrderFileEntity();
 		notaryOrderFile.setBusinessNo(file.getBusinessNo());
-		notaryOrderFile.setContractId(file.getContractId());
 		notaryOrderFile.setCode(code);
 		notaryOrderFile.setSignedPdfUrl(fileInfoEntity.getPath());
 		notaryOrderFile.setCreateTime(new Date());

+ 3 - 3
eladmin-system/src/main/java/me/zhengjie/application/bank/service/impl/BankOrderServiceImpl.java

@@ -145,11 +145,11 @@ public class BankOrderServiceImpl implements BankOrderService {
 			OrderOCRParser orderOCRParser = orderOCRParserFactory.generateOrderOCRParser(bank.getUscc());
 			if (orderOCRParser != null) {
 				String result = TencentServiceUtil.readInfoWithOCR(file);
-				if (OrderConstant.ORDER_TYPE_BORROWER == orderType) {
+				if (OrderConstant.CONTRACT_TYPE_BORROWER == orderType) {
 					return orderOCRParser.parseBorrower(result);
-				} else if (OrderConstant.ORDER_TYPE_MORTGAGE == orderType) {
+				} else if (OrderConstant.CONTRACT_TYPE_MORTGAGE == orderType) {
 					return orderOCRParser.parseMortgage(result);
-				} else if (OrderConstant.ORDER_TYPE_GUARANTEE == orderType) {
+				} else if (OrderConstant.CONTRACT_TYPE_GUARANTEE == orderType) {
 					return orderOCRParser.parseGuarantee(result);
 				}
 			}

+ 5 - 28
eladmin-system/src/main/java/me/zhengjie/application/bank/service/impl/NotaryNoteServiceImpl.java

@@ -158,34 +158,11 @@ public class NotaryNoteServiceImpl extends ServiceImpl<NotaryNoteMapper, NotaryN
 	 */
 	private void saveNotaryUserId(String businessNo) {
 		String currentUserId = String.valueOf(contextUtil.getCurrentUserId());
-		QueryWrapper<BorrowerEntity> borrowerQw = new QueryWrapper<>();
-		borrowerQw.eq("business_no", businessNo);
-		BorrowerEntity borrowerEntity = borrowerMapper.selectOne(borrowerQw);
-		BorrowerEntity saveBorrower = new BorrowerEntity();
-		saveBorrower.setId(borrowerEntity.getId());
-		saveBorrower.setUpdateTime(LocalDateTime.now());
-		saveBorrower.setNotaryUserId(currentUserId);
-		borrowerMapper.updateById(saveBorrower);
-//		QueryWrapper<GuaranteeEntity> guaranteeQw = new QueryWrapper<>();
-//		guaranteeQw.eq("business_no", businessNo);
-//		GuaranteeEntity guaranteeEntity = guaranteeMapper.selectOne(guaranteeQw);
-//		GuaranteeEntity saveGuarantee = new GuaranteeEntity();
-//		saveGuarantee.setId(guaranteeEntity.getId());
-//		saveGuarantee.setUpdateTime(LocalDateTime.now());
-//		saveGuarantee.setNotaryUserId(currentUserId);
-//		guaranteeMapper.updateById(saveGuarantee);
-		QueryWrapper<MortgageEntity> mortgageQw = new QueryWrapper<>();
-		mortgageQw.eq("business_no", businessNo);
-		// 非空
-		MortgageEntity mortgageEntity = mortgageMapper.selectOne(mortgageQw);
-		if (mortgageEntity != null) {
-			MortgageEntity saveMortgage = new MortgageEntity();
-			saveMortgage.setId(mortgageEntity.getId());
-			saveMortgage.setUpdateTime(LocalDateTime.now());
-			saveMortgage.setNotaryUserId(currentUserId);
-			mortgageMapper.updateById(saveMortgage);
-		}
-
+		ContractOrderEntity curOrder = contractOrderRepository.getContractOrderWithBizNo(businessNo);
+		ContractOrderEntity saveOrder = new ContractOrderEntity();
+		saveOrder.setId(curOrder.getId());
+		saveOrder.setNotaryUserId(currentUserId);
+		contractOrderRepository.updateWithId(saveOrder);
 	}
 
 	/**

+ 0 - 14
eladmin-system/src/main/java/me/zhengjie/base/util/DownloadUtils.java

@@ -106,20 +106,6 @@ public class DownloadUtils {
 	}
 
 	/**
-	 * 下载公证书
-	 * 
-	 * @param orderFile
-	 */
-	public static void downloadNotarization(OrderFileEntity orderFile) throws Exception {
-		String orderType = StepStatusEnum.getType(orderFile.getContractId());
-		CFCACertUtil.proxySwitchOn = "dev".equals(AppConfigInfo.APP_ENV_TYPE);
-		String uplaodPath = orderFile.getBusinessNo() + "/" + orderType + "/";
-		String path = uplaodPath + "notary-signed-" + orderFile.getBusinessNo() + "/";
-		String filePath = CFCACertUtil.download(path, orderFile.getAxqContractNo());
-		saveAuthNorizationUrlById(filePath, orderFile.getId());
-	}
-
-	/**
 	 * 保存签名文件URL
 	 *
 	 * @param fileUrl

+ 5 - 4
eladmin-system/src/main/java/me/zhengjie/domain/order/OrderConstant.java

@@ -2,11 +2,12 @@ package me.zhengjie.domain.order;
 
 public class OrderConstant {
     /**
-     * 订单类型
+     * 合同类型
      */
-    public static final Integer ORDER_TYPE_BORROWER = 1;
-    public static final Integer ORDER_TYPE_MORTGAGE = 2;
-    public static final Integer ORDER_TYPE_GUARANTEE = 3;
+    public static final Integer CONTRACT_TYPE_BORROWER = 1;
+    public static final Integer CONTRACT_TYPE_MORTGAGE = 2;
+    public static final Integer CONTRACT_TYPE_GUARANTEE = 3;
+    public static final Integer CONTRACT_TYPE_CREDIT = 4;
     /**
      * 订单状态
      */