|
|
@@ -92,8 +92,44 @@
|
|
92
|
92
|
<if test="parms.endDtm != null and parms.endDtm != ''">
|
|
93
|
93
|
and ir.IN_DTM <= TO_DATE(#{parms.endDtm}, 'yyyy-MM-dd hh24:mi:ss')
|
|
94
|
94
|
</if>
|
|
95
|
|
- <if test="parms.prodNo != null and parms.prodNo != ''">
|
|
96
|
|
- and ir.PROD_NO like '%' || #{parms.prodNo} || '%'
|
|
|
95
|
+<!-- <if test="parms.prodNo != null and parms.prodNo != ''">-->
|
|
|
96
|
+<!-- and ir.PROD_NO like '%' || #{parms.prodNo} || '%'-->
|
|
|
97
|
+<!-- </if>-->
|
|
|
98
|
+ <if test="parms.stGrade != null and parms.stGrade.size() > 0 and parms.stGrade!=''">
|
|
|
99
|
+ and ir.st_grade in
|
|
|
100
|
+ <foreach collection="parms.stGrade" item="item" open="(" separator="," close=")">
|
|
|
101
|
+ #{item,jdbcType=VARCHAR}
|
|
|
102
|
+ </foreach>
|
|
|
103
|
+ </if>
|
|
|
104
|
+ <if test="parms.attrib_01 != null and parms.attrib_01.size() > 0">
|
|
|
105
|
+ and PROD.attrib_01 in
|
|
|
106
|
+ <foreach collection="parms.attrib_01" item="item" open="(" separator="," close=")">
|
|
|
107
|
+ #{item,jdbcType=VARCHAR}
|
|
|
108
|
+ </foreach>
|
|
|
109
|
+ </if>
|
|
|
110
|
+ <if test="parms.attrib_02 != null and parms.attrib_02.size() > 0 ">
|
|
|
111
|
+ and PROD.attrib_02 in
|
|
|
112
|
+ <foreach collection="parms.attrib_02" item="item" open="(" separator="," close=")">
|
|
|
113
|
+ #{item,jdbcType=VARCHAR}
|
|
|
114
|
+ </foreach>
|
|
|
115
|
+ </if>
|
|
|
116
|
+ <if test="parms.attrib_04 != null and parms.attrib_04.size() > 0 ">
|
|
|
117
|
+ and PROD.attrib_04 in
|
|
|
118
|
+ <foreach collection="parms.attrib_04" item="item" open="(" separator="," close=")">
|
|
|
119
|
+ #{item,jdbcType=VARCHAR}
|
|
|
120
|
+ </foreach>
|
|
|
121
|
+ </if>
|
|
|
122
|
+ <if test="parms.inTruckNo != null and parms.inTruckNo.size() > 0 ">
|
|
|
123
|
+ and PROD.IN_TRUCK_NO in
|
|
|
124
|
+ <foreach collection="parms.inTruckNo" item="item" open="(" separator="," close=")">
|
|
|
125
|
+ #{item,jdbcType=VARCHAR}
|
|
|
126
|
+ </foreach>
|
|
|
127
|
+ </if>
|
|
|
128
|
+ <if test="parms.prodNo != null and parms.prodNo.size() > 0 ">
|
|
|
129
|
+ and ir.prod_no in
|
|
|
130
|
+ <foreach collection="parms.prodNo" item="item" open="(" separator="," close=")">
|
|
|
131
|
+ #{item,jdbcType=VARCHAR}
|
|
|
132
|
+ </foreach>
|
|
97
|
133
|
</if>
|
|
98
|
134
|
<!-- <if test="parms.orderNo != null and parms.orderNo != ''">-->
|
|
99
|
135
|
<!-- and ir.order_NO like '%' || #{parms.orderNo} || '%'-->
|
|
|
@@ -106,66 +142,70 @@
|
|
106
|
142
|
|
|
107
|
143
|
<select id="selectInrecordPage" resultMap="InrecordResultMap" parameterType="map">
|
|
108
|
144
|
select
|
|
109
|
|
- ir.id,
|
|
110
|
|
- ir.belong_id,
|
|
111
|
|
- ir.in_truck_no,
|
|
112
|
|
- ir.tally_people,
|
|
113
|
|
- ir.in_dtm,
|
|
114
|
|
- ir.in_ware_name,
|
|
115
|
|
- ir.in_stack_name,
|
|
116
|
|
- ir.in_layer_no,
|
|
117
|
|
- ir.prod_no,
|
|
118
|
|
- ir.owner_company,
|
|
119
|
|
- ir.receiving_company,
|
|
120
|
|
- ir.customer_company,
|
|
121
|
|
- ir.material_id,
|
|
122
|
|
- ir.st_grade,
|
|
123
|
|
- ir.in_weight,
|
|
124
|
|
- ir.in_quantity,
|
|
125
|
|
- ir.in_flag,
|
|
126
|
|
- nvl(ir.delivery_address, owner.default_address) as delivery_address,
|
|
127
|
|
- ir.attrib_01,
|
|
128
|
|
- ir.attrib_02,
|
|
129
|
|
- ir.attrib_03,
|
|
130
|
|
- ir.attrib_04,
|
|
131
|
|
- ir.attrib_05,
|
|
132
|
|
- ir.attrib_06,
|
|
133
|
|
- ir.attrib_07,
|
|
134
|
|
- ir.attrib_08,
|
|
135
|
|
- ir.attrib_09,
|
|
136
|
|
- ir.attrib_10,
|
|
137
|
|
- ir.attrib_11,
|
|
138
|
|
- ir.attrib_12,
|
|
139
|
|
- ir.attrib_13,
|
|
140
|
|
- ir.attrib_14,
|
|
141
|
|
- ir.attrib_15,
|
|
142
|
|
- ir.attrib_16,
|
|
143
|
|
- ir.attrib_17,
|
|
144
|
|
- ir.attrib_18,
|
|
145
|
|
- ir.attrib_19,
|
|
146
|
|
- ir.attrib_20,
|
|
147
|
|
- ir.attrib_21,
|
|
148
|
|
- ir.attrib_22,
|
|
149
|
|
- ir.attrib_23,
|
|
150
|
|
- ir.attrib_24,
|
|
151
|
|
- ir.attrib_25,
|
|
152
|
|
- ir.remark_1,
|
|
153
|
|
- ir.remark_2,
|
|
154
|
|
- ir.remark_3,
|
|
155
|
|
- ir.remark_4,
|
|
156
|
|
- ir.remark_5,
|
|
157
|
|
- owner.customer_nm as owner_company_name,
|
|
158
|
|
- receiving.customer_nm as receiving_company_name,
|
|
159
|
|
- customer.customer_nm as customer_company_name,
|
|
160
|
|
- material.material_name as material_name,
|
|
161
|
|
- material.material_code as material_code,
|
|
162
|
|
- material.material_standard as material_standard,
|
|
163
|
|
- material.material_model as material_model
|
|
|
145
|
+ ir.id,
|
|
|
146
|
+ ir.belong_id,
|
|
|
147
|
+ ir.in_truck_no,
|
|
|
148
|
+ ir.tally_people,
|
|
|
149
|
+ ir.in_dtm,
|
|
|
150
|
+ ir.in_ware_name,
|
|
|
151
|
+ ir.in_stack_name,
|
|
|
152
|
+ ir.in_layer_no,
|
|
|
153
|
+ ir.prod_no,
|
|
|
154
|
+ ir.owner_company,
|
|
|
155
|
+ ir.receiving_company,
|
|
|
156
|
+ ir.customer_company,
|
|
|
157
|
+ ir.material_id,
|
|
|
158
|
+ ir.st_grade,
|
|
|
159
|
+ ir.in_weight,
|
|
|
160
|
+ ir.in_quantity,
|
|
|
161
|
+ ir.in_flag,
|
|
|
162
|
+ nvl(ir.delivery_address, owner.default_address) as delivery_address,
|
|
|
163
|
+ ir.attrib_01,
|
|
|
164
|
+ ir.attrib_02,
|
|
|
165
|
+ ir.attrib_03,
|
|
|
166
|
+ ir.attrib_04,
|
|
|
167
|
+ ir.attrib_05,
|
|
|
168
|
+ ir.attrib_06,
|
|
|
169
|
+ ir.attrib_07,
|
|
|
170
|
+ ir.attrib_08,
|
|
|
171
|
+ ir.attrib_09,
|
|
|
172
|
+ ir.attrib_10,
|
|
|
173
|
+ ir.attrib_11,
|
|
|
174
|
+ ir.attrib_12,
|
|
|
175
|
+ ir.attrib_13,
|
|
|
176
|
+ ir.attrib_14,
|
|
|
177
|
+ ir.attrib_15,
|
|
|
178
|
+ ir.attrib_16,
|
|
|
179
|
+ ir.attrib_17,
|
|
|
180
|
+ ir.attrib_18,
|
|
|
181
|
+ ir.attrib_19,
|
|
|
182
|
+ ir.attrib_20,
|
|
|
183
|
+ ir.attrib_21,
|
|
|
184
|
+ ir.attrib_22,
|
|
|
185
|
+ ir.attrib_23,
|
|
|
186
|
+ ir.attrib_24,
|
|
|
187
|
+ ir.attrib_25,
|
|
|
188
|
+ ir.remark_1,
|
|
|
189
|
+ ir.remark_2,
|
|
|
190
|
+ ir.remark_3,
|
|
|
191
|
+ ir.remark_4,
|
|
|
192
|
+ ir.remark_5,
|
|
|
193
|
+ owner.customer_nm as owner_company_name,
|
|
|
194
|
+ receiving.customer_nm as receiving_company_name,
|
|
|
195
|
+ customer.customer_nm as customer_company_name,
|
|
|
196
|
+ material.material_name as material_name,
|
|
|
197
|
+ material.material_code as material_code,
|
|
|
198
|
+ material.material_standard as material_standard,
|
|
|
199
|
+ material.material_model as material_model,
|
|
|
200
|
+ prod.ATTRIB_01 as orderNo,
|
|
|
201
|
+ PROD.ATTRIB_02 as contractNo,
|
|
|
202
|
+ PROD.IN_TRUCK_NO as carNo
|
|
164
|
203
|
from T_IN_RECORD ir
|
|
165
|
|
- left join T_MAIN_CUSTOMER owner on owner.id = ir.owner_company
|
|
166
|
|
- left join T_MAIN_CUSTOMER receiving on receiving.id = ir.receiving_company
|
|
167
|
|
- left join T_MAIN_CUSTOMER customer on customer.id = ir.customer_company
|
|
168
|
|
- left join T_MAIN_MATERIAL material on material.id = ir.material_id
|
|
|
204
|
+ left join T_MAIN_CUSTOMER owner on owner.id = ir.owner_company
|
|
|
205
|
+ left join T_MAIN_CUSTOMER receiving on receiving.id = ir.receiving_company
|
|
|
206
|
+ left join T_MAIN_CUSTOMER customer on customer.id = ir.customer_company
|
|
|
207
|
+ left join T_MAIN_MATERIAL material on material.id = ir.material_id
|
|
|
208
|
+ left JOIN T_PROD_MASTER PROD ON PROD.PROD_No = ir.prod_no
|
|
169
|
209
|
<include refid="StatisticsWhere"/>
|
|
170
|
210
|
order by ir.in_dtm desc
|
|
171
|
211
|
</select>
|