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
0f1f1a48
Commit
0f1f1a48
authored
Dec 25, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
is_self
parent
79c4d0b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
Finance.php
application/index/controller/Finance.php
+23
-15
No files found.
application/index/controller/Finance.php
View file @
0f1f1a48
...
@@ -3193,63 +3193,71 @@ class Finance extends Basic
...
@@ -3193,63 +3193,71 @@ class Finance extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$where
[
'is_del'
]
=
0
;
$where
[
'
a.
is_del'
]
=
0
;
if
(
!
empty
(
$this
->
params
[
'id'
]))
{
if
(
!
empty
(
$this
->
params
[
'id'
]))
{
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$where
[
'
a.
id'
]
=
$this
->
params
[
'id'
];
}
}
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
$where
[
'
a.
create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
}
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
$where
[
'
a.
create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
}
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
$where
[
'
a.
create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]
];
}
}
if
(
!
empty
(
$this
->
params
[
'daily_start_time'
])
&&
empty
(
$this
->
params
[
'daily_end_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'daily_start_time'
])
&&
empty
(
$this
->
params
[
'daily_end_time'
]))
{
$where
[
'daily_date'
]
=
[
'> time'
,
$this
->
params
[
'daily_start_time'
]];
$where
[
'
a.
daily_date'
]
=
[
'> time'
,
$this
->
params
[
'daily_start_time'
]];
}
}
if
(
!
empty
(
$this
->
params
[
'daily_end_time'
])
&&
empty
(
$this
->
params
[
'daily_start_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'daily_end_time'
])
&&
empty
(
$this
->
params
[
'daily_start_time'
]))
{
$where
[
'daily_date'
]
=
[
'< time'
,
$this
->
params
[
'daily_end_time'
]];
$where
[
'
a.
daily_date'
]
=
[
'< time'
,
$this
->
params
[
'daily_end_time'
]];
}
}
if
(
!
empty
(
$this
->
params
[
'daily_end_time'
])
&&
!
empty
(
$this
->
params
[
'daily_start_time'
]))
{
if
(
!
empty
(
$this
->
params
[
'daily_end_time'
])
&&
!
empty
(
$this
->
params
[
'daily_start_time'
]))
{
$where
[
'daily_date'
]
=
[
'between time'
,
[
$this
->
params
[
'daily_end_time'
],
$this
->
params
[
'daily_end_time'
]]
];
$where
[
'
a.
daily_date'
]
=
[
'between time'
,
[
$this
->
params
[
'daily_end_time'
],
$this
->
params
[
'daily_end_time'
]]
];
}
}
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'store_id'
]
=
$this
->
params
[
'store_id'
];
$where
[
'
a.
store_id'
]
=
$this
->
params
[
'store_id'
];
}
}
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
if
(
!
empty
(
$this
->
params
[
'district_id'
]))
{
$where
[
'district_id'
]
=
$this
->
params
[
'district_id'
];
$where
[
'
a.
district_id'
]
=
$this
->
params
[
'district_id'
];
}
}
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
$where
[
'a
.a
gent_id'
]
=
$this
->
params
[
'agent_id'
];
}
}
if
(
$this
->
params
[
'status'
]
>
-
1
)
{
if
(
$this
->
params
[
'status'
]
>
-
1
)
{
$where
[
'status'
]
=
$this
->
params
[
'status'
];
$where
[
'a.status'
]
=
$this
->
params
[
'status'
];
}
if
(
isset
(
$this
->
params
[
'is_self'
])
&&
$this
->
params
[
'is_self'
]
!=
-
1
)
{
if
(
$this
->
params
[
'is_self'
])
{
$where
[
'b.operation_id'
]
=
$this
->
userId
;
}
else
{
$where
[
'b.operation_id'
]
=
[
'<>'
,
$this
->
userId
];
}
}
}
$m_daily
=
new
ODaily
();
$m_daily
=
new
ODaily
();
$m_store
=
new
AStore
();
$m_store
=
new
AStore
();
$field
=
'
id,agent_id,create_time,daily_date,store_id,status,
agent_name'
;
$field
=
'
a.id,a.agent_id,a.create_time,a.daily_date,a.store_id,a.status,a.
agent_name'
;
$list
=
$m_daily
->
getList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$list
=
$m_daily
->
get
DailyLog
List
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
foreach
(
$list
as
$k
=>
$v
)
{
foreach
(
$list
as
$k
=>
$v
)
{
$store_name
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
$store_name
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
}
}
$data
[
'list'
]
=
$list
;
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$m_daily
->
getTotal
(
$where
);
$data
[
'total'
]
=
$m_daily
->
get
DailyLog
Total
(
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
return
$this
->
response
(
200
,
''
,
$data
);
}
}
...
...
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