BjServiceCheckMapper.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.BjServiceCheckMapper">
  6. <resultMap id="serviceCheckVoList" type="com.ruoyi.business.domain.vo.BjServiceCheckVo">
  7. <result property="serviceCheckId" column="service_check_id"/>
  8. <result property="shipName" column="ship_name"/>
  9. <result property="shipId" column="ship_id"/>
  10. <result property="shipRegisterNumber" column="ship_register_number"/>
  11. <result property="regportName" column="regport_name"/>
  12. <result property="checkDate" column="check_date"/>
  13. <result property="beMonitorOrganization" column="be_monitor_organization"/>
  14. <result property="checkOrganization" column="check_organization"/>
  15. <result property="checkPerson" column="check_person"/>
  16. <result property="status" column="status"/>
  17. <result property="checkResult" column="check_result"/>
  18. <result property="defect" column="defect"/>
  19. <result property="releaseDate" column="release_date"/>
  20. <result property="releaseFlag" column="release_flag"/>
  21. </resultMap>
  22. <select id="queryServiceCheckList" resultMap="serviceCheckVoList">
  23. select service_check_id,
  24. ship_name,
  25. ship_id,
  26. ship_register_number,
  27. regport_name,
  28. check_date,
  29. be_monitor_organization,
  30. check_organization,
  31. check_person,
  32. status,
  33. check_result,
  34. defect,
  35. release_date,
  36. release_flag
  37. from bj_service_check
  38. where del_flag = '0'
  39. <if test="bo.shipRegisterNumber != null and bo.shipRegisterNumber != ''">
  40. and ship_id like concat('%',#{bo.shipRegisterNumber},'%')
  41. </if>
  42. <if test="bo.shipImo != null and bo.shipImo != ''">
  43. and ship_imo like concat('%',#{bo.shipImo},'%')
  44. </if>
  45. <if test="bo.startCheckDate != null and bo.endCheckDate != null">
  46. and check_date between #{bo.startCheckDate} and #{bo.endCheckDate}
  47. </if>
  48. order by service_check_id,
  49. RANDOM()
  50. </select>
  51. </mapper>