WfSubscriptionMapper.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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="com.xjrsoft.module.ledger.mapper.WfSubscriptionMapper">
  6. <select id="getPage" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
  7. select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
  8. left join xjr_department t2 on t1.application_department = t2.id
  9. left join xjr_user t3 on t1.user_id = t3.id
  10. where t1.status = 1
  11. <if test="dto.orgId != null">
  12. and t2.id = #{dto.orgId}
  13. </if>
  14. <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
  15. and t1.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
  16. </if>
  17. <if test="dto.userName != null and dto.userName != ''">
  18. and t3.name like concat('%', #{dto.userName}, '%')
  19. </if>
  20. order by t1.shen_qing_ri_qi4752 desc
  21. </select>
  22. <select id="getList" parameterType="com.xjrsoft.module.ledger.dto.WfSubscriptionPageDto" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionPageVo">
  23. select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752, t1.folder_id,t1.number,t1.total_amount from wf_subscription t1
  24. left join xjr_department t2 on t1.application_department = t2.id
  25. left join xjr_user t3 on t1.user_id = t3.id
  26. where t1.status = 1
  27. <if test="dto.orgId != null">
  28. and t2.id = #{dto.orgId}
  29. </if>
  30. <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
  31. and t1.shen_qing_ri_qi4752 between #{dto.startDate} and #{dto.endDate}
  32. </if>
  33. <if test="dto.userName != null and dto.userName != ''">
  34. and t3.name like concat('%', #{dto.userName}, '%')
  35. </if>
  36. order by t1.shen_qing_ri_qi4752 desc
  37. </select>
  38. <select id="getInfoById" resultType="com.xjrsoft.module.ledger.vo.WfSubscriptionListInfoVo">
  39. select t1.id,t2.name as org_name,t3.name as user_name,t1.shen_qing_ri_qi4752,t1.folder_id from wf_subscription t1
  40. left join xjr_department t2 on t1.application_department = t2.id
  41. left join xjr_user t3 on t1.user_id = t3.id
  42. where t1.id = #{id}
  43. </select>
  44. </mapper>