📄 allmethodmgr.java
字号:
package com.saas.biz.commen;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import com.saas.biz.dao.parallDAO.*;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
import com.saas.biz.dao.commenDAO.*;
public class AllMethodMgr {
Logger log;
commMethodMgr commen;
ArrayList queryResult = new ArrayList();
public AllMethodMgr()
{
log = new Logger(this);
commen = new commMethodMgr();
}
public ArrayList getQueryResult()
{
return this.queryResult;
}
public void setQueryResult(ArrayList queryResult)
{
this.queryResult = queryResult;
}
public void AllList(Buffers inbuffer)
{
ArrayList paraList = new ArrayList();
HashMap allmap = new HashMap();
log.LOG_INFO("进入paraexamList方法...");
// String cust_type = inbuffer.getString("CUST_TYPE");
try {
ArrayList storeList = StoreListInfo();
ArrayList enterPriseList = EnterpriseList();
ArrayList stockOrderList = StockOrderList();
ArrayList produceList = ProduceList();
ArrayList biddingList = BiddingList();
ArrayList saleList = SaleList();
ArrayList entList = EntArrayList();
paraList.add(0, storeList);
paraList.add(1, enterPriseList);
paraList.add(2, stockOrderList);
paraList.add(3, produceList);
paraList.add(4, biddingList);
paraList.add(5,saleList);
paraList.add(6,entList);
this.queryResult = paraList;
} catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出paraexamList方法...");
}
public ArrayList StoreListInfo() throws SaasApplicationException
{
ArrayList storeList = new ArrayList();
ArrayList paraexamList = new ArrayList();
StoreExt parainfoExt = new StoreExt();
// parainfoExt.setParam(":VCUST_TYPE", cust_type);
paraexamList = parainfoExt.selByList("SEL_BY_STORE");
if (paraexamList == null) return null;
for (Iterator it = paraexamList.iterator(); it.hasNext();)
{
HashMap paraInfo = (HashMap) it.next();
String custId = null;
String commodityId = null;
String commodityType = null;
String comodityName = null;
String comondityPrice = null;
String publish_date = null;
HashMap storeListMap = new HashMap();
if (paraInfo.get("cust_id") != null)
custId = paraInfo.get("cust_id").toString();
if (paraInfo.get("commodity_id") != null)
commodityId = paraInfo.get("commodity_id").toString();
if (paraInfo.get("commodity_type") != null)
commodityType = paraInfo.get("commodity_type").toString();
if (paraInfo.get("commodity_name") != null)
comodityName = paraInfo.get("commodity_name").toString();
if(comodityName.length()>=24)
{
comodityName = commen.splitStr(comodityName, 24);
}
if (paraInfo.get("commodity_price") != null)
comondityPrice = paraInfo.get("commodity_price").toString();
if (paraInfo.get("publish_date") != null)
publish_date = paraInfo.get("publish_date").toString().substring(0, 10);
storeListMap.put("cust_id", custId);
storeListMap.put("commodity_id", commodityId);
storeListMap.put("commodity_type", commodityType);
storeListMap.put("commodity_name", comodityName);
storeListMap.put("commodity_price", comondityPrice);
storeListMap.put("publish_date", publish_date);
storeList.add(storeListMap);
}
return storeList;
}
public ArrayList EnterpriseList() throws SaasApplicationException
{
ArrayList enterPriseList = new ArrayList();
ArrayList tempenterPriseList = new ArrayList();
EnterPriseExt enterPriseExt = new EnterPriseExt();
enterPriseList = enterPriseExt.selByList("SEL_BY_ENTERPRISE");
if (enterPriseList == null) return null;
for (Iterator its = enterPriseList.iterator(); its.hasNext();)
{
HashMap enterPrise = (HashMap) its.next();
String enterpriseName = null;
String enterpriseType = null;
String enterpriseState = null;
String enterpriseId = null;
HashMap enterListMap = new HashMap();
if (enterPrise.get("cust_id") != null)
enterpriseId = enterPrise.get("cust_id").toString();
if (enterPrise.get("cust_name") != null)
{
enterpriseName = enterPrise.get("cust_name").toString();
if(enterpriseName.length()>=22)
{
enterpriseName = commen.splitStr(enterpriseName, 22);
}
}
if (enterPrise.get("cust_type") != null)
enterpriseType = enterPrise.get("cust_type").toString();
if (enterPrise.get("cust_state") != null)
enterpriseState = enterPrise.get("cust_state").toString();
enterListMap.put("cust_id", enterpriseId);
enterListMap.put("cust_name", enterpriseName);
enterListMap.put("cust_type", enterpriseType);
enterListMap.put("cust_state", enterpriseState);
tempenterPriseList.add(enterListMap);
}
return tempenterPriseList;
}
public ArrayList StockOrderList() throws SaasApplicationException
{
ArrayList stockOrderList = new ArrayList();
ArrayList stockOrder = new ArrayList();
StockOrderExt enterPriseExt = new StockOrderExt();
stockOrderList = enterPriseExt.selByList("SEL_BY_STOCKORDERLIST");
if (stockOrderList == null) return null;
for (Iterator its = stockOrderList.iterator(); its.hasNext();)
{
HashMap stockOrderMap = (HashMap) its.next();
String stockOrderId = null;
String title = null;
String stockOrderType = null;
String custId = null;
String content = null;
String stockClass = null;
String startDate = null;
String endDate = null;
String publish_date = null;
HashMap stockMap = new HashMap();
if (stockOrderMap.get("stock_id") != null)
stockOrderId = stockOrderMap.get("stock_id").toString();
if (stockOrderMap.get("cust_id") != null)
custId = stockOrderMap.get("cust_id").toString();
if (stockOrderMap.get("stock_type") != null)
stockOrderType = stockOrderMap.get("stock_type").toString();
if (stockOrderMap.get("title") != null)
title = stockOrderMap.get("title").toString();
if (stockOrderMap.get("content") != null)
content = stockOrderMap.get("content").toString();
if (stockOrderMap.get("stock_class") != null)
stockClass = stockOrderMap.get("stock_class").toString();
if (stockOrderMap.get("start_date") != null)
startDate = stockOrderMap.get("start_date").toString();
if (stockOrderMap.get("end_date") != null)
endDate = stockOrderMap.get("end_date").toString();
if (stockOrderMap.get("publish_date") != null)
publish_date = stockOrderMap.get("publish_date").toString().substring(0, 10);
stockMap.put("stock_id", stockOrderId);
stockMap.put("cust_id", custId);
stockMap.put("stock_type", stockOrderType);
stockMap.put("title", title);
stockMap.put("content", content);
stockMap.put("stock_class", stockClass);
stockMap.put("start_date", startDate);
stockMap.put("end_date", endDate);
stockMap.put("publish_date", publish_date);
stockOrder.add(stockMap);
}
return stockOrder;
}
public ArrayList ProduceList() throws SaasApplicationException
{
ArrayList produceList = new ArrayList();
ArrayList proDuce = new ArrayList();
ProduceExt produceExt = new ProduceExt();
produceList = produceExt.selByList("SEL_BY_PRODUCT");
if (produceList == null) return null;
for (Iterator its = produceList.iterator(); its.hasNext();)
{
HashMap produceMap = (HashMap) its.next();
String custId = null;
String produceId = null;
String produceType = null;
String productName = null;
String productClass = null;
String productSite = null;
String productAbstract = null;
String productDesc = null;
HashMap proMap = new HashMap();
if (produceMap.get("cust_id") != null)
custId = produceMap.get("cust_id").toString();
if (produceMap.get("product_id") != null)
produceId = produceMap.get("product_id").toString();
if (produceMap.get("product_type") != null)
produceType = produceMap.get("product_type").toString();
if (produceMap.get("product_name") != null)
productName = produceMap.get("product_name").toString();
if (produceMap.get("product_class") != null)
productClass = produceMap.get("product_class").toString();
if (produceMap.get("product_site") != null)
productSite = produceMap.get("product_site").toString();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -