ApplyCheckInExtendMapper.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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="com.idea.oa.apply.mapper.ApplyCheckInExtendMapper">
  4. <select id="getInfoByFlowMainPushId" resultType="com.idea.oa.apply.model.inout.ApplyCheckInDto">
  5. SELECT
  6. flow_main_push.id AS flowMainPushId,
  7. frame_user.truename AS createdByString,
  8. flow_main_push.flow_main_id AS flowMainId,
  9. apply_check_in.*
  10. FROM
  11. flow_main_push
  12. LEFT JOIN apply_check_in ON apply_check_in.id = flow_main_push.form_id
  13. LEFT JOIN frame_user ON frame_user.id = apply_check_in.created_by
  14. WHERE
  15. flow_main_push.id = #{flowMainPushId}
  16. </select>
  17. <select id="getInfoByFlowMainId" resultType="com.idea.oa.apply.model.inout.ApplyCheckInDto">
  18. SELECT
  19. flow_main.id AS flowMainId,
  20. frame_user.truename AS createdByString,
  21. apply_check_in.*
  22. FROM
  23. flow_main
  24. LEFT JOIN apply_check_in ON apply_check_in.id = flow_main.form_id
  25. LEFT JOIN frame_user ON frame_user.id = apply_check_in.created_by
  26. WHERE
  27. flow_main.id = #{flowMainId}
  28. </select>
  29. <select id="getUserInfoByUserId" resultType="java.util.Map">
  30. SELECT
  31. frame_user.posts,
  32. frame_post.post_name AS postName,
  33. frame_user.id,
  34. frame_user.truename,
  35. frame_user.department,
  36. sys_dept.dept_name AS deptName
  37. FROM
  38. frame_user
  39. LEFT JOIN sys_dept ON sys_dept.id = frame_user.department
  40. LEFT JOIN frame_post ON frame_post.id = frame_user.posts
  41. WHERE
  42. frame_user.id = #{userId}
  43. </select>
  44. <select id="selectMaxNum" resultType="java.lang.String">
  45. SELECT MAX(flow_num) AS maxnum FROM apply_check_in
  46. </select>
  47. </mapper>