| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.limslaboratory.mapper.InspectionProductListMapper"> |
| | | |
| | | <select id="selectByMaterId" resultType="com.yuanchu.limslaboratory.pojo.dto.InspectionProductListDto"> |
| | | <select id="selectByMaterId" resultType="com.yuanchu.limslaboratory.pojo.vo.InspectionProductListVo"> |
| | | select inspection_material_list_id, |
| | | inspect_start_time inspectStartTime, |
| | | inspect_end_time inspectEndTime, |
| | |
| | | internal, |
| | | start_time, |
| | | end_time, |
| | | user.name userName, |
| | | uname userName, |
| | | equipment_name instrumentName |
| | | from lims_laboratory.inspection_product_list ipl |
| | | join lims_laboratory.inspection_material_list iml on iml.id = ipl.inspection_material_list_id |
| | | join lims_laboratory.inspection i on i.id = iml.inspection_id |
| | | join lims_laboratory.user on ipl.user_id = user.id |
| | | join lims_laboratory.instrument on ipl.instrument_id = instrument.id |
| | | where inspection_material_list_id = #{id} |
| | | from (select inspection_material_list_id, |
| | | pl.name name, |
| | | user.name uname, |
| | | method, |
| | | ask, |
| | | unit, |
| | | required, |
| | | internal, |
| | | start_time, |
| | | end_time, |
| | | equipment_name |
| | | from lims_laboratory.inspection_product_list pl |
| | | left join lims_laboratory.user on pl.user_id = user.id |
| | | left join lims_laboratory.instrument on pl.instrument_id = instrument.id) ipl |
| | | , lims_laboratory.inspection_material_list iml |
| | | , lims_laboratory.inspection i |
| | | where iml.id = ipl.inspection_material_list_id |
| | | and iml.id = ipl.inspection_material_list_id |
| | | and i.id = iml.inspection_id |
| | | and ipl.inspection_material_list_id = #{id} |
| | | </select> |
| | | </mapper> |