| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!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"> |
| | | <insert id="addInspectionProductList"> |
| | | INSERT INTO inspection_product_list (name, method, ask, unit, required, internal, create_time, |
| | | update_time,inspection_material_list_id, user_id) VALUES |
| | | <foreach collection="list" separator="," item="i"> |
| | | (#{i.name}, #{i.method}, #{i.ask}, #{i.unit}, #{i.required}, #{i.internal}, #{i.createTime}, |
| | | #{i.updateTime}, #{i.inspectionMaterialListId}, |
| | | #{i.userId}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <select id="selectByMaterId" resultType="com.yuanchu.limslaboratory.pojo.InspectionProductList"> |
| | | select id, |
| | | name, |
| | | <select id="selectByMaterId" resultType="com.yuanchu.limslaboratory.pojo.vo.InspectionProductListVo"> |
| | | select inspection_material_list_id, |
| | | inspect_start_time inspectStartTime, |
| | | inspect_end_time inspectEndTime, |
| | | ipl.name, |
| | | method, |
| | | ask, |
| | | unit, |
| | |
| | | internal, |
| | | start_time, |
| | | end_time, |
| | | state, |
| | | create_time, |
| | | update_time, |
| | | version, |
| | | inspection_material_list_id, |
| | | user_id, |
| | | instrument_id |
| | | from lims_laboratory.inspection_product_list |
| | | where inspection_material_list_id = #{id} |
| | | uname userName, |
| | | equipment_name instrumentName |
| | | 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> |