opt:需求:回温间到快速回温间显示信息同库存明细一致
This commit is contained in:
@@ -210,34 +210,89 @@
|
||||
ORDER BY a.pointCode ASC
|
||||
</select>
|
||||
|
||||
<select id="queryMoveDetail2" resultType="org.nl.wms.sch.report.service.dto.YCLKCDto">
|
||||
<select id="queryMoveDetail2" resultType="org.nl.wms.sch.report.service.dto.HwDto">
|
||||
SELECT
|
||||
a.*
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
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,
|
||||
( CASE WHEN ( p.ing_task_code = '' OR p.ing_task_code IS NULL ) THEN 0 ELSE 1 END ) AS STATUS,
|
||||
p.update_time AS updateTime
|
||||
p.update_time AS updateTime,
|
||||
p.ing_task_code AS ing_task_code,
|
||||
( CASE WHEN ( p.ing_task_code = '' OR p.ing_task_code IS NULL ) THEN 0 ELSE 1 END ) AS status,
|
||||
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.vehicle_code2 = v.vehicle_code
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
m.PalletSN AS PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch,
|
||||
count( * ) AS number
|
||||
FROM
|
||||
sch_base_material m
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="query.lotSN != null">
|
||||
and m.lotSN like CONCAT('%', #{query.lotSN}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
m.PalletSN,
|
||||
m.siliconGrade,
|
||||
m.productDescription,
|
||||
m.supplierName,
|
||||
m.ingotBatch
|
||||
) m2 ON p.vehicle_code2 = m2.PalletSN
|
||||
WHERE
|
||||
p.vehicle_code2 != ''
|
||||
AND p.vehicle_code2 IS NOT NULL
|
||||
AND p.point_code LIKE 'XHW%'
|
||||
AND p.is_used = '1'
|
||||
AND (p.ing_task_code IS NULL or p.ing_task_code = '')
|
||||
AND p.region_code IN ( 'HW' )) a
|
||||
WHERE 1=1
|
||||
<if test="query.point_code != null">
|
||||
and a.pointCode = #{query.point_code}
|
||||
AND ( p.ing_task_code IS NULL OR p.ing_task_code = '' )
|
||||
AND v.group_bind_material_status = '2'
|
||||
AND p.region_code IN ( 'HW' )
|
||||
<if test="query.supplierName != null">
|
||||
and m2.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m2.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
<if test="query.point_code != null">
|
||||
and p.point_code like CONCAT('%', #{query.point_code}, '%')
|
||||
</if>
|
||||
<if test="query.region_code != null">
|
||||
and p.region_code like CONCAT('%', #{query.region_code}, '%')
|
||||
</if>
|
||||
<if test="query.ingotBatch != null">
|
||||
and m2.ingotBatch like CONCAT('%', #{query.ingotBatch}, '%')
|
||||
</if>
|
||||
<if test="query.number != null">
|
||||
and m2.number = #{query.number}
|
||||
</if>
|
||||
) a
|
||||
where 1=1
|
||||
<if test="query.status != null">
|
||||
and a.status = #{query.status}
|
||||
</if>
|
||||
ORDER BY a.pointCode ASC
|
||||
ORDER BY
|
||||
a.pointCode ASC
|
||||
</select>
|
||||
|
||||
<select id="queryYlIn" resultType="org.nl.wms.sch.report.service.dto.YlDto">
|
||||
|
||||
@@ -40,4 +40,6 @@ public class HwDto implements Serializable {
|
||||
private String ingotBatch;
|
||||
/** 任务号 */
|
||||
private String ing_task_code;
|
||||
/** 是否有任务标识 */
|
||||
private String status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user