📄 confilinginfo.java
字号:
package com.saas.biz.confilingMgr;
import java.util.*;
import com.saas.biz.dao.confilingDAO.ConFilingDAO;
import com.saas.biz.dao.confilingDAO.ConFilingExt;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
public class ConFilingInfo {
Logger log;
Buffers inBuffer;
Buffers outBuffer;
Dbtable tradeQuery;
ArrayList queryResult = new ArrayList();
public ConFilingInfo() {
log = new Logger(this);
tradeQuery = new Dbtable();
outBuffer = new Buffers();
}
public void setOutBuffer(Buffers outBuffer) {
this.outBuffer = outBuffer;
}
public Buffers getOutBuffer() {
return this.outBuffer;
}
public void setTradeQuery(Dbtable tradeQuery) {
this.tradeQuery = tradeQuery;
}
public Dbtable getTradeQuery() {
return this.tradeQuery;
}
public ArrayList getQueryResult() {
return this.queryResult;
}
public void setQueryResult(ArrayList queryResult) {
this.queryResult = queryResult;
}
public int getFilingNoMaxValue(String cust_id) {
int count = 0;
ConFilingExt conExt = new ConFilingExt();
ArrayList list = new ArrayList();
conExt.setParam(":VCUST_ID", cust_id);
list = conExt.selByList("SEL_FILING_NO_MAX_VALUE");
HashMap conMap = new HashMap();
if (list != null && list.size() > 0) {
conMap = (HashMap) list.get(0);
if(conMap.get("ct")!=null){
count = Integer.parseInt(conMap.get("ct").toString());
}
}
return count;
}
// 添加归档信息表
public void addConFilingInfo(Buffers inbuffer) {
log.LOG_INFO("进入addConFilingInfo方法...");
this.outBuffer = inbuffer;
this.inBuffer = inbuffer;
int iResult = -1;
String cust_id = inbuffer.getString("SESSION_CUST_ID");
String con_id = inbuffer.getString("CON_ID");
String filing_id = inbuffer.getString("FILING_ID");
int no = getFilingNoMaxValue(cust_id) + 1;
String filing_no = String.valueOf(no);
String file_name = inbuffer.getString("FILE_NAME");
String file_desc = inbuffer.getString("FILE_DESC");
String media = inbuffer.getString("MEDIA");
String oper_date = inbuffer.getString("OPER_DATE");
String user_id = inbuffer.getString("SESSION_USER_ID");
String remark = inbuffer.getString("REMARK");
try {
ConFilingDAO condao = new ConFilingDAO();
condao.setCust_id(cust_id);
condao.setCon_id(con_id);
condao.setFiling_id(filing_id);
condao.setFiling_no(filing_no);
condao.setFile_name(file_name);
condao.setFile_desc(file_desc);
condao.setMedia(media);
condao.setOper_date(oper_date);
condao.setUser_id(user_id);
condao.setRemark(remark);
iResult = addConFilingInfo(condao);
} catch (Exception e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
} else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出addConFilingInfo方法...");
}
public int addConFilingInfo(ConFilingDAO conDao)
throws SaasApplicationException {
ConFilingExt conExt = new ConFilingExt();
// log.LOG_INFO("开始执行SQL:===:");
conExt.setParam(":VCUST_ID", conDao.getCust_id());
conExt.setParam(":VCON_ID", conDao.getCon_id());
conExt.setParam(":VFILING_ID", conDao.getFiling_id());
conExt.setParam(":VFILING_NO", conDao.getFiling_no());
conExt.setParam(":VFILE_NAME", conDao.getFile_name());
conExt.setParam(":VFILE_DESC", conDao.getFile_desc());
conExt.setParam(":VMEDIA", conDao.getMedia());
conExt.setParam(":VOPER_DATE", conDao.getOper_date());
conExt.setParam(":VUSER_ID", conDao.getUser_id());
conExt.setParam(":VREMARK", conDao.getRemark());
// log.LOG_INFO("开始执行SQL:===:" + conExt.insBy("INS_BY_CON_FILING"));
tradeQuery.executeBy(conExt.insBy("INS_BY_CON_FILING"));
return 0;
}
public ArrayList getConFilingList(int iStart, String cust_id ,String con_id)
throws SaasApplicationException {
if (iStart > 1) {
iStart = (iStart - 1) * 20;
} else {
iStart = 0;
}
ConFilingExt chriExt = new ConFilingExt();
chriExt.setParam(":VCUST_ID", cust_id);
chriExt.setParam(":VCON_ID", con_id);
ArrayList list = chriExt.selByList("SEL_BY_CON_LIST", iStart, 20);
return list;
}
public int getConFilingList(String cust_id ,String con_id) throws SaasApplicationException {
int count = 0;
ConFilingExt chriExt = new ConFilingExt();
chriExt.setParam(":VCUST_ID", cust_id);
chriExt.setParam(":VCON_ID", con_id);
ArrayList list = chriExt.selByList("SEL_BY_CON_LIST");
if (list != null && list.size() > 0) {
count = list.size();
}
return count;
}
// 修改归档信息表
public void ModiConFilingInfo(Buffers inbuffer) {
log.LOG_INFO("进入ModiConFilingInfo方法...");
this.outBuffer = inbuffer;
this.inBuffer = inbuffer;
int iResult = -1;
String cust_id = inbuffer.getString("SESSION_CUST_ID");
String con_id = inbuffer.getString("CON_ID");
String filing_id = inbuffer.getString("FILING_ID");
String filing_no = inbuffer.getString("FILING_NO");
String file_name = inbuffer.getString("FILE_NAME");
String file_desc = inbuffer.getString("FILE_DESC");
String media = inbuffer.getString("MEDIA");
String oper_date = inbuffer.getString("OPER_DATE");
String user_id = inbuffer.getString("SESSION_USER_ID");
String remark = inbuffer.getString("REMARK");
try {
ConFilingDAO condao = new ConFilingDAO();
condao.setCust_id(cust_id);
condao.setCon_id(con_id);
condao.setFiling_id(filing_id);
condao.setFiling_no(filing_no);
condao.setFile_name(file_name);
condao.setFile_desc(file_desc);
condao.setMedia(media);
condao.setOper_date(oper_date);
condao.setUser_id(user_id);
condao.setRemark(remark);
iResult = ModiConFilingInfo(condao);
} catch (Exception e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
} else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出ModiConFilingInfo方法...");
}
public int ModiConFilingInfo(ConFilingDAO conDao)
throws SaasApplicationException {
ConFilingExt conExt = new ConFilingExt();
// log.LOG_INFO("开始执行SQL:===:");
conExt.setParam(":VCUST_ID", conDao.getCust_id());
conExt.setParam(":VCON_ID", conDao.getCon_id());
conExt.setParam(":VFILING_ID", conDao.getFiling_id());
conExt.setParam(":VFILING_NO", conDao.getFiling_no());
conExt.setParam(":VFILE_NAME", conDao.getFile_name());
conExt.setParam(":VFILE_DESC", conDao.getFile_desc());
conExt.setParam(":VMEDIA", conDao.getMedia());
conExt.setParam(":VOPER_DATE", conDao.getOper_date());
conExt.setParam(":VUSER_ID", conDao.getUser_id());
conExt.setParam(":VREMARK", conDao.getRemark());
// log.LOG_INFO("开始执行SQL:===:" + conExt.insBy("UP_BY_CON_FILING"));
tradeQuery.executeBy(conExt.insBy("UP_BY_CON_FILING"));
return 0;
}
public ArrayList getListByTradeId(String cust_id, String trade_id)
throws SaasApplicationException {
ConFilingExt chriExt = new ConFilingExt();
chriExt.setParam(":VCUST_ID", cust_id);
chriExt.setParam(":VTRADE_ID", trade_id);
ArrayList list = chriExt.selByList("SEL_BY_TRADE_ID");
return list;
}
public ArrayList getValueById(String cust_id)
throws SaasApplicationException {
ArrayList relationList = new ArrayList();
ConFilingExt relaExt = new ConFilingExt();
relaExt.setParam(":VCUST_ID", cust_id);
relationList = relaExt.selByList("SEL_BY_KKK");
return relationList;
}
public ArrayList getOneValue(String cust_id, String con_id ,String filing_no)
throws SaasApplicationException {
ArrayList relationList = new ArrayList();
ConFilingExt relaExt = new ConFilingExt();
relaExt.setParam(":VCUST_ID", cust_id);
relaExt.setParam(":VCON_ID", con_id);
relaExt.setParam(":VFILING_NO", filing_no);
relationList = relaExt.selByList("SEL_BY_CON_LISTING");
return relationList;
}
public void DelConFilingInfo(Buffers inbuffer) {
log.LOG_INFO("进入DelConFilingInfo方法...");
this.outBuffer = inbuffer;
this.inBuffer = inbuffer;
int iResult = -1;
String cust_id = inbuffer.getString("SESSION_CUST_ID");
String con_id = inbuffer.getString("CON_ID");
try {
ConFilingDAO condao = new ConFilingDAO();
condao.setCust_id(cust_id);
condao.setCon_id(con_id);
iResult = DelConFilingInfo(condao);
} catch (Exception e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
} else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出DelConFilingInfo方法...");
}
public int DelConFilingInfo(ConFilingDAO conDao)
throws SaasApplicationException {
ConFilingExt conExt = new ConFilingExt();
conExt.setParam(":VCUST_ID", conDao.getCust_id());
conExt.setParam(":VCON_ID", conDao.getCon_id());
tradeQuery.executeBy(conExt.insBy("DEL_BY_CON_FILING"));
return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -