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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
| <?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.ruoyi.device.mapper.DataConfigMapper">
|
| <!-- 通用查询映射结果 -->
| <resultMap id="BaseResultMap" type="com.ruoyi.device.pojo.DataConfig">
| <id column="id" property="id" />
| <result column="formula" property="formula" />
| <result column="referx" property="referx" />
| <result column="refery" property="refery" />
| <result column="x" property="x" />
| <result column="y" property="y" />
| </resultMap>
|
| <select id="selectDataConfigList" resultType="com.ruoyi.device.dto.DeviceConfigDtoPage">
| SELECT d.device_name,
| d.file_type,
| d.collect_url,
| d.storage_url,
| d.ip,
| d.port,
| d.channel,
| d.entrust_code,
| d.sample_code,
| d.db_file_name,
| ip.inspection_item,
| ip.inspection_item_class,
| if(ip.inspection_item_subclass is not null and ip.inspection_item_subclass != '',
| ip.inspection_item_subclass, ip.inspection_item) inspection_item_subclass,
| ip.sample,
| ddc.formula,
| ddc.referx,
| ddc.refery,
| ddc.x,
| ddc.y,
| ddc.another_name,
| ddc.matching_name,
| ddc.id,
| ip.id structureItemParameterId ,
| ddc.imported_parts,
| ddc.imported_channel
| FROM device d
| left join structure_item_parameter ip on FIND_IN_SET(ip.id, d.ins_product_ids)
| left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id
| where d.id = #{deviceId}
| </select>
|
| <select id="deleteDataConfig" resultType="integer">
| SELECT ddc.id
| FROM device d
| left join structure_item_parameter ip on not FIND_IN_SET(ip.id, d.ins_product_ids)
| inner join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id
| </select>
| <select id="selectDataConfigListTwo" resultType="com.ruoyi.device.dto.DeviceConfigDtoPage">
| SELECT d.device_name,
| d.file_type,
| d.collect_url,
| d.storage_url,
| d.ip,
| d.port,
| d.channel,
| d.entrust_code,
| d.sample_code,
| d.db_file_name,
| ip.inspection_item,
| ip.inspection_item_class,
| if(ip.inspection_item_subclass is not null and ip.inspection_item_subclass != '',
| ip.inspection_item_subclass, ip.inspection_item) inspection_item_subclass,
| ip.sample,
| ddc.formula,
| ddc.referx,
| ddc.refery,
| ddc.x,
| ddc.y,
| ddc.another_name,
| ddc.matching_name,
| ddc.id,
| ip.id structureItemParameterId ,
| ddc.imported_parts,
| ddc.imported_channel
| FROM device d
| left join structure_item_parameter ip on FIND_IN_SET(ip.id, d.ins_product_ids)
| left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id
| where d.device_name = #{deviceName} and d.management_number = #{managementNumber}
| </select>
| </mapper>
|
|