From abf3976582790244f04168da7a84518dc728a28d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E7=A3=8A?= <寮犵@LAPTOP-O3DO03BA>
Date: Fri, 15 Jun 2018 09:32:31 +0800
Subject: [PATCH 01/21] =?UTF-8?q?=E9=93=B6=E8=A1=8C=E5=8D=A1=E5=9B=9B?=
=?UTF-8?q?=E8=A6=81=E7=B4=A0=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Flow/CollectionAudit/LcCustomerBankVertifyList.jsp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp
index 82dbf9f46..29dfac813 100644
--- a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp
+++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp
@@ -17,8 +17,8 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
String sButtons[][] = {
- {"true","All","Button","验证银行卡信息","验证银行卡信息","verifyBankInfo()","","","","btn_icon_add",""},
- {"true","All","Button","编辑","编辑","viewAndEdit()","","","","btn_icon_add",""},
+ {"true","All","Button","验证银行卡信息","验证银行卡信息","verifyBankInfo()","","","","btn_icon_add",""}
+ //{"true","All","Button","编辑","编辑","viewAndEdit()","","","","btn_icon_add",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
From 1c395fff7e74b9ca102b42140e176991330aa0ac Mon Sep 17 00:00:00 2001
From: amarsoft
Date: Fri, 15 Jun 2018 10:17:02 +0800
Subject: [PATCH 03/21] =?UTF-8?q?=E7=BB=8F=E9=94=80=E5=95=86=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E4=BA=A7=E5=93=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../LmDistributorToproductList.jsp | 67 +++++++++++++++++++
.../LmProductDistributorCar.jsp | 20 ++++++
.../LmProductDistributorList.jsp | 40 +++++++++++
.../apzl/saveunioncar/saveUnionCarUtil.java | 56 ++++++++++++++++
4 files changed, 183 insertions(+)
create mode 100644 WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp
create mode 100644 WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp
create mode 100644 WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorList.jsp
diff --git a/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp b/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp
new file mode 100644
index 000000000..673b40444
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/PortalToCarType/LmDistributorToproductList.jsp
@@ -0,0 +1,67 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2018-06-06
+ Content:
+ History Log:
+ */
+ ASObjectModel doTemp = new ASObjectModel("LM_DISTRIBUTOR_TO_PRODUCT");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ String distributorId = CurPage.getParameter("DISTRIBUTOR_ID");
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(10);
+ dwTemp.genHTMLObjectWindow(distributorId);
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
+ {"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
+ {"true","","Button","删除","删除","asDelete()","","","","btn_icon_delete",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp b/WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp
new file mode 100644
index 000000000..7c8c55f43
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorCar.jsp
@@ -0,0 +1,20 @@
+<%@ page contentType="text/html; charset=GBK"%><%@
+ include file="/IncludeBegin.jsp"%><%
+/*
+ 页面说明: 示例上下联动框架页面
+ */
+ String distributorId = CurPage.getParameter("distributorId");
+%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
+
+<%@ include file="/IncludeEnd.jsp"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorList.jsp b/WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorList.jsp
new file mode 100644
index 000000000..30d045714
--- /dev/null
+++ b/WebContent/Tenwa/Apzl/PortalToCarType/LmProductDistributorList.jsp
@@ -0,0 +1,40 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2018-06-06
+ Content:
+ History Log:
+ */
+ ASObjectModel doTemp = new ASObjectModel("LM_DISTRIBUTOR_LIST");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(10);
+ dwTemp.genHTMLObjectWindow("");
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"false","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
+ {"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
+ {"false","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java b/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java
index d070b2e37..a6adad886 100644
--- a/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java
+++ b/src_tenwa/com/tenwa/apzl/saveunioncar/saveUnionCarUtil.java
@@ -4,6 +4,7 @@ import java.util.List;
import java.util.UUID;
import jbo.app.tenwa.customer.LM_DISTRIBUTOR_TO_CAR;
+import jbo.app.tenwa.customer.LM_DISTRIBUTOR_TO_PRODUCT;
import jbo.app.tenwa.customer.LM_PORTAL_TO_CAR;
import jbo.com.tenwa.limit.LA_LIMIT_ELEMENT;
@@ -117,6 +118,56 @@ public String getCarBrandId() {
}
return "error";
}
+
+
+ public String saveLmDistributorToProduct(JBOTransaction tx)throws Exception {
+ /*
+ CarBrandId=admin@~
+ 8009002@~
+ 2018/06/12 15:03:50@~
+ 7c7624a558594bff8387ca6949982b21@~
+ 00303ba448074b0792bd465dd2359b7c@
+ */
+ String[] params = CarBrandId.split("@~");
+ String updateUserID = params[0];
+ String updateOrgId = params[1];
+ String updateTime = params[2];
+ String distributorId = params[3];
+ String productid=params[4];
+ int lle=0;
+ BizObjectManager Lmcheck = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
+ BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
+ .setParameter("DISTRIBUTOR_ID", distributorId).setParameter("PRODUCT_ID",productid).getSingleResult(false);
+ if(Lmcheck!=null){
+ return "error";
+ }
+ int i;
+ try{
+ for(i=4;i=0){
+ return "success";
+ }
+ return "error";
+ }
/**
* 删除经销商车型关联表的关联
* @param tx
@@ -128,6 +179,11 @@ public String getCarBrandId() {
Lmpc.createQuery("delete from o where id = :id").setParameter("id",unionId).executeUpdate();
return "success";
}
+ public String deleteLmDistributorToProduct(JBOTransaction tx)throws Exception {
+ BizObjectManager Lmpc = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
+ Lmpc.createQuery("delete from o where id = :id").setParameter("id",unionId).executeUpdate();
+ return "success";
+ }
/**
* 删除渠道机构车型关联表的关联
* @param tx
From b349628ccabc2ba825fcc49c291c75e854569bdd Mon Sep 17 00:00:00 2001
From: liuz
Date: Fri, 15 Jun 2018 10:25:18 +0800
Subject: [PATCH 04/21] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
WebContent/WEB-INF/etc/jbo/jbo_customer.xml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml
index 6e3f3c9fd..e7522548b 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml
@@ -2324,5 +2324,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 741f9365cae625a273dfe5f41a821a442134247b Mon Sep 17 00:00:00 2001
From: liuz
Date: Fri, 15 Jun 2018 10:34:44 +0800
Subject: [PATCH 05/21] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
WebContent/WEB-INF/etc/jbo/jbo_lease.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
index 2c7182932..7200b3005 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
@@ -1497,6 +1497,11 @@
+
+
+
+
+
From b940da25a727609957874fe2b1c52613537b62a7 Mon Sep 17 00:00:00 2001
From: liujiaji
Date: Fri, 15 Jun 2018 10:43:07 +0800
Subject: [PATCH 06/21] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98...?=
=?UTF-8?q?=E8=AF=BB=E5=8F=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
WebContent/WEB-INF/etc/cache.xml | 45 +++--
.../als/base/awe/util/AweDoCommUtil.java | 114 ++++++------
.../base/cache/instance/AppPrdCataCache.java | 96 ++++++++++
.../cache/instance/AppPrdLibraryCache.java | 137 ++++++++++++++
.../cache/instance/AppPrdMiddleCache.java | 125 +++++++++++++
.../base/cache/instance/AppTemplateCache.java | 86 +++++++++
.../base/cache/loader/AppPrdCataLoader.java | 12 ++
.../cache/loader/AppPrdLibraryLoader.java | 12 ++
.../base/cache/loader/AppPrdMiddleLoader.java | 12 ++
.../base/cache/loader/AppTemplateLoader.java | 12 ++
.../amarsoft/als/base/flow/AppConfigFlow.java | 169 ++++++++++++++----
11 files changed, 706 insertions(+), 114 deletions(-)
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppPrdCataCache.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppPrdLibraryCache.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppPrdMiddleCache.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppTemplateCache.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/loader/AppPrdCataLoader.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/loader/AppPrdLibraryLoader.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/loader/AppPrdMiddleLoader.java
create mode 100644 src_app_fresh/apx/com/amarsoft/als/base/cache/loader/AppTemplateLoader.java
diff --git a/WebContent/WEB-INF/etc/cache.xml b/WebContent/WEB-INF/etc/cache.xml
index 9bf3177b2..10899c9d2 100644
--- a/WebContent/WEB-INF/etc/cache.xml
+++ b/WebContent/WEB-INF/etc/cache.xml
@@ -1,20 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -30,14 +15,36 @@
loadClass="com.amarsoft.dict.als.cache.loader.AWEDataWindowLoader"
size="50" expireTime="1200" />
-
+
+
+
+
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src_app_fresh/apx/com/amarsoft/als/base/awe/util/AweDoCommUtil.java b/src_app_fresh/apx/com/amarsoft/als/base/awe/util/AweDoCommUtil.java
index 142b40136..78e5c57ab 100644
--- a/src_app_fresh/apx/com/amarsoft/als/base/awe/util/AweDoCommUtil.java
+++ b/src_app_fresh/apx/com/amarsoft/als/base/awe/util/AweDoCommUtil.java
@@ -4,15 +4,15 @@ import java.util.HashMap;
import java.util.Map;
public class AweDoCommUtil {
- public static void main(String[] args) throws Exception {
+public static void main(String[] args) throws Exception {
- String str = "id=:id1 and (ida>=:id2 or idb<=:id3) and idc >: id4 (idd <: id5 and ide <>:id6)";
+ String str = "flowunid=:id1 and (ida>=:id2 or idb<=:id3) and idc >: id4 (idd <: id5 and ide <>:id6)";
System.out.println(str);
Map map = new HashMap();
- map.put("id", "1");
+ map.put("flowunid", "1");
map.put("ida", "2");
map.put("idb", "3");
map.put("idc", "4");
@@ -109,23 +109,24 @@ public class AweDoCommUtil {
where = where.replace(" AND ", " and ");
where = where.replace(" OR ", " or ");
String[] array = where.split("and");
- String[] array1 = null;
- String sKey = "";
- String newStr = "";
for (String str : array) {
if (str.contains(":")) {
- array1 = str.split(":");
String[] orArray = str.split("or");
if (orArray.length >= 2) {
+ // [ (O.INPUTORGID=:inputOrgId , O.INPUTORGID like :inputOrgId1)]
for (String orStr : orArray) {
-// if (array1.length != 2)
-// continue;
+ // O.contract_id = :contract_id
+ String[] array1 = orStr.split(":");
+ // O.contract_id = > 0
+ // contract_id> 1
+ if (array1.length != 2)
+ continue;
if (!array1[0].contains(".")) {
- sKey = array1[0].toLowerCase();
+ String sKey = array1[0].toLowerCase();
sKey = sKey.trim();
sKey = sKey.substring(0, sKey.length() - 1);
sKey = sKey.trim();
- newStr = array1[0] + "'"
+ String newStr = array1[0] + "'"
+ paramMap.get(sKey) + "' ";
sJboWhere = sJboWhere.replace(orStr, newStr);
continue;
@@ -133,42 +134,47 @@ public class AweDoCommUtil {
String[] array2 = array1[0].split("\\.");
if (array2.length < 2)
continue;
- sKey = array2[array2.length - 1].toLowerCase().trim();
-
+ String sKey = array2[1].toLowerCase();
+ // inputorgid like
if (sKey.contains("like") || sKey.contains("LIKE")) {
- newStr = array1[0] + "'" + paramMap.get(sKey.trim().replaceAll("like", "").trim()) + "' ".trim();
- } else if (sKey.contains(" in ") || sKey.contains(" IN ")) {
- newStr = array1[0] + "'" + paramMap.get(sKey.trim().replaceAll(" in ", "").trim()) + "' ".trim();
+ String newStr = array1[0] + "'" + paramMap.get(sKey.trim().replaceAll("like", "").trim()) + "' ";
+ String sStr = array1[1];
+ while (sStr.endsWith(")")) {
+ newStr += ")";
+ sStr = sStr.substring(0, sStr.length() - 1);
+ }
+ sJboWhere = sJboWhere.replace(orStr, newStr);
} else {
- sKey = sKey.substring(0, sKey.length() - 1).trim();
- newStr = array1[0] + "'"
- + paramMap.get(sKey) + "' ".trim();
-
+ sKey = sKey.trim();
+ sKey = sKey.substring(0, sKey.length() - 1);
+ sKey = sKey.trim();
+ String newStr = array1[0] + "'"
+ + paramMap.get(sKey) + "' ";
+ String sStr = array1[1];
+ while (sStr.endsWith(")")) {
+ newStr += ")";
+ sStr = sStr.substring(0, sStr.length() - 1);
+ }
+ sJboWhere = sJboWhere.replace(orStr, newStr);
}
- String sStr = orStr.trim();
- while (sStr.endsWith(")")) {
-// newStr += ")";
- sStr = sStr.substring(0, sStr.length()-1);
- }
- sJboWhere = sJboWhere.replace(sStr, newStr);
sJboWhere += " ";
}
- } else { // 没有 or
+ sJboWhere = sJboWhere.substring(0, sJboWhere.length() - 1);
+ } else {
+ // O.contract_id = :contract_id
+ String[] array1 = str.split(":");
+ // O.contract_id = > 0
+ // contract_id> 1
if (array1.length != 2)
continue;
- if (!array1[0].contains(".")) { // 没有 O. xx.
- sKey = array1[0].toLowerCase().trim();
- newStr = "";
- if (sKey.contains(" like ") || sKey.contains(" LIKE ")) { // flowUnid like : flowUnid
- newStr = array1[0] + "'" + paramMap.get(sKey.replaceAll(" like ", "").trim()) + "'".trim();
- } else if (sKey.contains(" in ") || sKey.contains(" IN ")) { // flowUnid in : flowUnid
- newStr = array1[0] + "'" + paramMap.get(sKey.replaceAll(" in ", "").trim()) + "'".trim();
- } else { // flowUnid = || > || < : flowUnid
- sKey = sKey.substring(0, sKey.length() - 1).trim();
- newStr = array1[0] + "'" + paramMap.get(sKey) + "' ".trim();
- }
-
- String sStr = array1[1].trim();
+ if (!array1[0].contains(".")) {
+ String sKey = array1[0].toLowerCase();
+ sKey = sKey.trim();
+ sKey = sKey.substring(0, sKey.length() - 1);
+ sKey = sKey.trim();
+ String newStr = array1[0] + "'"
+ + paramMap.get(sKey) + "' ";
+ String sStr = array1[1];
while (sStr.endsWith(")")) {
newStr += ")";
sStr = sStr.substring(0, sStr.length() - 1);
@@ -179,25 +185,19 @@ public class AweDoCommUtil {
String[] array2 = array1[0].split("\\.");
if (array2.length < 2)
continue;
- sKey = array2[array2.length - 1].toLowerCase().trim();
- newStr = "";
- if (sKey.contains(" like ") || sKey.contains(" LIKE ")) { // flowUnid like : flowUnid
- newStr = array1[0] + "'" + paramMap.get(sKey.replaceAll(" like ", "").trim()) + "'".trim();
- } else if (sKey.contains(" in ") || sKey.contains(" IN ")) { // flowUnid in : flowUnid
- newStr = array1[0] + "'" + paramMap.get(sKey.replaceAll(" in ", "").trim()) + "'".trim();
- } else { // flowUnid = || > || < : flowUnid
- sKey = sKey.substring(0, sKey.length() - 1).trim();
- newStr = array1[0] + "'" + paramMap.get(sKey) + "' ".trim();
+ String sKey = array2[1].toLowerCase();
+ sKey = sKey.trim();
+ sKey = sKey.substring(0, sKey.length() - 1);
+ sKey = sKey.trim();
+ String newStr = array1[0] + "'"
+ + paramMap.get(sKey.toLowerCase()) + "' ";
+ String sStr = array1[1];
+ while (sStr.endsWith(")")) {
+ newStr += ")";
+ sStr = sStr.substring(0, sStr.length() - 1);
}
+ sJboWhere = sJboWhere.replace(str, newStr);
}
- newStr = newStr.trim();
- String sStr = array1[1].trim();
- while (sStr.endsWith(")")) {
- newStr += ")";
- sStr = sStr.substring(0, sStr.length() - 1);
- }
- newStr = " " + newStr + " ";
- sJboWhere = sJboWhere.replace(str, newStr);
}
}
return sJboWhere;
diff --git a/src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppPrdCataCache.java b/src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppPrdCataCache.java
new file mode 100644
index 000000000..0c7ad5d15
--- /dev/null
+++ b/src_app_fresh/apx/com/amarsoft/als/base/cache/instance/AppPrdCataCache.java
@@ -0,0 +1,96 @@
+package apx.com.amarsoft.als.base.cache.instance;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import jbo.app.PRD_NODEINFO_CATALOG_APP;
+
+import com.amarsoft.are.ARE;
+import com.amarsoft.are.jbo.BizObject;
+import com.amarsoft.are.jbo.BizObjectManager;
+import com.amarsoft.are.jbo.BizObjectQuery;
+import com.amarsoft.are.jbo.JBOException;
+import com.amarsoft.are.jbo.JBOFactory;
+import com.amarsoft.awe.util.Transaction;
+import com.amarsoft.dict.als.cache.AbstractCache;
+
+public class AppPrdCataCache extends AbstractCache {
+ private static Map appPrdCataPool = null;
+ private static AppPrdCataCache instance = null;
+
+ public static synchronized AppPrdCataCache getInstance() {
+ if (instance == null) {
+ instance = new AppPrdCataCache();
+ }
+ return instance;
+ }
+
+ public static Map getAppPrdCataPool() {
+ return appPrdCataPool;
+ }
+
+ public synchronized Map getCacheMapPool() {
+ if (appPrdCataPool == null)
+ appPrdCataPool = new HashMap();
+ return appPrdCataPool;
+ }
+
+ @Override
+ public synchronized void clear() throws Exception {
+ getCacheMapPool().clear();
+ appPrdCataPool = null;
+ }
+
+ @Override
+ public synchronized boolean load(Transaction arg0) throws Exception {
+ ARE.getLog().info(
+ "[CACHE] AppPrdCataCache bulid Begin .................");
+ initPrdCachePool();
+ ARE.getLog().info(
+ "[CACHE] AppPrdCataCache bulid End ...................");
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ private synchronized void initPrdCachePool() throws JBOException {
+ appPrdCataPool = new HashMap();
+
+ String sSql = "SELECT * FROM O ORDER BY FLOWNO, SORTNO ASC";
+ BizObjectManager bom = JBOFactory
+ .getBizObjectManager(PRD_NODEINFO_CATALOG_APP.CLASS_NAME);
+ BizObjectQuery boq = bom.createQuery(sSql);
+ List bos = boq.getResultList(false);
+ List