訂單組日工作量報表資料生成優化

2021-08-17 01:31:50 字數 4311 閱讀 9167

class order_service_orderworkload  else 

//b類

$configidb = common_service_config::getbyattribute(self::$maxsortnumber[1]);

if ($configidb && $configidb['config_value']) else

//c類

$configidc = common_service_config::getbyattribute(self::$maxsortnumber[2]);

if ($configidc && $configidc['config_value']) else

//配貨

$peihuos = product_service_pickup::getbycondition($combination, '*');

if ($peihuos)

//打包

$packings = product_service_pickup::getbycondition($combinat, '*');

if ($packings)

//分揀

$sorters = product_service_pickup::getbycondition($combin, '*');

if ($sorters)

} catch (exception $ex) }/*

* 生成資料

* * $combination array() 查詢結果資料

* $maximumusablea integer a 類訂單最大可用訂單票數

* $maximumusableb integer b 類訂單最大可用訂單票數

* $maximumusablec integer c 類訂單最大可用訂單票數

* $startdate 0000-00-00 開始時間

* $post integer 崗位人員

*/public static function generate($combination, $maximumusablea, $maximumusableb, $maximumusablec, $startdate, $post)

$countcode = count(array_unique($row));

}//根據訂單型別計算花費時間、標準配置時間、崗位人員

$time = 0;

if ($post == 0)

$configid = common_service_config::getbyattribute(self::$standardconfigurationtime[0], $warehouseid);

$userids = $value['pickup_user_id'];

} else if ($post == 1)

$configid = common_service_config::getbyattribute(self::$standardconfigurationtime[1], $warehouseid);

$userids = $value['package_user_id'];

} else

$configid = common_service_config::getbyattribute(self::$standardconfigurationtime[2], $warehouseid);

$userids = $value['op_sorting_user'];

}//根據崗位人員賬號開通時間查詢屬於哪個時期

if ($userids)

//根據時期計算超時票數

$count = 0;

if ($configid && $configid['config_value'])

if (!empty($configvalueinfo['trainb']) && $type == 1 && $configvalueinfo['trainb'] <= $time)

if (!empty($configvalueinfo['trainc']) && $type == 2 && $configvalueinfo['trainc'] <= $time)

} else if ($value['op_pack_start'] > $traindate && $value['op_pack_start'] <= $trydate)

if (!empty($configvalueinfo['try_hillockb']) && $type == 1 && $configvalueinfo['try_hillockb'] <= $time)

if (!empty($configvalueinfo['try_hillockc']) && $type == 2 && $configvalueinfo['try_hillockc'] <= $time)

} else if ($value['op_pack_start'] > $trydate && $value['op_pack_start'] <= $postsdate)

if (!empty($configvalueinfo['postsb']) && $type == 1 && $configvalueinfo['postsb'] <= $time)

if (!empty($configvalueinfo['postsc']) && $type == 2 && $configvalueinfo['postsc'] <= $time)

} else if ($value['op_pack_start'] > $postsdate)

if (!empty($configvalueinfo['matureb']) && $type == 1 && $configvalueinfo['matureb'] <= $time)

if (!empty($configvalueinfo['maturec']) && $type == 2 && $configvalueinfo['maturec'] <= $time) }}

//根據崗位人員和訂單型別倉庫作為鍵、組成四維陣列,如果有相同的鍵,就把對應值相加

if (isset($data[$userids . '-' . $post][$type][$warehouseid])) else if ($type == 1 && $countcode >= $maximumusableb) else if ($type == 2 && $countcode >= $maximumusablec)

$data[$userids . '-' . $post][$type][$warehouseid]['ow_more'] += $value['op_more'];

$data[$userids . '-' . $post][$type][$warehouseid]['ow_wrong'] += $value['op_wrong'];

$data[$userids . '-' . $post][$type][$warehouseid]['ow_leakage'] += $value['op_leakage'];

} else else if ($type == 1 && $countcode >= $maximumusableb) else if ($type == 2 && $countcode >= $maximumusablec)

$data[$userids . '-' . $post][$type][$warehouseid]['ow_more'] = $value['op_more'];

$data[$userids . '-' . $post][$type][$warehouseid]['ow_wrong'] = $value['op_wrong'];

$data[$userids . '-' . $post][$type][$warehouseid]['ow_leakage'] = $value['op_leakage'];

}if ($type == 0 && $countcode >= $maximumusablea) else if ($type == 1 && $countcode >= $maximumusableb) else if ($type == 2 && $countcode >= $maximumusablec)

$data[$userids . '-' . $post][$type][$warehouseid]['ow_total_pickup'] += 1;}}

//分解陣列寫入資料庫

if ($data) }}

}}

}}

工作量估算

我們的方法還是比較實用的 舉個具體的例子 我們做任何乙個工作,都先做sample,比如寫詳細設計,leader必須先寫,定sample,然後看leader做需要多少時間,然後按一定比例,比如pert方法就可以,然後按畫面去分,畫面數 預期每日完成數,測試也一樣,先做sample再算預期case數,再...

如何評估專案工作量

乙個工程需要的早期評估有三項 工作量 持續時間 預算。在這三項中,工作量必須首先評估。當了解工程所需的工作量,你就可以分配決定工程持續時間的資源,進而可以評估人力資源和非人力資源花費。用下面的過程來評估你的工程所需總工作量 1 決定評估所需的精確度。典型的情況是,評估的精確度越高,所需的細節就越多,...

什麼是工作量證明

工作量證明 proof of work 顧名思義,即指工作量的證明。pow機制的基本步驟如下 節點監聽全網資料記錄,通過基本合法性驗證的資料記錄將進行暫存 節點消耗自身算力嘗試不同的隨機數,進行指定雜湊計算,並不斷重複該過程直至找到合理的隨機數 找到合理的隨機數後,生成區塊資訊,首先輸入區塊頭資訊,...