ResourceAuditFlowV1ServiceDaoImplMapper.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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="resourceAuditFlowV1ServiceDaoImpl">
  6. <!-- 保存物品流程信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveResourceAuditFlowInfo" parameterType="Map">
  8. insert into resource_audit_flow(
  9. raf_id,remark,store_id,flow_id,flow_name,audit_type,community_id
  10. ) values (
  11. #{rafId},#{remark},#{storeId},#{flowId},#{flowName},#{auditType},#{communityId}
  12. )
  13. </insert>
  14. <!-- 查询物品流程信息 add by wuxw 2018-07-03 -->
  15. <select id="getResourceAuditFlowInfo" parameterType="Map" resultType="Map">
  16. select t.raf_id,t.raf_id rafId,t.remark,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id
  17. storeId,t.flow_id,t.flow_id flowId,t.flow_name,t.flow_name flowName,t.audit_type,t.audit_type auditType,
  18. t.create_time createTime,t.community_id communityId
  19. from resource_audit_flow t
  20. where 1 =1
  21. <if test="rafId !=null and rafId != ''">
  22. and t.raf_id= #{rafId}
  23. </if>
  24. <if test="remark !=null and remark != ''">
  25. and t.remark= #{remark}
  26. </if>
  27. <if test="statusCd !=null and statusCd != ''">
  28. and t.status_cd= #{statusCd}
  29. </if>
  30. <if test="storeId !=null and storeId != ''">
  31. and t.store_id= #{storeId}
  32. </if>
  33. <if test="communityId !=null and communityId != ''">
  34. and t.community_id= #{storeId}
  35. </if>
  36. <if test="flowId !=null and flowId != ''">
  37. and t.flow_id= #{flowId}
  38. </if>
  39. <if test="flowName !=null and flowName != ''">
  40. and t.flow_name= #{flowName}
  41. </if>
  42. <if test="auditType !=null and auditType != ''">
  43. and t.audit_type= #{auditType}
  44. </if>
  45. order by t.create_time desc
  46. <if test="page != -1 and page != null ">
  47. limit #{page}, #{row}
  48. </if>
  49. </select>
  50. <!-- 修改物品流程信息 add by wuxw 2018-07-03 -->
  51. <update id="updateResourceAuditFlowInfo" parameterType="Map">
  52. update resource_audit_flow t set t.status_cd = #{statusCd}
  53. <if test="newBId != null and newBId != ''">
  54. ,t.b_id = #{newBId}
  55. </if>
  56. <if test="remark !=null and remark != ''">
  57. , t.remark= #{remark}
  58. </if>
  59. <if test="flowId !=null and flowId != ''">
  60. , t.flow_id= #{flowId}
  61. </if>
  62. <if test="flowName !=null and flowName != ''">
  63. , t.flow_name= #{flowName}
  64. </if>
  65. <if test="auditType !=null and auditType != ''">
  66. , t.audit_type= #{auditType}
  67. </if>
  68. where 1=1
  69. <if test="rafId !=null and rafId != ''">
  70. and t.raf_id= #{rafId}
  71. </if>
  72. <if test="storeId !=null and storeId != ''">
  73. and t.store_id= #{storeId}
  74. </if>
  75. <if test="communityId !=null and communityId != ''">
  76. and t.community_id= #{storeId}
  77. </if>
  78. </update>
  79. <!-- 查询物品流程数量 add by wuxw 2018-07-03 -->
  80. <select id="queryResourceAuditFlowsCount" parameterType="Map" resultType="Map">
  81. select count(1) count
  82. from resource_audit_flow t
  83. where 1 =1
  84. <if test="rafId !=null and rafId != ''">
  85. and t.raf_id= #{rafId}
  86. </if>
  87. <if test="remark !=null and remark != ''">
  88. and t.remark= #{remark}
  89. </if>
  90. <if test="statusCd !=null and statusCd != ''">
  91. and t.status_cd= #{statusCd}
  92. </if>
  93. <if test="storeId !=null and storeId != ''">
  94. and t.store_id= #{storeId}
  95. </if>
  96. <if test="flowId !=null and flowId != ''">
  97. and t.flow_id= #{flowId}
  98. </if>
  99. <if test="flowName !=null and flowName != ''">
  100. and t.flow_name= #{flowName}
  101. </if>
  102. <if test="auditType !=null and auditType != ''">
  103. and t.audit_type= #{auditType}
  104. </if>
  105. <if test="communityId !=null and communityId != ''">
  106. and t.community_id= #{storeId}
  107. </if>
  108. </select>
  109. </mapper>