Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
b7221ed4
提交
b7221ed4
authored
1月 15, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复账单列表无法显示与账单详情显示错误
上级
0e2dea9d
全部展开
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
18 行删除
+19
-18
workspace.xml
.idea/workspace.xml
+0
-0
EmInvoice.php
application/em/model/EmInvoice.php
+19
-18
没有找到文件。
.idea/workspace.xml
浏览文件 @
b7221ed4
差异被折叠。
点击展开。
application/em/model/EmInvoice.php
浏览文件 @
b7221ed4
...
...
@@ -32,12 +32,10 @@ class EmInvoice extends Base
public
function
getInvoiceList
(
$map
,
$Nowpage
,
$limits
){
$data
=
self
::
alias
(
'inv'
)
->
field
(
'inv.*'
)
->
field
(
'station.station_name'
)
->
field
(
'em.em_numb'
)
->
leftJoin
([
'em_invoice_useage'
=>
'eiu'
],
'eiu.invoice_id=inv.invoice_id'
)
->
leftJoin
([
'em_useage'
=>
'eu'
],
'eu.useage_id = eiu.useage_id'
)
->
leftJoin
([
'em'
],
'em.id=eu.em_id'
)
->
leftJoin
([
'station_info'
=>
'station'
],
'station.station_id=em.station_id'
)
->
field
(
'station.station_name,em.em_numb'
)
->
join
([
'em_account'
=>
'ea'
],
'ea.account_id = inv.account_id'
)
->
join
([
'em'
],
'em.id=ea.em_id'
)
->
join
([
'station_info'
=>
'station'
],
'station.station_id=em.station_id'
)
->
where
(
$map
)
->
page
(
$Nowpage
,
$limits
)
->
select
()
...
...
@@ -57,12 +55,9 @@ class EmInvoice extends Base
public
function
getInvoiceCount
(
$map
){
$data
=
self
::
alias
(
'inv'
)
->
field
(
'inv.*'
)
->
field
(
'station.station_name'
)
->
field
(
'em.em_numb'
)
->
leftJoin
([
'em_invoice_useage'
=>
'eiu'
],
'eiu.invoice_id=inv.invoice_id'
)
->
leftJoin
([
'em_useage'
=>
'eu'
],
'eu.useage_id = eiu.useage_id'
)
->
leftJoin
([
'em'
],
'em.id=eu.em_id'
)
->
leftJoin
([
'station_info'
=>
'station'
],
'station.station_id=em.station_id'
)
->
join
([
'em_account'
=>
'ea'
],
'ea.account_id = inv.account_id'
)
->
join
([
'em'
],
'em.id=ea.em_id'
)
->
join
([
'station_info'
=>
'station'
],
'station.station_id=em.station_id'
)
->
where
(
$map
)
->
count
();
return
$data
;
...
...
@@ -73,10 +68,9 @@ class EmInvoice extends Base
->
field
(
'inv.*'
)
->
field
(
'station.station_name'
)
->
field
(
'em.em_numb'
)
->
leftJoin
([
'em_invoice_useage'
=>
'eiu'
],
'eiu.invoice_id=inv.invoice_id'
)
->
leftJoin
([
'em_useage'
=>
'eu'
],
'eu.useage_id = eiu.useage_id'
)
->
leftJoin
([
'em'
],
'em.id=eu.em_id'
)
->
leftJoin
([
'station_info'
=>
'station'
],
'station.station_id=em.station_id'
)
->
join
([
'em_account'
=>
'ea'
],
'ea.account_id = inv.account_id'
)
->
join
([
'em'
],
'em.id=ea.em_id'
)
->
join
([
'station_info'
=>
'station'
],
'station.station_id=em.station_id'
)
->
where
([
'inv.invoice_id'
=>
$ids
])
// ->where('inv.payment_balance','neq',0)
->
select
();
...
...
@@ -94,7 +88,14 @@ class EmInvoice extends Base
$eiu
=
EmInvoiceUseage
::
where
([
'invoice_id'
=>
$inv
->
invoice_id
])
->
find
();
//查询抄表信息
$useage
=
Useage
::
with
(
'photo'
)
->
get
([
'useage_id'
=>
$eiu
->
useage_id
]);
$useage
=
Useage
::
get
([
'useage_id'
=>
$eiu
->
useage_id
]);
if
(
$useage
->
photo_id
)
{
$receipt
=
Receipt
::
get
([
'id'
=>
$useage
->
photo_id
]);
if
(
$receipt
)
$useage
[
'photo'
]
=
$receipt
;
}
else
{
$useage
[
'photo'
]
=
[];
}
//获取电表信息
$em
=
Em
::
with
(
'rule'
)
->
field
(
'id,station_id,em_numb,em_type_id,rate'
)
->
where
([
'id'
=>
$useage
->
em_id
])
->
find
();
...
...
@@ -143,7 +144,7 @@ class EmInvoice extends Base
$totle
[
'current_numb'
]
=
0
;
$totle
[
'repo_numb'
]
=
0
;
$totle
[
'amount'
]
=
$totle
[
'settle_amount'
]
=
0
;
$totle
[
'settle_price'
]
=
$inv
->
em
->
emr
->
settle_price
*
$inv
->
em
->
rate
;
$totle
[
'settle_price'
]
=
(
$inv
->
em
->
emr
->
settle_price
?:
0
)
*
$inv
->
em
->
rate
;
$totle
[
'settle_status'
]
=
parseStatus
(
$inv
->
status
,
2
);
//峰谷表与普通抄表
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论