|
@@ -914,6 +914,24 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
if (!CollectionUtils.isEmpty(userContracts)) {
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ TenantInfo tenantInfo = tenantInfoService.get(studentInfo.getTenantId());
|
|
|
+ if(tenantInfo == null){
|
|
|
+ throw new BizException("机构信息不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ params.put("compayName", tenantInfo.getName());
|
|
|
+ params.put("sealPicture", "");
|
|
|
+
|
|
|
+ if (studentInfo.getTenantId() == 1) {
|
|
|
+ if (OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
|
|
|
+ params.put("compayName", "深圳大雅乐盟网络教育股份有限公司");
|
|
|
+ params.put("sealPicture", "https://daya-online.oss-cn-beijing.aliyuncs.com/website/cachet.png");
|
|
|
+ } else {
|
|
|
+ params.put("compayName", "武汉长乐长风乐器销售有限公司");
|
|
|
+ params.put("sealPicture", "https://daya-online.oss-cn-beijing.aliyuncs.com/website/clcf.png");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
templateEngine.render(params, "product" + ownershipType.getContractVersion() + ".ftl", srcFile);
|
|
|
|
|
@@ -935,10 +953,6 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
organCode = "91420106333619290A";
|
|
|
}
|
|
|
} else {
|
|
|
- TenantInfo tenantInfo = tenantInfoService.get(user.getTenantId());
|
|
|
- if(tenantInfo == null){
|
|
|
- throw new BizException("机构信息不存在");
|
|
|
- }
|
|
|
organCode = tenantInfo.getTsignCode();
|
|
|
}
|
|
|
SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
|
|
@@ -1000,7 +1014,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("courseViewType", CourseViewTypeEnum.COURSE_FEE);
|
|
|
CourseViewTypeEnum ownershipType = CourseViewTypeEnum.COURSE_FEE;
|
|
|
-
|
|
|
+
|
|
|
if (StringUtils.isBlank(musicGroupId)) {
|
|
|
params.put("ownershipType", "OWN");
|
|
|
MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
|
|
@@ -1021,6 +1035,24 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
if (Objects.nonNull(courseViewType)) {
|
|
|
ownershipType = courseViewType;
|
|
|
}
|
|
|
+
|
|
|
+ TenantInfo tenantInfo = tenantInfoService.get(studentInfo.getTenantId());
|
|
|
+ if(tenantInfo == null){
|
|
|
+ throw new BizException("机构信息不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ params.put("compayName", tenantInfo.getName());
|
|
|
+ params.put("sealPicture", "");
|
|
|
+
|
|
|
+ if (studentInfo.getTenantId() == 1) {
|
|
|
+ if (OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
|
|
|
+ params.put("compayName", "深圳大雅乐盟网络教育股份有限公司");
|
|
|
+ params.put("sealPicture", "https://daya-online.oss-cn-beijing.aliyuncs.com/website/cachet.png");
|
|
|
+ } else {
|
|
|
+ params.put("compayName", "武汉长乐长风乐器销售有限公司");
|
|
|
+ params.put("sealPicture", "https://daya-online.oss-cn-beijing.aliyuncs.com/website/clcf.png");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
templateEngine.render(params, "product" + ownershipType.getContractVersion() + ".ftl", srcFile);
|
|
|
|
|
@@ -1092,6 +1124,24 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
|
|
|
CourseViewTypeEnum courseViewType = CourseViewTypeEnum.COURSE_FEE;
|
|
|
params.put("ownershipType", "OWN");
|
|
|
+
|
|
|
+ TenantInfo tenantInfo = tenantInfoService.get(studentInfo.getTenantId());
|
|
|
+ if(tenantInfo == null){
|
|
|
+ throw new BizException("机构信息不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ params.put("compayName", tenantInfo.getName());
|
|
|
+ params.put("sealPicture", "");
|
|
|
+
|
|
|
+ if (studentInfo.getTenantId() == 1) {
|
|
|
+ if (OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
|
|
|
+ params.put("compayName", "深圳大雅乐盟网络教育股份有限公司");
|
|
|
+ params.put("sealPicture", "https://daya-online.oss-cn-beijing.aliyuncs.com/website/cachet.png");
|
|
|
+ } else {
|
|
|
+ params.put("compayName", "武汉长乐长风乐器销售有限公司");
|
|
|
+ params.put("sealPicture", "https://daya-online.oss-cn-beijing.aliyuncs.com/website/clcf.png");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
List<SysUserContracts> userContracts = sysUserContractsService.getUserContractWithType(userId, ContractType.PRODUCT, 2);
|
|
|
if (!CollectionUtils.isEmpty(userContracts)) {
|
|
@@ -1108,7 +1158,17 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
return BaseController.failed("生成产品协议失败");
|
|
|
}
|
|
|
|
|
|
- String organCode = "91440300326364429H";
|
|
|
+ String organCode = "";
|
|
|
+
|
|
|
+ if (user.getTenantId() == 1) {
|
|
|
+ if (OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
|
|
|
+ organCode = "91440300326364429H";
|
|
|
+ } else {
|
|
|
+ organCode = "91420106333619290A";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ organCode = tenantInfo.getTsignCode();
|
|
|
+ }
|
|
|
|
|
|
SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
|
|
|
if (organTsign == null) {
|