WorkflowAuditMessageServiceDaoImplMapper.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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="workflowAuditMessageServiceDaoImpl">
  6. <!-- 保存流程审核表信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveWorkflowAuditMessageInfo" parameterType="Map">
  8. insert into workflow_audit_message(
  9. audit_id,pre_audit_id,business_key,audit_person_id,audit_person,share_id,state,business_type,message,share_type,audit_link
  10. ) values (
  11. #{auditId},#{preAuditId},#{businessKey},#{auditPersonId},#{auditPerson},#{shareId},#{state},#{businessType},#{message},#{shareType},#{auditLink}
  12. )
  13. </insert>
  14. <!-- 查询流程审核表信息 add by wuxw 2018-07-03 -->
  15. <select id="getWorkflowAuditMessageInfo" parameterType="Map" resultType="Map">
  16. select t.audit_id,t.audit_id auditId,t.pre_audit_id,t.pre_audit_id preAuditId,t.business_key,t.business_key
  17. businessKey,t.audit_person_id,t.audit_person_id auditPersonId,t.audit_person,t.audit_person
  18. auditPerson,t.share_id,t.share_id shareId,t.status_cd,t.status_cd
  19. statusCd,t.state,t.business_type,t.business_type businessType,t.message,t.share_type,t.share_type
  20. shareType,t.audit_link,t.audit_link auditLink
  21. from workflow_audit_message t
  22. where 1 =1
  23. <if test="auditId !=null and auditId != ''">
  24. and t.audit_id= #{auditId}
  25. </if>
  26. <if test="preAuditId !=null and preAuditId != ''">
  27. and t.pre_audit_id= #{preAuditId}
  28. </if>
  29. <if test="businessKey !=null and businessKey != ''">
  30. and t.business_key= #{businessKey}
  31. </if>
  32. <if test="auditPersonId !=null and auditPersonId != ''">
  33. and t.audit_person_id= #{auditPersonId}
  34. </if>
  35. <if test="auditPerson !=null and auditPerson != ''">
  36. and t.audit_person= #{auditPerson}
  37. </if>
  38. <if test="shareId !=null and shareId != ''">
  39. and t.share_id= #{shareId}
  40. </if>
  41. <if test="statusCd !=null and statusCd != ''">
  42. and t.status_cd= #{statusCd}
  43. </if>
  44. <if test="state !=null and state != ''">
  45. and t.state= #{state}
  46. </if>
  47. <if test="businessType !=null and businessType != ''">
  48. and t.business_type= #{businessType}
  49. </if>
  50. <if test="message !=null and message != ''">
  51. and t.message= #{message}
  52. </if>
  53. <if test="shareType !=null and shareType != ''">
  54. and t.share_type= #{shareType}
  55. </if>
  56. <if test="auditLink !=null and auditLink != ''">
  57. and t.audit_link= #{auditLink}
  58. </if>
  59. order by t.create_time desc
  60. <if test="page != -1 and page != null ">
  61. limit #{page}, #{row}
  62. </if>
  63. </select>
  64. <!-- 修改流程审核表信息 add by wuxw 2018-07-03 -->
  65. <update id="updateWorkflowAuditMessageInfo" parameterType="Map">
  66. update workflow_audit_message t set t.status_cd = #{statusCd}
  67. <if test="newBId != null and newBId != ''">
  68. ,t.b_id = #{newBId}
  69. </if>
  70. <if test="preAuditId !=null and preAuditId != ''">
  71. , t.pre_audit_id= #{preAuditId}
  72. </if>
  73. <if test="businessKey !=null and businessKey != ''">
  74. , t.business_key= #{businessKey}
  75. </if>
  76. <if test="auditPersonId !=null and auditPersonId != ''">
  77. , t.audit_person_id= #{auditPersonId}
  78. </if>
  79. <if test="auditPerson !=null and auditPerson != ''">
  80. , t.audit_person= #{auditPerson}
  81. </if>
  82. <if test="shareId !=null and shareId != ''">
  83. , t.share_id= #{shareId}
  84. </if>
  85. <if test="state !=null and state != ''">
  86. , t.state= #{state}
  87. </if>
  88. <if test="businessType !=null and businessType != ''">
  89. , t.business_type= #{businessType}
  90. </if>
  91. <if test="message !=null and message != ''">
  92. , t.message= #{message}
  93. </if>
  94. <if test="shareType !=null and shareType != ''">
  95. , t.share_type= #{shareType}
  96. </if>
  97. <if test="auditLink !=null and auditLink != ''">
  98. , t.audit_link= #{auditLink}
  99. </if>
  100. where 1=1
  101. <if test="auditId !=null and auditId != ''">
  102. and t.audit_id= #{auditId}
  103. </if>
  104. </update>
  105. <!-- 查询流程审核表数量 add by wuxw 2018-07-03 -->
  106. <select id="queryWorkflowAuditMessagesCount" parameterType="Map" resultType="Map">
  107. select count(1) count
  108. from workflow_audit_message t
  109. where 1 =1
  110. <if test="auditId !=null and auditId != ''">
  111. and t.audit_id= #{auditId}
  112. </if>
  113. <if test="preAuditId !=null and preAuditId != ''">
  114. and t.pre_audit_id= #{preAuditId}
  115. </if>
  116. <if test="businessKey !=null and businessKey != ''">
  117. and t.business_key= #{businessKey}
  118. </if>
  119. <if test="auditPersonId !=null and auditPersonId != ''">
  120. and t.audit_person_id= #{auditPersonId}
  121. </if>
  122. <if test="auditPerson !=null and auditPerson != ''">
  123. and t.audit_person= #{auditPerson}
  124. </if>
  125. <if test="shareId !=null and shareId != ''">
  126. and t.share_id= #{shareId}
  127. </if>
  128. <if test="statusCd !=null and statusCd != ''">
  129. and t.status_cd= #{statusCd}
  130. </if>
  131. <if test="state !=null and state != ''">
  132. and t.state= #{state}
  133. </if>
  134. <if test="businessType !=null and businessType != ''">
  135. and t.business_type= #{businessType}
  136. </if>
  137. <if test="message !=null and message != ''">
  138. and t.message= #{message}
  139. </if>
  140. <if test="shareType !=null and shareType != ''">
  141. and t.share_type= #{shareType}
  142. </if>
  143. <if test="auditLink !=null and auditLink != ''">
  144. and t.audit_link= #{auditLink}
  145. </if>
  146. </select>
  147. </mapper>