|
|
@ -53,8 +53,8 @@ |
|
|
|
sch_base_point p,sch_base_material m |
|
|
|
WHERE |
|
|
|
p.vehicle_code2 = m.PalletSN |
|
|
|
and |
|
|
|
vehicle_code2!='' AND vehicle_code2 is not null |
|
|
|
AND vehicle_code2!='' |
|
|
|
AND vehicle_code2 is not null |
|
|
|
<if test="query.supplierName != null"> |
|
|
|
and m.supplierName like CONCAT('%', #{query.supplierName}, '%') |
|
|
|
</if> |
|
|
@ -183,24 +183,22 @@ |
|
|
|
<select id="queryYlIn" resultType="org.nl.wms.sch.report.service.dto.YlDto"> |
|
|
|
SELECT |
|
|
|
m.lotSN, |
|
|
|
p.point_code as pointCode, |
|
|
|
p.point_name as pointName, |
|
|
|
p.region_code as regionCode, |
|
|
|
p.region_name as regionName, |
|
|
|
p.vehicle_code2 as subTray, |
|
|
|
p.vehicle_code as motherTray, |
|
|
|
t.update_time as updateTime, |
|
|
|
p.point_code AS pointCode, |
|
|
|
p.point_name AS pointName, |
|
|
|
p.region_code AS regionCode, |
|
|
|
p.region_name AS regionName, |
|
|
|
t.vehicle_code2 AS subTray, |
|
|
|
t.vehicle_code AS motherTray, |
|
|
|
t.update_time AS updateTime, |
|
|
|
m.* |
|
|
|
FROM |
|
|
|
sch_base_task t,sch_base_point p,sch_base_material m |
|
|
|
sch_base_task t, |
|
|
|
sch_base_point p, |
|
|
|
sch_base_material m |
|
|
|
WHERE |
|
|
|
p.vehicle_code2 = m.PalletSN |
|
|
|
and |
|
|
|
t.point_code2 like 'HJ%' |
|
|
|
and |
|
|
|
t.point_code2=p.point_code |
|
|
|
and |
|
|
|
p.vehicle_code2!='' AND p.vehicle_code2 is not null |
|
|
|
t.vehicle_code2 = m.PalletSN |
|
|
|
AND t.point_code2 = p.point_code |
|
|
|
AND t.point_code2 LIKE 'HJ%' |
|
|
|
<if test="query.supplierName != null"> |
|
|
|
and m.supplierName like CONCAT('%', #{query.supplierName}, '%') |
|
|
|
</if> |
|
|
@ -225,24 +223,24 @@ |
|
|
|
<select id="queryYlOut" resultType="org.nl.wms.sch.report.service.dto.YlDto"> |
|
|
|
SELECT |
|
|
|
m.lotSN, |
|
|
|
p.point_code as pointCode, |
|
|
|
p.point_name as pointName, |
|
|
|
p.region_code as regionCode, |
|
|
|
p.region_name as regionName, |
|
|
|
p.vehicle_code2 as subTray, |
|
|
|
p.vehicle_code as motherTray, |
|
|
|
t.update_time as updateTime, |
|
|
|
p.point_code AS pointCode, |
|
|
|
p.region_name AS regionName, |
|
|
|
p2.point_code AS pointCode2, |
|
|
|
p2.region_name AS regionName2, |
|
|
|
t.vehicle_code2 AS subTray, |
|
|
|
t.vehicle_code AS motherTray, |
|
|
|
t.update_time AS updateTime, |
|
|
|
m.* |
|
|
|
FROM |
|
|
|
sch_base_task t,sch_base_point p,sch_base_material m |
|
|
|
sch_base_task t, |
|
|
|
sch_base_point p, |
|
|
|
sch_base_point p2, |
|
|
|
sch_base_material m |
|
|
|
WHERE |
|
|
|
p.vehicle_code2 = m.PalletSN |
|
|
|
and |
|
|
|
t.point_code2 like 'XHW%' |
|
|
|
and |
|
|
|
t.point_code2=p.point_code |
|
|
|
and |
|
|
|
p.vehicle_code2!='' AND p.vehicle_code2 is not null |
|
|
|
t.vehicle_code2 = m.PalletSN |
|
|
|
AND t.point_code1 = p.point_code |
|
|
|
AND t.point_code2 = p2.point_code |
|
|
|
AND t.point_code2 LIKE 'XHW%' |
|
|
|
<if test="query.supplierName != null"> |
|
|
|
and m.supplierName like CONCAT('%', #{query.supplierName}, '%') |
|
|
|
</if> |
|
|
@ -261,7 +259,7 @@ |
|
|
|
<if test="query.ingotBatch != null"> |
|
|
|
and m.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%') |
|
|
|
</if> |
|
|
|
ORDER BY t.update_time DESC,point_code ASC |
|
|
|
ORDER BY t.update_time DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryHwDetail" resultType="org.nl.wms.sch.report.service.dto.HwDto"> |
|
|
@ -274,19 +272,19 @@ |
|
|
|
p.vehicle_code AS motherTray, |
|
|
|
p.update_time AS updateTime, |
|
|
|
p.ing_task_code AS ing_task_code, |
|
|
|
ANY_VALUE ( v.standing_time ) AS standingTime, |
|
|
|
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade, |
|
|
|
ANY_VALUE ( m2.productDescription ) AS productDescription, |
|
|
|
ANY_VALUE ( m2.supplierName ) AS supplierName, |
|
|
|
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch, |
|
|
|
ANY_VALUE ( m2.number ) AS number, |
|
|
|
v.standing_time AS standingTime, |
|
|
|
m2.siliconGrade AS siliconGrade, |
|
|
|
m2.productDescription AS productDescription, |
|
|
|
m2.supplierName AS supplierName, |
|
|
|
m2.ingotBatch AS ingotBatch, |
|
|
|
m2.number AS number, |
|
|
|
TIMESTAMPDIFF( |
|
|
|
HOUR, |
|
|
|
p.update_time, |
|
|
|
curtime()) AS usedTime |
|
|
|
FROM |
|
|
|
sch_base_point p |
|
|
|
LEFT JOIN sch_base_vehiclematerialgroup v ON p.point_code = v.point_code |
|
|
|
LEFT JOIN sch_base_vehiclematerialgroup v ON p.vehicle_code2 = v.vehicle_code |
|
|
|
LEFT JOIN ( |
|
|
|
SELECT |
|
|
|
m.PalletSN AS PalletSN, |
|
|
@ -332,8 +330,6 @@ |
|
|
|
<if test="query.number != null"> |
|
|
|
and m2.number = #{query.number} |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
pointCode |
|
|
|
ORDER BY pointCode ASC |
|
|
|
</select> |
|
|
|
|
|
|
@ -341,14 +337,14 @@ |
|
|
|
SELECT |
|
|
|
p.point_code AS pointCode, |
|
|
|
p.region_name AS regionName, |
|
|
|
p.vehicle_code2 AS subTray, |
|
|
|
p.vehicle_code AS motherTray, |
|
|
|
p.update_time AS updateTime, |
|
|
|
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade, |
|
|
|
ANY_VALUE ( m2.productDescription ) AS productDescription, |
|
|
|
ANY_VALUE ( m2.supplierName ) AS supplierName, |
|
|
|
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch, |
|
|
|
ANY_VALUE ( m2.number ) AS number, |
|
|
|
t.vehicle_code2 AS subTray, |
|
|
|
t.vehicle_code AS motherTray, |
|
|
|
t.update_time AS updateTime, |
|
|
|
m2.siliconGrade AS siliconGrade, |
|
|
|
m2.productDescription AS productDescription, |
|
|
|
m2.supplierName AS supplierName, |
|
|
|
m2.ingotBatch AS ingotBatch, |
|
|
|
m2.number AS number, |
|
|
|
TIMESTAMPDIFF( |
|
|
|
HOUR, |
|
|
|
p.update_time, |
|
|
@ -379,8 +375,8 @@ |
|
|
|
m.ingotBatch |
|
|
|
) m2 ON t.vehicle_code2 = m2.PalletSN |
|
|
|
WHERE |
|
|
|
p.vehicle_code2 != '' |
|
|
|
AND p.vehicle_code2 IS NOT NULL |
|
|
|
t.vehicle_code2 != '' |
|
|
|
AND t.vehicle_code2 IS NOT NULL |
|
|
|
AND t.point_code2 LIKE 'XHW%' |
|
|
|
AND t.task_status in ('5') |
|
|
|
<if test="query.supplierName != null"> |
|
|
@ -401,9 +397,7 @@ |
|
|
|
<if test="query.number != null"> |
|
|
|
and m2.number = #{query.number} |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
pointCode |
|
|
|
ORDER BY p.update_time DESC, pointCode ASC |
|
|
|
ORDER BY t.update_time DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryHwInPending" resultType="org.nl.wms.sch.report.service.dto.HwDto"> |
|
|
@ -475,17 +469,17 @@ |
|
|
|
SELECT |
|
|
|
p.point_code AS pointCode, |
|
|
|
p.region_name AS regionName, |
|
|
|
ANY_VALUE ( p2.point_code ) AS pointCode2, |
|
|
|
ANY_VALUE ( p2.region_name ) AS regionName2, |
|
|
|
ANY_VALUE ( t.vehicle_code2 ) AS subTray, |
|
|
|
ANY_VALUE ( t.vehicle_code ) AS motherTray, |
|
|
|
p.update_time AS updateTime, |
|
|
|
ANY_VALUE ( v.standing_time ) AS standingTime, |
|
|
|
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade, |
|
|
|
ANY_VALUE ( m2.productDescription ) AS productDescription, |
|
|
|
ANY_VALUE ( m2.supplierName ) AS supplierName, |
|
|
|
ANY_VALUE ( m2.ingotBatch ) AS ingotBatch, |
|
|
|
ANY_VALUE ( m2.number ) AS number, |
|
|
|
p2.point_code AS pointCode2, |
|
|
|
p2.region_name AS regionName2, |
|
|
|
t.vehicle_code2 AS subTray, |
|
|
|
t.vehicle_code AS motherTray, |
|
|
|
t.update_time AS updateTime, |
|
|
|
v.standing_time AS standingTime, |
|
|
|
m2.siliconGrade AS siliconGrade, |
|
|
|
m2.productDescription AS productDescription, |
|
|
|
m2.supplierName AS supplierName, |
|
|
|
m2.ingotBatch AS ingotBatch, |
|
|
|
m2.number AS number, |
|
|
|
TIMESTAMPDIFF( |
|
|
|
HOUR, |
|
|
|
p.update_time, |
|
|
@ -518,8 +512,8 @@ |
|
|
|
m.ingotBatch |
|
|
|
) m2 ON t.vehicle_code2 = m2.PalletSN |
|
|
|
WHERE |
|
|
|
p.vehicle_code2 != '' |
|
|
|
AND p.vehicle_code2 IS NOT NULL |
|
|
|
t.vehicle_code2 != '' |
|
|
|
AND t.vehicle_code2 IS NOT NULL |
|
|
|
AND t.is_delete = '0' |
|
|
|
AND t.point_code1 LIKE 'XHW%' |
|
|
|
AND t.point_code2 LIKE 'FHW%' |
|
|
@ -541,9 +535,7 @@ |
|
|
|
<if test="query.number != null"> |
|
|
|
and m2.number = #{query.number} |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
pointCode |
|
|
|
ORDER BY p.update_time DESC, pointCode ASC |
|
|
|
ORDER BY t.update_time DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryHwOutPending" resultType="org.nl.wms.sch.report.service.dto.HwDto"> |
|
|
@ -552,8 +544,8 @@ |
|
|
|
p.region_name AS regionName, |
|
|
|
ANY_VALUE ( p2.point_code ) AS pointCode2, |
|
|
|
ANY_VALUE ( p2.region_name ) AS regionName2, |
|
|
|
ANY_VALUE ( t.vehicle_code2 ) AS subTray, |
|
|
|
ANY_VALUE ( t.vehicle_code ) AS motherTray, |
|
|
|
ANY_VALUE ( p.vehicle_code2 ) AS subTray, |
|
|
|
ANY_VALUE ( p.vehicle_code ) AS motherTray, |
|
|
|
p.update_time AS updateTime, |
|
|
|
ANY_VALUE ( m2.siliconGrade ) AS siliconGrade, |
|
|
|
ANY_VALUE ( m2.productDescription ) AS productDescription, |
|
|
|