APlanZhuzaoMapper.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="net.lab1024.smartadmin.module.longgang.zhuzao.dao.APlanZhuzaoDao">
  4. <resultMap id="APlanZhuzaoVO" type="net.lab1024.smartadmin.module.longgang.zhuzao.domain.vo.APlanZhuzaoVO"></resultMap>
  5. <resultMap id="APlanZhuzaoExcelVO" type="net.lab1024.smartadmin.module.longgang.zhuzao.domain.vo.APlanZhuzaoExcelVO"></resultMap>
  6. <select id="queryByPage" resultMap="APlanZhuzaoVO">
  7. select
  8. id,
  9. order_shengchan_id,
  10. order_sale_id,
  11. wuliao_id,
  12. wuliao_name,
  13. guige_xinghao,
  14. if_convert,
  15. convert_type,
  16. convert_plan_id,
  17. department,
  18. shengchan_shuliang,
  19. status,
  20. remarks,
  21. create_date,
  22. create_by,
  23. update_by,
  24. update_date,
  25. del_flag,
  26. cfree1,
  27. cfree2,
  28. cfree3,
  29. cfree4,
  30. cfree5,
  31. cfree6,
  32. cfree7,
  33. cfree8,
  34. cfree9,
  35. cfree10,
  36. cfree11,
  37. cfree12,
  38. cfree13,
  39. cfree14,
  40. cfree15,
  41. cfree16,
  42. cfree17,
  43. cfree18,
  44. cfree19,
  45. wangong_time,
  46. kaigong_time,
  47. cfree20,
  48. jihua_shuliang,
  49. shuju_type,
  50. jihua_id,
  51. shengchan_chejian
  52. from a_plan_zhuzao
  53. <where>
  54. del_flag='0'
  55. <if test="queryDTO.id != null">
  56. AND id = #{queryDTO.id}
  57. </if>
  58. <if test="queryDTO.orderShengchanId != null and queryDTO.orderShengchanId != ''">
  59. AND order_shengchan_id = #{queryDTO.orderShengchanId}
  60. </if>
  61. <if test="queryDTO.orderSaleId != null and queryDTO.orderSaleId != ''">
  62. AND order_sale_id = #{queryDTO.orderSaleId}
  63. </if>
  64. <if test="queryDTO.wuliaoId != null and queryDTO.wuliaoId != ''">
  65. AND wuliao_id = #{queryDTO.wuliaoId}
  66. </if>
  67. <if test="queryDTO.wuliaoName != null and queryDTO.wuliaoName != ''">
  68. AND wuliao_name = #{queryDTO.wuliaoName}
  69. </if>
  70. <if test="queryDTO.guigeXinghao != null and queryDTO.guigeXinghao != ''">
  71. AND guige_xinghao = #{queryDTO.guigeXinghao}
  72. </if>
  73. <if test="queryDTO.statusList !=null and queryDTO.statusList.size() > 0">
  74. and status in
  75. <foreach collection="queryDTO.statusList" open="(" index="index" separator="," close=")" item="item">
  76. #{item}
  77. </foreach>
  78. </if>
  79. <if test="queryDTO.shujuTypeList !=null and queryDTO.shujuTypeList.size() > 0">
  80. and shuju_type in
  81. <foreach collection="queryDTO.shujuTypeList" open="(" index="index" separator="," close=")" item="item">
  82. #{item}
  83. </foreach>
  84. </if>
  85. <if test="queryDTO.createTimeBegin != null ">
  86. AND create_time &gt;= #{queryDTO.createTimeBegin}
  87. </if>
  88. <if test="queryDTO.createTimeEnd != null ">
  89. AND create_time &lt;= #{queryDTO.createTimeEnd}
  90. </if>
  91. <if test="queryDTO.updateTimeBegin != null ">
  92. AND update_time &gt;= #{queryDTO.updateTimeBegin}
  93. </if>
  94. <if test="queryDTO.updateTimeEnd != null ">
  95. AND update_time &lt;= #{queryDTO.updateTimeEnd}
  96. </if>
  97. </where>
  98. </select>
  99. <select id="queryAllExportData" resultMap="APlanZhuzaoExcelVO">
  100. select
  101. id,
  102. order_shengchan_id,
  103. order_sale_id,
  104. wuliao_id,
  105. wuliao_name,
  106. guige_xinghao,
  107. if_convert,
  108. convert_type,
  109. convert_plan_id,
  110. department,
  111. shengchan_shuliang,
  112. status,
  113. remarks,
  114. create_date,
  115. create_by,
  116. update_by,
  117. update_date,
  118. del_flag,
  119. cfree1,
  120. cfree2,
  121. cfree3,
  122. cfree4,
  123. cfree5,
  124. cfree6,
  125. cfree7,
  126. cfree8,
  127. cfree9,
  128. cfree10,
  129. cfree11,
  130. cfree12,
  131. cfree13,
  132. cfree14,
  133. cfree15,
  134. cfree16,
  135. cfree17,
  136. cfree18,
  137. cfree19,
  138. wangong_time,
  139. kaigong_time,
  140. cfree20,
  141. jihua_shuliang,
  142. shuju_type,
  143. jihua_id,
  144. shengchan_chejian
  145. from a_plan_zhuzao
  146. <where>
  147. del_flag='0'
  148. <if test="queryDTO.id != null">
  149. AND id = #{queryDTO.id}
  150. </if>
  151. <if test="queryDTO.orderShengchanId != null and queryDTO.orderShengchanId != ''">
  152. AND order_shengchan_id = #{queryDTO.orderShengchanId}
  153. </if>
  154. <if test="queryDTO.orderSaleId != null and queryDTO.orderSaleId != ''">
  155. AND order_sale_id = #{queryDTO.orderSaleId}
  156. </if>
  157. <if test="queryDTO.wuliaoId != null and queryDTO.wuliaoId != ''">
  158. AND wuliao_id = #{queryDTO.wuliaoId}
  159. </if>
  160. <if test="queryDTO.wuliaoName != null and queryDTO.wuliaoName != ''">
  161. AND wuliao_name = #{queryDTO.wuliaoName}
  162. </if>
  163. <if test="queryDTO.guigeXinghao != null and queryDTO.guigeXinghao != ''">
  164. AND guige_xinghao = #{queryDTO.guigeXinghao}
  165. </if>
  166. <if test="queryDTO.statusList !=null and queryDTO.statusList.size() > 0">
  167. and status in
  168. <foreach collection="queryDTO.statusList" open="(" index="index" separator="," close=")" item="item">
  169. #{item}
  170. </foreach>
  171. </if>
  172. <if test="queryDTO.shujuTypeList !=null and queryDTO.shujuTypeList.size() > 0">
  173. and shuju_type in
  174. <foreach collection="queryDTO.shujuTypeList" open="(" index="index" separator="," close=")" item="item">
  175. #{item}
  176. </foreach>
  177. </if>
  178. <if test="queryDTO.createTimeBegin != null ">
  179. AND create_time &gt;= #{queryDTO.createTimeBegin}
  180. </if>
  181. <if test="queryDTO.createTimeEnd != null ">
  182. AND create_time &lt;= #{queryDTO.createTimeEnd}
  183. </if>
  184. <if test="queryDTO.updateTimeBegin != null ">
  185. AND update_time &gt;= #{queryDTO.updateTimeBegin}
  186. </if>
  187. <if test="queryDTO.updateTimeEnd != null ">
  188. AND update_time &lt;= #{queryDTO.updateTimeEnd}
  189. </if>
  190. </where>
  191. </select>
  192. <select id="queryBatchExportData" resultMap="APlanZhuzaoExcelVO">
  193. select
  194. id,
  195. order_shengchan_id,
  196. order_sale_id,
  197. wuliao_id,
  198. wuliao_name,
  199. guige_xinghao,
  200. if_convert,
  201. convert_type,
  202. convert_plan_id,
  203. department,
  204. shengchan_shuliang,
  205. status,
  206. remarks,
  207. create_date,
  208. create_by,
  209. update_by,
  210. update_date,
  211. del_flag,
  212. cfree1,
  213. cfree2,
  214. cfree3,
  215. cfree4,
  216. cfree5,
  217. cfree6,
  218. cfree7,
  219. cfree8,
  220. cfree9,
  221. cfree10,
  222. cfree11,
  223. cfree12,
  224. cfree13,
  225. cfree14,
  226. cfree15,
  227. cfree16,
  228. cfree17,
  229. cfree18,
  230. cfree19,
  231. wangong_time,
  232. kaigong_time,
  233. cfree20,
  234. jihua_shuliang,
  235. shuju_type,
  236. jihua_id,
  237. shengchan_chejian
  238. from a_plan_zhuzao
  239. where id in
  240. <foreach collection="idList" open="(" close=")" separator="," item="item">
  241. #{item}
  242. </foreach>
  243. </select>
  244. <delete id="deleteById">
  245. delete from a_plan_zhuzao where id = #{id}
  246. </delete>
  247. <delete id="deleteByIdList">
  248. delete from a_plan_zhuzao where id in
  249. <foreach collection="idList" open="(" close=")" separator="," item="item">
  250. #{item}
  251. </foreach>
  252. </delete>
  253. </mapper>