DaLqwhxxDAOImpl.java 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. package com.huimv.da.dao;
  2. import com.huimv.busi.da.dto.DaDwsDTO;
  3. import com.huimv.busi.xt.constant.XtSqlMapConstant;
  4. import com.huimv.da.dataobject.DaLqwhxx;
  5. import com.huimv.da.dataobject.DaLqwhxxExample;
  6. import java.util.List;
  7. import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
  8. public class DaLqwhxxDAOImpl extends SqlMapClientDaoSupport implements DaLqwhxxDAO {
  9. /**
  10. * This method was generated by Apache iBATIS ibator.
  11. * This method corresponds to the database table da_lqwhxx
  12. *
  13. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  14. */
  15. public DaLqwhxxDAOImpl() {
  16. super();
  17. }
  18. /**
  19. * This method was generated by Apache iBATIS ibator.
  20. * This method corresponds to the database table da_lqwhxx
  21. *
  22. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  23. */
  24. public int countByExample(DaLqwhxxExample example) {
  25. Integer count = (Integer) getSqlMapClientTemplate().queryForObject("da_lqwhxx.ibatorgenerated_countByExample", example);
  26. return count;
  27. }
  28. /**
  29. * This method was generated by Apache iBATIS ibator.
  30. * This method corresponds to the database table da_lqwhxx
  31. *
  32. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  33. */
  34. public int deleteByExample(DaLqwhxxExample example) {
  35. int rows = getSqlMapClientTemplate().delete("da_lqwhxx.ibatorgenerated_deleteByExample", example);
  36. return rows;
  37. }
  38. /**
  39. * This method was generated by Apache iBATIS ibator.
  40. * This method corresponds to the database table da_lqwhxx
  41. *
  42. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  43. */
  44. public int deleteByPrimaryKey(Integer id) {
  45. DaLqwhxx key = new DaLqwhxx();
  46. key.setId(id);
  47. int rows = getSqlMapClientTemplate().delete("da_lqwhxx.ibatorgenerated_deleteByPrimaryKey", key);
  48. return rows;
  49. }
  50. /**
  51. * This method was generated by Apache iBATIS ibator.
  52. * This method corresponds to the database table da_lqwhxx
  53. *
  54. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  55. */
  56. public void insert(DaLqwhxx record) {
  57. getSqlMapClientTemplate().insert("da_lqwhxx.ibatorgenerated_insert", record);
  58. }
  59. /**
  60. * This method was generated by Apache iBATIS ibator.
  61. * This method corresponds to the database table da_lqwhxx
  62. *
  63. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  64. */
  65. public void insertSelective(DaLqwhxx record) {
  66. getSqlMapClientTemplate().insert("da_lqwhxx.ibatorgenerated_insertSelective", record);
  67. }
  68. /**
  69. * This method was generated by Apache iBATIS ibator.
  70. * This method corresponds to the database table da_lqwhxx
  71. *
  72. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  73. */
  74. @SuppressWarnings("unchecked")
  75. public List<DaLqwhxx> selectByExample(DaLqwhxxExample example) {
  76. List<DaLqwhxx> list = getSqlMapClientTemplate().queryForList("da_lqwhxx.ibatorgenerated_selectByExample", example);
  77. return list;
  78. }
  79. /**
  80. * This method was generated by Apache iBATIS ibator.
  81. * This method corresponds to the database table da_lqwhxx
  82. *
  83. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  84. */
  85. public DaLqwhxx selectByPrimaryKey(Integer id) {
  86. DaLqwhxx key = new DaLqwhxx();
  87. key.setId(id);
  88. DaLqwhxx record = (DaLqwhxx) getSqlMapClientTemplate().queryForObject("da_lqwhxx.ibatorgenerated_selectByPrimaryKey", key);
  89. return record;
  90. }
  91. /**
  92. * This method was generated by Apache iBATIS ibator.
  93. * This method corresponds to the database table da_lqwhxx
  94. *
  95. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  96. */
  97. public int updateByExampleSelective(DaLqwhxx record, DaLqwhxxExample example) {
  98. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  99. int rows = getSqlMapClientTemplate().update("da_lqwhxx.ibatorgenerated_updateByExampleSelective", parms);
  100. return rows;
  101. }
  102. /**
  103. * This method was generated by Apache iBATIS ibator.
  104. * This method corresponds to the database table da_lqwhxx
  105. *
  106. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  107. */
  108. public int updateByExample(DaLqwhxx record, DaLqwhxxExample example) {
  109. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  110. int rows = getSqlMapClientTemplate().update("da_lqwhxx.ibatorgenerated_updateByExample", parms);
  111. return rows;
  112. }
  113. /**
  114. * This method was generated by Apache iBATIS ibator.
  115. * This method corresponds to the database table da_lqwhxx
  116. *
  117. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  118. */
  119. public int updateByPrimaryKeySelective(DaLqwhxx record) {
  120. int rows = getSqlMapClientTemplate().update("da_lqwhxx.ibatorgenerated_updateByPrimaryKeySelective", record);
  121. return rows;
  122. }
  123. /**
  124. * This method was generated by Apache iBATIS ibator.
  125. * This method corresponds to the database table da_lqwhxx
  126. *
  127. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  128. */
  129. public int updateByPrimaryKey(DaLqwhxx record) {
  130. int rows = getSqlMapClientTemplate().update("da_lqwhxx.ibatorgenerated_updateByPrimaryKey", record);
  131. return rows;
  132. }
  133. /**
  134. * This class was generated by Apache iBATIS ibator.
  135. * This class corresponds to the database table da_lqwhxx
  136. *
  137. * @ibatorgenerated Fri May 23 16:56:30 CST 2014
  138. */
  139. private static class UpdateByExampleParms extends DaLqwhxxExample {
  140. private Object record;
  141. public UpdateByExampleParms(Object record, DaLqwhxxExample example) {
  142. super(example);
  143. this.record = record;
  144. }
  145. @SuppressWarnings("unused")
  146. public Object getRecord() {
  147. return record;
  148. }
  149. }
  150. /**
  151. * 选择栏期维护列表
  152. */
  153. @SuppressWarnings("unchecked")
  154. public List<DaLqwhxx> selectMCZSLQLQWHByExample(DaLqwhxxExample example) {
  155. List<DaLqwhxx> list = getSqlMapClientTemplate().queryForList("da_lqwhxx.ibatorgenerated_selectMCZSLQLQWHByExample", example);
  156. return list;
  157. }
  158. /**
  159. * 计算动物数量
  160. */
  161. public DaDwsDTO selectDwsFromDaLqwhxxByLqid(Integer lqid) {
  162. DaLqwhxx key = new DaLqwhxx();
  163. key.setLqid(lqid);
  164. DaDwsDTO record = (DaDwsDTO) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.DWS_SELECT_LQWHXX_BY_LQID, key.getLqid());
  165. return record;
  166. }
  167. /**
  168. * 根据lqid和发生时间计算动物数量
  169. * @param record
  170. * @return
  171. */
  172. public DaDwsDTO selectDwsFromDaLqwhxxByLqidAndFssj(DaLqwhxx record) {
  173. DaDwsDTO daDwsDTO = (DaDwsDTO) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.DWS_SELECT_LQWHXX_BY_LQID_FSSJ, record);
  174. return daDwsDTO;
  175. }
  176. /**
  177. * 选择栏期维护
  178. */
  179. public DaLqwhxx selectDaLqwhxxByLqid(Integer lqid) {
  180. DaLqwhxx key = new DaLqwhxx();
  181. key.setLqid(lqid);
  182. DaLqwhxx record = (DaLqwhxx) getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.ID_SELECT_LQWHXX_BY_LQID, key.getLqid());
  183. return record;
  184. }
  185. /**
  186. * 更新栏期维护
  187. */
  188. public int updateZlsByDaLqwhxxId(Integer id) {
  189. int rows = getSqlMapClientTemplate().update(XtSqlMapConstant.ZLS_UPDATE_LQWHXX_BY_ID, id);
  190. return rows;
  191. }
  192. }