Browse Source

1. 协议起止时间修改
2. 驾意险配置添加产品别名字段

785834757 1 year ago
parent
commit
0f6d405785

+ 4 - 0
sql/Online.sql

@@ -217,3 +217,7 @@ CREATE TABLE `send_project_history` (
 
 
 
+-- 2024-11-15 协议修改时间格式--
+ALTER TABLE `agent`.`ptl_agreement`
+MODIFY COLUMN `start_date` datetime NOT NULL COMMENT '协议起期' AFTER `insurance_company_id`,
+MODIFY COLUMN `end_date` datetime NOT NULL COMMENT '协议止期' AFTER `start_date`;

+ 2 - 1
src/main/java/com/ydtech/modules/order/controller/QuoteController.java

@@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.List;
@@ -125,7 +126,7 @@ public class QuoteController extends BaseController {
         HttpResult<QuoteRespVo> respVo = null;
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         HttpResult<PtlAgreementQueryVo> byAgreementId = ptlAgreementService.getByAgreementId(quoteVo.getAgreementId());
-        LocalDate currentDate = LocalDate.now();
+        LocalDateTime currentDate = LocalDateTime.now();
         if(byAgreementId.getData().getAgreement().getIsValid().equals("0")  //是否有效
                 || byAgreementId.getData().getAgreement().getValidStatus().equals("0")  //是否有效
                 || !(currentDate.isAfter(byAgreementId.getData().getAgreement().getStartDate()) && currentDate.isBefore(byAgreementId.getData().getAgreement().getEndDate()))){

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/InsDrivingIntentionInsurance.java

@@ -40,7 +40,7 @@ public class InsDrivingIntentionInsurance implements Serializable {
     @TableField(value = "type")
     private Integer type;
 
-    @TableField(exist = false)
+    @TableField(value = "alias")
     private String alias;
 
     /**

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/InsDrivingIntentionInsuranceVo.java

@@ -66,6 +66,9 @@ public class InsDrivingIntentionInsuranceVo {
     @ApiModelProperty(value = "保额")
     private String sumAmount;
 
+    @ApiModelProperty(value = "产品别名")
+    private String alias;
+
     /**
      * 保费
      */

+ 3 - 2
src/main/java/com/ydtech/modules/protocol/entity/dto/PtlAgreementSaveDto.java

@@ -7,6 +7,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 
 @Data
 @ApiModel("协议添加实体")
@@ -33,10 +34,10 @@ public class PtlAgreementSaveDto implements Serializable {
     private String associationCompaniesId;
 
     @ApiModelProperty("协议起期")
-    private LocalDate startDate;
+    private LocalDateTime startDate;
 
     @ApiModelProperty("协议止期")
-    private LocalDate endDate;
+    private LocalDateTime endDate;
 
     @ApiModelProperty("结算周期")
     private Integer moneyTime;

+ 2 - 2
src/main/java/com/ydtech/modules/protocol/entity/po/PtlAgreement.java

@@ -107,13 +107,13 @@ public class PtlAgreement implements Serializable {
      * 协议起期
      */
     @TableField(value = "start_date")
-    private LocalDate startDate;
+    private LocalDateTime startDate;
 
     /**
      * 协议止期
      */
     @TableField(value = "end_date")
-    private LocalDate endDate;
+    private LocalDateTime endDate;
 
     /**
      * 结算周期

+ 6 - 6
src/main/java/com/ydtech/modules/protocol/service/impl/PtlAgreementServiceImpl.java

@@ -241,9 +241,9 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
         ptlAgreement.setCreator(userName);
         ptlAgreement.setCreateTime(LocalDateTime.now());
         ptlAgreement.setDeleted(0);
-        LocalDate startDate = agreementSaveDto.getStartDate();
-        LocalDate endDate = agreementSaveDto.getEndDate();
-        LocalDate now = LocalDate.now();
+        LocalDateTime startDate = agreementSaveDto.getStartDate();
+        LocalDateTime endDate = agreementSaveDto.getEndDate();
+        LocalDateTime now = LocalDateTime.now();
         //更新是否有效
         if (now.isEqual(startDate) || (now.isAfter(startDate) && now.isBefore(endDate))) {
             ptlAgreement.setIsValid("1");
@@ -588,9 +588,9 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
                         agreement.setFeeFileUrl(file.getUrl());
                         agreement.setFeeFileName(file.getFileName());
                     }); // 假设 record 有 setUrl 方法
-            LocalDate startDate = agreement.getStartDate();
-            LocalDate endDate = agreement.getEndDate();
-            LocalDate now = LocalDate.now();
+            LocalDateTime startDate = agreement.getStartDate();
+            LocalDateTime endDate = agreement.getEndDate();
+            LocalDateTime now = LocalDateTime.now();
             //更新是否有效
             if (now.isEqual(startDate) || (now.isAfter(startDate) && now.isBefore(endDate))) {
                 agreement.setIsValid("1");

+ 1 - 0
src/main/resources/mapper/modules/order/InsDrivingIntentionInsuranceMapper.xml

@@ -12,6 +12,7 @@
         <result property="companyName" column="companyName" jdbcType="VARCHAR"/>
         <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
         <result property="projectCode" column="project_code" jdbcType="VARCHAR"/>
+        <result property="alias" column="alias" jdbcType="VARCHAR"/>
         <result property="riskCode" column="risk_code" jdbcType="VARCHAR"/>
         <result property="seatNum" column="seat_num" jdbcType="INTEGER"/>
         <result property="sumAmount" column="sum_amount" jdbcType="DECIMAL"/>