Selaa lähdekoodia

修改乐小雅协议样式

hgw 3 vuotta sitten
vanhempi
commit
2423424cf7

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TenantContractRecord.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -68,6 +69,7 @@ public class TenantContractRecord implements Serializable {
     @ApiModelProperty(value = "协议类型 0机构开通 1机构续费 待补充")
     private Integer type;
 
+    @JsonFormat(pattern = "yyyy-MM-dd")
     @TableField("biz_date_")
     @ApiModelProperty(value = "创建日期")
     private Date bizDate;

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

@@ -545,11 +545,15 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
     private Map<String, Object> getContractParam(TenantInfoInfoPageVo tenantInfo, Date now) {
         //将数据转换为Map
         Map<String, Object> param = toMap(tenantInfo);
+        //当前时间
         param.put("nowDate", DateUtils.formatDate(now, "yyyy年MM月dd日"));
+        //服务过期时间
         param.put("expireDate", DateUtils.formatDate(getExpiryDate(tenantInfo.getExpiryCount(), tenantInfo.getExpiryUnit(), now), "yyyy年MM月dd日"));
+        //购买服务的时长单位
         param.put("expiryUnit", TenantProductInfo.MONTH.equals(tenantInfo.getExpiryUnit()) ? "月" : "年");
+        //乙方公章
         param.put("officialSealB", "https://daya.ks3-cn-beijing.ksyun.com/202202/Sx6rzWm.png");
-        //写入产品名称
+        //获取产品名称
         opsContractData(tenantInfo.getServeId(), platformServeService::queryProductNameById,
                 "未查询到产品信息!",
                 param::put, "productName", PlatformServePageVo::getProductName);
@@ -565,13 +569,15 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         TenantConfig tenantConfig = opsContractData(tenantInfo.getId(), tenantConfigService::queryByTenantId,
                 "未查询到机构配置信息!",
                 param::put, "chargeRate", TenantConfig::getChargeRate);
+        //甲方企业公章
+        param.put("officialSealA", tenantConfig.getCorporateChops());
         //获取云教室规则  String人数 BigDecimal每分钟扣费标准
         Map<String, BigDecimal> rule = opsContractData(tenantConfig.getConfig(), tenantConfigService::getCloudRoomRule,
                 "未查询到云教室的价格配置!",
                 param::put, "rowspan", Map::size);
 
         AtomicReference<String> rowspanData = new AtomicReference<>("");
-        //生成默认云教室数据
+        //生成云教室扣费的样式
         rule.forEach((k, v) -> {
             //人数
             int count = Integer.parseInt(k) - 1;
@@ -620,7 +626,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
      */
     public String getContractAndUpLoad(Integer tenantId) {
         Date now = new Date();
-        //创建地址
+        //创建PDF本次缓存地址
         String srcPdfPath = contractBaseDir + lexiaoyaContract + DateUtils.formatDate(now, "yyyyMMddHHmmss") + "/" + tenantId + "_" + java.time.LocalDateTime.now().getSecond() + ".pdf";
         //生成文件
         File srcFile = new File(srcPdfPath);
@@ -640,7 +646,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         String dateStrOss = DateUtils.formatDate(now, "yyyy/MM/dd");
         dateStrOss = "oa/" + dateStrOss + "/" + DateUtil.getHour(now);
         String pdfFilePath = storagePluginContext.uploadFile(KS3StoragePlugin.PLUGIN_NAME, dateStrOss, srcFile);
-        //删除生成的文件
+        //删除本次PDF生成的文件缓存
         FileUtils.deleteQuietly(srcFile);
         return pdfFilePath;
     }

+ 9 - 5
mec-biz/src/main/resources/config/contracts/lexiaoyaContract.ftl

@@ -65,7 +65,7 @@
             left: 50%;
             width: 140px;
             height: 140px;
-            margin-left: -70px;
+            margin-left: -90px;
         }
 
         .iInfo {
@@ -271,9 +271,11 @@
 
     <table border="1" style="width: 100%; border-collapse: collapse;">
         <tr>
-            <td style="text-align: center;">甲方盖章:</td>
             <td style="text-align: center;">
-                乙方盖章<div class="sign"><img class="cachet" src="${officialSealB}" alt="" /></div>
+                甲方盖章:<div class="sign"><img class="cachet" src="${officialSealA}" alt="" /></div>
+            </td>
+            <td style="text-align: center;">
+                乙方盖章:<div class="sign"><img class="cachet" src="${officialSealB}" alt="" /></div>
             </td>
         </tr>
         <tr>
@@ -400,9 +402,11 @@
             <td style="text-align: center;">乙方:武汉乐小雅网络科技有限公司</td>
         </tr>
         <tr>
-            <td style="text-align: center;">甲方盖章:</td>
             <td style="text-align: center;">
-                乙方盖章<div class="sign"><img class="cachet" src="${officialSealB}" alt="" /></div>
+                甲方盖章:<div class="sign"><img class="cachet" src="${officialSealA}" alt="" /></div>
+            </td>
+            <td style="text-align: center;">
+                乙方盖章:<div class="sign"><img class="cachet" src="${officialSealB}" alt="" /></div>
             </td>
         </tr>
         <tr>