瀏覽代碼

只生成pdf,取消第三方电子签章

zouxuan 4 月之前
父節點
當前提交
711dfd2f0c

+ 2 - 2
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -61,10 +61,10 @@ public class UserController extends BaseController {
 	@Autowired
 	private RedisCache<String,Object> redisCache;
 
-	@Value("${message.debugMode}")
+	/*@Value("${message.debugMode}")
 	private boolean debugMode;
 	@Autowired
-	private RealnameAuthenticationPluginContext realnameAuthenticationPluginContext;
+	private RealnameAuthenticationPluginContext realnameAuthenticationPluginContext;*/
 
 	@ApiOperation(value = "分页查询用户信息")
 	@ApiImplicitParams({ @ApiImplicitParam(name = "userType", value = "用户类型", required = false, dataType = "String"),

+ 30 - 30
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -246,11 +246,11 @@ public class ContractServiceImpl implements ContractService {
             }
 
             if (CertificateTypeEnum.IDENTITY.getCode().equals(user.getCertificateType())) {
-                if (!debugMode) {
-//                    realnameAuthenticationPluginContext.getRealnameAuthenticationPlugin(LinkfaceRealnameAuthenticationPlugin.getName()).verify(realName, idCardNo);
-                    // 取消第三方实名认证
-                    RealnameAuthenticationDto.verify(realName, idCardNo);
-                }
+                // 取消第三方实名认证
+                RealnameAuthenticationDto.verify(realName, idCardNo);
+                /*if (!debugMode) {
+                    realnameAuthenticationPluginContext.getRealnameAuthenticationPlugin(LinkfaceRealnameAuthenticationPlugin.getName()).verify(realName, idCardNo);
+                }*/
 
                 accountId = eSealPlugin.createUserAccount(realName, idCardNo, mobileNo);
 
@@ -278,7 +278,7 @@ public class ContractServiceImpl implements ContractService {
     @Override
     public boolean transferRegisterContract(Integer userId) {
 
-        SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
+        /*SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 
         if (sysUserTsign == null) {
             SysUser user = sysUserFeignService.queryUserById(userId);
@@ -286,7 +286,7 @@ public class ContractServiceImpl implements ContractService {
                 throw new BizException("用户信息查询失败");
             }
             sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
-        }
+        }*/
 
         // 合成freemarker
         String srcPdfPath = contractBaseDir + "/register/" + userId + ".pdf";
@@ -312,9 +312,9 @@ public class ContractServiceImpl implements ContractService {
             throw new BizException("生成pdf协议失败", e);
         }
 
-        if (sysUserTsign != null) {
+        /*if (sysUserTsign != null) {
             eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
-        }
+        }*/
 
         Date date = new Date();
         // 上传到oss
@@ -374,7 +374,7 @@ public class ContractServiceImpl implements ContractService {
             transferProduceContract(userId, musicGroupId, orderType);
             return true;
         }
-        SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
+        /*SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 
         if (sysUserTsign == null) {
             SysUser user = sysUserFeignService.queryUserById(userId);
@@ -382,7 +382,7 @@ public class ContractServiceImpl implements ContractService {
                 throw new BizException("用户信息查询失败");
             }
             sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
-        }
+        }*/
         Date date = new Date();
 
         // 合成freemarker
@@ -452,7 +452,7 @@ public class ContractServiceImpl implements ContractService {
         } catch (IOException e) {
             throw new BizException("生成pdf协议失败", e);
         }
-        String organCode = "";
+        /*String organCode = "";
         if (musicGroup.getOwnershipType() == OwnershipType.OWN) {
             organCode = "91440300326364429H";
         } else {
@@ -466,7 +466,7 @@ public class ContractServiceImpl implements ContractService {
         eSealPlugin.organSign(organTsign.getSealData(), srcPdfPath, srcPdfPath);
         if (sysUserTsign != null) {
             eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
-        }
+        }*/
 
         // 上传到oss
         String dateStrOss = dateFormatOss.format(date);
@@ -572,7 +572,7 @@ public class ContractServiceImpl implements ContractService {
             return true;
         }
 
-        SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
+        /*SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 
         if (sysUserTsign == null) {
             SysUser user = sysUserFeignService.queryUserById(userId);
@@ -580,7 +580,7 @@ public class ContractServiceImpl implements ContractService {
                 throw new BizException("用户信息查询失败");
             }
             sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
-        }
+        }*/
         Date date = new Date();
 
         // 合成freemarker
@@ -633,7 +633,7 @@ public class ContractServiceImpl implements ContractService {
         } catch (IOException e) {
             throw new BizException("生成pdf协议失败", e);
         }
-        String organCode = "91440300326364429H";
+        /*String organCode = "91440300326364429H";
         SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
         if (organTsign == null) {
             throw new BizException("甲方未创建签章");
@@ -643,7 +643,7 @@ public class ContractServiceImpl implements ContractService {
 
         if (sysUserTsign != null) {
             eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
-        }
+        }*/
 
         // 上传到oss
         String dateStrOss = dateFormatOss.format(date);
@@ -834,7 +834,7 @@ public class ContractServiceImpl implements ContractService {
             return true;
         }
 
-        SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
+        /*SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 
         if (sysUserTsign == null) {
             SysUser user = sysUserFeignService.queryUserById(userId);
@@ -842,7 +842,7 @@ public class ContractServiceImpl implements ContractService {
                 throw new BizException("用户信息查询失败");
             }
             sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
-        }
+        }*/
 
         Date date = new Date();
 
@@ -877,7 +877,7 @@ public class ContractServiceImpl implements ContractService {
         } catch (IOException e) {
             throw new BizException("生成pdf协议失败", e);
         }
-        String organCode = "91440300326364429H";
+        /*String organCode = "91440300326364429H";
         SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
         if (organTsign == null) {
             throw new BizException("甲方未创建签章");
@@ -887,7 +887,7 @@ public class ContractServiceImpl implements ContractService {
 
         if (sysUserTsign != null) {
             eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
-        }
+        }*/
 
         // 上传到oss
         String dateStrOss = dateFormatOss.format(date);
@@ -929,7 +929,7 @@ public class ContractServiceImpl implements ContractService {
             return;
         }
 
-        SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
+        /*SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
         if (sysUserTsign == null) {
             try {
                 sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
@@ -937,7 +937,7 @@ public class ContractServiceImpl implements ContractService {
                 logger.error("用户电子签章注册失败", e);
                 return;
             }
-        }
+        }*/
         Date date = new Date();
 
         // 合成freemarker
@@ -1028,7 +1028,7 @@ public class ContractServiceImpl implements ContractService {
             return;
         }
 
-        String organCode = StringUtils.equals(companyName, tenantInfo.getTsignName()) ? tenantInfo.getTsignCode() : organizationDto.getCorporateCode();
+        /*String organCode = StringUtils.equals(companyName, tenantInfo.getTsignName()) ? tenantInfo.getTsignCode() : organizationDto.getCorporateCode();
         
 		if (user.getTenantId() == 1) {
 			if (!OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
@@ -1044,7 +1044,7 @@ public class ContractServiceImpl implements ContractService {
         eSealPlugin.organSign(organTsign.getSealData(), srcPdfPath, srcPdfPath);
         if (sysUserTsign != null && CertificateTypeEnum.IDENTITY.getCode().equals(user.getCertificateType())) {
             eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), srcPdfPath, srcPdfPath);
-        }
+        }*/
 
         // 上传到oss
         String dateStrOss = dateFormatOss.format(date);
@@ -1183,7 +1183,7 @@ public class ContractServiceImpl implements ContractService {
         List<SysUser> users = employeeDao.getUsers(circulationUserIds);
 
         Integer workOrderId = null;
-        List<SysUserTsign> sysUserTsigns = new ArrayList<>();
+//        List<SysUserTsign> sysUserTsigns = new ArrayList<>();
         for (SysUser user : users) {
             for (CirculationUser circulationUser : financialDto.getCirculationUsers()) {
                 if (workOrderId == null) {
@@ -1196,7 +1196,7 @@ public class ContractServiceImpl implements ContractService {
                 if (!executor.getUserId().equals(user.getId())) continue;
                 executor.setRealName(user.getRealName());
             }
-            SysUserTsign sysUserTsign = sysUserTsignService.get(user.getId());
+            /*SysUserTsign sysUserTsign = sysUserTsignService.get(user.getId());
             if (sysUserTsign == null) {
                 try {
                     sysUserTsign = register(user.getId(), user.getRealName(), user.getIdCardNo(), user.getPhone());
@@ -1205,7 +1205,7 @@ public class ContractServiceImpl implements ContractService {
                     continue;
                 }
             }
-            sysUserTsigns.add(sysUserTsign);
+            sysUserTsigns.add(sysUserTsign);*/
         }
 
         Date date = new Date();
@@ -1244,9 +1244,9 @@ public class ContractServiceImpl implements ContractService {
             logger.error("生成签章协议失败", e);
         }
 
-        for (SysUserTsign sysUserTsign : sysUserTsigns) {
+        /*for (SysUserTsign sysUserTsign : sysUserTsigns) {
             eSealPlugin.userSign(sysUserTsign.getAccountId(), sysUserTsign.getSealData(), sysUserTsign.getUserId().toString(), srcPdfPath, srcPdfPath);
-        }
+        }*/
 
         //上传到oss
         String dateStrOss = dateFormatOss.format(date);

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrganizationServiceImpl.java

@@ -191,10 +191,10 @@ public class OrganizationServiceImpl extends BaseServiceImpl<Integer, Organizati
             //升级机构协议版本号
             tenantContractTemplateService.upgradeContractVersion(tenantId);
             
-			if (StringUtils.isNotBlank(organization.getCorporateName()) && StringUtils.isNotBlank(organization.getCorporateCode())) {
+			/*if (StringUtils.isNotBlank(organization.getCorporateName()) && StringUtils.isNotBlank(organization.getCorporateCode())) {
 				// 添加签章信息
 				contractService.addTsign(organization.getId(), organization.getCorporateCode(), organization.getCorporateName(), tenantId);
-			}
+			}*/
         }
 		
 		return true;

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -4286,11 +4286,11 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
                 }
             }
         }
-        try {
+        /*try {
             contractService.register(user.getId(), user.getRealName(), user.getIdCardNo(), user.getPhone());
         } catch (Exception e) {
             LOGGER.error("[{}]小课购买协议生成错误:{}", practiceGroup.getId(), e.getCause());
-        }
+        }*/
 
         String baseApiUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
         //分类费用 course,instrument,accessories,other

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -1548,7 +1548,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         studentInfo.setCurrentClass(studentRegistration.getCurrentClass());
         studentDao.update(studentInfo);
         // 添加用户电子签章账户
-        contractService.register(student.getUserId(), student.getParentsName(), student.getIdCardNo(), student.getParentsPhone());
+//        contractService.register(student.getUserId(), student.getParentsName(), student.getIdCardNo(), student.getParentsPhone());
         return student;
     }
 

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java

@@ -259,7 +259,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
             //升级机构协议版本号
             tenantContractTemplateService.upgradeContractVersion(tenantId);
             //添加签章信息
-            contractService.addTsign(tenantInfo.getUserId(), dto.getTsignCode(), dto.getTsignName(), tenantId);
+//            contractService.addTsign(tenantInfo.getUserId(), dto.getTsignCode(), dto.getTsignName(), tenantId);
         }
 
         //机构状态 1已缴费,并且 机构注册的手机号与本次修改后的手机号不同,就证明本次修改了手机号 则需要修改机构的账号信息
@@ -461,7 +461,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         Lists.partition(collectMenuId, 50)
                 .forEach(idList -> employeeService.batchInsertRoleMenu(roleId, idList, tenantId));
         //添加签章信息
-        contractService.addTsign(tenantInfo.getUserId(), tenantInfo.getTsignCode(), tenantInfo.getTsignName(), tenantId);
+//        contractService.addTsign(tenantInfo.getUserId(), tenantInfo.getTsignCode(), tenantInfo.getTsignName(), tenantId);
 
         Date now = new Date();
 

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -2786,11 +2786,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                 }
             }
         }
-        try {
+        /*try {
             contractService.register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
         } catch (Exception e) {
             businessLogger.error("[{}]课程购买协议生成错误:{}", vipGroup.getId(), e.getCause());
-        }
+        }*/
 
         String baseApiUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
         //分类费用 course,instrument,accessories,other

+ 0 - 6
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/eseal/provider/TsignPlugin.java

@@ -228,9 +228,6 @@ public class TsignPlugin implements ESealPlugin, InitializingBean, DisposableBea
      * @return
      */
     public boolean organSign(String sealData, String srcPdfPath, String destPdfPath) {
-        if (true){
-            return true;
-        }
         PosBean posBean = new PosBean();
         // 签章类型,Single-单页签章、Multi-多页签章、Edges-骑缝章、Key-关键字签章
         SignType signType = SignType.Key;
@@ -265,9 +262,6 @@ public class TsignPlugin implements ESealPlugin, InitializingBean, DisposableBea
      * @return
      */
     public boolean userSign(String accountId, String sealData, String srcPdfPath, String destPdfPath) {
-        if (true){
-            return true;
-        }
         SignPDFFileBean signPDFStreamBean = new SignPDFFileBean();
         // C:test_signed.pdf为平台自身签署后路径
         signPDFStreamBean.setSrcPdfFile(srcPdfPath);