切换导航条
此项目
正在载入...
登录
root
/
sleep
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
33d92524e408f105ac46b03f262d5977e3ef2168
1 个父辈
18568c83
1 个管道 的构建
通过
耗费 1 秒
XIAOPAN
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
18 行增加
和
2 行删除
app/portal/controller/AdminStatisticsController.php
app/portal/controller/AdminStatisticsController.php
查看文件 @
33d9252
...
...
@@ -31,10 +31,14 @@ class AdminStatisticsController extends AdminBaseController{
$param
=
$this
->
request
->
param
();
$where
=
''
;
$where1
=
[];
$where2
=
[];
if
(
!
empty
(
$param
[
'hospital'
])){
$where
=
"hospital='"
.
$param
[
'hospital'
]
.
"' AND"
;
$where1
[
'hospital'
]
=
$param
[
'hospital'
];
}
if
(
!
empty
(
$param
[
'note'
])){
$where2
[
'note'
]
=
$param
[
'note'
];
}
//医院总体时长统计
$data
=
Db
::
name
(
'order'
)
->
alias
(
'a'
)
...
...
@@ -91,6 +95,14 @@ class AdminStatisticsController extends AdminBaseController{
->
where
(
'o.start_time'
,
'between'
,
$month_interval
[
$i
])
->
where
(
'o.state'
,
3
)
->
sum
(
'o.price'
);
$Month_note_money
[]
=
Db
::
name
(
'order'
)
->
alias
(
'o'
)
->
join
(
'equipment e'
,
'o.eq_name=e.name'
)
->
where
(
$where1
)
->
where
(
$where2
)
->
where
(
'o.start_time'
,
'between'
,
$month_interval
[
$i
])
->
where
(
'o.state'
,
3
)
->
sum
(
'o.price'
);
}
$this
->
assign
(
'month'
,
json_encode
(
$Month
));
$this
->
assign
(
'monthData'
,
json_encode
(
$Month_statistics
));
...
...
@@ -125,8 +137,12 @@ class AdminStatisticsController extends AdminBaseController{
public
function
getNote
(){
$param
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'equipment'
)
->
where
([
'hospital'
=>
$param
[
'hospital'
],
'is_delete'
=>
0
])
->
whereNotNull
(
'note'
)
->
group
(
'note'
)
->
select
()
->
toArray
();
return
$data
;
if
(
$param
[
'hospital'
]
!=
""
)
{
$data
=
Db
::
name
(
'equipment'
)
->
where
([
'hospital'
=>
$param
[
'hospital'
],
'is_delete'
=>
0
])
->
whereNotNull
(
'note'
)
->
group
(
'note'
)
->
select
()
->
toArray
();
return
$data
;
}
else
{
return
""
;
}
}
...
...
请
注册
或
登录
后发表评论