📄 sjwhcjsjdao.java
字号:
package gov.gdlt.ssgly.taxcore.taxdao.sjwh;
import java.math.*;
import java.sql.*;
import java.util.*;
import gov.gdlt.ssgly.taxcore.comm.dao.*;
import gov.gdlt.ssgly.taxcore.taxevent.sjwh.*;
/**
* <p>Title: 采集的数据指标DAO</p>
*
* <p>Description: 广东地税税收管理员工作平台</p>
*
* <p>Copyright: Copyright (c) 2005 广东省地方税务局,广州市地方税务局</p>
*
* <p>Company: 广州地税</p>
*
* @author czz
*
* @version 1.0
*/
public class SJWHcjsjDAO extends BaseDataAccessObject {
private String zb_dm;
private String gly_dm;
private BigDecimal nsrnbm;
private String st_dm;
private String zbz;
private String lrry_dm;
private String sjly;
private Timestamp lr_sj;
private BigDecimal zbsj_xh;
private BigDecimal hh;
private String type; //调用存储过程是single/List
private String nsrnbmToString;
public SJWHcjsjDAO() {
}
/**
* 通过st_dm查找采集指标列表
* @throws SQLException
* @param st_dm String
* @return List
*/
public List findZbList(String st_dm) throws SQLException {
return selectAll("T_SJWH_CJSJ.selectCjzbList", st_dm);
}
/**
* 通过cjsj的nsrnbm和zb_bm查找相应的采集数据
* @throws SQLException
* @param cjsj SJWHcjsjVO
* @return List
*/
public List findCjsj(SJWHcjsjVO cjsj) throws SQLException {
return selectAll("T_SJWH_CJSJ.selectCjsj", cjsj);
}
/**
* 查找某一纳税人的所有指标数据
* @return boolean
* @throws SQLException
*/
public List findAllZbsj(BigDecimal nsrnbm) throws SQLException {
return selectAll("T_SJWH_CJSJ.selectAllCjsj", nsrnbm);
}
/**
* 插入纳税人内部码为nsrnbm的指标编码为zb_bm的指标数据记录
* @throws SQLException
* @return Integer 返回插入是否成功标志
*/
public boolean saveCjsj() throws SQLException {
boolean flag = true;
try {
if (!"value".equals(this.zbz)) {
save("T_SJWH_CJSJ.insertCjsj");
}
} catch (Exception e) {
flag = false;
throw new SQLException("SJWH02011:插入数据异常!");
}
return flag;
}
/**
* 更新采集数据
* @throws SQLException
* @return int 返回更新的行数
*/
public int updateCjsj() throws SQLException {
return update("T_SJWH_CJSJ.updateCjsj");
}
/**
* 读取相应指标的可选值列表
* @throws SQLException
* @param zbvo SJWHcjzbVO
* @return List
*/
public List getZlb(SJWHcjzbVO zbvo) throws SQLException {
return selectAll("T_SJWH_CJSJ.dynamicSelect", zbvo);
}
/**
* 读取指标数据历史记录
* @throws SQLException
* @param cjsj SJWHcjsjVO
* @return List
*/
public List getHistorySj(SJWHcjsjVO cjsj) throws SQLException {
return selectAll("T_SJWH_CJSJ.selectHistoryCjsj", cjsj);
}
/**
* 读取某一指标数据
* @param cjsj SJWHcjsjVO
* @return List
* @throws SQLException
*/
public List existCjsj(SJWHcjsjVO cjsj) throws SQLException {
return selectAll("T_SJWH_CJSJ.existCjsj", cjsj);
}
/**
* 更新一条记录,并插入一条新的记录
* @return boolean
* @throws SQLException
*/
// public boolean insert() throws SQLException {
// this.getSqlMapClient(); //获取SqlMap对象
// boolean flag = false;
// try {
// try {
// sqlMap.startTransaction();
// //sqlMap.update("T_SJWH_CJSJ.updateCjsj", this); //更新数据使原来指标值为无效
// sqlMap.delete("T_SJWH_CJSJ.deleteZbsj", this.zbsj_xh); //删除原来指标值
// String tempZbz = this.getZbz() == null ? "" : this.getZbz();
// System.out.println("-----dao: zbz = " + tempZbz);
// if (!"value".equals(tempZbz) && tempZbz.trim().length() > 0) {
// sqlMap.insert("T_SJWH_CJSJ.insertCjsj", this);
//// System.out.println("--------dao : insert ok !");
// }
// flag = true;
// sqlMap.commitTransaction();
// } finally {
// sqlMap.endTransaction();
// }
// } catch (SQLException ex) {
// ex.printStackTrace();
// return flag;
// }
// return flag;
// }
public boolean updateZbz() throws SQLException {
boolean flag = false;
try {
String tempZbz = this.getZbz() == null ? "" : this.getZbz();
if (!"value".equals(this.zbz)&& tempZbz.trim().length() > 0){
update("T_SJWH_CJSJ.updateZbz", this);
}else {
delete("T_SJWH_CJSJ.deleteZbsj",this.zbsj_xh);
}
flag = true;
} catch (Exception e) {
throw new SQLException("更新指标值失败!"+e.getMessage());
}
return flag;
}
public boolean deleteZbsj(java.math.BigDecimal zbsj_xh) throws SQLException {
boolean flag = false;
int i = delete("T_SJWH_CJSJ.deleteZbsj", zbsj_xh);
if (i > 0) {
flag = true;
}
return flag;
}
/**
* 强制更新dao
* @return int
* @throws SQLException
*/
public int forceUpdate()throws SQLException{
return select("T_SJWH_CJSJ.forceUpdate",this);
}
public void setZb_dm(String zb_dm) {
this.zb_dm = zb_dm;
}
public void setGly_dm(String gly_dm) {
this.gly_dm = gly_dm;
}
public void setNsrnbm(BigDecimal nsrnbm) {
this.nsrnbm = nsrnbm;
}
public void setSt_dm(String st_dm) {
this.st_dm = st_dm;
}
public void setZbz(String zbz) {
this.zbz = zbz;
}
public void setLrry_dm(String lrry_dm) {
this.lrry_dm = lrry_dm;
}
public void setSjly(String sjly) {
this.sjly = sjly;
}
public void setLr_sj(Timestamp lr_sj) {
this.lr_sj = lr_sj;
}
public void setZbsj_xh(BigDecimal zbsj_xh) {
this.zbsj_xh = zbsj_xh;
}
public void setHh(BigDecimal hh) {
this.hh = hh;
}
public void setType(String type) {
this.type = type;
}
public void setNsrnbmToString(String nsrnbmToString) {
this.nsrnbmToString = nsrnbmToString;
}
public String getZb_dm() {
return zb_dm;
}
public String getGly_dm() {
return gly_dm;
}
public BigDecimal getNsrnbm() {
return nsrnbm;
}
public String getSt_dm() {
return st_dm;
}
public String getZbz() {
return zbz;
}
public String getLrry_dm() {
return lrry_dm;
}
public String getSjly() {
return sjly;
}
public Timestamp getLr_sj() {
return lr_sj;
}
public BigDecimal getZbsj_xh() {
return zbsj_xh;
}
public BigDecimal getHh() {
return hh;
}
public String getType() {
return type;
}
public String getNsrnbmToString() {
return nsrnbmToString;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -