提交 | 用户 | 时间
|
7fd198
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
潘 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
|
|
4 |
<mapper namespace="com.iailab.module.model.mcs.pre.dao.MmPredictItemDao"> |
|
5 |
|
|
6 |
<resultMap id="ItemVO" type="com.iailab.module.model.mdk.vo.ItemVO"> |
|
7 |
<result property="id" column="ID"/> |
|
8 |
<result property="itemNo" column="ITEMNO"/> |
|
9 |
<result property="itemName" column="ITEMNAME"/> |
|
10 |
<result property="itemType" column="ITEMTYPENAME"/> |
|
11 |
<result property="predictLength" column="PREDICTLENGTH"/> |
|
12 |
<result property="granularity" column="GRANULARITY"/> |
|
13 |
<result property="status" column="STATUS"/> |
|
14 |
<result property="isFuse" column="ISFUSE"/> |
|
15 |
<result property="predictPhase" column="PREDICTPHASE"/> |
|
16 |
<result property="workChecked" column="WORKCHECKED"/> |
|
17 |
</resultMap> |
|
18 |
|
|
19 |
<resultMap id="MergeItemVO" type="com.iailab.module.model.mdk.vo.MergeItemVO"> |
|
20 |
<result property="id" column="ID"/> |
|
21 |
<result property="itemId" column="ITEMID"/> |
|
22 |
<result property="expression" column="EXPRESSION"/> |
|
23 |
</resultMap> |
|
24 |
|
137356
|
25 |
<select id="getPageList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO" |
潘 |
26 |
parameterType="map"> |
|
27 |
SELECT |
|
28 |
TMPI.ID, |
|
29 |
TMPI.ITEMNO, |
|
30 |
TMPI.ITEMNAME, |
|
31 |
TMPI.ITEMTYPEID, |
|
32 |
TMIT.ITEMTYPENAME, |
|
33 |
TMPI.PREDICTLENGTH, |
|
34 |
TMPI.GRANULARITY, |
|
35 |
TMPI.ISFUSE, |
|
36 |
TMPI.WORKCHECKED, |
|
37 |
TDMI.MODULEID, |
|
38 |
TDMI.ITEMORDER, |
|
39 |
TMPI.STATUS, |
|
40 |
TDMI.CATEGORYID, |
|
41 |
TMIO.POINTID, |
|
42 |
TMIO.TAGNAME, |
|
43 |
TMIO.RESULTTABLEID, |
|
44 |
TMRT.TABLENAME |
|
45 |
FROM T_MM_PREDICT_ITEM TMPI |
|
46 |
LEFT JOIN T_MM_ITEM_TYPE TMIT ON TMIT.ID = TMPI.ITEMTYPEID |
|
47 |
LEFT JOIN T_DM_MODULE_ITEM TDMI ON TDMI.ITEMID = TMPI.ID |
|
48 |
LEFT JOIN T_MM_ITEM_OUTPUT TMIO ON TMIO.ITEMID = TMPI.ID |
|
49 |
LEFT JOIN T_MM_RESULT_TABLE TMRT ON TMRT.ID = TMIO.RESULTTABLEID |
|
50 |
<where> |
|
51 |
<if test="params.itemno != null and params.itemno != ''"> |
|
52 |
AND TMPI.ITEMNO LIKE CONCAT('%', #{params.itemno},'%') |
|
53 |
</if> |
|
54 |
<if test="params.itemname != null and params.itemname != ''"> |
|
55 |
AND TMPI.ITEMNAME LIKE CONCAT('%', #{params.itemname},'%') |
|
56 |
</if> |
|
57 |
<if test="params.itemtypeid != null and params.itemtypeid != ''"> |
|
58 |
AND TMPI.ITEMTYPEID = #{params.itemtypeid} |
|
59 |
</if> |
|
60 |
<if test="params.itemtypename != null and params.itemtypename != ''"> |
|
61 |
AND TMIT.ITEMTYPENAME = #{params.itemtypename} |
|
62 |
</if> |
|
63 |
<if test="params.status != null and params.status != ''"> |
|
64 |
AND TMPI.STATUS = #{params.status} |
|
65 |
</if> |
|
66 |
</where> |
|
67 |
ORDER BY TMPI.CREATE_TIME DESC |
|
68 |
</select> |
|
69 |
|
7fd198
|
70 |
<select id="queryList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO" parameterType="map"> |
潘 |
71 |
SELECT |
|
72 |
TMPI.ID, |
|
73 |
TMPI.ITEMNO, |
|
74 |
TMPI.ITEMNAME, |
|
75 |
TMPI.ITEMTYPEID, |
|
76 |
TMIT.ITEMTYPENAME, |
|
77 |
TMPI.GRANULARITY, |
|
78 |
TMPI.ISFUSE, |
|
79 |
TMPI.WORKCHECKED, |
|
80 |
TDMI.MODULEID, |
|
81 |
TDMI.ITEMORDER, |
a97b38
|
82 |
TMPI.STATUS, |
7fd198
|
83 |
TDMI.CATEGORYID, |
潘 |
84 |
TMIO.POINTID, |
|
85 |
TMIO.TAGNAME, |
|
86 |
TMIO.RESULTTABLEID, |
|
87 |
TMRT.TABLENAME |
|
88 |
FROM T_MM_PREDICT_ITEM TMPI |
|
89 |
LEFT JOIN T_MM_ITEM_TYPE TMIT ON TMIT.ID = TMPI.ITEMTYPEID |
|
90 |
LEFT JOIN T_DM_MODULE_ITEM TDMI ON TDMI.ITEMID = TMPI.ID |
|
91 |
LEFT JOIN T_MM_ITEM_OUTPUT TMIO ON TMIO.ITEMID = TMPI.ID |
|
92 |
LEFT JOIN T_MM_RESULT_TABLE TMRT ON TMRT.ID = TMIO.RESULTTABLEID |
|
93 |
WHERE 1 = 1 |
a97b38
|
94 |
<if test="itemno != null and itemno != ''"> |
潘 |
95 |
AND TMPI.ITEMNO LIKE CONCAT('%', #{itemno},'%') |
7fd198
|
96 |
</if> |
a97b38
|
97 |
<if test="itemname != null and itemname != ''"> |
潘 |
98 |
AND TMPI.ITEMNAME LIKE CONCAT('%', #{itemname},'%') |
7fd198
|
99 |
</if> |
a97b38
|
100 |
<if test="itemtypeid != null and itemtypeid != ''"> |
潘 |
101 |
AND TMPI.ITEMTYPEID = #{itemtypeid} |
7fd198
|
102 |
</if> |
a97b38
|
103 |
<if test="itemtypename != null and itemtypename != ''"> |
潘 |
104 |
AND TMIT.ITEMTYPENAME = #{itemtypename} |
7fd198
|
105 |
</if> |
a97b38
|
106 |
<if test="status != null and status != ''"> |
潘 |
107 |
AND TMPI.STATUS = #{status} |
7fd198
|
108 |
</if> |
潘 |
109 |
ORDER BY TMPI.CREATE_TIME DESC |
|
110 |
</select> |
|
111 |
|
|
112 |
<select id="getByModuleId" parameterType="map" resultMap="ItemVO"> |
|
113 |
SELECT t1.id, |
|
114 |
t1.itemno, |
|
115 |
t1.itemname, |
|
116 |
t3.itemtypename, |
|
117 |
t1.predictlength, |
|
118 |
t1.granularity, |
|
119 |
t1.status, |
|
120 |
t1.isfuse, |
|
121 |
t1.workchecked, |
|
122 |
t1.unittransfactor |
|
123 |
FROM t_mm_predict_item t1, |
|
124 |
t_dm_module_item t2, |
|
125 |
t_mm_item_type t3 |
|
126 |
WHERE t1.id = t2.itemid |
|
127 |
AND t1.itemtypeid = t3.id |
|
128 |
AND t2.moduleid = #{MODULEID} |
|
129 |
AND t2.status = 1 |
|
130 |
AND t1.status = 1 |
|
131 |
ORDER BY t2.itemorder |
|
132 |
</select> |
|
133 |
|
|
134 |
<select id="getItem" parameterType="map" resultMap="ItemVO"> |
|
135 |
SELECT |
|
136 |
t1.id, |
|
137 |
t1.itemno , |
|
138 |
t1.itemname , |
|
139 |
t1.predictlength , |
|
140 |
t2.itemtypename, |
|
141 |
t1.granularity, |
|
142 |
t1.status, |
|
143 |
t1.isfuse, |
|
144 |
t1.predictphase, |
|
145 |
t1.workchecked |
|
146 |
FROM |
1a2b62
|
147 |
t_mm_predict_item t1, |
D |
148 |
t_mm_item_type t2 |
7fd198
|
149 |
WHERE t1.itemtypeid=t2.id |
潘 |
150 |
<if test="ITEMID != null and ITEMID != ''"> |
|
151 |
AND t1.id=#{ITEMID} |
|
152 |
</if> |
|
153 |
<if test="ITEMNO != null and ITEMNO != ''"> |
|
154 |
t1.itemno=#{ITEMNO} |
|
155 |
</if> |
|
156 |
</select> |
|
157 |
<select id="getMergeItemByItemId" parameterType="map" resultMap="MergeItemVO"> |
|
158 |
SELECT t1.id, |
|
159 |
t1.itemid, |
|
160 |
t1.expression |
|
161 |
FROM t_mm_predict_merge_item t1 |
|
162 |
WHERE t1.itemid = #{ITEMID} |
|
163 |
</select> |
|
164 |
|
|
165 |
|
|
166 |
</mapper> |