|
|
@ -4,34 +4,38 @@ |
|
|
|
|
|
|
|
<select id="sc" resultType="org.nl.wms.board.service.dao.dto.ScDto"> |
|
|
|
SELECT |
|
|
|
*, |
|
|
|
b.batch,b.standing_time,b.usedTime,b.productName,b.supplierName,b.productDescription, |
|
|
|
CASE |
|
|
|
WHEN b.standing_time > b.usedTime THEN |
|
|
|
'回温中' ELSE '回温完成' |
|
|
|
END AS state |
|
|
|
,count(*) as number |
|
|
|
FROM |
|
|
|
( |
|
|
|
SELECT |
|
|
|
productName, |
|
|
|
supplierName, |
|
|
|
productDescription, |
|
|
|
pcsn AS batch, |
|
|
|
standing_time, |
|
|
|
TIMESTAMPDIFF( |
|
|
|
HOUR, |
|
|
|
instorage_time, |
|
|
|
curtime()) AS usedTime |
|
|
|
DISTINCT point_code, |
|
|
|
productName, |
|
|
|
supplierName, |
|
|
|
productDescription, |
|
|
|
pcsn AS batch, |
|
|
|
standing_time, |
|
|
|
TIMESTAMPDIFF( |
|
|
|
HOUR, |
|
|
|
instorage_time, |
|
|
|
curtime()) AS usedTime |
|
|
|
FROM |
|
|
|
( |
|
|
|
SELECT |
|
|
|
* |
|
|
|
DISTINCT point_code,vehicle_code,pcsn,standing_time,instorage_time |
|
|
|
FROM |
|
|
|
sch_base_vehiclematerialgroup |
|
|
|
WHERE |
|
|
|
vehicle_code IN ( SELECT vehicle_code2 FROM sch_base_point WHERE region_code = #{region_code} AND vehicle_code!='' AND vehicle_code IS NOT NULL )) a |
|
|
|
LEFT JOIN sch_base_material m ON a.vehicle_code = m.PalletSN |
|
|
|
AND m.group_bind_material_status = 2 |
|
|
|
vehicle_code IN ( SELECT vehicle_code2 FROM sch_base_point WHERE region_code = #{region_code} AND vehicle_code!='' AND vehicle_code IS NOT NULL )) a |
|
|
|
LEFT JOIN sch_base_material m ON a.vehicle_code = m.PalletSN |
|
|
|
AND m.group_bind_material_status = 2 |
|
|
|
) b |
|
|
|
GROUP BY batch,standing_time,usedTime,productName,supplierName,productDescription |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="kn" resultType="org.nl.wms.board.service.dao.dto.WlDto"> |
|
|
|