修改计算产能不足一小时计算为0的情况
This commit is contained in:
@@ -317,10 +317,11 @@
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
device.productivity,
|
||||
device.productivity * TIMESTAMPDIFF( HOUR, realproducestart_date, now( ) ) AS max_productivity,
|
||||
shiftorder.produceorder_code,
|
||||
shiftorder.realproducestart_date
|
||||
device.productivity,
|
||||
CASE WHEN TIMESTAMPDIFF( HOUR, realproducestart_date, now( ) ) = '0' THEN device.productivity
|
||||
ELSE device.productivity * TIMESTAMPDIFF( HOUR, realproducestart_date, now( ) ) END AS max_productivity,
|
||||
shiftorder.produceorder_code,
|
||||
shiftorder.realproducestart_date
|
||||
FROM
|
||||
pdm_bi_device device
|
||||
RIGHT JOIN MPS_BD_ProduceShiftOrder shiftorder ON shiftorder.device_id = device.device_id
|
||||
|
||||
Reference in New Issue
Block a user