HiprocdefMapper.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="HiprocdefMapper">
  4. <!--流程历史表名 -->
  5. <sql id="tableName">
  6. ACT_HI_PROCINST
  7. </sql>
  8. <!--流程定义表 -->
  9. <sql id="ptableName">
  10. ACT_RE_PROCDEF
  11. </sql>
  12. <!--历史流程变量表 -->
  13. <sql id="hivartableName">
  14. ACT_HI_VARINST
  15. </sql>
  16. <!-- 历史流程列表-->
  17. <select id="datalistPage" parameterType="page" resultType="pd">
  18. select
  19. hp.*,
  20. rp.NAME_ PNAME_,
  21. rp.VERSION_,
  22. rp.ID_ PID_,
  23. rp.DEPLOYMENT_ID_,
  24. rp.DGRM_RESOURCE_NAME_
  25. from
  26. <include refid="tableName"></include> hp
  27. left join
  28. <include refid="ptableName"></include> rp
  29. on hp.PROC_DEF_ID_ = rp.ID_
  30. where 1=1
  31. <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
  32. and
  33. (
  34. rp.NAME_ LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  35. )
  36. </if>
  37. <if test="pd.lastStart != null and pd.lastStart != ''"><!-- 开始时间检索 -->
  38. and hp.END_TIME_ &gt;= #{pd.lastStart}
  39. </if>
  40. <if test="pd.lastEnd != null and pd.lastEnd != ''"><!-- 结束时间检索 -->
  41. and hp.END_TIME_ &lt;= #{pd.lastEnd}
  42. </if>
  43. and hp.END_TIME_ is not NULL
  44. order by hp.END_TIME_ desc
  45. </select>
  46. <!-- 历史流程变量列表 -->
  47. <select id="hivarList" parameterType="pd" resultType="pd">
  48. select
  49. *
  50. from
  51. <include refid="hivartableName"></include>
  52. where 1=1
  53. <if test="PROC_INST_ID_ != null and PROC_INST_ID_ != ''"><!-- 流程实例ID -->
  54. and PROC_INST_ID_ = #{PROC_INST_ID_}
  55. and TASK_ID_ is NULL
  56. </if>
  57. </select>
  58. <!-- fh313596790qq(青苔) -->
  59. </mapper>