From c8ad6f13c0e9cbff9a0763bc50c86576449f6e03 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 22 一月 2024 08:57:51 +0800
Subject: [PATCH] 111

---
 server/service/src/main/java/com/doumee/core/utils/Constants.java |  213 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 211 insertions(+), 2 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 b4cae7f..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;
 
@@ -556,14 +560,13 @@
 
 
     public  enum DispatchUnitLogType {
-
         UPLOAD(0, "鎻愪氦鐢宠"),
         AUDIT_PASS(1, "娲鹃仯鍗曚綅閫氳繃"),
         AUDIT_UN_PASS(2, "娲鹃仯鍗曚綅涓嶉�氳繃"),
         EDIT_UNIT(3, "淇敼娲鹃仯鍗曚綅淇℃伅"),
         ADD_WORK_TYPE(4, "鎻愪氦娣诲姞宸ョ"),
         WORK_TYPE_AUDIT_PASS(5, "娣诲姞宸ョ瀹℃壒閫氳繃"),
-        WORK_TYPE_AUDIT_UN_PASS(5, "娣诲姞宸ョ瀹℃壒涓嶉�氳繃"),
+        WORK_TYPE_AUDIT_UN_PASS(6, "娣诲姞宸ョ瀹℃壒涓嶉�氳繃"),
         ;
         // 鎴愬憳鍙橀噺
         private String name;
@@ -604,6 +607,212 @@
 
     }
 
+
+    public  enum ApplyLogType {
+        UPLOAD(0, "鎻愪氦鎶曚繚鐢宠"),
+        PLATFORM_RETURN(1, "骞冲彴閫�鍥炰繚鍗�"),
+        WAIT_SIGNATURE(2, "宸蹭笂浼犱唬绛剧敵璇疯〃寰呬紒涓氱绔�"),
+        SIGNATURE(3, "宸茬绔犲緟涓婁紶淇濋櫓鍗�"),
+        FAIL_RETURN(4, "淇濆崟鍑哄叿澶辫触閫�鍥�"),
+        UPLOAD_INSURANCE(5, "宸蹭笂浼犱繚鍗�"),
+        COMPANY_APPLY_RETURN(6, "浼佷笟鐢宠閫�鍥�"),
+        COMPANY_APPLY_CLOSE(7, "浼佷笟鍏抽棴鐢宠"),
+        PLATFORM_AGREE(8, "骞冲彴鍚屾剰浼佷笟閫�鍥炵敵璇�"),
+        PLATFORM_UN_AGREE(9, "骞冲彴鎷掔粷浼佷笟閫�鍥炵敵璇�"),
+        ;
+        // 鎴愬憳鍙橀噺
+        private String name;
+        private int key;
+
+        // 鏋勯�犳柟娉�
+        ApplyLogType(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 InsuranceApplyStatus {
+        UPLOAD(0, "鎻愪氦鎶曚繚鐢宠"),
+        PLATFORM_RETURN(1, "骞冲彴閫�鍥炰繚鍗�"),
+        WAIT_SIGNATURE(2, "宸蹭笂浼犱唬绛剧敵璇疯〃寰呬紒涓氱绔�"),
+        SIGNATURE(3, "宸茬绔犲緟涓婁紶淇濋櫓鍗�"),
+        FAIL_RETURN(4, "淇濆崟鍑哄叿澶辫触閫�鍥�"),
+        UPLOAD_INSURANCE(5, "宸蹭笂浼犱繚鍗�"),
+        COMPANY_APPLY_RETURN(6, "浼佷笟鐢宠閫�鍥�"),
+        PLATFORM_AGREE(7, "骞冲彴鍚屾剰閫�鍥�"),
+        CLOSE(8, "璁㈠崟鍏抽棴"),
+        ;
+        // 鎴愬憳鍙橀噺
+        private String name;
+        private int key;
+
+        // 鏋勯�犳柟娉�
+        InsuranceApplyStatus(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 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