📄 custinfo.java
字号:
String cust_id = inbuffer.getString("CUST_ID");
try {
this.queryResult = genSpecCustInfo(cust_id);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出genSpecCustInfo方法...");
}
public ArrayList genSpecCustInfo(String cust_id) throws SaasApplicationException {
ArrayList itemsList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_ID", cust_id);
itemsList = customerExt.selByList("SEL_SPEC_CUST");
return itemsList;
}
public void CustInfoList(Buffers inbuffer) {
String table_flag = "";
String cust_id = "";
table_flag = inbuffer.getString("TABLE_FLAG");
cust_id = inbuffer.getString("CUST_ID");
this.outBuffer = inbuffer;
log.LOG_INFO("进入CustInfoList方法...");
try {
this.queryResult = CustInfoAllList(table_flag, cust_id);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出CustInfoList方法...");
}
/**
* 获取产品列表
*
* @param inbuffer
*/
public ArrayList CustInfoAllList(String table_flag, String cust_id) throws SaasApplicationException {
if (table_flag == "" || table_flag == null)
return null;
if (table_flag.equals("3")) {
table_flag = "2";
}
if (table_flag.equals("4")) {
table_flag = "1";
}
ArrayList paraList = new ArrayList();
Attachinfo attachInfo = new Attachinfo();
String strImagePath = "";
if (table_flag.equals("1")) {
ArrayList creditList = new ArrayList();
ParacreditExt creditExt = new ParacreditExt();
creditExt.setParam(":VCUST_ID", cust_id);
creditList = creditExt.selByList("SEL_BY_CREDIT");
if (creditList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator it = creditList.iterator(); it.hasNext();) {
HashMap creditInfo = (HashMap) it.next();
String credit_id = "";
String custName = "";
String custId = "";
String credit_type = "";
String credit_title = "";
String credit_desc = "";
String affix_id = "";
String publish_user_id = "";
String publish_date = "";
HashMap paraListMap = new HashMap();
if (creditInfo.get("credit_id") != null)
credit_id = creditInfo.get("credit_id").toString();
if (creditInfo.get("cust_id") != null)
custId = creditInfo.get("cust_id").toString();
if (creditInfo.get("credit_type") != null)
credit_type = creditInfo.get("credit_type").toString();
if (creditInfo.get("credit_title") != null)
credit_title = creditInfo.get("credit_title").toString();
if (creditInfo.get("credit_desc") != null)
credit_desc = creditInfo.get("credit_desc").toString();
if (creditInfo.get("affix_id") != null) {
affix_id = creditInfo.get("affix_id").toString();
strImagePath = "<img border=0 src=" + getCustAttachPath(affix_id, "C") + ">";
}
if (creditInfo.get("publish_date") != null)
publish_date = creditInfo.get("publish_date").toString();
if (creditInfo.get("cust_name") != null)
custName = creditInfo.get("cust_name").toString();
paraListMap.put("credit_id", credit_id);
paraListMap.put("cust_id", custId);
paraListMap.put("credit_type", credit_type);
paraListMap.put("credit_title", credit_title);
paraListMap.put("credit_desc", credit_desc);
paraListMap.put("affix_id", affix_id);
paraListMap.put("publish_date", publish_date);
paraListMap.put("cust_name", custName);
paraListMap.put("pic_path", strImagePath);
log.LOG_INFO("strImagePath..." + strImagePath);
paraList.add(paraListMap);
}
}
if (table_flag.equals("2")) {
NewsExt newsExt = new NewsExt();
ArrayList newsList = new ArrayList();
newsExt.setParam(":VCUST_ID", cust_id);
newsList = newsExt.selByList("SEL_BY_NEWS");
if (newsList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator its = newsList.iterator(); its.hasNext();) {
HashMap newsMap = (HashMap) its.next();
String news_id = "";
String custName = "";
String news_type = "";
String custId = "";
String title = "";
String content = "";
String attachment_tag = "";
String validity = "";
HashMap newListMap = new HashMap();
if (newsMap.get("news_id") != null)
news_id = newsMap.get("news_id").toString();
if (newsMap.get("news_type") != null)
news_type = newsMap.get("news_type").toString();
if (newsMap.get("cust_id") != null)
custId = newsMap.get("cust_id").toString();
if (newsMap.get("title") != null)
title = newsMap.get("title").toString();
if (newsMap.get("content") != null)
content = newsMap.get("content").toString();
if (newsMap.get("attachment_tag") != null)
attachment_tag = newsMap.get("attachment_tag").toString();
if (newsMap.get("validity") != null)
validity = newsMap.get("validity").toString();
if (newsMap.get("cust_name") != null)
custName = newsMap.get("cust_name").toString();
newListMap.put("news_id", news_id);
newListMap.put("news_type", news_type);
newListMap.put("cust_id", custId);
newListMap.put("title", title);
newListMap.put("content", content);
newListMap.put("attachment_tag", attachment_tag);
newListMap.put("validity", validity);
newListMap.put("cust_name", custName);
paraList.add(newListMap);
}
}
if (table_flag.equals("5")) {
ArrayList seleInfoList = new ArrayList();
SaleInfoExt seleExt = new SaleInfoExt();
seleExt.setParam(":VSALE_UNIT", cust_id);
seleInfoList = seleExt.selByList("SEL_BY_SALE_CUST");
if (seleInfoList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator its = seleInfoList.iterator(); its.hasNext();) {
HashMap saleMap = (HashMap) its.next();
String sale_id = "";
String custName = "";
String sale_unit = "";
String sale_type = "";
String title = "";
String content = "";
String sale_class = "";
String sale_addr = "";
String attach_tag = "";
String start_date = "";
String end_date = "";
String publish_date = "";
String publish_user_id = "";
String audit_date = "";
String validity = "";
String audit_user_id = "";
String remark = "";
HashMap saleInfoMap = new HashMap();
if (saleMap.get("sale_id") != null)
sale_id = saleMap.get("sale_id").toString();
if (saleMap.get("sale_unit") != null)
sale_unit = saleMap.get("sale_unit").toString();
if (saleMap.get("sale_type") != null)
sale_type = saleMap.get("sale_type").toString();
if (saleMap.get("sale_class") != null)
sale_class = saleMap.get("sale_class").toString();
if (saleMap.get("sale_addr") != null)
sale_addr = saleMap.get("sale_addr").toString();
if (saleMap.get("attach_tag") != null)
attach_tag = saleMap.get("attach_tag").toString();
if (saleMap.get("start_date") != null)
start_date = saleMap.get("start_date").toString();
if (saleMap.get("end_date") != null)
end_date = saleMap.get("end_date").toString();
if (saleMap.get("publish_date") != null)
publish_date = saleMap.get("publish_date").toString().substring(0, 10);
if (saleMap.get("publish_user_id") != null)
publish_user_id = saleMap.get("publish_user_id").toString();
if (saleMap.get("title") != null)
title = saleMap.get("title").toString();
if (saleMap.get("audit_date") != null)
audit_date = saleMap.get("audit_date").toString();
if (saleMap.get("validity") != null)
validity = saleMap.get("validity").toString();
if (saleMap.get("audit_user_id") != null)
audit_user_id = saleMap.get("audit_user_id").toString();
if (saleMap.get("content") != null)
content = saleMap.get("content").toString();
if (saleMap.get("remark") != null)
remark = saleMap.get("remark").toString();
if (saleMap.get("cust_name") != null)
custName = saleMap.get("cust_name").toString();
saleInfoMap.put("sale_id", sale_id);
saleInfoMap.put("cust_id", sale_unit);
saleInfoMap.put("sale_type", sale_type);
saleInfoMap.put("title", title);
saleInfoMap.put("sale_class", sale_class);
saleInfoMap.put("content", content);
saleInfoMap.put("sale_addr", sale_addr);
saleInfoMap.put("attach_tag", attach_tag);
saleInfoMap.put("start_date", start_date);
saleInfoMap.put("end_date", end_date);
saleInfoMap.put("publish_date", publish_date);
saleInfoMap.put("publish_user_id", publish_user_id);
saleInfoMap.put("audit_date", audit_date);
saleInfoMap.put("validity", validity);
saleInfoMap.put("audit_user_id", audit_user_id);
saleInfoMap.put("remark", remark);
saleInfoMap.put("cust_name", custName);
paraList.add(saleInfoMap);
}
}
if (table_flag.equals("6")) {
ArrayList repositoryList = new ArrayList();
RepositoryExt repositoryExt = new RepositoryExt();
repositoryExt.setParam(":VCUST_ID", cust_id);
repositoryList = repositoryExt.selByList("SEL_BY_REPOSITORY");
if (repositoryList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator it = repositoryList.iterator(); it.hasNext();) {
HashMap repositoryListMap = (HashMap) it.next();
String title = "";
String content = "";
String custId = "";
String custName = "";
String repositoryId = "";
String affix_number = "";
HashMap repositoryMap = new HashMap();
if (repositoryListMap.get("repository_id") != null)
repositoryId = repositoryListMap.get("repository_id").toString();
if (repositoryListMap.get("title") != null)
title = repositoryListMap.get("title").toString();
if (repositoryListMap.get("cust_id") != null)
custId = repositoryListMap.get("cust_id").toString();
if (repositoryListMap.get("affix_number") != null)
affix_number = repositoryListMap.get("affix_number").toString();
if (affix_number != "0") {
strImagePath = "<img border=0 src=" + getCustAttachPath(repositoryId, "R") + ">";
}
if (repositoryListMap.get("cust_name") != null)
custName = repositoryListMap.get("cust_name").toString();
if (repositoryListMap.get("content") != null)
content = commen.splitStr(repositoryListMap.get("content").toString(), 200);
repositoryMap.put("title", title);
repositoryMap.put("cust_name", custName);
repositoryMap.put("repositoryId", repositoryId);
repositoryMap.put("cust_id", custId);
repositoryMap.put("affix_number", affix_number);
repositoryMap.put("pic_path", strImagePath);
repositoryMap.put("content", content);
paraList.add(repositoryMap);
}
}
if (table_flag.equals("7")) {
ArrayList biddingList = new ArrayList();
ArrayList bidDing = new ArrayList();
BidExt biddingExt = new BidExt();
biddingExt.setParam(":VCUST_ID", cust_id);
biddingList = biddingExt.selByList("SEL_BY_BIDDING_CUST");
if (biddingList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator its = biddingList.iterator(); its.hasNext();) {
HashMap biddingMap = (HashMap) its.next();
String custId = "";
String custName = "";
String biddingId = "";
String title = "";
String biddingNo = "";
String openDate = "";
String addr = "";
String content = "";
String attachTag = "";
String publish_date = "";
HashMap bidMap = new HashMap();
if (biddingMap.get("bidding_id") != null)
biddingId = biddingMap.get("bidding_id").toString();
if (biddingMap.get("cust_id") != null)
custId = biddingMap.get("cust_id").toString();
if (biddingMap.get("title") != null)
title = biddingMap.get("title").toString();
if (biddingMap.get("bidding_no") != null)
biddingNo = biddingMap.get("bidding_no").toString();
if (biddingMap.get("open_date") != null)
openDate = biddingMap.get("open_date").toString();
if (biddingMap.get("addr") != null)
addr = biddingMap.get("addr").toString();
if (biddingMap.get("content") != null)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -