📄 contract.java
字号:
* @param aPackFee the new value of the packFee property
*/
public void setPackFee(String aPackFee) {
packFee = setChnString(aPackFee);}
/**
* Access method for the jsfs property.
*
* @return the current value of the jsfs property
*/
public int getJsfs() {
return jsfs;}
/**
* Sets the value of the jsfs property.
*
* @param aJsfs the new value of the jsfs property
*/
public void setJsfs(int aJsfs) {
jsfs = aJsfs;}
/**
* Access method for the jsqx property.
*
* @return the current value of the jsqx property
*/
public String getJsqx() {
return jsqx;}
/**
* Sets the value of the jsqx property.
*
* @param aJsqx the new value of the jsqx property
*/
public void setJsqx(String aJsqx) {
jsqx = setChnString(aJsqx);}
/**
* Access method for the hlsh property.
*
* @return the current value of the hlsh property
*/
public String getHlsh() {
return hlsh;}
/**
* Sets the value of the hlsh property.
*
* @param aHlsh the new value of the hlsh property
*/
public void setHlsh(String aHlsh) {
hlsh = setChnString(aHlsh);}
/**
* Access method for the ysbz property.
*
* @return the current value of the ysbz property
*/
public String getYsbz() {
return ysbz;}
/**
* Sets the value of the ysbz property.
*
* @param aYsbz the new value of the ysbz property
*/
public void setYsbz(String aYsbz) {
ysbz = setChnString(aYsbz);}
/**
* Access method for the tcyy property.
*
* @return the current value of the tcyy property
*/
public Timestamp getTcyy() {
return tcyy;}
/**
* Sets the value of the tcyy property.
*
* @param aTcyy the new value of the tcyy property
*/
public void setTcyy(Timestamp aTcyy) {
tcyy = aTcyy;}
/**
* Access method for the zyjj property.
*
* @return the current value of the zyjj property
*/
public String getZyjj() {
return zyjj;}
/**
* Sets the value of the zyjj property.
*
* @param aZyjj the new value of the zyjj property
*/
public void setZyjj(String aZyjj) {
zyjj = setChnString(aZyjj);}
/**
* Access method for the other property.
*
* @return the current value of the other property
*/
public String getOther() {
return other;}
/**
* Sets the value of the other property.
*
* @param aOther the new value of the other property
*/
public void setOther(String aOther) {
other = setChnString(aOther);}
/**
* Access method for the proposer property.
*
* @return the current value of the proposer property
*/
public String getProposer() {
return proposer;}
/**
* Sets the value of the proposer property.
*
* @param aProposer the new value of the proposer property
*/
public void setProposer(String aProposer) {
proposer = setChnString(aProposer);}
/**
* Access method for the deptManager property.
*
* @return the current value of the deptManager property
*/
public String getDeptManager() {
return deptManager;}
/**
* Sets the value of the deptManager property.
*
* @param aDeptManager the new value of the deptManager property
*/
public void setDeptManager(String aDeptManager) {
deptManager = setChnString(aDeptManager);}
/**
* Access method for the comment property.
*
* @return the current value of the comment property
*/
public String getComment() {
return comment;}
/**
* Sets the value of the comment property.
*
* @param aComment the new value of the comment property
*/
public void setComment(String aComment) {
comment = setChnString(aComment);}
/**
* Access method for the ratifier property.
*
* @return the current value of the ratifier property
*/
public String getRatifier() {
return ratifier;}
/**
* Sets the value of the ratifier property.
*
* @param aRatifier the new value of the ratifier property
*/
public void setRatifier(String aRatifier) {
ratifier = setChnString(aRatifier);}
/**
* Access method for the outContractId property.
*
* @return the current value of the outContractId property
*/
public String getOutContractId() {
return outContractId;}
/**
* Sets the value of the outContractId property.
*
* @param aOutContractId the new value of the outContractId property
*/
public void setOutContractId(String aOutContractId) {
outContractId = setChnString(aOutContractId);}
/**
* Access method for the contractDate property.
*
* @return the current value of the contractDate property
*/
public Timestamp getContractDate() {
return contractDate;}
/**
* Sets the value of the contractDate property.
*
* @param aContractDate the new value of the contractDate property
*/
public void setContractDate(Timestamp aContractDate) {
contractDate = aContractDate;}
/**
* Access method for the modifiedContractId property.
*
* @return the current value of the modifiedContractId property
*/
public String getModifiedContractId() {
return modifiedContractId;}
/**
* Sets the value of the modifiedContractId property.
*
* @param aModifiedContractId the new value of the modifiedContractId property
*/
public void setModifiedContractId(String aModifiedContractId) {
modifiedContractId = setChnString(aModifiedContractId);}
public String getDeptId() {
return deptId;}
public Contract()
{
primarykey1Name="contractId" ;
primarykey1Type=1;
tableName ="Contract";
viewName="V_Contract";
numInOnePager=10;
}
public String getWhereClause(javax.servlet.ServletRequest request) {
String whereClause = "";
whereClause = addWhereClause(whereClause, "contractId", "=", "'",request.getParameter("contractId"));
whereClause = addWhereClause(whereClause, "customerId", "=", "'",request.getParameter("customerId"));
whereClause = addWhereClause(whereClause, "contractFlag", "=", "",request.getParameter("contractFlag"));
whereClause = addWhereClause(whereClause, "proposer", "like", "'",request.getParameter("proposer"));
return whereClause;
}
public int loadAttr() {
try {
contractId= getRsString(rs,"contractId");
customerId= getRsString(rs,"customerId");
contractFlag= rs.getInt("contractFlag");
contractState= rs.getInt("contractState");
contractAddress= getRsString(rs,"contractAddress");
contractBegTime= rs.getTimestamp("contractBegTime");
technique= getRsString(rs,"technique");
arriveDate= rs.getTimestamp("arriveDate");
arriveAddress= getRsString(rs,"arriveAddress");
delivWay= rs.getInt("delivWay");
delivResp= getRsString(rs,"delivResp");
arrivPort= getRsString(rs,"arrivPort");
packStand= getRsString(rs,"packStand");
packFee= getRsString(rs,"packFee");
jsfs= rs.getInt("jsfs");
jsqx= getRsString(rs,"jsqx");
hlsh= getRsString(rs,"hlsh");
ysbz= getRsString(rs,"ysbz");
tcyy= rs.getTimestamp("tcyy");
zyjj= getRsString(rs,"zyjj");
other= getRsString(rs,"other");
proposer= getRsString(rs,"proposer");
deptManager= getRsString(rs,"deptManager");
comment= getRsString(rs,"comment");
ratifier= getRsString(rs,"ratifier");
outContractId= getRsString(rs,"outContractId");
contractDate= rs.getTimestamp("contractDate");
modifiedContractId= getRsString(rs,"modifiedContractId");
deptId = getRsString(rs,"deptId");
} catch(SQLException e) {
e.printStackTrace();
System.out.println("query failed!");
return -1;
}
return 1;
}
public int update() {
String sql= "{?=call sp_UpdateContract(?,?,?,?,? ,?,?,?,?,? ,?,?,?,?,?, ?,?,?,?,? ,?,?)}";
try{
CallableStatement updStmt=conn.prepareCall(sql);
updStmt.registerOutParameter(1, java.sql.Types.INTEGER);
setStmtString(updStmt,2,contractId);
setStmtString(updStmt,3,customerId);
updStmt.setInt(4,contractFlag);
setStmtString(updStmt,5,contractAddress);
updStmt.setTimestamp(6,contractBegTime);
setStmtString(updStmt,7,technique);
updStmt.setTimestamp(8,arriveDate);
setStmtString(updStmt,9,arriveAddress);
updStmt.setInt(10,delivWay);
setStmtString(updStmt,11,delivResp);
setStmtString(updStmt,12,arrivPort);
setStmtString(updStmt,13,packStand);
setStmtString(updStmt,14,packFee);
updStmt.setInt(15,jsfs);
setStmtString(updStmt,16,jsqx);
setStmtString(updStmt,17,hlsh);
setStmtString(updStmt,18,ysbz);
updStmt.setTimestamp(19,tcyy);
setStmtString(updStmt,20,zyjj);
setStmtString(updStmt,21,other);
setStmtString(updStmt,22,proposer);
setStmtString(updStmt,23,outContractId);
updStmt.executeUpdate();
int rtcode = updStmt.getInt(1);
updStmt.close();
return rtcode;
}catch(SQLException E){
System.out.println(E.getMessage());
return -102;
}
}
public int insert() {
String sql= "{?=call sp_InsertContract(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
try{
CallableStatement updStmt=conn.prepareCall(sql);
updStmt.registerOutParameter(1, java.sql.Types.INTEGER);
setStmtString(updStmt,2,contractId);
setStmtString(updStmt,3,customerId);
updStmt.setInt(4,contractFlag);
setStmtString(updStmt,5,contractAddress);
updStmt.setTimestamp(6,contractBegTime);
setStmtString(updStmt,7,technique);
updStmt.setTimestamp(8,arriveDate);
setStmtString(updStmt,9,arriveAddress);
updStmt.setInt(10,delivWay);
setStmtString(updStmt,11,delivResp);
setStmtString(updStmt,12,arrivPort);
setStmtString(updStmt,13,packStand);
setStmtString(updStmt,14,packFee);
updStmt.setInt(15,jsfs);
setStmtString(updStmt,16,jsqx);
setStmtString(updStmt,17,hlsh);
setStmtString(updStmt,18,ysbz);
updStmt.setTimestamp(19,tcyy);
setStmtString(updStmt,20,zyjj);
setStmtString(updStmt,21,other);
setStmtString(updStmt,22,proposer);
setStmtString(updStmt,23,outContractId);
setStmtString(updStmt,24,modifiedContractId);
updStmt.executeUpdate();
int rtcode = updStmt.getInt(1);
updStmt.close();
return rtcode;
}catch(SQLException E){
System.out.println(E.getMessage());
return -102;
}
}
public int updateRatifier(int mode,int agree,String loginName) {
String sql= "{?=call sp_UpdateContractRatifier(?,?,?,?,?)}";
try{
CallableStatement updStmt=conn.prepareCall(sql);
updStmt.registerOutParameter(1, java.sql.Types.INTEGER);/** 注册OUT参数 */
updStmt.setInt(2,mode);
setStmtString(updStmt,3,contractId);
setStmtString(updStmt,4,loginName);
updStmt.setInt(5,agree);
setStmtString(updStmt,6,comment);
updStmt.executeUpdate();
int rtcode = updStmt.getInt(1);
updStmt.close();
return rtcode;
}catch(SQLException E){
System.out.println(E.getMessage());
return -102;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -