SjlrPzjlDAOImpl.java 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. package com.huimv.sjlr.dao;
  2. import java.util.List;
  3. import java.util.Map;
  4. import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
  5. import com.huimv.busi.xt.constant.XtSqlMapConstant;
  6. import com.huimv.sjlr.dataobject.SjlrMzda;
  7. import com.huimv.sjlr.dataobject.SjlrPzjl;
  8. import com.huimv.sjlr.dataobject.SjlrPzjlExample;
  9. public class SjlrPzjlDAOImpl extends SqlMapClientDaoSupport implements SjlrPzjlDAO {
  10. /**
  11. * This method was generated by Apache iBATIS ibator.
  12. * This method corresponds to the database table sjlr_pzjl
  13. *
  14. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  15. */
  16. public SjlrPzjlDAOImpl() {
  17. super();
  18. }
  19. /**
  20. * This method was generated by Apache iBATIS ibator.
  21. * This method corresponds to the database table sjlr_pzjl
  22. *
  23. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  24. */
  25. public int countByExample(SjlrPzjlExample example) {
  26. Integer count = (Integer) getSqlMapClientTemplate().queryForObject("sjlr_pzjl.ibatorgenerated_countByExample", example);
  27. return count;
  28. }
  29. /**
  30. * This method was generated by Apache iBATIS ibator.
  31. * This method corresponds to the database table sjlr_pzjl
  32. *
  33. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  34. */
  35. public int deleteByExample(SjlrPzjlExample example) {
  36. int rows = getSqlMapClientTemplate().delete("sjlr_pzjl.ibatorgenerated_deleteByExample", example);
  37. return rows;
  38. }
  39. /**
  40. * This method was generated by Apache iBATIS ibator.
  41. * This method corresponds to the database table sjlr_pzjl
  42. *
  43. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  44. */
  45. public int deleteByPrimaryKey(Integer id) {
  46. SjlrPzjl key = new SjlrPzjl();
  47. key.setId(id);
  48. int rows = getSqlMapClientTemplate().delete("sjlr_pzjl.ibatorgenerated_deleteByPrimaryKey", key);
  49. return rows;
  50. }
  51. /**
  52. * This method was generated by Apache iBATIS ibator.
  53. * This method corresponds to the database table sjlr_pzjl
  54. *
  55. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  56. */
  57. public void insert(SjlrPzjl record) {
  58. getSqlMapClientTemplate().insert("sjlr_pzjl.ibatorgenerated_insert", record);
  59. }
  60. /**
  61. * This method was generated by Apache iBATIS ibator.
  62. * This method corresponds to the database table sjlr_pzjl
  63. *
  64. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  65. */
  66. public void insertSelective(SjlrPzjl record) {
  67. getSqlMapClientTemplate().insert("sjlr_pzjl.ibatorgenerated_insertSelective", record);
  68. }
  69. /**
  70. * This method was generated by Apache iBATIS ibator.
  71. * This method corresponds to the database table sjlr_pzjl
  72. *
  73. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  74. */
  75. @SuppressWarnings("unchecked")
  76. public List<SjlrPzjl> selectByExample(SjlrPzjlExample example) {
  77. List<SjlrPzjl> list = getSqlMapClientTemplate().queryForList("sjlr_pzjl.ibatorgenerated_selectByExample", example);
  78. return list;
  79. }
  80. /**
  81. * This method was generated by Apache iBATIS ibator.
  82. * This method corresponds to the database table sjlr_pzjl
  83. *
  84. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  85. */
  86. public SjlrPzjl selectByPrimaryKey(Integer id) {
  87. SjlrPzjl key = new SjlrPzjl();
  88. key.setId(id);
  89. SjlrPzjl record = (SjlrPzjl) getSqlMapClientTemplate().queryForObject("sjlr_pzjl.ibatorgenerated_selectByPrimaryKey", key);
  90. return record;
  91. }
  92. /**
  93. * This method was generated by Apache iBATIS ibator.
  94. * This method corresponds to the database table sjlr_pzjl
  95. *
  96. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  97. */
  98. public int updateByExampleSelective(SjlrPzjl record, SjlrPzjlExample example) {
  99. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  100. int rows = getSqlMapClientTemplate().update("sjlr_pzjl.ibatorgenerated_updateByExampleSelective", parms);
  101. return rows;
  102. }
  103. /**
  104. * This method was generated by Apache iBATIS ibator.
  105. * This method corresponds to the database table sjlr_pzjl
  106. *
  107. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  108. */
  109. public int updateByExample(SjlrPzjl record, SjlrPzjlExample example) {
  110. UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
  111. int rows = getSqlMapClientTemplate().update("sjlr_pzjl.ibatorgenerated_updateByExample", parms);
  112. return rows;
  113. }
  114. /**
  115. * This method was generated by Apache iBATIS ibator.
  116. * This method corresponds to the database table sjlr_pzjl
  117. *
  118. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  119. */
  120. public int updateByPrimaryKeySelective(SjlrPzjl record) {
  121. int rows = getSqlMapClientTemplate().update("sjlr_pzjl.ibatorgenerated_updateByPrimaryKeySelective", record);
  122. return rows;
  123. }
  124. /**
  125. * This method was generated by Apache iBATIS ibator.
  126. * This method corresponds to the database table sjlr_pzjl
  127. *
  128. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  129. */
  130. public int updateByPrimaryKey(SjlrPzjl record) {
  131. int rows = getSqlMapClientTemplate().update("sjlr_pzjl.ibatorgenerated_updateByPrimaryKey", record);
  132. return rows;
  133. }
  134. /**
  135. * This class was generated by Apache iBATIS ibator.
  136. * This class corresponds to the database table sjlr_pzjl
  137. *
  138. * @ibatorgenerated Wed Mar 08 10:44:06 CST 2017
  139. */
  140. private static class UpdateByExampleParms extends SjlrPzjlExample {
  141. private Object record;
  142. public UpdateByExampleParms(Object record, SjlrPzjlExample example) {
  143. super(example);
  144. this.record = record;
  145. }
  146. public Object getRecord() {
  147. return record;
  148. }
  149. }
  150. /**
  151. * 查询配种记录
  152. * @param paramMap
  153. * @return
  154. */
  155. public List<SjlrPzjl> selectPzjlListByParam(Map<String, Object> paramMap) {
  156. @SuppressWarnings("unchecked")
  157. List<SjlrPzjl> pzjlList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_PZJL_BY_PARAM, paramMap);
  158. return pzjlList;
  159. }
  160. /**
  161. * 母猪查询列表
  162. * @param paramMap
  163. * @return
  164. */
  165. public List<SjlrMzda> selectPzjlMzdaListByParam(Map<String, Object> paramMap) {
  166. @SuppressWarnings("unchecked")
  167. List<SjlrMzda> mzdaList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_PZJL_MZLIST_BY_PARAM, paramMap);
  168. return mzdaList;
  169. }
  170. /**
  171. * 统计配种数
  172. * @param paramMap
  173. * @return
  174. */
  175. public int countPzjlByParam(Map<String, Object> paramMap) {
  176. Object count = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SJLR_PZJL_BY_PARAM, paramMap);
  177. if (count != null) {
  178. return (int) count;
  179. } else {
  180. return 0;
  181. }
  182. }
  183. /**
  184. * 统计配种分娩数
  185. * @param paramMap
  186. * @return
  187. */
  188. public int countPzFmByParam(Map<String, Object> paramMap) {
  189. Object count = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SJLR_PZFM_BY_PARAM, paramMap);
  190. if (count != null) {
  191. return (int) count;
  192. } else {
  193. return 0;
  194. }
  195. }
  196. /**
  197. * 统计配种胎次
  198. * @param paramMap
  199. * @return
  200. */
  201. public int countPztcByParam(Map<String, Object> paramMap) {
  202. Object count = getSqlMapClientTemplate().queryForObject(XtSqlMapConstant.SQLMAP_COUNT_SJLR_PZTC_BY_PARAM, paramMap);
  203. if (count != null) {
  204. return (int) count;
  205. } else {
  206. return 0;
  207. }
  208. }
  209. /**
  210. * 配种记录新增查询舍栏和胎次
  211. * @param paramMap
  212. * @return
  213. */
  214. public List<SjlrPzjl> selectPzjlAddByParam(Map<String, Object> paramMap) {
  215. @SuppressWarnings("unchecked")
  216. List<SjlrPzjl> pzjlList = getSqlMapClientTemplate().queryForList(XtSqlMapConstant.SQLMAP_SELECT_SJLR_PZJLADD_BY_PARAM, paramMap);
  217. return pzjlList;
  218. }
  219. }