DailyRecordWindrainsnowFileDao.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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="cn.ourwill.module.house.dao.daily.DailyRecordWindrainsnowFileDao">
  4. <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnowFile" id="baseMap">
  5. <result column="id" property="id"/>
  6. <result column="uuid" property="uuid"/>
  7. <result column="house_id" property="houseId"/>
  8. <result column="check_date" property="checkDate"/>
  9. <result column="check_sign" property="checkSign"/>
  10. <result column="custodian_sign" property="custodianSign"/>
  11. <result column="remark" property="remark"/>
  12. <result column="pre_window_close" property="preWindowClose"/>
  13. <result column="pre_water_clean" property="preWaterClean"/>
  14. <result column="doing_weather" property="doingWeather"/>
  15. <result column="doing_window_close" property="doingWindowClose"/>
  16. <result column="doing_water_clean" property="doingWaterClean"/>
  17. <result column="doing_water_in" property="doingWaterIn"/>
  18. <result column="doing_water_in_position" property="doingWaterInPosition"/>
  19. <result column="doing_water_in_solution" property="doingWaterInSolution"/>
  20. <result column="post_check_date" property="postCheckDate"/>
  21. <result column="post_house_temp" property="postHouseTemp"/>
  22. <result column="post_house_water" property="postHouseWater"/>
  23. <result column="post_water_in" property="postWaterIn"/>
  24. <result column="post_water_in_position" property="postWaterInPosition"/>
  25. <result column="post_water_in_solution" property="postWaterInSolution"/>
  26. <result column="c_id" property="cId"/>
  27. <result column="c_time" property="cTime"/>
  28. <result column="u_id" property="uId"/>
  29. <result column="u_time" property="uTime"/>
  30. <result column="version" property="version"/>
  31. <result column="sync_flag" property="syncFlag"/>
  32. <result column="file_uuid" property="fileUuid"/>
  33. </resultMap>
  34. <sql id="columns">
  35. id ,
  36. uuid ,
  37. house_id ,
  38. check_date,
  39. check_sign,
  40. custodian_sign,
  41. remark,
  42. pre_window_close,
  43. pre_water_clean,
  44. doing_weather,
  45. doing_window_close,
  46. doing_water_clean,
  47. doing_water_in,
  48. doing_water_in_position,
  49. doing_water_in_solution,
  50. post_check_date,
  51. post_house_temp,
  52. post_house_water,
  53. post_water_in,
  54. post_water_in_position,
  55. post_water_in_solution,
  56. c_id ,
  57. c_time ,
  58. u_id ,
  59. u_time ,
  60. version,
  61. sync_flag,
  62. file_uuid
  63. </sql>
  64. <sql id="joinCols">
  65. </sql>
  66. <select id="getByUuid" resultMap="baseMap">
  67. SELECT
  68. <include refid="columns"/>
  69. FROM windrainsnow_check_file a
  70. <include refid="joinCols"/>
  71. WHERE a.uuid = #{uuid}
  72. </select>
  73. <select id="get" resultMap="baseMap">
  74. SELECT
  75. <include refid="columns"/>
  76. FROM windrainsnow_check_file a
  77. <include refid="joinCols"/>
  78. WHERE a.id = #{id}
  79. </select>
  80. <select id="findList" resultMap="baseMap">
  81. SELECT
  82. <include refid="columns"/>
  83. FROM windrainsnow_check_file a
  84. <include refid="joinCols"/>
  85. <where>
  86. <if test="id !=null">
  87. and id = #{id}
  88. </if>
  89. <if test="searchStartDate !=null">
  90. and STR_TO_DATE(check_date, '%Y-%m-%d') <![CDATA[ >= ]]> #{searchStartDate}
  91. </if>
  92. <if test="searchEndDate !=null">
  93. and STR_TO_DATE(check_date, '%Y-%m-%d') &lt;= #{searchEndDate}
  94. </if>
  95. <if test="uuid !=null">
  96. and uuid = #{uuid}
  97. </if>
  98. <if test="houseId !=null">
  99. and house_id = #{houseId}
  100. </if>
  101. <if test="checkDate !=null">
  102. and check_date = #{checkDate}
  103. </if>
  104. <if test="checkSign !=null">
  105. and check_sign = #{checkSign}
  106. </if>
  107. <if test="custodianSign !=null">
  108. and custodian_sign = #{custodianSign}
  109. </if>
  110. <if test="remark !=null">
  111. and remark = #{remark}
  112. </if>
  113. <if test="preWindowClose !=null">
  114. and pre_window_close = #{preWindowClose}
  115. </if>
  116. <if test="preWaterClean !=null">
  117. and pre_water_clean = #{preWaterClean}
  118. </if>
  119. <if test="doingWeather !=null">
  120. and doing_weather = #{doingWeather}
  121. </if>
  122. <if test="doingWindowClose !=null">
  123. and doing_window_close = #{doingWindowClose}
  124. </if>
  125. <if test="doingWaterClean !=null">
  126. and doing_water_clean = #{doingWaterClean}
  127. </if>
  128. <if test="doingWaterIn !=null">
  129. and doing_water_in = #{doingWaterIn}
  130. </if>
  131. <if test="doingWaterInPosition !=null">
  132. and doing_water_in_position = #{doingWaterInPosition}
  133. </if>
  134. <if test="doingWaterInSolution !=null">
  135. and doing_water_in_solution = #{doingWaterInSolution}
  136. </if>
  137. <if test="postCheckDate !=null">
  138. and post_check_date = #{postCheckDate}
  139. </if>
  140. <if test="postHouseTemp !=null">
  141. and post_house_temp = #{postHouseTemp}
  142. </if>
  143. <if test="postHouseWater !=null">
  144. and post_house_water = #{postHouseWater}
  145. </if>
  146. <if test="postWaterIn !=null">
  147. and post_water_in = #{postWaterIn}
  148. </if>
  149. <if test="postWaterInPosition !=null">
  150. and post_water_in_position = #{postWaterInPosition}
  151. </if>
  152. <if test="postWaterInSolution !=null">
  153. and post_water_in_solution = #{postWaterInSolution}
  154. </if>
  155. <if test="cId !=null">
  156. and c_id = #{cId}
  157. </if>
  158. <if test="cTime !=null">
  159. and c_time = #{cTime}
  160. </if>
  161. <if test="uId !=null">
  162. and u_id = #{uId}
  163. </if>
  164. <if test="uTime !=null">
  165. and u_time = #{uTime}
  166. </if>
  167. <if test="version !=null">
  168. and version = #{version}
  169. </if>
  170. <if test="syncFlag !=null">
  171. and sync_flag = #{syncFlag}
  172. </if>
  173. <if test="fileUuid !=null">
  174. and file_uuid = #{fileUuid}
  175. </if>
  176. </where>
  177. <choose>
  178. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  179. ORDER BY ${page.orderBy}
  180. </when>
  181. <otherwise>
  182. order by id desc
  183. </otherwise>
  184. </choose>
  185. </select>
  186. <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
  187. parameterType="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnowFile">
  188. INSERT INTO windrainsnow_check_file
  189. <trim prefix="(" suffix=")" suffixOverrides=",">
  190. <!-- <if test=" id != null">
  191. id,
  192. </if>-->
  193. <if test="uuid != null">
  194. uuid,
  195. </if>
  196. <if test="houseId != null">
  197. house_id,
  198. </if>
  199. <if test="checkDate !=null">
  200. check_date,
  201. </if>
  202. <if test="checkSign !=null">
  203. check_sign,
  204. </if>
  205. <if test="custodianSign !=null">
  206. custodian_sign,
  207. </if>
  208. <if test="remark !=null">
  209. remark,
  210. </if>
  211. <if test="preWindowClose !=null">
  212. pre_window_close,
  213. </if>
  214. <if test="preWaterClean !=null">
  215. pre_water_clean,
  216. </if>
  217. <if test="doingWeather !=null">
  218. doing_weather,
  219. </if>
  220. <if test="doingWindowClose !=null">
  221. doing_window_close,
  222. </if>
  223. <if test="doingWaterClean !=null">
  224. doing_water_clean,
  225. </if>
  226. <if test="doingWaterIn !=null">
  227. doing_water_in,
  228. </if>
  229. <if test="doingWaterInPosition !=null">
  230. doing_water_in_position,
  231. </if>
  232. <if test="doingWaterInSolution !=null">
  233. doing_water_in_solution,
  234. </if>
  235. <if test="postCheckDate !=null">
  236. post_check_date,
  237. </if>
  238. <if test="postHouseTemp !=null">
  239. post_house_temp,
  240. </if>
  241. <if test="postHouseWater !=null">
  242. post_house_water,
  243. </if>
  244. <if test="postWaterIn !=null">
  245. post_water_in,
  246. </if>
  247. <if test="postWaterInPosition !=null">
  248. post_water_in_position,
  249. </if>
  250. <if test="postWaterInSolution !=null">
  251. post_water_in_solution,
  252. </if>
  253. <if test="cId !=null">
  254. c_id,
  255. </if>
  256. <if test="cTime !=null">
  257. c_time,
  258. </if>
  259. <if test="uId !=null">
  260. u_id,
  261. </if>
  262. <if test="uTime !=null">
  263. u_time,
  264. </if>
  265. <if test="version !=null">
  266. version,
  267. </if>
  268. <if test="syncFlag !=null">
  269. sync_flag,
  270. </if>
  271. <if test="fileUuid !=null">
  272. file_uuid,
  273. </if>
  274. </trim>
  275. <trim prefix="values (" suffix=")" suffixOverrides=",">
  276. <!--<if test="id !=null">
  277. #{id},
  278. </if>-->
  279. <if test=" uuid != null">
  280. #{uuid}, </if>
  281. <if test=" houseId != null">
  282. #{houseId}, </if>
  283. <if test="checkDate !=null">
  284. #{checkDate},
  285. </if>
  286. <if test="checkSign !=null">
  287. #{checkSign},
  288. </if>
  289. <if test="custodianSign !=null">
  290. #{custodianSign},
  291. </if>
  292. <if test="remark !=null">
  293. #{remark},
  294. </if>
  295. <if test="preWindowClose !=null">
  296. #{preWindowClose},
  297. </if>
  298. <if test="preWaterClean !=null">
  299. #{preWaterClean},
  300. </if>
  301. <if test="doingWeather !=null">
  302. #{doingWeather},
  303. </if>
  304. <if test="doingWindowClose !=null">
  305. #{doingWindowClose},
  306. </if>
  307. <if test="doingWaterClean !=null">
  308. #{doingWaterClean},
  309. </if>
  310. <if test="doingWaterIn !=null">
  311. #{doingWaterIn},
  312. </if>
  313. <if test="doingWaterInPosition !=null">
  314. #{doingWaterInPosition},
  315. </if>
  316. <if test="doingWaterInSolution !=null">
  317. #{doingWaterInSolution},
  318. </if>
  319. <if test="postCheckDate !=null">
  320. #{postCheckDate},
  321. </if>
  322. <if test="postHouseTemp !=null">
  323. #{postHouseTemp},
  324. </if>
  325. <if test="postHouseWater !=null">
  326. #{postHouseWater},
  327. </if>
  328. <if test="postWaterIn !=null">
  329. #{postWaterIn},
  330. </if>
  331. <if test="postWaterInPosition !=null">
  332. #{postWaterInPosition},
  333. </if>
  334. <if test="postWaterInSolution !=null">
  335. #{postWaterInSolution},
  336. </if>
  337. <if test="cId !=null">
  338. #{cId},
  339. </if>
  340. <if test="cTime !=null">
  341. #{cTime},
  342. </if>
  343. <if test="uId !=null">
  344. #{uId},
  345. </if>
  346. <if test="uTime !=null">
  347. #{uTime},
  348. </if>
  349. <if test="version !=null">
  350. #{version},
  351. </if>
  352. <if test="syncFlag !=null">
  353. #{syncFlag},
  354. </if>
  355. <if test="fileUuid !=null">
  356. #{fileUuid}
  357. </if>
  358. </trim>
  359. </insert>
  360. </mapper>