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
34
35
36
37
38
39
40
41
42
| <?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="org.jeecg.modules.eam.mapper.QuanlityConfirmMapper">
| <select id="myPage" resultType="org.jeecg.modules.eam.entity.QuanlityConfirm">
| select
| t1.id id,
| t1.num num,
| t1.report_id reportId,
| t1.condition condition,
| t1.condition_analysis conditionAnalysis,
| t1.part_number partNumber,
| t1.batch_no batchNo,
| t1.quantity quantity,
| t1.operator operator,
| t1.create_time creatTime,
| t1.leader leader,
| t1.confirm_time confirmTime,
| t1.is_confirm isConfirm,
| t2.num reportNum,
| t2.fault_description faultDescription,
| t3.num equipmentNum,
| t3.name equipmentName,
| t3.model equipmentModel
| from mom_eam_quanlity_confirm t1
| left join (select * from mom_eam_equipment_report_repair where del_flag = 0) t2 on t2.id = t1.report_id
| left join (select * from mom_eam_equipment where del_flag = 0) t3 on t3.id = t2.equipment_id
| where 1=1
| <if test="num != null and num != ''">
| and t1.num like concat('%',#{num},'%')
| </if>
| <if test="reportNum != null and reportNum != ''">
| and t2.num like concat('%',#{reportNum},'%')
| </if>
| <if test="equipmentNum != null and equipmentNum != ''">
| and t3.num like concat('%',#{equipmentNum},'%')
| </if>
| <if test="id != null and id != ''">
| and t1.id = #{id}
| </if>
| order by t1.create_time desc
| </select>
| </mapper>
|
|