1
0

ReportMapper.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.web.work.mapper.ReportMapper">
  6. <select id="selectList" resultType="com.ruoyi.web.work.domain.Report">
  7. select * from tb_report
  8. <where>
  9. <if test="patId != null "> and pat_id = #{patId}</if>
  10. <if test="visitId != null "> and visit_id = #{visitId}</if>
  11. <if test="cardId != null "> and card_id = #{cardId}</if>
  12. <if test="reportNo != null and reportNo != ''"> and report_no = #{reportNo}</if>
  13. <if test="originalApplicationNo != null and originalApplicationNo != ''"> and original_application_no = #{originalApplicationNo}</if>
  14. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  15. <if test="reportClassCode != null and reportClassCode != ''"> and report_class_code = #{reportClassCode}</if>
  16. <if test="reportClassName != null and reportClassName != ''"> and report_class_name like concat('%', #{reportClassName}, '%')</if>
  17. <if test="checkDoctorCode != null and checkDoctorCode != ''"> and check_doctor_code = #{checkDoctorCode}</if>
  18. <if test="applyDoctorName != null and applyDoctorName != ''"> and apply_doctor_name like concat('%', #{applyDoctorName}, '%')</if>
  19. <if test="testingDoctorCode != null and testingDoctorCode != ''"> and testing_doctor_code = #{testingDoctorCode}</if>
  20. <if test="testingDoctorName != null and testingDoctorName != ''"> and testing_doctor_name like concat('%', #{testingDoctorName}, '%')</if>
  21. <if test="inspectionDepartmentCode != null and inspectionDepartmentCode != ''"> and inspection_department_code = #{inspectionDepartmentCode}</if>
  22. <if test="inspectionDepartmentName != null and inspectionDepartmentName != ''"> and inspection_department_name like concat('%', #{inspectionDepartmentName}, '%')</if>
  23. </where>
  24. </select>
  25. <select id="getAllReportByPatId" resultType="com.ruoyi.web.work.domain.Report">
  26. SELECT * FROM tb_orc_report
  27. WHERE tb_orc_report.pat_id=#{patId}
  28. </select>
  29. <select id="selectOrcReportByObcId" resultType="com.ruoyi.web.work.domain.Report">
  30. SELECT * FROM tb_orc_report
  31. WHERE id = #{orcId}
  32. </select>
  33. </mapper>