ResourceAuditFlowV1ServiceDaoImplMapper.xml 3.7 KB

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