123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- package com.huimv.xt.dao;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import java.util.Map;
- import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
- import com.huimv.busi.xt.constant.XtSqlMapConstant;
- import com.huimv.busi.xt.utils.StringUtils;
- import com.huimv.da.dataobject.DaLqda;
- import com.huimv.sj.dataobject.SjFwjl;
- import com.huimv.xt.dataobject.XtSbcs;
- import com.huimv.xt.dataobject.XtSbcsExample;
- public class XtSbcsDAOImpl extends SqlMapClientDaoSupport implements XtSbcsDAO {
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:15 CST 2014
- */
- public XtSbcsDAOImpl() {
- super();
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int countByExample(XtSbcsExample example) {
- Integer count = (Integer) getSqlMapClientTemplate().queryForObject("xt_sbcs.ibatorgenerated_countByExample", example);
- return count;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int deleteByExample(XtSbcsExample example) {
- int rows = getSqlMapClientTemplate().delete("xt_sbcs.ibatorgenerated_deleteByExample", example);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int deleteByPrimaryKey(Integer id) {
- XtSbcs key = new XtSbcs();
- key.setId(id);
- int rows = getSqlMapClientTemplate().delete("xt_sbcs.ibatorgenerated_deleteByPrimaryKey", key);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public void insert(XtSbcs record) {
- getSqlMapClientTemplate().insert("xt_sbcs.ibatorgenerated_insert", record);
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public void insertSelective(XtSbcs record) {
- getSqlMapClientTemplate().insert("xt_sbcs.ibatorgenerated_insertSelective", record);
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- @SuppressWarnings("unchecked")
- public List<XtSbcs> selectByExample(XtSbcsExample example) {
- List<XtSbcs> list = getSqlMapClientTemplate().queryForList("xt_sbcs.ibatorgenerated_selectByExample", example);
- return list;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public XtSbcs selectByPrimaryKey(Integer id) {
- XtSbcs key = new XtSbcs();
- key.setId(id);
- XtSbcs record = (XtSbcs) getSqlMapClientTemplate().queryForObject("xt_sbcs.ibatorgenerated_selectByPrimaryKey", key);
- return record;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int updateByExampleSelective(XtSbcs record, XtSbcsExample example) {
- UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
- int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByExampleSelective", parms);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int updateByExample(XtSbcs record, XtSbcsExample example) {
- UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
- int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByExample", parms);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int updateByPrimaryKeySelective(XtSbcs record) {
- int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByPrimaryKeySelective", record);
- return rows;
- }
- /**
- * This method was generated by Apache iBATIS ibator.
- * This method corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- public int updateByPrimaryKey(XtSbcs record) {
- int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByPrimaryKey", record);
- return rows;
- }
- /**
- * This class was generated by Apache iBATIS ibator.
- * This class corresponds to the database table xt_sbcs
- *
- * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
- */
- private static class UpdateByExampleParms extends XtSbcsExample {
- private Object record;
- public UpdateByExampleParms(Object record, XtSbcsExample example) {
- super(example);
- this.record = record;
- }
- public Object getRecord() {
- return record;
- }
- }
-
- @Override
- public List<XtSbcs> selectXtsbcsByParam(Map<String, Object> searchParam) {
- List<XtSbcs> list = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SBCS_BY_PARAM,searchParam);
- return list;
- }
- @Override
- public int selectCountXtsbcsByParam(Map<String, Object> searchParam) {
- Integer count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SELECT_SBCS_BY_PARAM,searchParam);
- return count == null ? 0 : count;
- }
- @Override
- public int selectCountFwjlByParam(Map<String, Object> searchParam) {
- Integer count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SELECT_FWJL_BY_PARAM,searchParam);
- return count == null ? 0 : count;
- }
- @Override
- public String selectDqtzFwjlByParam(Map<String, Object> searchParam) {
- String dqtz = (String) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_DQTZ_FWJL_BY_PARAM,searchParam);
- return dqtz;
- };
-
- /**
- * 返回指定yjsb里面的最大ID
- */
- public int selectSbcsMaxId() {
- Integer count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_MAX_SBCS_ID);
- return count == null ? 0 : count;
- }
-
- public List<XtSbcs> selectTxtzByLqid(String lqid) {
- List<XtSbcs> list = new ArrayList<XtSbcs>();
- if (StringUtils.isNotEmpty(lqid) && Integer.parseInt(lqid) != 0) {
- list = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_TXTZ_SBCS_BY_LQID, lqid);
- }
- return list;
- }
- @Override
- public String selectLqidByJpid(Map<String, Object> searchParam) {
- String lqid = (String) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_LQID_BY_PARAM,searchParam);
- return lqid;
- }
- @SuppressWarnings("unchecked")
- public List<SjFwjl> selectPjtzByParam(Map<String, Object> searchParam) {
- List<SjFwjl> list = (List<SjFwjl>) getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_PJTZ_BY_PARAM,searchParam);
- return list;
- }
- @Override
- public DaLqda selectLqdaByJqid(Map<String, Object> searchParam) {
- DaLqda daLqda = (DaLqda) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_LQDA_BY_PARAM,searchParam);
- return daLqda;
- }
-
- public Date selectMaxFwsjByParam(Map<String, Object> searchParam) {
- Object obj = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_FWSJ_BY_PARAM, searchParam);
- if (obj != null) {
- return (Date)obj;
- } else {
- return null;
- }
- }
-
- public int selectIdByZsid(int zsid) {
- Object obj = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_SBCS_ID_BY_ZSID, zsid);
- if (obj == null) {
- return 0;
- }
- int id = (int) obj;
- return id;
- }
-
- /**
- * 根据JQID获取MCID
- * @param paramMap
- * @return
- */
- public int selectMcidByJqid (Map<String, Object> paramMap) {
- Object obj = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_MCID_BY_JQID, paramMap);
- if (obj == null) {
- return 0;
- }
- int id = (int) obj;
- return id;
- }
- }
|