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
77966bfa
Commit
77966bfa
authored
Jul 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤总计
parent
a284d203
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
Cost.php
application/index/controller/Cost.php
+3
-3
FStoreCost.php
application/model/FStoreCost.php
+14
-0
FStoreCostExt.php
application/model/FStoreCostExt.php
+0
-14
No files found.
application/index/controller/Cost.php
View file @
77966bfa
...
...
@@ -321,10 +321,10 @@ class Cost extends Basic
}
if
(
$data
[
'office_id'
])
{
$ext_where
[
'
a
.type'
]
=
1
;
$ext_where
[
'
b
.type'
]
=
1
;
$ext_where
[
'c.office_id'
]
=
$data
[
'office_id'
];
$ext_where
[
'
b
.setting_date'
]
=
$data
[
'count_time'
];
$data
[
'office_attendance_num'
]
=
$m_store_cost
_ext
->
getFeeOfficeCostSum
(
'a
.office_attendance_num'
,
$ext_where
);
$ext_where
[
'
a
.setting_date'
]
=
$data
[
'count_time'
];
$data
[
'office_attendance_num'
]
=
$m_store_cost
->
getFeeOfficeCostSum
(
'b
.office_attendance_num'
,
$ext_where
);
}
break
;
case
2
:
...
...
application/model/FStoreCost.php
View file @
77966bfa
...
...
@@ -91,4 +91,18 @@ class FStoreCost extends BaseModel
->
where
(
$where
)
->
select
();
}
/**
* @param $field
* @param $where
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getFeeOfficeCostSum
(
$field
,
$where
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'f_store_cost_ext b'
,
'a.id = b.cost_id'
,
'left'
)
->
join
(
'f_apply_for_fee c'
,
'b.apply_for_id = b.id'
,
'left'
)
->
where
(
$where
)
->
sum
(
$field
);
}
}
application/model/FStoreCostExt.php
View file @
77966bfa
...
...
@@ -111,20 +111,6 @@ class FStoreCostExt extends BaseModel
->
select
();
}
/**
* @param $field
* @param $where
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getFeeOfficeCostSum
(
$field
,
$where
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'f_store_cost b'
,
'a.cost_id = b.id'
,
'left'
)
->
join
(
'f_apply_for_fee c'
,
'a.apply_for_id = b.id'
,
'left'
)
->
where
(
$where
)
->
sum
(
$field
);
}
/**
* 我的门店成本
* @param $field
...
...
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