BjTrackShipsMapper.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.ruoyi.business.mapper.BjTrackShipsMapper">
  6. <resultMap id="trackShipsVoList" type="com.ruoyi.business.domain.vo.BjTrackShipsVo">
  7. <result property="trackShipsId" column="track_ships_id"/>
  8. <result property="shipNameCn" column="ship_name_cn"/>
  9. <result property="shipNameEn" column="ship_name_en"/>
  10. <result property="shipId" column="ship_id"/>
  11. <result property="shipFirstregNo" column="ship_firstreg_no"/>
  12. <result property="shipImo" column="ship_imo"/>
  13. <result property="icCardNo" column="ic_card_no"/>
  14. <result property="nationality" column="nationality"/>
  15. <result property="regportName" column="regport_name"/>
  16. <result property="shipType" column="ship_type"/>
  17. <result property="traceUnit" column="trace_unit"/>
  18. <result property="traceStatus" column="trace_status"/>
  19. <result property="auditStatus" column="audit_status"/>
  20. <result property="addOrganization" column="add_organization"/>
  21. <result property="traceReason" column="trace_reason"/>
  22. <result property="traceDate" column="trace_date"/>
  23. <result property="removeOrganization" column="remove_organization"/>
  24. <result property="breakDate" column="break_date"/>
  25. <result property="releaseDate" column="release_date"/>
  26. <result property="releaseFlag" column="release_flag"/>
  27. </resultMap>
  28. <select id="queryTrackShipsList" resultMap="trackShipsVoList">
  29. select track_ships_id,
  30. ship_name_cn,
  31. ship_name_en,
  32. ship_id,
  33. ship_firstreg_no,
  34. ship_imo,
  35. ic_card_no,
  36. nationality,
  37. regport_name,
  38. ship_type,
  39. trace_unit,
  40. trace_status,
  41. audit_status,
  42. add_organization,
  43. trace_reason,
  44. trace_date,
  45. remove_organization,
  46. break_date,
  47. release_date,
  48. release_flag
  49. from bj_track_ships
  50. where del_flag = '0'
  51. <if test="bo.shipNameCn != null and bo.shipNameCn != ''">
  52. and ship_came_cn like concat('%',#{bo.shipNameCn},'%')
  53. </if>
  54. <if test="bo.shipNameEn != null and bo.shipNameEn != ''">
  55. and ship_came_en like concat('%',#{bo.shipNameEn},'%')
  56. </if>
  57. <if test="bo.shipId != null and bo.shipId != ''">
  58. and ship_id like concat('%',#{bo.shipId},'%')
  59. </if>
  60. <if test="bo.shipFirstregNo != null and bo.shipFirstregNo != ''">
  61. and ship_firstreg_no like concat('%',#{bo.shipFirstregNo},'%')
  62. </if>
  63. <if test="bo.shipImo != null and bo.shipImo != ''">
  64. and ship_imo like concat('%',#{bo.shipImo},'%')
  65. </if>
  66. <if test="bo.icCardNo != null and bo.icCardNo != ''">
  67. and ic_card_no like concat('%',#{bo.icCardNo},'%')
  68. </if>
  69. <if test="bo.startCheckDate != null and bo.endCheckDate != null">
  70. and check_date between #{bo.startCheckDate} and #{bo.endCheckDate}
  71. </if>
  72. <if test="bo.startTraceDate != null and bo.endTraceDate != null">
  73. and trace_date between #{bo.startTraceDate} and #{bo.endTraceDate}
  74. </if>
  75. order by track_ships_id,
  76. RANDOM()
  77. </select>
  78. </mapper>