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