|
|
@@ -0,0 +1,60 @@
|
|
|
+package me.zhengjie.application.admin.service.impl;
|
|
|
+
|
|
|
+import cfca.trustsign.common.vo.cs.UploadSignInfoVO;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import me.zhengjie.application.admin.service.AdminNotarizationManageService;
|
|
|
+import me.zhengjie.application.bank.service.UserAXQInfoService;
|
|
|
+import me.zhengjie.dao.mybatis.ContractOrderRepository;
|
|
|
+import me.zhengjie.dao.mybatis.UserAXQInfoRepository;
|
|
|
+import me.zhengjie.dao.mybatis.entity.ContractOrderEntity;
|
|
|
+import me.zhengjie.dao.mybatis.entity.SysUserEntity;
|
|
|
+import me.zhengjie.dao.mybatis.entity.UserAXQInfoEntity;
|
|
|
+import me.zhengjie.dao.mybatis.mapper.SysUserMapper;
|
|
|
+import me.zhengjie.domain.order.OrderConstant;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Service
|
|
|
+@RequiredArgsConstructor
|
|
|
+public class AdminNotarizationManageServiceImpl implements AdminNotarizationManageService {
|
|
|
+
|
|
|
+ private final ContractOrderRepository contractOrderRepository;
|
|
|
+ private final UserAXQInfoRepository userAXQInfoRepository;
|
|
|
+ private final UserAXQInfoService userAXQInfoService;
|
|
|
+ private final SysUserMapper userMapper;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void resignCommonDoc(final String businessNo) {
|
|
|
+ ContractOrderEntity contractOrderEntity = contractOrderRepository.getContractOrderWithBizNo(businessNo);
|
|
|
+ List<UploadSignInfoVO> signInfoList = new ArrayList<>();
|
|
|
+ List<String> idCardList = new ArrayList<>();
|
|
|
+ idCardList.add(contractOrderEntity.getIdCard());
|
|
|
+ if (contractOrderEntity.getJointFlag() == OrderConstant.JOINT_FLAG_TRUE) {
|
|
|
+ idCardList.add(contractOrderEntity.getJointIdCard());
|
|
|
+ }
|
|
|
+ for (String idCard : idCardList) {
|
|
|
+ UserAXQInfoEntity entity = userAXQInfoRepository.getUserAXQInfoWithIdcard(idCard);
|
|
|
+ UploadSignInfoVO notartyUser = new UploadSignInfoVO();
|
|
|
+ notartyUser.setUserId(entity.getAxqUserId());
|
|
|
+ notartyUser.setSealId(entity.getAxqSealId());
|
|
|
+ notartyUser.setLocation("210.74.41.0");
|
|
|
+ notartyUser.setAuthorizationTime("20220214171200");
|
|
|
+ signInfoList.add(notartyUser);
|
|
|
+ }
|
|
|
+ SysUserEntity customer = userMapper.selectById(contractOrderEntity.getCustomerId());
|
|
|
+ UploadSignInfoVO notartyUser = new UploadSignInfoVO();
|
|
|
+ notartyUser.setUserId(customer.getAxqUserId());
|
|
|
+ notartyUser.setSealId(customer.getAxqSealId());
|
|
|
+ notartyUser.setLocation("210.74.41.0");
|
|
|
+ notartyUser.setAuthorizationTime("20220214171200");
|
|
|
+ signInfoList.add(notartyUser);
|
|
|
+ //
|
|
|
+ try {
|
|
|
+ userAXQInfoService.signContract(signInfoList, businessNo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|