1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| <?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.MaterialMapper">
|
| <select id="selectMaterialLimit" resultType="Map">
| select id, name
| from lims_laboratory.material
| where state = 1
| and type = #{type}
| order by create_time desc
| limit #{num1},#{num2}
| </select>
| <select id="selectMaterialById" resultType="Map">
| select m.id,
| m.num,
| m.supplier,
| m.name,
| m.location,
| m.batch,
| m.reel_number reelNumber,
| concat(s.name, '/', sn.name) specificationSerialNum,
| s.voltage_level voltageLevel,
| s.cross_section crossSection,
| s.number_of_cores numberOfCores,
| s.instruct
| from lims_laboratory.material m,
| lims_laboratory.specifications s,
| lims_laboratory.serial_number sn
| where m.specifications_id = s.id
| and s.serial_id = sn.id
| and m.id=#{materialId}
| </select>
| </mapper>
|
|