IndustrialLandSupplyDetailDao.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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="platform.modules.government.dao.IndustrialLandSupplyDetailDao">
  4. <select id="findPage" parameterType="platform.modules.government.dto.IndustrialLandSupplyParam"
  5. resultType="platform.modules.government.dto.IndustrialLandSupplyDto">
  6. SELECT
  7. supply.id id,
  8. supply.no no,
  9. supply.title title,
  10. supply.location location,
  11. supply.accept_date accept_date,
  12. supply.approve_status approve_status,
  13. supply.process_stage process_stage,
  14. supply.gs_feedback gs_feedback,
  15. supply.update_time update_time,
  16. supply.create_time create_time,
  17. zuser.user_type user_type
  18. FROM
  19. industrial_land_supply supply
  20. LEFT JOIN
  21. z_approval approval ON approval.apply_id = supply.id AND approval.type = #{param.approval_type}
  22. LEFT JOIN
  23. z_user zuser ON zuser.id = supply.create_by
  24. WHERE
  25. 1 = 1
  26. AND supply.del_flag !=1
  27. <if test="param.title != null and param.title != '' ">
  28. AND supply.title LIKE CONCAT('%',#{param.title},'%')
  29. </if>
  30. <if test="param.location != null and param.location != '' ">
  31. AND supply.location LIKE CONCAT('%',#{param.location},'%')
  32. </if>
  33. <if test="param.approve_status != null and param.approve_status != '' ">
  34. AND supply.approve_status = #{param.approve_status}
  35. </if>
  36. <if test="param.process_stage != null and param.process_stage != '' ">
  37. AND supply.process_stage = #{param.process_stage}
  38. </if>
  39. <if test="param.applyIds.size() > 0 ">
  40. AND supply.id IN
  41. <foreach collection="param.applyIds" index="index" item="item" open="(" separator="," close=")">
  42. #{item}
  43. </foreach>
  44. </if>
  45. <if test="param.applyIds.size() == 0 ">
  46. AND supply.id=0
  47. </if>
  48. GROUP BY supply.id
  49. ORDER BY supply.create_time DESC
  50. </select>
  51. <select id="findByProjectIdAndApproveStatus"
  52. resultType="platform.modules.government.entity.IndustrialLandSupplyDetail">
  53. SELECT
  54. *
  55. FROM industrial_land_supply
  56. WHERE del_flag = 0
  57. <if test="null != approveStatus and approveStatus.size >0">
  58. AND approve_status IN
  59. <foreach collection="approveStatus" index="index" item="item" open="(" separator="," close=")">
  60. #{item}
  61. </foreach>
  62. </if>
  63. </select>
  64. <select id="selectById" resultType="platform.modules.government.entity.IndustrialLandSupplyDetail">
  65. SELECT
  66. *
  67. FROM industrial_land_supply
  68. WHERE id = #{id}
  69. </select>
  70. </mapper>