From fc03a64522e6c6e0f47eeb82c8900e1910a0a363 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 01 二月 2024 09:11:11 +0800
Subject: [PATCH] 111

---
 server/service/src/main/java/com/doumee/core/utils/Constants.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index f2b834f..5270010 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -3,6 +3,7 @@
 import com.doumee.core.constants.ResponseStatus;
 import com.doumee.core.exception.BusinessException;
 import com.doumee.dao.business.model.Solutions;
+import com.doumee.dao.business.vo.CountCyclePriceVO;
 import io.swagger.models.auth.In;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
@@ -161,6 +162,23 @@
         return age;
     }
 
+
+    public static CountCyclePriceVO countPriceVO(Date startDate, Solutions solutions){
+        CountCyclePriceVO countCyclePriceVO = new CountCyclePriceVO();
+        if(solutions.getInsureCycleUnit().equals(Constants.ZERO)){
+            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(startDate,0,solutions.getInsureCycle()));
+        }else if(solutions.getInsureCycleUnit().equals(Constants.TWO)){
+            Integer monthDays = DateUtil.monthDays(startDate);
+            Date afterDate = DateUtil.afterDateByType(startDate,0,monthDays);
+            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1));
+        }else if(solutions.getInsureCycleUnit().equals(Constants.THREE)){
+            Date afterDate = DateUtil.afterDateByType(startDate,2,solutions.getInsureCycle());
+            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1));
+        }
+        countCyclePriceVO.setCyclePrice(Constants.countDetailFee(solutions,countCyclePriceVO.getEndDate(),startDate));
+        return countCyclePriceVO;
+    }
+
     public static Integer getSexByIdCard(String idCard){
         Pattern pattern = Pattern.compile("\\d{17}[\\d|x]"); // 瀹氫箟韬唤璇佸彿鐮佹牸寮忕殑姝e垯琛ㄨ揪寮�
         Matcher matcher = pattern.matcher(idCard);

--
Gitblit v1.9.3