📄 custinfo.java
字号:
content = commen.splitStr(biddingMap.get("content").toString(), 200);
if (biddingMap.get("attach_tag") != null)
attachTag = biddingMap.get("attach_tag").toString();
if (attachTag != "0") {
strImagePath = "<img border=0 src=" + getCustAttachPath(biddingId, "B") + ">";
}
if (biddingMap.get("publish_date") != null)
publish_date = biddingMap.get("publish_date").toString();
if (biddingMap.get("publish_date") != null)
publish_date = biddingMap.get("publish_date").toString();
if (biddingMap.get("cust_name") != null)
custName = biddingMap.get("cust_name").toString();
bidMap.put("bidding_id", biddingId);
bidMap.put("cust_id", custId);
bidMap.put("title", title);
bidMap.put("bidding_no", biddingNo);
bidMap.put("open_date", openDate);
bidMap.put("addr", addr);
bidMap.put("content", content);
bidMap.put("attach_tag", attachTag);
bidMap.put("publish_date", publish_date);
bidMap.put("cust_name", custName);
bidMap.put("pic_path", strImagePath);
paraList.add(bidMap);
}
}
if (table_flag.equals("8")) {
ArrayList produceList = new ArrayList();
ArrayList proDuce = new ArrayList();
ProduceExt produceExt = new ProduceExt();
produceExt.setParam(":VCUST_ID", cust_id);
produceList = produceExt.selByList("SEL_BY_PRODUCT_CUST");
if (produceList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator its = produceList.iterator(); its.hasNext();) {
HashMap produceMap = (HashMap) its.next();
String custId = "";
String custName = "";
String produceId = "";
String produceType = "";
String productName = "";
String productClass = "";
String productSite = "";
String productAbstract = "";
String productDesc = null;
String attachTag = "";
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();
if (produceMap.get("attach_tag") != null)
attachTag = produceMap.get("attach_tag").toString();
if (attachTag != "0") {
strImagePath = "<img border=0 src=" + getCustAttachPath(produceId, "P") + ">";
}
if (produceMap.get("product_abstract") != null)
productAbstract = produceMap.get("product_abstract").toString();
if (produceMap.get("product_desc") != null)
productDesc = produceMap.get("product_desc").toString();
if (produceMap.get("cust_name") != null)
custName = produceMap.get("cust_name").toString();
proMap.put("cust_id", custId);
proMap.put("product_id", produceId);
proMap.put("product_type", produceType);
proMap.put("product_name", productName);
proMap.put("product_class", productClass);
proMap.put("product_site", productSite);
proMap.put("product_abstract", productAbstract);
proMap.put("product_desc", productDesc);
proMap.put("cust_name", custName);
proMap.put("pic_path", strImagePath);
paraList.add(proMap);
}
}
if (table_flag.equals("9")) {
ArrayList stockOrderList = new ArrayList();
StockOrderExt enterPriseExt = new StockOrderExt();
enterPriseExt.setParam(":VCUST_ID", cust_id);
stockOrderList = enterPriseExt.selByList("SEL_BY_STOCKORDER");
if (stockOrderList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator its = stockOrderList.iterator(); its.hasNext();) {
HashMap stockOrderMap = (HashMap) its.next();
String stockOrderId = "";
String custName = "";
String title = "";
String stockOrderType = "";
String custId = "";
String content = "";
String stockClass = "";
String startDate = "";
String endDate = "";
String publish_date = "";
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);
if (stockOrderMap.get("cust_name") != null)
custName = stockOrderMap.get("cust_name").toString();
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);
stockMap.put("cust_name", custName);
paraList.add(stockMap);
}
}
if (table_flag.equals("10")) {
ArrayList JobList = new ArrayList();
ArrayList itemsList = new ArrayList();
JobExt jobExt = new JobExt();
jobExt.setParam(":VCUST_ID", cust_id);
JobList = jobExt.selByList("SEL_BY_JOBCUST");
if (JobList == null) {
HashMap custMapInfo = new HashMap();
custMapInfo.put("cust_id", cust_id);
paraList.add(custMapInfo);
return paraList;
}
for (Iterator it = JobList.iterator(); it.hasNext();) {
HashMap JobListMap = (HashMap) it.next();
String custId = "";
String title = "";
String custName = "";
String job_unit = "";
String job_type = "";
String jobId = "";
String validity = "";
String job_addr = "";
String request = "";
HashMap stockorderMap = new HashMap();
if (JobListMap.get("cust_id") != null)
custId = JobListMap.get("cust_id").toString();
if (JobListMap.get("job_id") != null)
jobId = JobListMap.get("job_id").toString();
if (JobListMap.get("title") != null)
title = JobListMap.get("title").toString();
if (JobListMap.get("job_unit") != null)
job_unit = JobListMap.get("job_unit").toString();
if (JobListMap.get("validity") != null)
validity = JobListMap.get("validity").toString();
if (JobListMap.get("job_addr") != null)
job_addr = JobListMap.get("job_addr").toString();
if (JobListMap.get("request") != null)
request = JobListMap.get("request").toString();
if (JobListMap.get("job_type") != null)
job_type = JobListMap.get("job_type").toString();
if (JobListMap.get("cust_name") != null)
custName = JobListMap.get("cust_name").toString();
stockorderMap.put("cust_id", custId);
stockorderMap.put("cust_name", custName);
stockorderMap.put("job_id", jobId);
stockorderMap.put("title", title);
stockorderMap.put("job_unit", job_unit);
stockorderMap.put("validity", validity);
stockorderMap.put("job_addr", job_addr);
stockorderMap.put("request", request);
stockorderMap.put("job_type", job_type);
paraList.add(stockorderMap);
}
}
return paraList;
}
// 查找指定的客户资料
public void getCustInfo(Buffers inbuffer) {
log.LOG_INFO("进入getCustInfo方法...");
String cust_id = inbuffer.getString("CUST_ID");
this.outBuffer = inbuffer;
try {
this.queryResult = getCustInfo(cust_id);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出getCustInfo方法...");
}
public ArrayList getCustInfo(String cust_id) throws SaasApplicationException {
ArrayList customerList = new ArrayList();
ArrayList itemsList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_ID", cust_id);
customerList = customerExt.selByList("SEL_SPEC_CUST");
return customerList;
}
public ArrayList getCustInfoBydefinition(String cust_id, String cust_name, String group_contact_phone, String province, String eparchy_code, String city_code, int iStart) throws SaasApplicationException {
if (iStart == 0) {
iStart = 0;
}
else {
iStart = (iStart - 1) * 20;
}
ArrayList customerList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_ID", cust_id);
customerExt.setParam(":VCUST_NAME", "%" + cust_name + "%");
customerExt.setParam(":VGROUP_CONTACT_PHONE", "%" + group_contact_phone + "%");
customerExt.setParam(":VPROVINCE", "%" + province + "%");
customerExt.setParam(":VEPARCHY_CODE", "%" + eparchy_code + "%");
customerExt.setParam(":VCITY_CODE", "%" + city_code + "%");
customerList = customerExt.selByList("SEL_CUST_BYDEFINITION", iStart, 20);
return customerList;
}
public int getCustInfoBydefinition(String cust_id, String cust_name, String group_contact_phone, String province, String eparchy_code, String city_code) throws SaasApplicationException {
ArrayList customerList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
int size = 0;
customerExt.setParam(":VCUST_ID", cust_id);
customerExt.setParam(":VCUST_NAME", "%" + cust_name + "%");
customerExt.setParam(":VGROUP_CONTACT_PHONE", "%" + group_contact_phone + "%");
customerExt.setParam(":VPROVINCE", "%" + province + "%");
customerExt.setParam(":VEPARCHY_CODE", "%" + eparchy_code + "%");
customerExt.setParam(":VCITY_CODE", "%" + city_code + "%");
customerList = customerExt.selByList("SEL_CUST_PAGE_BYDEFINITION");
if (customerList != null && customerList.size() > 0) {
HashMap map = (HashMap) customerList.get(0);
size = Integer.parseInt(map.get("tt").toString());
}
return size;
}
/*
* 查找全部客户 add by sjp date:2007-06-12
*/
public void getAllCust(Buffers inbuffer) {
log.LOG_INFO("进入getAllCust方法...");
this.outBuffer = inbuffer;
try {
this.queryResult = getAllCust();
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出getAllCust方法...");
}
public ArrayList getAllCust() throws SaasApplicationException {
ArrayList customerList = new ArrayList();
ArrayList itemsList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerList = customerExt.selByList("SEL_ALL_CUST");
return customerList;
}
/*
* 查找全部正常客户资料
*/
public void getCustList(Buffers inbuffer) {
log.LOG_INFO("进入getCustList方法...");
this.outBuffer = inbuffer;
String query_param = inbuffer.getString("QUERY_PARAM");
log.LOG_INFO("QUERY_PARAM..................." + query_param);
try {
if (query_param.equals(""))
this.queryResult = getCustList();
else
this.queryResult = searchCust(query_param);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出getCustList方法...");
}
public ArrayList getCustList() throws SaasApplicationException {
ArrayList customerList = new ArrayList();
ArrayList itemsList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_STATE", "0");
customerList = customerExt.selByList("SEL_BY_ALL");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -