XtSbcsDAOImpl.java 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. package com.huimv.xt.dao;
  2. import java.util.ArrayList;
  3. import java.util.Date;
  4. import java.util.List;
  5. import java.util.Map;
  6. import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
  7. import com.huimv.busi.xt.constant.XtSqlMapConstant;
  8. import com.huimv.busi.xt.utils.StringUtils;
  9. import com.huimv.da.dataobject.DaLqda;
  10. import com.huimv.sj.dataobject.SjFwjl;
  11. import com.huimv.xt.dataobject.XtSbcs;
  12. import com.huimv.xt.dataobject.XtSbcsExample;
  13. public class XtSbcsDAOImpl extends SqlMapClientDaoSupport implements XtSbcsDAO {
  14. /**
  15. * This method was generated by Apache iBATIS ibator.
  16. * This method corresponds to the database table xt_sbcs
  17. *
  18. * @ibatorgenerated Wed Jul 23 14:49:15 CST 2014
  19. */
  20. public XtSbcsDAOImpl() {
  21. super();
  22. }
  23. /**
  24. * This method was generated by Apache iBATIS ibator.
  25. * This method corresponds to the database table xt_sbcs
  26. *
  27. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  28. */
  29. public int countByExample(XtSbcsExample example) {
  30. Integer count = (Integer) getSqlMapClientTemplate().queryForObject("xt_sbcs.ibatorgenerated_countByExample", example);
  31. return count;
  32. }
  33. /**
  34. * This method was generated by Apache iBATIS ibator.
  35. * This method corresponds to the database table xt_sbcs
  36. *
  37. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  38. */
  39. public int deleteByExample(XtSbcsExample example) {
  40. int rows = getSqlMapClientTemplate().delete("xt_sbcs.ibatorgenerated_deleteByExample", example);
  41. return rows;
  42. }
  43. /**
  44. * This method was generated by Apache iBATIS ibator.
  45. * This method corresponds to the database table xt_sbcs
  46. *
  47. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  48. */
  49. public int deleteByPrimaryKey(Integer id) {
  50. XtSbcs key = new XtSbcs();
  51. key.setId(id);
  52. int rows = getSqlMapClientTemplate().delete("xt_sbcs.ibatorgenerated_deleteByPrimaryKey", key);
  53. return rows;
  54. }
  55. /**
  56. * This method was generated by Apache iBATIS ibator.
  57. * This method corresponds to the database table xt_sbcs
  58. *
  59. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  60. */
  61. public void insert(XtSbcs record) {
  62. getSqlMapClientTemplate().insert("xt_sbcs.ibatorgenerated_insert", record);
  63. }
  64. /**
  65. * This method was generated by Apache iBATIS ibator.
  66. * This method corresponds to the database table xt_sbcs
  67. *
  68. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  69. */
  70. public void insertSelective(XtSbcs record) {
  71. getSqlMapClientTemplate().insert("xt_sbcs.ibatorgenerated_insertSelective", record);
  72. }
  73. /**
  74. * This method was generated by Apache iBATIS ibator.
  75. * This method corresponds to the database table xt_sbcs
  76. *
  77. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  78. */
  79. @SuppressWarnings("unchecked")
  80. public List<XtSbcs> selectByExample(XtSbcsExample example) {
  81. List<XtSbcs> list = getSqlMapClientTemplate().queryForList("xt_sbcs.ibatorgenerated_selectByExample", example);
  82. return list;
  83. }
  84. /**
  85. * This method was generated by Apache iBATIS ibator.
  86. * This method corresponds to the database table xt_sbcs
  87. *
  88. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  89. */
  90. public XtSbcs selectByPrimaryKey(Integer id) {
  91. XtSbcs key = new XtSbcs();
  92. key.setId(id);
  93. XtSbcs record = (XtSbcs) getSqlMapClientTemplate().queryForObject("xt_sbcs.ibatorgenerated_selectByPrimaryKey", key);
  94. return record;
  95. }
  96. /**
  97. * This method was generated by Apache iBATIS ibator.
  98. * This method corresponds to the database table xt_sbcs
  99. *
  100. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  101. */
  102. public int updateByExampleSelective(XtSbcs record, XtSbcsExample example) {
  103. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  104. int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByExampleSelective", parms);
  105. return rows;
  106. }
  107. /**
  108. * This method was generated by Apache iBATIS ibator.
  109. * This method corresponds to the database table xt_sbcs
  110. *
  111. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  112. */
  113. public int updateByExample(XtSbcs record, XtSbcsExample example) {
  114. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  115. int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByExample", parms);
  116. return rows;
  117. }
  118. /**
  119. * This method was generated by Apache iBATIS ibator.
  120. * This method corresponds to the database table xt_sbcs
  121. *
  122. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  123. */
  124. public int updateByPrimaryKeySelective(XtSbcs record) {
  125. int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByPrimaryKeySelective", record);
  126. return rows;
  127. }
  128. /**
  129. * This method was generated by Apache iBATIS ibator.
  130. * This method corresponds to the database table xt_sbcs
  131. *
  132. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  133. */
  134. public int updateByPrimaryKey(XtSbcs record) {
  135. int rows = getSqlMapClientTemplate().update("xt_sbcs.ibatorgenerated_updateByPrimaryKey", record);
  136. return rows;
  137. }
  138. /**
  139. * This class was generated by Apache iBATIS ibator.
  140. * This class corresponds to the database table xt_sbcs
  141. *
  142. * @ibatorgenerated Wed Jul 23 14:49:16 CST 2014
  143. */
  144. private static class UpdateByExampleParms extends XtSbcsExample {
  145. private Object record;
  146. public UpdateByExampleParms(Object record, XtSbcsExample example) {
  147. super(example);
  148. this.record = record;
  149. }
  150. public Object getRecord() {
  151. return record;
  152. }
  153. }
  154. @Override
  155. public List<XtSbcs> selectXtsbcsByParam(Map<String, Object> searchParam) {
  156. List<XtSbcs> list = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SBCS_BY_PARAM,searchParam);
  157. return list;
  158. }
  159. @Override
  160. public int selectCountXtsbcsByParam(Map<String, Object> searchParam) {
  161. Integer count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SELECT_SBCS_BY_PARAM,searchParam);
  162. return count == null ? 0 : count;
  163. }
  164. @Override
  165. public int selectCountFwjlByParam(Map<String, Object> searchParam) {
  166. Integer count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SELECT_FWJL_BY_PARAM,searchParam);
  167. return count == null ? 0 : count;
  168. }
  169. @Override
  170. public String selectDqtzFwjlByParam(Map<String, Object> searchParam) {
  171. String dqtz = (String) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_DQTZ_FWJL_BY_PARAM,searchParam);
  172. return dqtz;
  173. };
  174. /**
  175. * 返回指定yjsb里面的最大ID
  176. */
  177. public int selectSbcsMaxId() {
  178. Integer count = (Integer) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_MAX_SBCS_ID);
  179. return count == null ? 0 : count;
  180. }
  181. public List<XtSbcs> selectTxtzByLqid(String lqid) {
  182. List<XtSbcs> list = new ArrayList<XtSbcs>();
  183. if (StringUtils.isNotEmpty(lqid) && Integer.parseInt(lqid) != 0) {
  184. list = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_TXTZ_SBCS_BY_LQID, lqid);
  185. }
  186. return list;
  187. }
  188. @Override
  189. public String selectLqidByJpid(Map<String, Object> searchParam) {
  190. String lqid = (String) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_LQID_BY_PARAM,searchParam);
  191. return lqid;
  192. }
  193. @SuppressWarnings("unchecked")
  194. public List<SjFwjl> selectPjtzByParam(Map<String, Object> searchParam) {
  195. List<SjFwjl> list = (List<SjFwjl>) getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_PJTZ_BY_PARAM,searchParam);
  196. return list;
  197. }
  198. @Override
  199. public DaLqda selectLqdaByJqid(Map<String, Object> searchParam) {
  200. DaLqda daLqda = (DaLqda) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_LQDA_BY_PARAM,searchParam);
  201. return daLqda;
  202. }
  203. public Date selectMaxFwsjByParam(Map<String, Object> searchParam) {
  204. Object obj = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_FWSJ_BY_PARAM, searchParam);
  205. if (obj != null) {
  206. return (Date)obj;
  207. } else {
  208. return null;
  209. }
  210. }
  211. public int selectIdByZsid(int zsid) {
  212. Object obj = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_SBCS_ID_BY_ZSID, zsid);
  213. if (obj == null) {
  214. return 0;
  215. }
  216. int id = (int) obj;
  217. return id;
  218. }
  219. /**
  220. * 根据JQID获取MCID
  221. * @param paramMap
  222. * @return
  223. */
  224. public int selectMcidByJqid (Map<String, Object> paramMap) {
  225. Object obj = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_SELECT_MCID_BY_JQID, paramMap);
  226. if (obj == null) {
  227. return 0;
  228. }
  229. int id = (int) obj;
  230. return id;
  231. }
  232. }