InspectionPlanV1ServiceDaoImplMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <mapper namespace="inspectionPlanV1ServiceDaoImpl">
  5. <!-- 保存巡检计划信息 add by wuxw 2018-07-03 -->
  6. <insert id="saveInspectionPlanInfo" parameterType="Map">
  7. insert into inspection_plan(inspection_plan_name, create_user_id, inspection_route_id, inspection_plan_period,
  8. remark, create_user_name, sign_type, start_time, inspection_plan_id, end_time,
  9. state, community_id, start_date, end_date, inspection_month, inspection_day,
  10. inspection_workday, before_time, can_reexamine)
  11. values (#{inspectionPlanName}, #{createUserId}, #{inspectionRouteId}, #{inspectionPlanPeriod}, #{remark},
  12. #{createUserName}, #{signType}, #{startTime}, #{inspectionPlanId}, #{endTime}, #{state}, #{communityId},
  13. #{startDate}, #{endDate}, #{inspectionMonth}, #{inspectionDay}, #{inspectionWorkday}, #{beforeTime},
  14. #{canReexamine})
  15. </insert>
  16. <!-- 查询巡检计划信息 add by wuxw 2018-07-03 -->
  17. <select id="getInspectionPlanInfo" parameterType="Map" resultType="Map">
  18. select t.inspection_plan_name,t.inspection_plan_name inspectionPlanName,t.create_user_id,t.create_user_id
  19. createUserId,t.inspection_route_id,t.inspection_route_id inspectionRouteId
  20. ,t.can_reexamine,t.can_reexamine canReexamine,t.inspection_plan_period,t.inspection_plan_period
  21. inspectionPlanPeriod,t.remark,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd
  22. statusCd,t.sign_type,t.sign_type signType,t.start_time,t.start_time
  23. startTime,t.inspection_plan_id,t.inspection_plan_id inspectionPlanId,t.end_time,t.end_time
  24. endTime,t.state,t.community_id,t.community_id communityId,
  25. DATE_FORMAT(t.start_date,'%Y-%m-%d') startDate,DATE_FORMAT(t.end_date,'%Y-%m-%d') endDate,t.inspection_month inspectionMonth,t.inspection_day inspectionDay,
  26. t.inspection_workday inspectionWorkday,t.before_time beforeTime,t.create_time createTime,
  27. d.name stateName,
  28. c.name inspectionPlanPeriodName,
  29. i.name signTypeName,
  30. ir.route_name inspectionRouteName
  31. from inspection_plan t
  32. left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0'
  33. inner join t_dict d on t.state = d.status_cd and d.table_name = 'inspection_plan' and d.table_columns = 'state'
  34. inner join t_dict c on t.inspection_plan_period = c.status_cd and c.table_name = 'inspection_plan' and
  35. c.table_columns = 'inspection_plan_period'
  36. inner join t_dict i on t.sign_type = i.status_cd and i.table_name = 'inspection_plan' and i.table_columns =
  37. 'sign_type'
  38. where 1 =1
  39. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  40. and t.inspection_plan_name= #{inspectionPlanName}
  41. </if>
  42. <if test="createUserId !=null and createUserId != ''">
  43. and t.create_user_id= #{createUserId}
  44. </if>
  45. <if test="canReexamine !=null and canReexamine != ''">
  46. and t.can_reexamine= #{canReexamine}
  47. </if>
  48. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  49. and t.inspection_route_id= #{inspectionRouteId}
  50. </if>
  51. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  52. and t.inspection_plan_period= #{inspectionPlanPeriod}
  53. </if>
  54. <if test="remark !=null and remark != ''">
  55. and t.remark= #{remark}
  56. </if>
  57. <if test="createUserName !=null and createUserName != ''">
  58. and t.create_user_name= #{createUserName}
  59. </if>
  60. <if test="statusCd !=null and statusCd != ''">
  61. and t.status_cd= #{statusCd}
  62. </if>
  63. <if test="signType !=null and signType != ''">
  64. and t.sign_type= #{signType}
  65. </if>
  66. <if test="startTime !=null and startTime != ''">
  67. and t.start_time= #{startTime}
  68. </if>
  69. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  70. and t.inspection_plan_id= #{inspectionPlanId}
  71. </if>
  72. <if test="endTime !=null and endTime != ''">
  73. and t.end_time= #{endTime}
  74. </if>
  75. <if test="startDate !=null and startDate != ''">
  76. and t.start_date= #{startDate}
  77. </if>
  78. <if test="endDate !=null and endDate != ''">
  79. and t.end_date= #{endDate}
  80. </if>
  81. <if test="beforeTime !=null and beforeTime != ''">
  82. and t.before_time = #{beforeTime}
  83. </if>
  84. <if test="state !=null and state != ''">
  85. and t.state= #{state}
  86. </if>
  87. <if test="communityId !=null and communityId != ''">
  88. and t.community_id= #{communityId}
  89. </if>
  90. order by t.create_time desc
  91. <if test="page != -1 and page != null ">
  92. limit #{page}, #{row}
  93. </if>
  94. </select>
  95. <!-- 修改巡检计划信息 add by wuxw 2018-07-03 -->
  96. <update id="updateInspectionPlanInfo" parameterType="Map">
  97. update inspection_plan t set t.status_cd = #{statusCd}
  98. <if test="newBId != null and newBId != ''">
  99. ,t.b_id = #{newBId}
  100. </if>
  101. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  102. , t.inspection_plan_name= #{inspectionPlanName}
  103. </if>
  104. <if test="canReexamine !=null and canReexamine != ''">
  105. , t.can_reexamine= #{canReexamine}
  106. </if>
  107. <if test="createUserId !=null and createUserId != ''">
  108. , t.create_user_id= #{createUserId}
  109. </if>
  110. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  111. , t.inspection_route_id= #{inspectionRouteId}
  112. </if>
  113. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  114. , t.inspection_plan_period= #{inspectionPlanPeriod}
  115. </if>
  116. <if test="remark !=null and remark != ''">
  117. , t.remark= #{remark}
  118. </if>
  119. <if test="createUserName !=null and createUserName != ''">
  120. , t.create_user_name= #{createUserName}
  121. </if>
  122. <if test="signType !=null and signType != ''">
  123. , t.sign_type= #{signType}
  124. </if>
  125. <if test="startTime !=null and startTime != ''">
  126. , t.start_time= #{startTime}
  127. </if>
  128. <if test="endTime !=null and endTime != ''">
  129. , t.end_time= #{endTime}
  130. </if>
  131. <if test="state !=null and state != ''">
  132. , t.state= #{state}
  133. </if>
  134. <if test="startDate !=null and startDate != ''">
  135. , t.start_date= #{startDate}
  136. </if>
  137. <if test="endDate !=null and endDate != ''">
  138. , t.end_date= #{endDate}
  139. </if>
  140. <if test="inspectionMonth !=null and inspectionMonth != ''">
  141. , t.inspection_month = #{inspectionMonth}
  142. </if>
  143. <if test="inspectionDay !=null and inspectionDay != ''">
  144. , t.inspection_day= #{inspectionDay}
  145. </if>
  146. <if test="inspectionWorkday !=null and inspectionWorkday != ''">
  147. ,t.inspection_workday= #{inspectionWorkday}
  148. </if>
  149. <if test="beforeTime !=null and beforeTime != ''">
  150. , t.before_time = #{beforeTime}
  151. </if>
  152. where 1=1
  153. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  154. and t.inspection_plan_id= #{inspectionPlanId}
  155. </if>
  156. <if test="communityId !=null and communityId != ''">
  157. and t.community_id= #{communityId}
  158. </if>
  159. </update>
  160. <!-- 查询巡检计划数量 add by wuxw 2018-07-03 -->
  161. <select id="queryInspectionPlansCount" parameterType="Map" resultType="Map">
  162. select count(1) count
  163. from inspection_plan t
  164. where 1 =1
  165. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  166. and t.inspection_plan_name= #{inspectionPlanName}
  167. </if>
  168. <if test="createUserId !=null and createUserId != ''">
  169. and t.create_user_id= #{createUserId}
  170. </if>
  171. <if test="canReexamine !=null and canReexamine != ''">
  172. and t.can_reexamine= #{canReexamine}
  173. </if>
  174. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  175. and t.inspection_route_id= #{inspectionRouteId}
  176. </if>
  177. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  178. and t.inspection_plan_period= #{inspectionPlanPeriod}
  179. </if>
  180. <if test="remark !=null and remark != ''">
  181. and t.remark= #{remark}
  182. </if>
  183. <if test="createUserName !=null and createUserName != ''">
  184. and t.create_user_name= #{createUserName}
  185. </if>
  186. <if test="statusCd !=null and statusCd != ''">
  187. and t.status_cd= #{statusCd}
  188. </if>
  189. <if test="signType !=null and signType != ''">
  190. and t.sign_type= #{signType}
  191. </if>
  192. <if test="startTime !=null and startTime != ''">
  193. and t.start_time= #{startTime}
  194. </if>
  195. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  196. and t.inspection_plan_id= #{inspectionPlanId}
  197. </if>
  198. <if test="endTime !=null and endTime != ''">
  199. and t.end_time= #{endTime}
  200. </if>
  201. <if test="startDate !=null and startDate != ''">
  202. and t.start_date= #{startDate}
  203. </if>
  204. <if test="endDate !=null and endDate != ''">
  205. and t.end_date= #{endDate}
  206. </if>
  207. <if test="state !=null and state != ''">
  208. and t.state= #{state}
  209. </if>
  210. <if test="communityId !=null and communityId != ''">
  211. and t.community_id= #{communityId}
  212. </if>
  213. <if test="beforeTime !=null and beforeTime != ''">
  214. and t.before_time = #{beforeTime}
  215. </if>
  216. </select>
  217. <select id="queryPointInspectionPlansCount" parameterType="Map" resultType="Map">
  218. select count(1) count
  219. from inspection_plan t
  220. left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0'
  221. left join inspection_route_point_rel irpr on ir.inspection_route_id = irpr.inspection_route_id and irpr.status_cd = '0'
  222. left join inspection_point ip on irpr.inspection_id = ip.inspection_id and ip.status_cd = '0'
  223. where 1=1
  224. and ip.inspection_id = #{inspectionId}
  225. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  226. and t.inspection_plan_name= #{inspectionPlanName}
  227. </if>
  228. <if test="createUserId !=null and createUserId != ''">
  229. and t.create_user_id= #{createUserId}
  230. </if>
  231. <if test="canReexamine !=null and canReexamine != ''">
  232. and t.can_reexamine= #{canReexamine}
  233. </if>
  234. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  235. and t.inspection_route_id= #{inspectionRouteId}
  236. </if>
  237. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  238. and t.inspection_plan_period= #{inspectionPlanPeriod}
  239. </if>
  240. <if test="remark !=null and remark != ''">
  241. and t.remark= #{remark}
  242. </if>
  243. <if test="createUserName !=null and createUserName != ''">
  244. and t.create_user_name= #{createUserName}
  245. </if>
  246. <if test="statusCd !=null and statusCd != ''">
  247. and t.status_cd= #{statusCd}
  248. </if>
  249. <if test="signType !=null and signType != ''">
  250. and t.sign_type= #{signType}
  251. </if>
  252. <if test="startTime !=null and startTime != ''">
  253. and t.start_time= #{startTime}
  254. </if>
  255. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  256. and t.inspection_plan_id= #{inspectionPlanId}
  257. </if>
  258. <if test="endTime !=null and endTime != ''">
  259. and t.end_time= #{endTime}
  260. </if>
  261. <if test="startDate !=null and startDate != ''">
  262. and t.start_date= #{startDate}
  263. </if>
  264. <if test="endDate !=null and endDate != ''">
  265. and t.end_date= #{endDate}
  266. </if>
  267. <if test="state !=null and state != ''">
  268. and t.state= #{state}
  269. </if>
  270. <if test="communityId !=null and communityId != ''">
  271. and t.community_id= #{communityId}
  272. </if>
  273. <if test="beforeTime !=null and beforeTime != ''">
  274. and t.before_time = #{beforeTime}
  275. </if>
  276. </select>
  277. <select id="queryPointInspectionPlans" parameterType="Map" resultType="Map">
  278. select t.inspection_plan_name,t.inspection_plan_name inspectionPlanName,t.create_user_id,t.create_user_id
  279. createUserId,t.inspection_route_id,t.inspection_route_id inspectionRouteId
  280. ,t.can_reexamine,t.can_reexamine canReexamine,t.inspection_plan_period,t.inspection_plan_period
  281. inspectionPlanPeriod,t.remark,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd
  282. statusCd,t.sign_type,t.sign_type signType,t.start_time,t.start_time
  283. startTime,t.inspection_plan_id,t.inspection_plan_id inspectionPlanId,t.end_time,t.end_time
  284. endTime,t.state,t.community_id,t.community_id communityId,
  285. DATE_FORMAT(t.start_date,'%Y-%m-%d') startDate,DATE_FORMAT(t.end_date,'%Y-%m-%d') endDate,t.inspection_month inspectionMonth,t.inspection_day inspectionDay,
  286. t.inspection_workday inspectionWorkday,t.before_time beforeTime,t.create_time createTime,
  287. d.name stateName,
  288. c.name inspectionPlanPeriodName,
  289. i.name signTypeName,
  290. ir.route_name inspectionRouteName
  291. from inspection_plan t
  292. left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0'
  293. left join inspection_route_point_rel irpr on ir.inspection_route_id = irpr.inspection_route_id and irpr.status_cd = '0'
  294. left join inspection_point ip on irpr.inspection_id = ip.inspection_id and ip.status_cd = '0'
  295. inner join t_dict d on t.state = d.status_cd and d.table_name = 'inspection_plan' and d.table_columns = 'state'
  296. inner join t_dict c on t.inspection_plan_period = c.status_cd and c.table_name = 'inspection_plan' and
  297. c.table_columns = 'inspection_plan_period'
  298. inner join t_dict i on t.sign_type = i.status_cd and i.table_name = 'inspection_plan' and i.table_columns =
  299. 'sign_type'
  300. where 1=1
  301. and ip.inspection_id = #{inspectionId}
  302. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  303. and t.inspection_plan_name= #{inspectionPlanName}
  304. </if>
  305. <if test="createUserId !=null and createUserId != ''">
  306. and t.create_user_id= #{createUserId}
  307. </if>
  308. <if test="canReexamine !=null and canReexamine != ''">
  309. and t.can_reexamine= #{canReexamine}
  310. </if>
  311. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  312. and t.inspection_route_id= #{inspectionRouteId}
  313. </if>
  314. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  315. and t.inspection_plan_period= #{inspectionPlanPeriod}
  316. </if>
  317. <if test="remark !=null and remark != ''">
  318. and t.remark= #{remark}
  319. </if>
  320. <if test="createUserName !=null and createUserName != ''">
  321. and t.create_user_name= #{createUserName}
  322. </if>
  323. <if test="statusCd !=null and statusCd != ''">
  324. and t.status_cd= #{statusCd}
  325. </if>
  326. <if test="signType !=null and signType != ''">
  327. and t.sign_type= #{signType}
  328. </if>
  329. <if test="startTime !=null and startTime != ''">
  330. and t.start_time= #{startTime}
  331. </if>
  332. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  333. and t.inspection_plan_id= #{inspectionPlanId}
  334. </if>
  335. <if test="endTime !=null and endTime != ''">
  336. and t.end_time= #{endTime}
  337. </if>
  338. <if test="startDate !=null and startDate != ''">
  339. and t.start_date= #{startDate}
  340. </if>
  341. <if test="endDate !=null and endDate != ''">
  342. and t.end_date= #{endDate}
  343. </if>
  344. <if test="beforeTime !=null and beforeTime != ''">
  345. and t.before_time = #{beforeTime}
  346. </if>
  347. <if test="state !=null and state != ''">
  348. and t.state= #{state}
  349. </if>
  350. <if test="communityId !=null and communityId != ''">
  351. and t.community_id= #{communityId}
  352. </if>
  353. order by t.create_time desc
  354. <if test="page != -1 and page != null ">
  355. limit #{page}, #{row}
  356. </if>
  357. </select>
  358. <select id="queryRouteInspectionPlansCount" parameterType="Map" resultType="Map">
  359. select count(1) count
  360. from inspection_plan t
  361. left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0'
  362. where 1=1
  363. and ir.inspection_route_id = #{inspectionRouteId}
  364. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  365. and t.inspection_plan_name= #{inspectionPlanName}
  366. </if>
  367. <if test="createUserId !=null and createUserId != ''">
  368. and t.create_user_id= #{createUserId}
  369. </if>
  370. <if test="canReexamine !=null and canReexamine != ''">
  371. and t.can_reexamine= #{canReexamine}
  372. </if>
  373. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  374. and t.inspection_route_id= #{inspectionRouteId}
  375. </if>
  376. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  377. and t.inspection_plan_period= #{inspectionPlanPeriod}
  378. </if>
  379. <if test="remark !=null and remark != ''">
  380. and t.remark= #{remark}
  381. </if>
  382. <if test="createUserName !=null and createUserName != ''">
  383. and t.create_user_name= #{createUserName}
  384. </if>
  385. <if test="statusCd !=null and statusCd != ''">
  386. and t.status_cd= #{statusCd}
  387. </if>
  388. <if test="signType !=null and signType != ''">
  389. and t.sign_type= #{signType}
  390. </if>
  391. <if test="startTime !=null and startTime != ''">
  392. and t.start_time= #{startTime}
  393. </if>
  394. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  395. and t.inspection_plan_id= #{inspectionPlanId}
  396. </if>
  397. <if test="endTime !=null and endTime != ''">
  398. and t.end_time= #{endTime}
  399. </if>
  400. <if test="startDate !=null and startDate != ''">
  401. and t.start_date= #{startDate}
  402. </if>
  403. <if test="endDate !=null and endDate != ''">
  404. and t.end_date= #{endDate}
  405. </if>
  406. <if test="state !=null and state != ''">
  407. and t.state= #{state}
  408. </if>
  409. <if test="communityId !=null and communityId != ''">
  410. and t.community_id= #{communityId}
  411. </if>
  412. <if test="beforeTime !=null and beforeTime != ''">
  413. and t.before_time = #{beforeTime}
  414. </if>
  415. </select>
  416. <select id="queryRouteInspectionPlans" parameterType="Map" resultType="Map">
  417. select t.inspection_plan_name,t.inspection_plan_name inspectionPlanName,t.create_user_id,t.create_user_id
  418. createUserId,t.inspection_route_id,t.inspection_route_id inspectionRouteId
  419. ,t.can_reexamine,t.can_reexamine canReexamine,t.inspection_plan_period,t.inspection_plan_period
  420. inspectionPlanPeriod,t.remark,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd
  421. statusCd,t.sign_type,t.sign_type signType,t.start_time,t.start_time
  422. startTime,t.inspection_plan_id,t.inspection_plan_id inspectionPlanId,t.end_time,t.end_time
  423. endTime,t.state,t.community_id,t.community_id communityId,
  424. DATE_FORMAT(t.start_date,'%Y-%m-%d') startDate,DATE_FORMAT(t.end_date,'%Y-%m-%d') endDate,t.inspection_month inspectionMonth,t.inspection_day inspectionDay,
  425. t.inspection_workday inspectionWorkday,t.before_time beforeTime,t.create_time createTime,
  426. d.name stateName,
  427. c.name inspectionPlanPeriodName,
  428. i.name signTypeName,
  429. ir.route_name inspectionRouteName
  430. from inspection_plan t
  431. left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0'
  432. inner join t_dict d on t.state = d.status_cd and d.table_name = 'inspection_plan' and d.table_columns = 'state'
  433. inner join t_dict c on t.inspection_plan_period = c.status_cd and c.table_name = 'inspection_plan' and
  434. c.table_columns = 'inspection_plan_period'
  435. inner join t_dict i on t.sign_type = i.status_cd and i.table_name = 'inspection_plan' and i.table_columns =
  436. 'sign_type'
  437. where 1=1
  438. and ir.inspection_route_id = #{inspectionRouteId}
  439. <if test="inspectionPlanName !=null and inspectionPlanName != ''">
  440. and t.inspection_plan_name= #{inspectionPlanName}
  441. </if>
  442. <if test="createUserId !=null and createUserId != ''">
  443. and t.create_user_id= #{createUserId}
  444. </if>
  445. <if test="canReexamine !=null and canReexamine != ''">
  446. and t.can_reexamine= #{canReexamine}
  447. </if>
  448. <if test="inspectionRouteId !=null and inspectionRouteId != ''">
  449. and t.inspection_route_id= #{inspectionRouteId}
  450. </if>
  451. <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''">
  452. and t.inspection_plan_period= #{inspectionPlanPeriod}
  453. </if>
  454. <if test="remark !=null and remark != ''">
  455. and t.remark= #{remark}
  456. </if>
  457. <if test="createUserName !=null and createUserName != ''">
  458. and t.create_user_name= #{createUserName}
  459. </if>
  460. <if test="statusCd !=null and statusCd != ''">
  461. and t.status_cd= #{statusCd}
  462. </if>
  463. <if test="signType !=null and signType != ''">
  464. and t.sign_type= #{signType}
  465. </if>
  466. <if test="startTime !=null and startTime != ''">
  467. and t.start_time= #{startTime}
  468. </if>
  469. <if test="inspectionPlanId !=null and inspectionPlanId != ''">
  470. and t.inspection_plan_id= #{inspectionPlanId}
  471. </if>
  472. <if test="endTime !=null and endTime != ''">
  473. and t.end_time= #{endTime}
  474. </if>
  475. <if test="startDate !=null and startDate != ''">
  476. and t.start_date= #{startDate}
  477. </if>
  478. <if test="endDate !=null and endDate != ''">
  479. and t.end_date= #{endDate}
  480. </if>
  481. <if test="beforeTime !=null and beforeTime != ''">
  482. and t.before_time = #{beforeTime}
  483. </if>
  484. <if test="state !=null and state != ''">
  485. and t.state= #{state}
  486. </if>
  487. <if test="communityId !=null and communityId != ''">
  488. and t.community_id= #{communityId}
  489. </if>
  490. order by t.create_time desc
  491. <if test="page != -1 and page != null ">
  492. limit #{page}, #{row}
  493. </if>
  494. </select>
  495. </mapper>