Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
96b5c7f5
Commit
96b5c7f5
authored
Jan 25, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bargain_id
parent
a85326ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
86 deletions
+90
-86
Finance.php
application/index/controller/Finance.php
+90
-86
No files found.
application/index/controller/Finance.php
View file @
96b5c7f5
...
...
@@ -2450,109 +2450,113 @@ class Finance extends Basic
$is_show
=
0
;
$msg
=
''
;
try
{
$order
=
new
OPayLogModel
();
/*提交时间 start*/
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'a.create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
$is_show
=
1
;
}
/*提交时间 start*/
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'a.create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'a.create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'a.create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]];
$is_show
=
1
;
}
/*提交时间 end*/
/*入账日期 start*/
if
(
!
empty
(
$this
->
params
[
'income_start_time'
])
&&
empty
(
$this
->
params
[
'income_end_time'
]))
{
$where
[
'a.income_time'
]
=
[
'> time'
,
$this
->
params
[
'income_start_time'
]
.
' 00:00:00'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]];
$is_show
=
1
;
}
/*提交时间 end*/
/*入账日期 start*/
if
(
!
empty
(
$this
->
params
[
'income_start_time'
])
&&
empty
(
$this
->
params
[
'income_end_time'
]))
{
$where
[
'a.income_time'
]
=
[
'> time'
,
$this
->
params
[
'income_start_time'
]
.
' 00:00:00'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'income_end_time'
])
&&
empty
(
$this
->
params
[
'income_start_time'
]))
{
$where
[
'a.income_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'income_end_time'
])
&&
empty
(
$this
->
params
[
'income_start_time'
]))
{
$where
[
'a.income_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'income_end_time'
])
&&
!
empty
(
$this
->
params
[
'income_start_time'
]))
{
$where
[
'a.income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'income_start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'income_end_time'
]
.
' 23:59:59'
]];
$is_show
=
1
;
}
/*入账日期 end*/
if
(
!
empty
(
$this
->
params
[
'income_end_time'
])
&&
!
empty
(
$this
->
params
[
'income_start_time'
]))
{
$where
[
'a.income_time'
]
=
[
'between time'
,
[
$this
->
params
[
'income_start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'income_end_time'
]
.
' 23:59:59'
]];
$is_show
=
1
;
}
/*入账日期 end*/
//商铺地址
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
$where
[
'd.internal_address'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
$is_show
=
1
;
}
//商铺地址
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
$where
[
'd.internal_address'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
$is_show
=
1
;
}
//商铺ID
if
(
!
empty
(
$this
->
params
[
'house_id'
]))
{
$where
[
'b.house_id'
]
=
$this
->
params
[
'house_id'
];
$is_show
=
1
;
}
//商铺ID
if
(
!
empty
(
$this
->
params
[
'house_id'
]))
{
$where
[
'b.house_id'
]
=
$this
->
params
[
'house_id'
];
$is_show
=
1
;
}
//提交人所在门店
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'e.store_id'
]
=
$this
->
params
[
'store_id'
];
$is_show
=
1
;
}
//提交人所在门店
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'e.store_id'
]
=
$this
->
params
[
'store_id'
];
$is_show
=
1
;
}
//提交人所在部门
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'e.district_id'
]
=
$this
->
params
[
'district_id'
];
$is_show
=
1
;
}
//提交人所在部门
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'e.district_id'
]
=
$this
->
params
[
'district_id'
];
$is_show
=
1
;
}
//提交人姓名
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'a.agent_id'
]
=
$this
->
params
[
'agent_id'
];
$is_show
=
1
;
}
//提交人姓名
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'a.agent_id'
]
=
$this
->
params
[
'agent_id'
];
$is_show
=
1
;
}
//入账方式
if
(
!
empty
(
$this
->
params
[
'pay_type'
]))
{
$where
[
'a.pay_type'
]
=
$this
->
params
[
'pay_type'
];
$is_show
=
1
;
}
//入账方式
if
(
!
empty
(
$this
->
params
[
'pay_type'
]))
{
$where
[
'a.pay_type'
]
=
$this
->
params
[
'pay_type'
];
$is_show
=
1
;
}
//入账类型
if
(
!
empty
(
$this
->
params
[
'type'
]))
{
$where
[
'a.type'
]
=
$this
->
params
[
'type'
];
$is_show
=
1
;
}
//入账类型
if
(
!
empty
(
$this
->
params
[
'type'
]))
{
$where
[
'a.type'
]
=
$this
->
params
[
'type'
];
$is_show
=
1
;
}
//来源
if
(
$this
->
params
[
'source'
]
>
-
1
)
{
$where
[
'a.source'
]
=
$this
->
params
[
'source'
];
$is_show
=
1
;
}
//来源
if
(
$this
->
params
[
'source'
]
>
-
1
)
{
$where
[
'a.source'
]
=
$this
->
params
[
'source'
];
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'bargain_id'
]))
{
$order_id
=
$this
->
m_bargain
->
getFieldValue
(
'order_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
],
'father_id'
=>
0
]);
if
(
!
empty
(
$order_id
))
{
$where
[]
=
[
'EXP'
,
'a.order_id='
.
$order_id
];
}
$is_show
=
1
;
if
(
!
empty
(
$this
->
params
[
'bargain_id'
]))
{
$order_id
=
$this
->
m_bargain
->
getFieldValue
(
'order_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
],
'father_id'
=>
0
]);
if
(
!
empty
(
$order_id
))
{
$where
[]
=
[
'EXP'
,
'a.order_id='
.
$order_id
];
}
$is_show
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'pay_id'
]))
{
$where
[
'a.id'
]
=
$this
->
params
[
'pay_id'
];
}
if
(
!
empty
(
$this
->
params
[
'pay_id'
]))
{
$where
[
'a.id'
]
=
$this
->
params
[
'pay_id'
];
}
if
(
!
empty
(
$this
->
params
[
'order_id'
]))
{
$where
[
'a.order_id'
]
=
$this
->
params
[
'order_id'
];
}
if
(
!
empty
(
$this
->
params
[
'order_id'
]))
{
$where
[
'a.order_id'
]
=
$this
->
params
[
'order_id'
];
}
if
(
!
empty
(
$this
->
params
[
'bargain_id'
]))
{
$where
[
'a.bargain_id'
]
=
$this
->
params
[
'bargain_id'
];
}
try
{
$order
=
new
OPayLogModel
();
if
(
empty
(
$this
->
params
[
'excel'
]))
{
$field
=
'a.id,a.create_time,a.order_id,a.father_id,a.money,a.real_money,a.pay_type,a.type,a.source,a.transaction_fee,a.source,b.f_id,a.transfer_name,a.receipt_number,'
;
$field
.=
'e.name,a.income_time,e.store_id,b.house_id,b.order_no,a.report_id,a.house_number,a.is_dividend,a.last_transfer_time,a.industry_type,a.agent_id,d.internal_address as address,e.name as agent_name'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment