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
f6ff38fb
Commit
f6ff38fb
authored
Jul 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
name
parent
737962ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
Cost.php
application/index/controller/Cost.php
+13
-4
No files found.
application/index/controller/Cost.php
View file @
f6ff38fb
...
...
@@ -264,6 +264,7 @@ class Cost extends Basic
$m_store_cost_ext
=
new
FStoreCostExt
();
$m_check
=
new
FApplyForFeeCheck
();
$m_img
=
new
FImg
();
$redis
=
new
RedisCacheService
();
$field
=
'id,count_time,source,type,create_time,agent_id,total_fee,fee_item,purpose,status,site_id,status,bank,'
;
$field
.=
'card_no,card_name,store_id'
;
...
...
@@ -276,11 +277,18 @@ class Cost extends Basic
$data
[
'store_cost_data'
]
=
[];
$data
[
'office_attendance_num'
]
=
0
;
//报销类型 1办公室成本 2总部成本 3分部成本 4门店独有成本
if
(
$this
->
params
[
'is_self'
]
==
1
)
{
$agent_data
=
$redis
->
getRedisCache
(
2
,
$data
[
'agent_id'
]);
$cost_where
[
'b.store_id'
]
=
$ext_where
[
'c.store_id'
]
=
$agent_data
[
'store_id'
];
}
//费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本
switch
(
$data
[
'type'
])
{
case
1
:
$store_field
=
'a.cost_id as id,a.assume_fee,a.store_attendance_num,c.store_name'
;
$data
[
'store_cost_data'
]
=
$m_store_cost_ext
->
getFeeStoreCost
(
$store_field
,
[
'a.apply_for_id'
=>
$data
[
'id'
]]);
$cost_where
[
'a.apply_for_id'
]
=
$data
[
'id'
];
$data
[
'store_cost_data'
]
=
$m_store_cost_ext
->
getFeeStoreCost
(
$store_field
,
$cost_where
);
$ext_where
[
'a.type'
]
=
1
;
$ext_where
[
'c.office_id'
]
=
$data
[
'office_id'
];
...
...
@@ -292,6 +300,8 @@ class Cost extends Basic
case
3
:
break
;
case
4
:
break
;
case
5
:
$cost_ext_field
=
'a.id,b.store_attendance_num,b.assume_fee'
;
$where_cost
[
'apply_for_id'
]
=
$data
[
'id'
];
$store_cost_data
=
$m_store_cost
->
getCostExt
(
$cost_ext_field
,
$where_cost
);
...
...
@@ -304,8 +314,7 @@ class Cost extends Basic
$data
[
'images_data'
]
=
$m_img
->
findByAll
(
'id,img_name,img_type'
,
[
'img_id'
=>
$data
[
'id'
]]);
$data
[
'image_base_url'
]
=
'static/chat_image/'
;
$redis
=
new
RedisCacheService
();
$agent_data
=
$redis
->
getRedisCache
(
2
,
$data
[
'id'
]);
$agent_data
=
$redis
->
getRedisCache
(
2
,
$data
[
'agent_id'
]);
$data
[
'agent_name'
]
=
$agent_data
[
'name'
];
$source
=
[
...
...
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