📄 rwglrwlzxxdao.java
字号:
package gov.gdlt.ssgly.taxcore.taxdao.rwgl;
import java.math.*;
import java.sql.*;
import java.util.*;
import gov.gdlt.ssgly.taxcore.comm.config.*;
import gov.gdlt.ssgly.taxcore.comm.dao.*;
import gov.gdlt.ssgly.taxcore.comm.log.*;
import gov.gdlt.ssgly.taxcore.comm.servicelocator.*;
import gov.gdlt.ssgly.taxcore.comm.exception.SsglyDAOException;
/**
* <p>Title: </p>
*
* <p>Description: 广东地税税收管理员工作平台</p>
*
* <p>Copyright: Copyright (c) 2005 广东省地方税务局,广州市地方税务局</p>
*
* <p>Company: 广州地税</p>
*
* @author 王隽
* @version 1.0
*/
public class RWGLrwlzxxDAO extends BaseDataAccessObject {
private BigDecimal bz_xh;
private BigDecimal rw_xh;
private BigDecimal lcbh;
private String lzfs_dm;
private String blbm_dm;
private String swjg_dm;
private BigDecimal sybz_xh;
private String syclfs;
private String fsr_dm;
private String jsz_lx;
private String jsz_dm;
private String blyj;
private String swry_dm;
private String blry_dm;
private String sqz_dm;
public RWGLrwlzxxDAO() {
}
public RWGLrwlzxxDAO(BigDecimal rw_xh){
this.rw_xh=rw_xh;
}
public void setBz_xh(BigDecimal bz_xh) {
this.bz_xh = bz_xh;
}
public void setRw_xh(BigDecimal rw_xh) {
this.rw_xh = rw_xh;
}
public void setLcbh(BigDecimal lcbh) {
this.lcbh = lcbh;
}
public void setLzfs_dm(String lzfs_dm) {
this.lzfs_dm = lzfs_dm;
}
public void setBlbm_dm(String blbm_dm) {
this.blbm_dm = blbm_dm;
}
public void setSwjg_dm(String swjg_dm) {
this.swjg_dm = swjg_dm;
}
public void setSybz_xh(BigDecimal sybz_xh) {
this.sybz_xh = sybz_xh;
}
public void setSyclfs(String syclfs) {
this.syclfs = syclfs;
}
public void setFsr_dm(String fsr_dm) {
this.fsr_dm = fsr_dm;
}
public void setJsz_lx(String jsz_lx) {
this.jsz_lx = jsz_lx;
}
public void setJsz_dm(String jsz_dm) {
this.jsz_dm = jsz_dm;
}
public void setBlyj(String blyj) {
this.blyj = blyj;
}
public void setSwry_dm(String swry_dm) {
this.swry_dm = swry_dm;
}
public void setBlry_dm(String blry_dm) {
this.blry_dm = blry_dm;
}
public void setSqz_dm(String sqz_dm) {
this.sqz_dm = sqz_dm;
}
public BigDecimal getBz_xh() {
return bz_xh;
}
public BigDecimal getRw_xh() {
return rw_xh;
}
public BigDecimal getLcbh() {
return lcbh;
}
public String getLzfs_dm() {
return lzfs_dm;
}
public String getBlbm_dm() {
return blbm_dm;
}
public String getSwjg_dm() {
return swjg_dm;
}
public BigDecimal getSybz_xh() {
return sybz_xh;
}
public String getSyclfs() {
return syclfs;
}
public String getFsr_dm() {
return fsr_dm;
}
public String getJsz_lx() {
return jsz_lx;
}
public String getJsz_dm() {
return jsz_dm;
}
public String getBlyj() {
//为避免iBatis出错,增加空值的判断
if (blyj==null) return "";
return blyj;
}
public String getSwry_dm() {
return swry_dm;
}
public String getBlry_dm() {
return blry_dm;
}
public String getSqz_dm() {
//为避免iBatis出错,增加空值的判断
if (sqz_dm==null) return "";
return sqz_dm;
}
public int sign() {
LogWritter.sysDebug("rw_xh="+rw_xh+" bz_xh="+bz_xh+" swry_dm="+swry_dm+" sqz_dm="+sqz_dm);
int rows = 0;
this.getSqlMapClient(); //获取SqlMap对象
Connection connection = null;
try {
connection = JDBCLocator.getInstance().getJDBCConnection();
sqlMap.setUserConnection(connection);
rows = sqlMap.update("T_RWGL_RWLZXX.sign1", this);
LogWritter.sysDebug("sign1 updated,rows="+rows);
if (rows == 1) {
sqlMap.update("T_RWGL_RWLZXX.sign2", this);
LogWritter.sysDebug("sign2 updated");
connection.commit();
}
} catch (SQLException e) {
e.printStackTrace();
try {
if (connection != null) connection.rollback();
} catch (SQLException ex) {}
return ApplicationContext.RET_FAIL;
} finally {
try {
if (connection != null) connection.close();
} catch (SQLException e) {}
}
return rows;
}
public void query4view(){
this.select("T_RWGL_RWLZXX.getBzxh",this);
// Object obj = null;
// this.getSqlMapClient(); //获取SqlMap对象
// Connection connection = null;
// try {
// connection = JDBCLocator.getInstance().getJDBCConnection();
// sqlMap.setUserConnection(connection);
// try{
// obj=sqlMap.queryForObject("T_RWGL_RWLZXX.getBzxh",this,this);
// }finally {
// try {
// if (connection != null) {
// connection.close();
// }}
// catch (Exception e){}
// }
// } catch (SQLException ex) {
// ex.printStackTrace();
// }
}
public int querySqz(){
return this.select("T_RWGL_RWLZXX.getSqz",this);
}
public int unsign() {
int rows = 0; //更新了多少条记录
Object obj = null;
this.getSqlMapClient(); //获取SqlMap对象
Connection connection = null;
try {
connection = JDBCLocator.getInstance().getJDBCConnection();
sqlMap.setUserConnection(connection);
//执行update操作
try {
rows = sqlMap.update("T_RWGL_RWLZXX.unsign1", this);
if (rows == 1) {
obj = sqlMap.queryForObject("T_RWGL_RWLZXX.unsign2", this, this);
LogWritter.sysDebug("" + this.getBz_xh() + " " +
this.getRw_xh() + " " + this.getBlbm_dm() +
" " + this.getSybz_xh() + " " +
this.getSyclfs());
obj = sqlMap.insert("T_RWGL_RWLZXX.unsign3", this);
rows = sqlMap.update("T_RWGL_RWLZXX.unsign4", this);
if (rows == 1) {
connection.commit();
}
}
}catch (SQLException e) {
e.printStackTrace();
try {
if (connection != null) connection.rollback();
} catch (SQLException ex) {}
}
finally {
try {
if (connection != null) {
connection.close();
}}
catch (Exception e){}
}
} catch (SQLException ex) {
ex.printStackTrace();
return ApplicationContext.RET_FAIL;
}
return rows;
}
public int save2() {
return this.update("T_RWGL_RWLZXX.save2", this);
}
public int send234() {
int rows = 0; //更新了多少条记录
Object obj = null;
this.getSqlMapClient(); //获取SqlMap对象
Connection connection = null;
try {
//执行update操作
connection = JDBCLocator.getInstance().getJDBCConnection();
sqlMap.setUserConnection(connection);
try {
LogWritter.sysDebug("lzxxDAO got jsz_dm="+jsz_dm);
rows = sqlMap.update("T_RWGL_RWLZXX.send3", this);
if (rows == 1) {
//根据下一办理方式是否办结,进行不同的处理
if (!lzfs_dm.equals("07")) {
LogWritter.sysDebug("next lzfs is not 07");
obj = sqlMap.queryForObject("T_RWGL_RWLZXX.send2", this, this);
LogWritter.sysDebug("new bz_xh="+bz_xh);
obj = sqlMap.insert("T_RWGL_RWLZXX.send4", this);
LogWritter.sysDebug("insert lzxx succeed");
connection.commit();
} else {
connection.commit();
LogWritter.sysDebug("lzxx updated");
}
}
} finally {
try {
if (connection != null) {
connection.close();
}}
catch (Exception e){}
}
} catch (SQLException ex) {
ex.printStackTrace();
return ApplicationContext.RET_FAIL;
}
return rows;
}
public ArrayList getLzxx(){
List list=this.selectAll("T_RWGL_RWLZXX.getLzxx",rw_xh);
return (ArrayList)list;
}
public int pullBack(String operation){
int rows = 0; //更新了多少条记录
if (!operation.equals("pullBack") && !operation.equals("turnBack")) return rows;
Object obj = null;
this.getSqlMapClient(); //获取SqlMap对象
Connection connection = null;
try {
connection = JDBCLocator.getInstance().getJDBCConnection();
sqlMap.setUserConnection(connection);
//执行update操作
try {
rows = sqlMap.update("T_RWGL_RWLZXX."+operation+"1", this);
LogWritter.sysDebug("pullback step1 completed,rows="+rows);
if (rows == 1) {
obj = sqlMap.queryForObject("T_RWGL_RWLZXX."+operation+"2", this, this);
LogWritter.sysDebug("pullback step2 completed");
if (obj!=null){
obj = sqlMap.insert("T_RWGL_RWLZXX." + operation + "3", this);
LogWritter.sysDebug("pullback step3 completed");
if (obj==null || !obj.equals(new Integer(ApplicationContext.RET_FAIL))){
rows = sqlMap.update("T_RWGL_RWLZXX." + operation +
"4", this);
LogWritter.sysDebug("pullback step4 completed");
if (rows == 1) {
connection.commit();
}
}
}
}
} finally {
try {
if (connection != null) {
connection.close();
}}
catch (Exception e){}
}
} catch (SQLException ex) {
ex.printStackTrace();
return ApplicationContext.RET_FAIL;
}
return rows;
}
public int addXbz(){
Object obj=this.save("T_RWGL_RWLZXX.addXbz");
if (obj.equals(new Integer(ApplicationContext.RET_FAIL))) return ApplicationContext.RET_FAIL;
return ApplicationContext.RET_SUCCESS;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -