From 94fc07774a552edc838ab68dc72a89eed8888665 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期六, 20 一月 2024 17:40:04 +0800
Subject: [PATCH] 111

---
 server/service/src/main/java/com/doumee/core/utils/Constants.java |  106 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 106 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 84598f6..d25517c 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
@@ -1,5 +1,8 @@
 package com.doumee.core.utils;
 
+import com.doumee.core.constants.ResponseStatus;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.dao.business.model.Solutions;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 
@@ -7,6 +10,7 @@
 import java.math.BigDecimal;
 import java.net.URLDecoder;
 import java.util.*;
+import java.util.Date;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -705,8 +709,110 @@
 
     }
 
+    public static BigDecimal countDetailFee(Solutions solutions,Date startDate, Date endDate){
+        //鏌ヨ淇濋櫓瀹為檯鍛ㄦ湡
+        Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getDataType());
+        if(cycle==-1){
+            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鏃ユ湡淇℃伅閿欒!");
+        }
+        return solutions.getPrice().multiply(new BigDecimal(cycle));
+    }
 
 
+    public  enum ApplyChangeStatus {
+        UPLOAD(0, "鎻愪氦鍔犲噺淇�/鎹㈠巶鐢宠"),
+        SIGNATURE(1, "宸茬绔�"),
+        APPROVE(2, "宸蹭笂浼犲鎵�"),
+        RETURN_APPLY(3, "鍙戣捣閫�鍥炵敵璇�"),
+        PLATFORM_AGREE(4, "骞冲彴鍚屾剰锛堝凡閫�鍥烇級"),
+        CLOSE(5, "宸插叧闂�"),
+        ;
+        // 鎴愬憳鍙橀噺
+        private String name;
+        private int key;
+
+        // 鏋勯�犳柟娉�
+        ApplyChangeStatus(int key, String name) {
+            this.name = name;
+            this.key = key;
+        }
+
+        // 鏅�氭柟娉�
+        public static String getName(int index) {
+            for (ApplyLogType c : ApplyLogType.values()) {
+                if (c.getKey() == index) {
+                    return c.name;
+                }
+            }
+            return null;
+        }
+
+        // get set 鏂规硶
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public int getKey() {
+            return key;
+        }
+
+        public void setKey(int key) {
+            this.key = key;
+        }
+
+    }
+
+//3=閫�鍥炵敵璇凤紱4=骞冲彴瀹℃壒閫氳繃锛�0=瀹℃壒椹冲洖;5=骞冲彴瀹℃壒椹冲洖
+    public  enum ApplyChangeLogStatus {
+        UPLOAD(0, "鍙戣捣鐢宠"),
+        RETURN_APPLY(3, "鍙戣捣閫�鍥炵敵璇�"),
+        PLATFORM_AGREE(4, "骞冲彴瀹℃壒閫氳繃"),
+        PLATFORM_UN_AGREE(0, "瀹℃壒椹冲洖"),
+        CLOSE(5, "鍏抽棴"),
+        ;
+        // 鎴愬憳鍙橀噺
+        private String name;
+        private int key;
+
+        // 鏋勯�犳柟娉�
+        ApplyChangeLogStatus(int key, String name) {
+            this.name = name;
+            this.key = key;
+        }
+
+        // 鏅�氭柟娉�
+        public static String getName(int index) {
+            for (ApplyLogType c : ApplyLogType.values()) {
+                if (c.getKey() == index) {
+                    return c.name;
+                }
+            }
+            return null;
+        }
+
+        // get set 鏂规硶
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public int getKey() {
+            return key;
+        }
+
+        public void setKey(int key) {
+            this.key = key;
+        }
+
+    }
+
     public  enum ProjectRecord {
 
         COM_EDITING(0, "浼佷笟淇濆瓨鏁版嵁", "鐢� ${param2} ${param3}淇濆瓨鎴愬姛锛屽綋鍓嶈繘搴︿负 銆�${param4}銆�"),

--
Gitblit v1.9.3