|
@@ -980,14 +980,14 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
|
|
|
params.put("isShowVisualSeal", false);
|
|
params.put("isShowVisualSeal", false);
|
|
|
|
|
|
- if(Objects.nonNull(musicGroupId)){
|
|
|
|
- params.put("ownershipType", OwnershipType.OWN);
|
|
|
|
|
|
+ if(StringUtils.isBlank(musicGroupId)){
|
|
|
|
+ params.put("ownershipType", "OWN");
|
|
}else{
|
|
}else{
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
if (musicGroup == null) {
|
|
if (musicGroup == null) {
|
|
throw new BizException("乐团信息没找到");
|
|
throw new BizException("乐团信息没找到");
|
|
}
|
|
}
|
|
- params.put("ownershipType", musicGroup.getOwnershipType());
|
|
|
|
|
|
+ params.put("ownershipType", musicGroup.getOwnershipType().name());
|
|
}
|
|
}
|
|
|
|
|
|
templateEngine.render(params, "product.ftl", srcFile);
|
|
templateEngine.render(params, "product.ftl", srcFile);
|
|
@@ -1001,7 +1001,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
|
|
|
|
|
|
|
String organCode = "";
|
|
String organCode = "";
|
|
- if (params.get("ownershipType") == OwnershipType.OWN) {
|
|
|
|
|
|
+ if (OwnershipType.OWN.name().equals(params.get("ownershipType"))){
|
|
organCode = "91440300326364429H";
|
|
organCode = "91440300326364429H";
|
|
} else {
|
|
} else {
|
|
organCode = "91420106333619290A";
|
|
organCode = "91420106333619290A";
|
|
@@ -1023,7 +1023,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
|
|
|
SysUserContracts sysUserContracts = new SysUserContracts();
|
|
SysUserContracts sysUserContracts = new SysUserContracts();
|
|
sysUserContracts.setCreateTime(date);
|
|
sysUserContracts.setCreateTime(date);
|
|
- sysUserContracts.setType(ContractType.COURSES);
|
|
|
|
|
|
+ sysUserContracts.setType(ContractType.PRODUCT);
|
|
sysUserContracts.setUrl(pdfFilePath);
|
|
sysUserContracts.setUrl(pdfFilePath);
|
|
sysUserContracts.setUserId(userId);
|
|
sysUserContracts.setUserId(userId);
|
|
|
|
|
|
@@ -1054,8 +1054,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
StudentInfo studentInfo = studentRegistrationService.queryStudentInfo(userId);
|
|
StudentInfo studentInfo = studentRegistrationService.queryStudentInfo(userId);
|
|
params.put("studentInfo", studentInfo);
|
|
params.put("studentInfo", studentInfo);
|
|
params.put("isShowVisualSeal", true);
|
|
params.put("isShowVisualSeal", true);
|
|
- if(Objects.nonNull(musicGroupId)){
|
|
|
|
- params.put("ownershipType", OwnershipType.OWN);
|
|
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isBlank(musicGroupId)){
|
|
|
|
+ params.put("ownershipType", "OWN");
|
|
}else{
|
|
}else{
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
if (musicGroup == null) {
|
|
if (musicGroup == null) {
|
|
@@ -1063,6 +1064,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
}
|
|
}
|
|
params.put("ownershipType", musicGroup.getOwnershipType().name());
|
|
params.put("ownershipType", musicGroup.getOwnershipType().name());
|
|
}
|
|
}
|
|
|
|
+
|
|
templateEngine.render(params, "product.ftl", srcFile);
|
|
templateEngine.render(params, "product.ftl", srcFile);
|
|
|
|
|
|
String html = "";
|
|
String html = "";
|