Joburgess 4 years ago
parent
commit
fe0a5d49ce

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

@@ -981,13 +981,13 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 		params.put("isShowVisualSeal", false);
 
 		if(StringUtils.isBlank(musicGroupId)){
-			params.put("ownershipType", OwnershipType.OWN);
+			params.put("ownershipType", "OWN");
 		}else{
 			MusicGroup musicGroup = musicGroupService.get(musicGroupId);
 			if (musicGroup == null) {
 				throw new BizException("乐团信息没找到");
 			}
-			params.put("ownershipType", musicGroup.getOwnershipType());
+			params.put("ownershipType", musicGroup.getOwnershipType().name());
 		}
 
 		templateEngine.render(params, "product.ftl", srcFile);
@@ -1001,7 +1001,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
 
 		String organCode = "";
-		if (params.get("ownershipType") == OwnershipType.OWN) {
+		if (OwnershipType.OWN.name().equals(params.get("ownershipType"))){
 			organCode = "91440300326364429H";
 		} else {
 			organCode = "91420106333619290A";
@@ -1054,8 +1054,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 		StudentInfo studentInfo = studentRegistrationService.queryStudentInfo(userId);
 		params.put("studentInfo", studentInfo);
 		params.put("isShowVisualSeal", true);
+
 		if(StringUtils.isBlank(musicGroupId)){
-			params.put("ownershipType", OwnershipType.OWN);
+			params.put("ownershipType", "OWN");
 		}else{
 			MusicGroup musicGroup = musicGroupService.get(musicGroupId);
 			if (musicGroup == null) {
@@ -1063,6 +1064,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 			}
 			params.put("ownershipType", musicGroup.getOwnershipType().name());
 		}
+
 		templateEngine.render(params, "product.ftl", srcFile);
 
 		String html = "";

+ 2 - 2
mec-biz/src/main/resources/config/contracts/product.ftl

@@ -83,7 +83,7 @@
         }
     </style>
 </head>
-<body>
+<body style="font-family:'SimSun'">
     <div class="container">
         <h1>《产品与服务协议》</h1>
         <!-- 甲方:深圳大雅乐盟网络教育股份有限公司 <br/> -->
@@ -187,7 +187,7 @@
                 <span>日期:${.now?string("yyyy年MM月dd日")}</span>
             </div>
             </#if>
-            <div class="sign">乙方签:${studentInfo.realName!}
+            <div class="sign">乙方签:${studentInfo.realName!}
                 <span>日期:${.now?string("yyyy年MM月dd日")} </span>
             </div>
         	<#else>