|  | @@ -3,7 +3,6 @@ package com.yonge.cooleshow.biz.dal.service.impl;
 | 
	
		
			
				|  |  |  import com.microsvc.toolkit.middleware.oss.OssPluginContext;
 | 
	
		
			
				|  |  |  import com.microsvc.toolkit.middleware.oss.impl.TencentOssPlugin;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.common.enums.CertificateTypeEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.entity.ContractTemplate;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.entity.SysUserTsign;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.*;
 | 
	
	
		
			
				|  | @@ -11,10 +10,10 @@ import com.yonge.cooleshow.biz.dal.vo.StudentVo;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.constant.SysConfigConstant;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.common.enums.CertificateTypeEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.enums.ContractTemplateTypeEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.common.enums.SysUserType;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.base.exception.BizException;
 | 
	
		
			
				|  |  | -import com.yonge.toolset.thirdparty.eseal.ESealPlugin;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.thirdparty.user.realname.RealnameAuthenticationPluginContext;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.thirdparty.user.realname.provider.LinkfaceRealnameAuthenticationPlugin;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.utils.date.DateUtil;
 | 
	
	
		
			
				|  | @@ -37,7 +36,9 @@ import java.io.IOException;
 | 
	
		
			
				|  |  |  import java.text.DateFormat;
 | 
	
		
			
				|  |  |  import java.text.SimpleDateFormat;
 | 
	
		
			
				|  |  |  import java.time.LocalDateTime;
 | 
	
		
			
				|  |  | -import java.util.*;
 | 
	
		
			
				|  |  | +import java.util.Date;
 | 
	
		
			
				|  |  | +import java.util.HashMap;
 | 
	
		
			
				|  |  | +import java.util.Map;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @Service
 | 
	
		
			
				|  |  |  public class ContractServiceImpl implements ContractService {
 | 
	
	
		
			
				|  | @@ -59,8 +60,8 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |      private RealnameAuthenticationPluginContext realnameAuthenticationPluginContext;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private OssPluginContext ossPluginContext;
 | 
	
		
			
				|  |  | -    @Autowired
 | 
	
		
			
				|  |  | -    private ESealPlugin eSealPlugin;
 | 
	
		
			
				|  |  | +//    @Autowired
 | 
	
		
			
				|  |  | +//    private ESealPlugin eSealPlugin;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Value("${contract.baseDir:/var/pdf}")
 | 
	
		
			
				|  |  |      private String contractBaseDir;
 | 
	
	
		
			
				|  | @@ -91,12 +92,12 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 | 
	
		
			
				|  |  |          if (sysUserTsign == null) {
 | 
	
		
			
				|  |  | -            try {
 | 
	
		
			
				|  |  | -                sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
 | 
	
		
			
				|  |  | +            sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
 | 
	
		
			
				|  |  | +            /*try {
 | 
	
		
			
				|  |  |              } catch (Exception e) {
 | 
	
		
			
				|  |  |                  logger.error("用户电子签章注册失败", e);
 | 
	
		
			
				|  |  |                  return HttpResponseResult.failed("用户电子签章注册失败");
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +            }*/
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          Date date = new Date();
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -163,14 +164,14 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |              return HttpResponseResult.failed("生成产品协议失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        String organCode = sysConfigService.findConfigValue(SysConfigConstant.COMPANY_ORGAN_CODE);
 | 
	
		
			
				|  |  | +        /*String organCode = sysConfigService.findConfigValue(SysConfigConstant.COMPANY_ORGAN_CODE);
 | 
	
		
			
				|  |  |          SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
 | 
	
		
			
				|  |  |          if (organTsign == null) {
 | 
	
		
			
				|  |  |              //创建企业签章
 | 
	
		
			
				|  |  |              organTsign = addTsign(0L, organCode, companyName);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        /*eSealPlugin.organSign(organTsign.getSealData(), srcPdfPath, srcPdfPath);
 | 
	
		
			
				|  |  | +        eSealPlugin.organSign(organTsign.getSealData(), srcPdfPath, srcPdfPath);
 | 
	
		
			
				|  |  |          if (sysUserTsign != null && CertificateTypeEnum.IDENTITY.getCode().equals(user.getCertificateType())) {
 | 
	
		
			
				|  |  |              eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
 | 
	
		
			
				|  |  |          }*/
 | 
	
	
		
			
				|  | @@ -281,7 +282,7 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |                      realnameAuthenticationPluginContext.getRealnameAuthenticationPlugin(LinkfaceRealnameAuthenticationPlugin.getName()).verify(realName, idCardNo);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                accountId = eSealPlugin.createUserAccount(realName, idCardNo, mobileNo);
 | 
	
		
			
				|  |  | +                /*accountId = eSealPlugin.createUserAccount(realName, idCardNo, mobileNo);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  if (StringUtils.isBlank(accountId)) {
 | 
	
		
			
				|  |  |                      throw new BizException("创建电子存证账户失败");
 | 
	
	
		
			
				|  | @@ -291,7 +292,7 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  if (StringUtils.isBlank(sealData)) {
 | 
	
		
			
				|  |  |                      throw new BizException("创建电子存证印章失败");
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | +                }*/
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              sysUserTsign = new SysUserTsign(userId, accountId, sealData, realName, idCardNo);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -301,7 +302,7 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |          return null;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private SysUserTsign addTsign(Long userId, String organCode, String orgName) {
 | 
	
		
			
				|  |  | +    /*private SysUserTsign addTsign(Long userId, String organCode, String orgName) {
 | 
	
		
			
				|  |  |          Optional.ofNullable(organCode).orElseThrow(() -> new BizException("营业执照编号不能为空!"));
 | 
	
		
			
				|  |  |          Optional.ofNullable(orgName).orElseThrow(() -> new BizException("营业名称不能为空"));
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -330,6 +331,6 @@ public class ContractServiceImpl implements ContractService {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return orignSysUserTsign;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    }*/
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  }
 |