|
|
|
|
@ -204,12 +204,14 @@ class StatisticsController extends CommonController
|
|
|
|
|
try {
|
|
|
|
|
foreach ($orderItems as $orderItem) {
|
|
|
|
|
$factors = json_decode($orderItem->factors, true);
|
|
|
|
|
dump(collect($factors)->pluck("factor_name")->toArray());
|
|
|
|
|
dump(in_array("所在科室", collect($factors)->pluck("factor_name")->toArray()));
|
|
|
|
|
$parent_factors = json_decode($orderItem->order->factors, true);
|
|
|
|
|
dump(collect($parent_factors)->pluck("factor_name")->toArray());
|
|
|
|
|
dd($parent_factors);
|
|
|
|
|
|
|
|
|
|
if (!in_array("所在科室", collect($factors)->pluck("factor_name")->toArray())
|
|
|
|
|
&& in_array("所在科室", collect($parent_factors)->pluck("factor_name")->toArray())) {
|
|
|
|
|
dd(collect($parent_factors)->keyBy("factor_name"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dd("test");
|
|
|
|
|
DB::commit();
|
|
|
|
|
return $this->success("处理成功一批,正在跳转到下一批!", url($this->urlPrefix . "/salary/sync-order-items?month={$request->month}&last_id=" . $orderItems->last()->id));
|
|
|
|
|
} catch (\Exception $exception) {
|
|
|
|
|
|