| | |
| | | <?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.NonConformingFeedbackMapper"> |
| | | |
| | | <select id="selectNonConformingFeedback" resultType="nonConformingFeedback" parameterType="com.yuanchu.limslaboratory.pojo.Dto.NonConformingFeedbackDto"> |
| | | SELECT |
| | | <select id="selectNonConformingFeedback" resultType="nonConformingFeedback" |
| | | parameterType="com.yuanchu.limslaboratory.pojo.Dto.NonConformingFeedbackDto"> |
| | | SELECT im.id, |
| | | im.`code` materialCode, |
| | | im.`name` materialName, |
| | | i.`code` inspectionCode, |
| | | i.create_time createTime, |
| | | u.`name` testManager, |
| | | im.specifications specifications |
| | | im.specifications specifications, |
| | | inspection_status result |
| | | FROM |
| | | inspection i, |
| | | inspection_material im, |
| | | `user` u |
| | | lims_laboratory.inspection i, |
| | | lims_laboratory.inspection_material im, |
| | | lims_laboratory.`user` u |
| | | WHERE |
| | | 1 = 1 |
| | | AND i.id = im.inspection_id |
| | | i.id = im.inspection_id |
| | | AND i.user_id = u.id |
| | | <if test="nonConformingFeedbackDto.materialCode!=null and nonConformingFeedbackDto.materialCode!=''"> |
| | | and im.`code` like concat("%",#{nonConformingFeedbackDto.materialCode},"%") |
| | | and im.`code` like concat('%',#{nonConformingFeedbackDto.materialCode},'%') |
| | | </if> |
| | | <if test="nonConformingFeedbackDto.materialName!=null and nonConformingFeedbackDto.materialName!=''"> |
| | | and im.`name` like concat("%",#{nonConformingFeedbackDto.materialName},"%") |
| | | and im.`name` like concat('%',#{nonConformingFeedbackDto.materialName},'%') |
| | | </if> |
| | | <if test="nonConformingFeedbackDto.inspectionCode!=null and nonConformingFeedbackDto.inspectionCode!=''"> |
| | | and im.specifications like concat("%",#{nonConformingFeedbackDto.inspectionCode},"%") |
| | | and im.specifications like concat('%',#{nonConformingFeedbackDto.inspectionCode},'%') |
| | | </if> |
| | | and i.state=1 |
| | | and im.state=1 |
| | | and i.inspection_status =0 |
| | | </select> |
| | | |
| | | </mapper> |