Kaynağa Gözat

feat(contract): 增加收据起止日期字段并更新环境配置

- 在 AReceiptInfo 实体类中新增 startDate 和 endDate 字段
- 在 ReceiptDto 中增加 startDate 和 endDate 字符串属性
- 更新 AContractInfoServiceImpl以设置新字段值并解析日期
- 在 RentalTempBo 中新增 d14 和 d15 字段用于模板渲染- 将 application.yml 配置切换为开发环境 (dev)
林仔 7 ay önce
ebeveyn
işleme
8aa2570621

+ 14 - 0
src/main/java/com/zksy/property/domain/AReceiptInfo.java

@@ -107,6 +107,20 @@ public class AReceiptInfo implements Serializable {
     @JsonFormat(pattern = "yyyy-MM-dd")
     private LocalDate generationDate;
 
+    /**
+     * 生成日期
+     */
+    @ApiModelProperty(value = "开始日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate startDate;
+
+    /**
+     * 生成日期
+     */
+    @ApiModelProperty(value = "结束日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate endDate;
+
     /**
      * 创建时间
      */

+ 2 - 0
src/main/java/com/zksy/property/domain/bo/RentalTempBo.java

@@ -117,6 +117,8 @@ public class RentalTempBo {
     private String d11;
     private String d12;
     private String d13;
+    private String d14;
+    private String d15;
 
     private String e1;
     private String e2;

+ 2 - 0
src/main/java/com/zksy/property/domain/dto/ReceiptDto.java

@@ -20,6 +20,8 @@ public class ReceiptDto {
     private BigDecimal sf;
     private String paymentReason;
     private String rzrq;
+    private String startDate;
+    private String endDate;
     private String operator;
 
 }

+ 4 - 0
src/main/java/com/zksy/property/service/impl/AContractInfoServiceImpl.java

@@ -125,6 +125,8 @@ public class AContractInfoServiceImpl extends ServiceImpl<AContractInfoMapper, A
         DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy年M月d日");
         LocalDate rzrqDate = LocalDate.parse(dto.getRzrq(), inputFormatter);
         bo.setD13(rzrqDate.format(outputFormatter));
+        bo.setD14(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy年M月d日")));
+        bo.setD15(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy年M月d日")));
 
         String attachmentUrl = aRentalContractService.generatorRental("4", bo, true);
         AReceiptInfo receiptInfo = new AReceiptInfo();
@@ -141,6 +143,8 @@ public class AContractInfoServiceImpl extends ServiceImpl<AContractInfoMapper, A
         receiptInfo.setReceiptReason(dto.getPaymentReason());
         receiptInfo.setAttachmentUrl(attachmentUrl);
         receiptInfo.setGenerationDate(LocalDate.now());
+        receiptInfo.setStartDate(LocalDate.parse(dto.getStartDate()));
+        receiptInfo.setEndDate(LocalDate.parse(dto.getEndDate()));
         receiptInfo.setCreateTime(LocalDateTime.now());
         receiptInfo.setUpdateTime(LocalDateTime.now());
         aReceiptInfoService.save(receiptInfo);

+ 1 - 1
src/main/resources/application.yml

@@ -20,7 +20,7 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: prod
+    active: dev
   # 文件上传
   servlet:
     multipart: