📄 customsdoc.java
字号:
//Source file: D:\tomcat\webapps\wuyang\WEB-INF\classes\src\wuyang\src\CustomsDoc.java
package src.wuyang;
import src.com.*;
import java.sql.*;
import java.io.*;
public class CustomsDoc extends ShangObject
{
/**
进出口合同编号
*/
private String contractId;
/**
报关委托书编号
*/
private String commitDocId;
/**
委托单位编码
*/
private String companyId;
/**
经办人
*/
private String employeeId;
/**
委托单位帐号
*/
private String accountId;
/**
贸易性质
0
1
*/
private int tradeCharacter;
/**
是否退税
*/
private int isDrawback;
/**
航班/航次
*/
private String flight;
/**
合同份数
*/
private int contractNum;
/**
发票份数
*/
private int invoiceNum;
/**
装箱单份数
*/
private int incaseNum;
/**
登记手册份数
*/
private int liberNum;
/**
许可证份数
*/
private int linenceNum;
/**
机电证明份数
*/
private int provementNum;
/**
商检证分数
*/
private int checkDocNum;
/**
被委托单位编号
*/
private String commitedComId;
/**
被委托单位名称
*/
private String commitedCompany;
/**
被委托单位地址
*/
private String commitedComAddress;
/**
被委托经办人
*/
private String commitedAccountId;
/**
被委托人的身份证号
*/
private String commitedIdNum;
public CustomsDoc()
{
primarykey1Name = "commitDocId";
primarykey1Type = 1;
tableName = "CustomsDoc";
viewName = "CustomsDoc";
numInOnePager = 10;
}
/**
* Access method for the contractId property.
*
* @return the current value of the contractId property
*/
public String getContractId()
{
return contractId;
}
/**
* Sets the value of the contractId property.
*
* @param aContractId the new value of the contractId property
*/
public void setContractId(String aContractId)
{
contractId = setChnString(aContractId);
}
/**
* Access method for the commitDocId property.
*
* @return the current value of the commitDocId property
*/
public String getCommitDocId()
{
return commitDocId;
}
/**
* Sets the value of the commitDocId property.
*
* @param aCommitDocId the new value of the commitDocId property
*/
public void setCommitDocId(String aCommitDocId)
{
commitDocId = setChnString(aCommitDocId);
}
/**
* Access method for the companyId property.
*
* @return the current value of the companyId property
*/
public String getCompanyId()
{
return companyId;
}
/**
* Sets the value of the companyId property.
*
* @param aAccountId the new value of the companyId property
*/
public void setCompanyId(String aCompanyId)
{
companyId = setChnString(aCompanyId);
}
/**
* Access method for the accountId property.
*
* @return the current value of the accountId property
*/
public String getAccountId()
{
return accountId;
}
/**
* Sets the value of the accountId property.
*
* @param aAccountId the new value of the accountId property
*/
public void setAccountId(String aAccountId)
{
accountId = setChnString(aAccountId);
}
/**
* Access method for the employeeId property.
*
* @return the current value of the employeeId property
*/
public String getEmployeeId()
{
return employeeId;
}
/**
* Sets the value of the employeeId property.
*
* @param aAccountId the new value of the employeeId property
*/
public void setEmployeeId(String aEmployeeId)
{
employeeId = setChnString(aEmployeeId);
}
/**
* Access method for the tradeCharacter property.
*
* @return the current value of the tradeCharacter property
*/
public int getTradeCharacter()
{
return tradeCharacter;
}
/**
* Sets the value of the tradeCharacter property.
*
* @param aTradeCharacter the new value of the tradeCharacter property
*/
public void setTradeCharacter(int aTradeCharacter)
{
tradeCharacter = aTradeCharacter;
}
/**
* Access method for the isDrawback property.
*
* @return the current value of the isDrawback property
*/
public int getIsDrawback()
{
return isDrawback;
}
/**
* Sets the value of the isDrawback property.
*
* @param aIsDrawback the new value of the isDrawback property
*/
public void setIsDrawback(int aIsDrawback)
{
isDrawback = aIsDrawback;
}
/**
* Access method for the flight property.
*
* @return the current value of the flight property
*/
public String getFlight()
{
return flight;
}
/**
* Sets the value of the flight property.
*
* @param aFlight the new value of the flight property
*/
public void setFlight(String aFlight)
{
flight = setChnString(aFlight);
}
/**
* Access method for the contractNum property.
*
* @return the current value of the contractNum property
*/
public int getContractNum()
{
return contractNum;
}
/**
* Sets the value of the contractNum property.
*
* @param aContractNum the new value of the contractNum property
*/
public void setContractNum(int aContractNum)
{
contractNum = aContractNum;
}
/**
* Access method for the invoiceNum property.
*
* @return the current value of the invoiceNum property
*/
public int getInvoiceNum()
{
return invoiceNum;
}
/**
* Sets the value of the invoiceNum property.
*
* @param aInvoiceNum the new value of the invoiceNum property
*/
public void setInvoiceNum(int aInvoiceNum)
{
invoiceNum = aInvoiceNum;
}
/**
* Access method for the incaseNum property.
*
* @return the current value of the incaseNum property
*/
public int getIncaseNum()
{
return incaseNum;
}
/**
* Sets the value of the incaseNum property.
*
* @param aIncaseNum the new value of the incaseNum property
*/
public void setIncaseNum(int aIncaseNum)
{
incaseNum = aIncaseNum;
}
/**
* Access method for the liberNum property.
*
* @return the current value of the liberNum property
*/
public int getLiberNum()
{
return liberNum;
}
/**
* Sets the value of the liberNum property.
*
* @param aLiberNum the new value of the liberNum property
*/
public void setLiberNum(int aLiberNum)
{
liberNum = aLiberNum;
}
/**
* Access method for the linenceNum property.
*
* @return the current value of the linenceNum property
*/
public int getLinenceNum()
{
return linenceNum;
}
/**
* Sets the value of the linenceNum property.
*
* @param aLinenceNum the new value of the linenceNum property
*/
public void setLinenceNum(int aLinenceNum)
{
linenceNum = aLinenceNum;
}
/**
* Access method for the provementNum property.
*
* @return the current value of the provementNum property
*/
public int getProvementNum()
{
return provementNum;
}
/**
* Sets the value of the provementNum property.
*
* @param aProvementNum the new value of the provementNum property
*/
public void setProvementNum(int aProvementNum)
{
provementNum = aProvementNum;
}
/**
* Access method for the checkDocNum property.
*
* @return the current value of the checkDocNum property
*/
public int getCheckDocNum()
{
return checkDocNum;
}
/**
* Sets the value of the checkDocNum property.
*
* @param aCheckDocNum the new value of the checkDocNum property
*/
public void setCheckDocNum(int aCheckDocNum)
{
checkDocNum = aCheckDocNum;
}
/**
* Access method for the commitedComId property.
*
* @return the current value of the commitedComId property
*/
public String getCommitedComId()
{
return commitedComId;
}
/**
* Sets the value of the commitedComId property.
*
* @param aCommitedComId the new value of the commitedComId property
*/
public void setCommitedComId(String aCommitedComId)
{
commitedComId = setChnString(aCommitedComId);
}
/**
* Access method for the commitedCompany property.
*
* @return the current value of the commitedCompany property
*/
public String getCommitedCompany()
{
return commitedCompany;
}
/**
* Sets the value of the commitedCompany property.
*
* @param aCommitedCompany the new value of the commitedCompany property
*/
public void setCommitedCompany(String aCommitedCompany)
{
commitedCompany = setChnString(aCommitedCompany);
}
/**
* Access method for the commitedComAddress property.
*
* @return the current value of the commitedComAddress property
*/
public String getCommitedComAddress()
{
return commitedComAddress;
}
/**
* Sets the value of the commitedComAddress property.
*
* @param aCommitedComAddress the new value of the commitedComAddress property
*/
public void setCommitedComAddress(String aCommitedComAddress)
{
commitedComAddress = aCommitedComAddress;
}
/**
* Access method for the commitedAccountId property.
*
* @return the current value of the commitedAccountId property
*/
public String getCommitedAccountId()
{
return commitedAccountId;
}
/**
* Sets the value of the commitedAccountId property.
*
* @param aCommitedAccountId the new value of the commitedAccountId property
*/
public void setCommitedAccountId(String aCommitedAccountId)
{
commitedAccountId = setChnString(aCommitedAccountId);
}
/**
* Access method for the commitedIdNum property.
*
* @return the current value of the commitedIdNum property
*/
public String getCommitedIdNum()
{
return commitedIdNum;
}
/**
* Sets the value of the commitedIdNum property.
*
* @param aCommitedIdNum the new value of the commitedIdNum property
*/
public void setCommitedIdNum(String aCommitedIdNum)
{
commitedIdNum = setChnString(aCommitedIdNum);
}
public int loadAttr()
{
try {
contractId = getRsString(rs,"contractId");
commitDocId = getRsString(rs, "commitDocId");
companyId = getRsString(rs,"companyId");
accountId = getRsString(rs,"accountId");
employeeId = getRsString(rs,"employeeId");
tradeCharacter = rs.getInt("tradeCharacter");
isDrawback = rs.getInt("isDrawback");
flight = getRsString(rs,"flight");
contractNum = rs.getInt("contractNum");
invoiceNum = rs.getInt("invoiceNum");
incaseNum = rs.getInt("incaseNum");
liberNum = rs.getInt("liberNum");
linenceNum = rs.getInt("linenceNum");
provementNum = rs.getInt("provementNum");
checkDocNum = rs.getInt("checkDocNum");
commitedComId = getRsString(rs,"commitedComId");
commitedAccountId = getRsString(rs,"commitedAccountId");
commitedIdNum = getRsString(rs,"commitedIdNum");
}
catch(SQLException e)
{
e.printStackTrace();
System.out.println("query failed!");
return -1;
}
return 1;
}
public int insert()
{
String sql= "INSERT INTO CustomsDoc (contractId,commitDocId,companyId,accountId,employeeId,"+
"tradeCharacter,isDrawback,flight,contractNum,invoiceNum,"+
"incaseNum,liberNum,linenceNum,provementNum,checkDocNum,"+
"commitedComId,commitedAccountId,commitedIdNum) "+
"VALUES ('"+getContractId()+"','"+getCommitDocId()+"','"+getCompanyId()+"','"+
getAccountId()+"','"+getEmployeeId()+"',"+getTradeCharacter()+","+getIsDrawback()+",'"+
getFlight()+"',"+getContractNum()+","+getInvoiceNum()+","+
getIncaseNum()+","+getLiberNum()+","+getLinenceNum()+","+
getProvementNum()+","+getCheckDocNum()+",'"+getCommitedComId()+"','"+
getCommitedAccountId()+"','"+getCommitedIdNum()+"')";
System.out.println(sql);
try {
Statement stmt=conn.createStatement();
stmt.execute(sql);
return 0;
}
catch(SQLException E)
{
System.out.println(E.getMessage());
return -104;
}
}
public int update()
{
String sql= "UPDATE CustomsDoc SET contractId='"+getContractId()+"',companyId='"+
getCompanyId()+"',accountId='"+getAccountId()+"',employeeId='"+
getEmployeeId()+"',tradeCharacter="+getTradeCharacter()+",isDrawback="+
getIsDrawback()+",flight='"+getFlight()+"',contractNum="+
getContractNum()+",invoiceNum="+getInvoiceNum()+",incaseNum="+
getIncaseNum()+",liberNum="+getLiberNum()+",linenceNum="+
getLinenceNum()+",provementNum="+getProvementNum()+",checkDocNum="+
getCheckDocNum()+",commitedComId='"+getCommitedComId()+"',commitedAccountId='"+
getCommitedAccountId()+"',commitedIdNum='"+getCommitedIdNum()+"' "+
"WHERE commitDocId='" + getCommitDocId() + "'";
System.out.println(sql);
try {
Statement stmt=conn.createStatement();
stmt.execute(sql);
return 0;
}
catch(SQLException E)
{
System.out.println(E.getMessage());
return -103;
}
}
public String getWhereClause(javax.servlet.ServletRequest request)
{
String whereClause = "";
String str;
int queryMode = (new Integer(request.getParameter("queryMode"))).intValue();
switch(queryMode)
{
case 1: // 综合查询
whereClause = addWhereClause(whereClause, "contractId", "=", "'", request.getParameter("contractId"));
whereClause = addWhereClause(whereClause, "commitDocId", "=", "'", request.getParameter("commitDocId"));
whereClause = addWhereClause(whereClause, "companyId", "=", "'", request.getParameter("companyId"));
whereClause = addWhereClause(whereClause, "employeeId", "=", "'", request.getParameter("employeeId"));
whereClause = addWhereClause(whereClause, "tradeCharacter", "=", "", request.getParameter("tradeCharacter"));
whereClause = addWhereClause(whereClause, "isDrawback", "=", "", request.getParameter("isDrawback"));
whereClause = addWhereClause(whereClause, "flight", "=", "'", request.getParameter("flight"));
whereClause = addWhereClause(whereClause, "commitedComId", "=", "'", request.getParameter("commitedComId"));
whereClause = addWhereClause(whereClause, "commitedAccountId", "=", "'", request.getParameter("commitedAccountId"));
whereClause = addWhereClause(whereClause, "commitedIdNum", "=", "'", request.getParameter("commitedIdNum"));
break;
case 2:
break;
}
return whereClause;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -