From dad4c3efeedd1971235d7907d9066ea06dc30e11 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 11 七月 2023 18:02:21 +0800
Subject: [PATCH] 倒仓和性质变更优化

---
 igds-inout/src/main/java/com/ld/igds/m/InoutManageUtil.java |  227 +++++++++++++++++++++++++++++---------------------------
 1 files changed, 118 insertions(+), 109 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/m/InoutManageUtil.java b/igds-inout/src/main/java/com/ld/igds/m/InoutManageUtil.java
index 14259de..9f5bd25 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/InoutManageUtil.java
+++ b/igds-inout/src/main/java/com/ld/igds/m/InoutManageUtil.java
@@ -2,128 +2,137 @@
 
 import com.ld.igds.models.InoutPlan;
 import com.ld.igds.util.ContextUtil;
+
 import java.util.List;
 
 /**
  * 鍑哄叆搴�--绠$悊鍔熻兘鐩稿叧甯搁噺
- * 
- * @author:
  *
+ * @author:
  */
 public class InoutManageUtil {
 
-	/**
-	 * 璁″垝绫诲瀷-閲囪喘璁″垝
-	 */
-	public static final String PLAN_TYPE_1 = "1";
-	/**
-	 * 璁″垝绫诲瀷-閿�鍞鍒�
-	 */
-	public static final String PLAN_TYPE_2 = "2";
-	/**
-	 * 璁″垝绫诲瀷-杞崲璁″垝
-	 */
-	public static final String PLAN_TYPE_3 = "3";
-	
-	/**
-	 * 璁″垝绫诲瀷-鍔犲伐璁″垝
-	 */
-	public static final String PLAN_TYPE_4 = "4";
+    /**
+     * 璁″垝绫诲瀷-閲囪喘璁″垝
+     */
+    public static final String PLAN_TYPE_1 = "1";
+    /**
+     * 璁″垝绫诲瀷-閿�鍞鍒�
+     */
+    public static final String PLAN_TYPE_2 = "2";
+    /**
+     * 璁″垝绫诲瀷-杞崲璁″垝
+     */
+    public static final String PLAN_TYPE_3 = "3";
 
-	/**
-	 * 璁″垝璇︾粏绫诲瀷-杞叆
-	 */
-	public static final String PLAN_TYPE_TURN_IN = "2";
-	/**
-	 * 璁″垝璇︾粏绫诲瀷-杞嚭
-	 */
-	public static final String PLAN_TYPE_TURN_OUT = "1";
+    /**
+     * 璁″垝绫诲瀷-鍔犲伐璁″垝
+     */
+    public static final String PLAN_TYPE_4 = "4";
 
-	/**
-	 * 瀹℃牳鐘舵��-寰呭鏍�
-	 */
-	public static final String AUDIT_NONE = "NONE";
-	/**
-	 * 瀹℃牳鐘舵��-閫氳繃
-	 */
-	public static final String AUDIT_PASS = "PASS";
-	/**
-	 * 瀹℃牳鐘舵��-鎷掔粷
-	 */
-	public static final String AUDIT_UNPASS = "UNPASS";
+    /**
+     * 璁″垝璇︾粏绫诲瀷-杞叆
+     */
+    public static final String PLAN_TYPE_TURN_IN = "2";
+    /**
+     * 璁″垝璇︾粏绫诲瀷-杞嚭
+     */
+    public static final String PLAN_TYPE_TURN_OUT = "1";
 
-	/**
-	 * 鍚堝悓绫诲瀷-浠e偍鍚堝悓
-	 */
-	public static final String CONTRACT_TYPE_3 = "3";
-	/**
-	 * 鍚堝悓绫诲瀷-閲囪喘鍚堝悓
-	 */
-	public static final String CONTRACT_TYPE_2 = "2";
-	/**
-	 * 鍚堝悓绫诲瀷-閿�鍞悎鍚�
-	 */
-	public static final String CONTRACT_TYPE_1 = "1";
+    /**
+     * 瀹℃牳鐘舵��-寰呭鏍�
+     */
+    public static final String AUDIT_NONE = "NONE";
+    /**
+     * 瀹℃牳鐘舵��-閫氳繃
+     */
+    public static final String AUDIT_PASS = "PASS";
+    /**
+     * 瀹℃牳鐘舵��-鎷掔粷
+     */
+    public static final String AUDIT_UNPASS = "UNPASS";
 
-	/**
-	 * 瀹㈡埛绫诲瀷 - 浼佷笟
-	 */
-	public static final String CUSTOMER_TYPE_1 = "1";
-	/**
-	 * 瀹㈡埛绫诲瀷 - 涓汉
-	 */
-	public static final String CUSTOMER_TYPE_2 = "2";
+    /**
+     * 鍚堝悓绫诲瀷-浠e偍鍚堝悓
+     */
+    public static final String CONTRACT_TYPE_3 = "3";
+    /**
+     * 鍚堝悓绫诲瀷-閲囪喘鍚堝悓
+     */
+    public static final String CONTRACT_TYPE_2 = "2";
+    /**
+     * 鍚堝悓绫诲瀷-閿�鍞悎鍚�
+     */
+    public static final String CONTRACT_TYPE_1 = "1";
 
-	/**
-	 * 鏍规嵁绫诲瀷鍒涘缓璁″垝ID
-	 * 
-	 * @param type
-	 */
-	public static String createPlanId(String type, String year, List<InoutPlan> list) {
-		String index = "001";
-		if(list != null && list.size() > 0){
-			String[] arr = list.get(0).getId().split("_");
-			int temp = Integer.valueOf(arr[2]) + 1;
-			index = temp + "";
-		}
-		if(index.length() == 1){
-			index = "00" + index;
-		}
-		if(index.length() == 2){
-			index = "0" + index;
-		}
-		if (PLAN_TYPE_1.equals(type)) {
-			return "CGJH_" + year + "_" + index;
-		}
-		if (PLAN_TYPE_2.equals(type)) {
-			return "XSJH_" + year + "_" + index;
-		}
-		if (PLAN_TYPE_3.equals(type)) {
-			return "LHJH_" + year + "_" + index;
-		}
-		if (PLAN_TYPE_4.equals(type)) {
-			return "JGJH_" + year + "_" + index;
-		}
-		return "QTJH" + year + "_" + index;
-	}
+    /**
+     * 瀹㈡埛绫诲瀷 - 浼佷笟
+     */
+    public static final String CUSTOMER_TYPE_1 = "1";
+    /**
+     * 瀹㈡埛绫诲瀷 - 涓汉
+     */
+    public static final String CUSTOMER_TYPE_2 = "2";
+    /**
+     * 缂撳瓨-鎬ц川杞彉ID
+     */
+    public static final String CACHE_STOCK_ID = "STOCK_ID";
+    /**
+     * 缂撳瓨-鎬ц川杞彉ID
+     */
+    public static final String CACHE_VARIETY_ID = "VARIETY_ID";
 
-	/**
-	 * 鏍规嵁绫诲瀷鍒涘缓鍚堝悓ID
-	 * @param type
-	 * @return
-	 */
-	public static String createContractId(String type) {
-		String id = ContextUtil.getTimeId();
-		if (CONTRACT_TYPE_1.equals(type)) {
-			return "XSHT_" + id;
-		}
-		if (CONTRACT_TYPE_2.equals(type)) {
-			return "CGHT_" + id;
-		}
-		if (CONTRACT_TYPE_3.equals(type)) {
-			return "LHHT_" + id;
-		}
-		return id;
-	}
+    /**
+     * 鏍规嵁绫诲瀷鍒涘缓璁″垝ID
+     *
+     * @param type
+     */
+    public static String createPlanId(String type, String year, List<InoutPlan> list) {
+        String index = "001";
+        if (list != null && list.size() > 0) {
+            String[] arr = list.get(0).getId().split("_");
+            int temp = Integer.valueOf(arr[2]) + 1;
+            index = temp + "";
+        }
+        if (index.length() == 1) {
+            index = "00" + index;
+        }
+        if (index.length() == 2) {
+            index = "0" + index;
+        }
+        if (PLAN_TYPE_1.equals(type)) {
+            return "CGJH_" + year + "_" + index;
+        }
+        if (PLAN_TYPE_2.equals(type)) {
+            return "XSJH_" + year + "_" + index;
+        }
+        if (PLAN_TYPE_3.equals(type)) {
+            return "LHJH_" + year + "_" + index;
+        }
+        if (PLAN_TYPE_4.equals(type)) {
+            return "JGJH_" + year + "_" + index;
+        }
+        return "QTJH" + year + "_" + index;
+    }
+
+    /**
+     * 鏍规嵁绫诲瀷鍒涘缓鍚堝悓ID
+     *
+     * @param type
+     * @return
+     */
+    public static String createContractId(String type) {
+        String id = ContextUtil.getTimeId();
+        if (CONTRACT_TYPE_1.equals(type)) {
+            return "XSHT_" + id;
+        }
+        if (CONTRACT_TYPE_2.equals(type)) {
+            return "CGHT_" + id;
+        }
+        if (CONTRACT_TYPE_3.equals(type)) {
+            return "LHHT_" + id;
+        }
+        return id;
+    }
 
 }

--
Gitblit v1.9.3