| | |
| | | <?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.RawMaterialMapper"> |
| | | |
| | | <select id="selectRawMaterial" resultType="com.yuanchu.limslaboratory.pojo.RawMaterial"> |
| | | SELECT * |
| | | FROM raw_material r |
| | |
| | | <if test="materialName != null and materialName != ''"> |
| | | AND r.`material_name` LIKE CONCAT('%',#{materialName},'%') |
| | | </if> |
| | | <if test="condition != null and condition != ''"> |
| | | AND r.`condition` = #{condition} |
| | | <if test="type != null"> |
| | | AND r.`type` = #{type} |
| | | </if> |
| | | <if test="createTime != null and createTime != ''"> |
| | | AND DATE_FORMAT(r.`create_time`,'%Y-%m-%d') = #{createTime} |
| | | AND DATE_FORMAT(r.`date_survey`,'%Y-%m-%d') = #{createTime} |
| | | </if> |
| | | </select> |
| | | <select id="selectRawmaAll" resultType="com.yuanchu.limslaboratory.pojo.RawMaterial"> |
| | | select * from lims_laboratory.raw_material where state=1 |
| | | </select> |
| | | |
| | | <select id="selectRawmaById" resultType="com.yuanchu.limslaboratory.pojo.vo.InspectionVo"> |
| | | select create_time formTime, |
| | | supplier_name supplier, |
| | | material_coding mcode, |
| | | material_name name, |
| | | specifications_models specifications, |
| | | unit , |
| | | quantity num |
| | | <select id="selectRawmaAll" resultType="java.util.Map"> |
| | | select id, |
| | | supplier_name supplier, |
| | | material_coding mcode, |
| | | material_name name, |
| | | specifications_models specifications, |
| | | unit, |
| | | quantity num, |
| | | surveyor, |
| | | type, |
| | | DATE_FORMAT(inspection_date, '%Y-%m-%d') startTime, |
| | | DATE_FORMAT(date_survey, '%Y-%m-%d') endTime, |
| | | DATE_FORMAT(create_time, '%Y-%m-%d') formTime |
| | | from lims_laboratory.raw_material |
| | | where id=#{id} |
| | | where state = 1 |
| | | </select> |
| | | </mapper> |