PacsConfigMapper.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.diagbot.mapper.PacsConfigMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.diagbot.entity.PacsConfig">
  6. <id column="id" property="id" />
  7. <result column="is_deleted" property="isDeleted" />
  8. <result column="gmt_create" property="gmtCreate" />
  9. <result column="gmt_modified" property="gmtModified" />
  10. <result column="creator" property="creator" />
  11. <result column="modifier" property="modifier" />
  12. <result column="hospital_id" property="hospitalId" />
  13. <result column="his_name" property="hisName" />
  14. <result column="unique_name" property="uniqueName" />
  15. <result column="unique_code" property="uniqueCode" />
  16. </resultMap>
  17. <!-- 分页查询 -->
  18. <select id="getPage" resultType="com.diagbot.entity.PacsConfig">
  19. select a.*
  20. from tran_pacs_config a
  21. where a.is_deleted='N'
  22. <if test="pacsConfigPageVO.hospitalId!=null">
  23. and a.hospital_id=#{pacsConfigPageVO.hospitalId}
  24. </if>
  25. <if test="pacsConfigPageVO.hisName!=null and pacsConfigPageVO.hisName!=''">
  26. and a.his_name like concat("%",#{pacsConfigPageVO.hisName},"%")
  27. </if>
  28. <if test="pacsConfigPageVO.uniqueName!=null and pacsConfigPageVO.uniqueName!=''">
  29. and a.unique_name like concat("%",#{pacsConfigPageVO.uniqueName},"%")
  30. </if>
  31. <if test="pacsConfigPageVO.uniqueCode!=null and pacsConfigPageVO.uniqueCode!=''">
  32. and a.unique_code like concat("%",#{pacsConfigPageVO.uniqueCode},"%")
  33. </if>
  34. order by a.gmt_modified desc
  35. </select>
  36. <select id="getPACSsIndex" resultType="com.diagbot.entity.PacsConfig"
  37. parameterType="com.diagbot.vo.RetrievalVO">
  38. SELECT u.*
  39. FROM(
  40. SELECT
  41. *
  42. FROM
  43. `tran_pacs_config`
  44. WHERE
  45. is_deleted = "N"
  46. <if test="hospitalId!=null">
  47. and hospital_id=#{hospitalId}
  48. </if>
  49. <if test="inputStr!=null and inputStr!=''">
  50. and his_name = #{inputStr}
  51. </if>
  52. UNION
  53. SELECT
  54. *
  55. FROM
  56. `tran_pacs_config`
  57. WHERE
  58. is_deleted = "N"
  59. <if test="hospitalId!=null">
  60. and hospital_id=#{hospitalId}
  61. </if>
  62. <if test="inputStr!=null and inputStr!=''">
  63. and his_name like concat(#{inputStr},"%")
  64. </if>
  65. UNION
  66. SELECT
  67. *
  68. FROM
  69. `tran_pacs_config`
  70. WHERE
  71. is_deleted = "N"
  72. <if test="hospitalId!=null">
  73. and hospital_id=#{hospitalId}
  74. </if>
  75. <if test="inputStr!=null and inputStr!=''">
  76. and his_name like concat("%",#{inputStr},"%")
  77. </if>
  78. ) u LIMIT 100
  79. </select>
  80. </mapper>