|
|
|
|
@ -69,7 +69,9 @@ class StatisticsController extends CommonController
|
|
|
|
|
$months = $this->_getMonths();
|
|
|
|
|
|
|
|
|
|
DB::enableQueryLog();
|
|
|
|
|
$paramedics = (new Paramedic())->ofProject($project_id)->with(["orderItems" => function ($query) use ($month) {
|
|
|
|
|
$paramedics = (new Paramedic())->where(function ($query) use ($project_id, $month) {
|
|
|
|
|
$query->where("project_id", $project_id);
|
|
|
|
|
})->with(["orderItems" => function ($query) use ($month) {
|
|
|
|
|
$query->whereRaw("(DATE_FORMAT(`service_date`,'%Y-%m') = '{$month}' or DATE_FORMAT(`paid_at`,'%Y-%m') = '{$month}')")
|
|
|
|
|
->where("total", ">", 0)
|
|
|
|
|
->whereHas("order")
|
|
|
|
|
@ -158,8 +160,8 @@ class StatisticsController extends CommonController
|
|
|
|
|
{
|
|
|
|
|
DB::enableQueryLog();
|
|
|
|
|
//采用指定订单号
|
|
|
|
|
$model = OrderItems::whereHas("order", function($query) {
|
|
|
|
|
$query->whereIn("serial",[
|
|
|
|
|
$model = OrderItems::whereHas("order", function ($query) {
|
|
|
|
|
$query->whereIn("serial", [
|
|
|
|
|
"20210910000003",
|
|
|
|
|
"20210914000006",
|
|
|
|
|
"20210826000004",
|
|
|
|
|
@ -168,7 +170,7 @@ class StatisticsController extends CommonController
|
|
|
|
|
"20210918000013",
|
|
|
|
|
"20210906000015"
|
|
|
|
|
]);
|
|
|
|
|
})->where("service_date",">=","2021-09-01");
|
|
|
|
|
})->where("service_date", ">=", "2021-09-01");
|
|
|
|
|
//采用指定订单号结束
|
|
|
|
|
|
|
|
|
|
if ($request->last_id) {
|
|
|
|
|
@ -317,7 +319,8 @@ class StatisticsController extends CommonController
|
|
|
|
|
return $this->success("处理完毕" . $balances->count() . "条数据,正在进入下一批数据。", url($this->urlPrefix . "/finance/fix-balance-order-id?timer=" . time()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function manualQueryRecharge($id) {
|
|
|
|
|
public function manualQueryRecharge($id)
|
|
|
|
|
{
|
|
|
|
|
$recharge = Recharge::find($id);
|
|
|
|
|
$res = (new AlipayF2F())->manualQuery($recharge);
|
|
|
|
|
dd($res);
|
|
|
|
|
|