|
@@ -404,14 +404,14 @@ class ScreenController extends BaseController
|
|
|
* @return array
|
|
|
*/
|
|
|
public function nu_work_order(Request $request){
|
|
|
- $date = date('Ymd',time());
|
|
|
+ // 获取当前时间戳
|
|
|
+ $currentTimestamp = time();
|
|
|
+ $startOfDay = strtotime(date('Y-m-d 00:00:00', $currentTimestamp));
|
|
|
|
|
|
- //工序-----------------------------
|
|
|
- $model = new OrdersProductProcess(['channel' => $date]);//当前季度的数据
|
|
|
- $result = $model->where('del_time',0)
|
|
|
- ->where('status',0)
|
|
|
- ->select('production_no as order_no','product_title','process_id',DB::raw('count(id) as product_num'))
|
|
|
- ->groupBy('order_product_id')
|
|
|
+ $result = DispatchSub::where('del_time',0)
|
|
|
+ ->where('dispatch_time_start',">=", $startOfDay)
|
|
|
+ ->where('finished_num',0)
|
|
|
+ ->select('dispatch_no as order_no','product_title','dispatch_quantity as product_num','process_id')
|
|
|
->get()->toArray();
|
|
|
|
|
|
if(! empty($result)){
|