ReportInfoSettingServiceDaoImplMapper.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="reportInfoSettingServiceDaoImpl">
  6. <!-- 保存进出上报信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveReportInfoSettingInfo" parameterType="Map">
  8. insert into report_info_setting(
  9. report_type,name,start_time,remark,end_time,community_id,setting_id
  10. ) values (
  11. #{reportType},#{name},#{startTime},#{remark},#{endTime},#{communityId},#{settingId}
  12. )
  13. </insert>
  14. <!-- 查询进出上报信息 add by wuxw 2018-07-03 -->
  15. <select id="getReportInfoSettingInfo" parameterType="Map" resultType="Map">
  16. select t.report_type,t.report_type reportType,t.create_time,t.create_time createTime,t.name,t.start_time,t.start_time startTime,t.remark,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.setting_id,t.setting_id settingId
  17. from report_info_setting t
  18. where 1 =1
  19. <if test="reportType !=null and reportType != ''">
  20. and t.report_type= #{reportType}
  21. </if>
  22. <if test="createTime !=null and createTime != ''">
  23. and t.create_time= #{createTime}
  24. </if>
  25. <if test="name !=null and name != ''">
  26. and t.name= #{name}
  27. </if>
  28. <if test="nameLike !=null and nameLike != ''">
  29. and t.name like concat('%',#{nameLike},'%')
  30. </if>
  31. <if test="startTime !=null and startTime != ''">
  32. and t.start_time= #{startTime}
  33. </if>
  34. <if test="remark !=null and remark != ''">
  35. and t.remark= #{remark}
  36. </if>
  37. <if test="statusCd !=null and statusCd != ''">
  38. and t.status_cd= #{statusCd}
  39. </if>
  40. <if test="endTime !=null and endTime != ''">
  41. and t.end_time= #{endTime}
  42. </if>
  43. <if test="communityId !=null and communityId != ''">
  44. and t.community_id= #{communityId}
  45. </if>
  46. <if test="settingId !=null and settingId != ''">
  47. and t.setting_id= #{settingId}
  48. </if>
  49. order by t.create_time desc
  50. <if test="page != -1 and page != null ">
  51. limit #{page}, #{row}
  52. </if>
  53. </select>
  54. <!-- 修改进出上报信息 add by wuxw 2018-07-03 -->
  55. <update id="updateReportInfoSettingInfo" parameterType="Map">
  56. update report_info_setting t set t.status_cd = #{statusCd}
  57. <if test="newBId != null and newBId != ''">
  58. ,t.b_id = #{newBId}
  59. </if>
  60. <if test="reportType !=null and reportType != ''">
  61. , t.report_type= #{reportType}
  62. </if>
  63. <if test="createTime !=null and createTime != ''">
  64. , t.create_time= #{createTime}
  65. </if>
  66. <if test="name !=null and name != ''">
  67. , t.name= #{name}
  68. </if>
  69. <if test="startTime !=null and startTime != ''">
  70. , t.start_time= #{startTime}
  71. </if>
  72. <if test="remark !=null and remark != ''">
  73. , t.remark= #{remark}
  74. </if>
  75. <if test="endTime !=null and endTime != ''">
  76. , t.end_time= #{endTime}
  77. </if>
  78. <if test="communityId !=null and communityId != ''">
  79. , t.community_id= #{communityId}
  80. </if>
  81. where 1=1 <if test="settingId !=null and settingId != ''">
  82. and t.setting_id= #{settingId}
  83. </if>
  84. </update>
  85. <!-- 查询进出上报数量 add by wuxw 2018-07-03 -->
  86. <select id="queryReportInfoSettingsCount" parameterType="Map" resultType="Map">
  87. select count(1) count
  88. from report_info_setting t
  89. where 1 =1
  90. <if test="reportType !=null and reportType != ''">
  91. and t.report_type= #{reportType}
  92. </if>
  93. <if test="createTime !=null and createTime != ''">
  94. and t.create_time= #{createTime}
  95. </if>
  96. <if test="name !=null and name != ''">
  97. and t.name= #{name}
  98. </if>
  99. <if test="nameLike !=null and nameLike != ''">
  100. and t.name like concat('%',#{nameLike},'%')
  101. </if>
  102. <if test="startTime !=null and startTime != ''">
  103. and t.start_time= #{startTime}
  104. </if>
  105. <if test="remark !=null and remark != ''">
  106. and t.remark= #{remark}
  107. </if>
  108. <if test="statusCd !=null and statusCd != ''">
  109. and t.status_cd= #{statusCd}
  110. </if>
  111. <if test="endTime !=null and endTime != ''">
  112. and t.end_time= #{endTime}
  113. </if>
  114. <if test="communityId !=null and communityId != ''">
  115. and t.community_id= #{communityId}
  116. </if>
  117. <if test="settingId !=null and settingId != ''">
  118. and t.setting_id= #{settingId}
  119. </if>
  120. </select>
  121. </mapper>