📄 infomsg.java
字号:
package com.saas.biz.infoMsg;
import java.util.ArrayList;
import java.util.HashMap;
import com.saas.biz.commen.commMethodMgr;
import com.saas.biz.dao.careDAO.CareExt;
import com.saas.biz.dao.letterDAO.LetterExt;
import com.saas.biz.dao.newsDAO.NewsExt;
import com.saas.biz.dao.notifyDAO.NotifyExt;
import com.saas.biz.dao.saleDAO.SaleExt;
import com.saas.biz.dao.leavewordsDAO.LeavewordsExt;
import com.saas.biz.dao.stockorderDAO.StockorderExt;
import com.saas.biz.dao.enquirytrackDAO.EnquirytrackExt;
import com.saas.biz.dao.studyDAO.StudyExt;
import com.saas.biz.dao.xcalendarDAO.XcalendarExt;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
/**
* @author:LiuYang
* @desc:系统各个服务的初始化信息d
* @2008-3-10
*/
public class InfoMsg
{
Dbtable tradeQuery;
commMethodMgr comm;
Logger log;
Buffers inBuffer;
Buffers outBuffer;
ArrayList queryResult = new ArrayList();
public InfoMsg()
{
log = new Logger(this);
tradeQuery = new Dbtable();
comm = new commMethodMgr();
}
public void setTradeQuery(Dbtable tradeQuery)
{
this.tradeQuery = tradeQuery;
}
public Dbtable getTradeQuery()
{
return this.tradeQuery;
}
public void setOutBuffer(Buffers outBuffer)
{
this.outBuffer = outBuffer;
}
public Buffers getOutBuffer()
{
return this.outBuffer;
}
public ArrayList getQueryResult()
{
return this.queryResult;
}
public void setQueryResult(ArrayList queryResult)
{
this.queryResult = queryResult;
}
/** *************************************网上办公系统初始化信息******************************************************** */
/**
* 日程安排
*/
public String getItineraryByUser(String user, int limit) throws SaasApplicationException {
String html = "";
String link = "/oa/itineraryMgr/itineraryInfoView.jsp?menu_id=nWXFw1LmN178Q32&id=";
ArrayList list = new ArrayList();
XcalendarExt calendarExt = new XcalendarExt();
calendarExt.setParam(":VUSER", user);
list = calendarExt.selByList("SEL_BY_USER", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if ( title.length()>26 )
title = title.substring( 0, 26 );
String id = map.get( "id" ).toString();
html = " <a href=" + link + id + ">" + title + "</a><br>" + html;
}
}
return html;
}
/**
* 最新通知
*/
public String getNoticeByPart(String part, int limit,String cust_id) throws SaasApplicationException {
String html = "";
String link = "/oa/notificationMgr/viewNotifyIndex.jsp?menu_id=7t2wv641B7773gR&id=";
NotifyExt notifyExt = new NotifyExt();
ArrayList list = new ArrayList();
try
{
notifyExt.setParam(":VPART", part);
notifyExt.setParam(":VCHECKED", "0");
notifyExt.setParam(":VXVISIBLE", cust_id);
list = notifyExt.selByList("SEL_BY_PART", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26) title=title.substring(0,26);
String id = map.get("id").toString();
html = " <a href=" + link + id + ">" + title + "</a><br>" + html;
}
}
}
catch (RuntimeException e)
{
log.LOG_INFO(e.getMessage());
}
return html;
}
/**
* 最新短信
*/
public String getLetterBy(String user, int limit) {
String html = "";
String link = "/oa/shortmessageMgr/showletter.jsp?menu_id=FI107GG54H36ihr&id=";
ArrayList list = new ArrayList();
LetterExt letterExt = new LetterExt();
letterExt.setParam(":VRPART", user);
list = letterExt.selByList("SEL_BY_RPART", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26)
title=title.substring(0,26);
String id = map.get("id").toString();
html = " <a href=" + link + id + ">" + title + "</a><br>" + html;
}
}
return html;
}
/**
* 主题学习
*/
public String getStudyInfoByPartOrUser(String user, String part, int limit) throws SaasApplicationException {
String html = "";
String link = "/oa/study/viewStudyInfo.jsp?menu_id=zshi1fk1CC81S11p&id=";
ArrayList list = new ArrayList();
StudyExt repExt = new StudyExt();
repExt.setParam(":VUSER", user);
repExt.setParam(":VPART", part);
list = repExt.selByList("SEL_BY_USERORPART", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26)
title=title.substring(0,26);
String id = map.get("id").toString();
html = " <a href=" + link + id + ">" + title + "</a><br>" + html;
}
}
return html;
}
/** ************************************客户管理系统初始化信息************************************************************* */
/**
* 关怀设置
*/
public String getCareByCust(String cust_id, int limit) throws SaasApplicationException {
String html = "";
String link = "/careMgr/indexRemind.jsp?menu_id=2J0V4n2mMp080X0G85BH";
ArrayList list = new ArrayList();
CareExt careExt = new CareExt();
careExt.setParam(":VCUST_ID", cust_id);
list = careExt.selByList("SEL_BY_CUST", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26)
title=title.substring(0,26);
html = " <a href=" + link + ">" + title + "</a><br>" + html;
}
}
return html;
}
/**
* 最新资讯
*/
public String getNewsByCust(String cust_id, int limit) throws SaasApplicationException {
String html = "";
String link = "/newsMgr/viewNewsInfo.jsp?news_id=";
ArrayList list = new ArrayList();
NewsExt newExt = new NewsExt();
newExt.setParam(":VCUST_ID", cust_id);
newExt.setParam(":VVALIDITY", "0");
list = newExt.selByList("SEL_BY_CUST", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26)
title=title.substring(0,26);
String news_id = map.get("news_id").toString();
html = " <a href=" + link + news_id + " target=blank>" + title + "</a><br>" + html;
}
}
return html;
}
/**
* 最新供应
*/
public String getSaleInfoByCust(String cust_id, int limit) throws SaasApplicationException {
String html = "";
String link = "/saleMgr/viewSaleInfo.jsp?sale_id=";
ArrayList list = new ArrayList();
SaleExt saleExt = new SaleExt();
saleExt.setParam(":VSALE_UNIT", cust_id);
list = saleExt.selByList("SEL_SPEC_SALE", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26)
title=title.substring(0,26);
String sale_id = map.get("sale_id").toString();
html = " <a href=" + link + sale_id + " target=blank>" + title + "</a><br>" + html;
}
}
return html;
}
/**
* 最新求购
*/
public String getStockListByCust(String cust_id, int limit) throws SaasApplicationException {
String html = "";
String link = "/stockMgr/viewStockInfo.jsp?stock_id=";
ArrayList list = new ArrayList();
StockorderExt stockorderExt = new StockorderExt();
stockorderExt.setParam(":VCUST_ID", cust_id);
stockorderExt.setParam(":VVALIDITY", "0");
list = stockorderExt.selByList("SEL_CUST_STOCKORDER", 0, limit);
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title = map.get("title").toString();
if (title.length()>26)
title=title.substring(0,26);
String stock_id = map.get("stock_id").toString();
html = " <a href=" + link + stock_id + " target=blank>" + title + "</a><br>" + html;
}
}
return html;
}
/**
* 最新留言vv
*
* @author: shenbei
* @Date: 2008-4-22 15:07:12
* @Method_Name:
*/
public String getLeavewordByCust(String cust_id, int limit) throws SaasApplicationException
{
String html = "";
String link = "/leaveMgr/viewLeaveInfo.jsp?trade_id=";
ArrayList list = new ArrayList();
LeavewordsExt newsExt = new LeavewordsExt();
newsExt.setParam(":VCUST_ID", cust_id);
newsExt.setParam(":VWORD_TYPE", "4");
list = newsExt.selByList("SEL_BY_NEW_LEVEL");
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String content = "";
if(map.get("content")!=null)
{
content=map.get("content").toString();
if(content.length()>26)
content=content.substring(0,26);
}
String trade_id = map.get("trade_id").toString();
html = " <a href=" + link + trade_id + " target=blank>" + content + "</a><br>" + html;
}
}
return html;
}
/**
*询价
**/
public String getEnquiryByCust(String cust_id, int limit) throws SaasApplicationException
{
String html = "";
String link ="/enquiryMgr/viewEnquiryInfo.jsp?sale_id=";
ArrayList list = new ArrayList();
EnquirytrackExt enquiryExt = new EnquirytrackExt();
enquiryExt.setParam(":VTRADE", cust_id);
list = enquiryExt.selByList("SEL_SPEC_ENQUIRY");
if (list != null && list.size() > 0)
{
for (int i = 0; i < list.size(); i++)
{
HashMap map = (HashMap) list.get(i);
String title="";
if( map.get("title") != null && !map.get("title").equals(""))
{
title = map.get("title").toString();
}
if (title.length()>26)
title=title.substring(0,26);
String sale_id = map.get("sale_id").toString();
html = " <a href=" + link + sale_id + " target=blank>" + title + "</a><br>" + html;
}
}
return html;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -