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
964facd1
Commit
964facd1
authored
Jul 22, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
办公室名
parent
d1156ff6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
ApplyForCost.php
application/api_broker/controller/ApplyForCost.php
+6
-3
AStore.php
application/model/AStore.php
+18
-0
No files found.
application/api_broker/controller/ApplyForCost.php
View file @
964facd1
...
@@ -13,6 +13,7 @@ use app\api_broker\extend\Basic;
...
@@ -13,6 +13,7 @@ use app\api_broker\extend\Basic;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VipService
;
use
app\api_broker\service\VipService
;
use
app\index\service\CostService
;
use
app\index\service\CostService
;
use
app\model\AStore
;
use
app\model\FApplyForFee
;
use
app\model\FApplyForFee
;
use
app\model\FApplyForFeeCheck
;
use
app\model\FApplyForFeeCheck
;
use
app\model\FImg
;
use
app\model\FImg
;
...
@@ -65,11 +66,12 @@ class ApplyForCost extends Basic
...
@@ -65,11 +66,12 @@ class ApplyForCost extends Basic
}
}
$field
=
'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,'
;
$field
=
'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,'
;
$field
.=
'b.name as agent_name,a.card_name,a.bank,a.card_no,a.source'
;
$field
.=
'b.name as agent_name,a.card_name,a.bank,a.card_no,a.source
,a.store_id
'
;
$fee_model
=
new
FApplyForFee
();
$fee_model
=
new
FApplyForFee
();
$cost_service
=
new
CostService
();
$cost_service
=
new
CostService
();
$m_img
=
new
FImg
();
$m_img
=
new
FImg
();
$m_check
=
new
FApplyForFeeCheck
();
$m_check
=
new
FApplyForFeeCheck
();
$m_store
=
new
AStore
();
$list
=
$fee_model
->
getJoinAgentList
(
$pageNo
,
$pageSize
,
'a.ID DESC'
,
$field
,
$where
);
$list
=
$fee_model
->
getJoinAgentList
(
$pageNo
,
$pageSize
,
'a.ID DESC'
,
$field
,
$where
);
$source
=
[
$source
=
[
...
@@ -97,11 +99,12 @@ class ApplyForCost extends Basic
...
@@ -97,11 +99,12 @@ class ApplyForCost extends Basic
];
];
}
}
}
}
$office_name
=
$m_store
->
getStoreCost
(
'b.office_name'
,
[
'a.id'
=>
$v
[
'store_id'
]]);
$list
[
$k
][
'office_name'
]
=
empty
(
$office_name
[
'office_name'
])
?
''
:
$office_name
[
'office_name'
];
$list
[
$k
][
'image_array'
]
=
$image_array
;
$list
[
$k
][
'image_array'
]
=
$image_array
;
$list
[
$k
][
'check_image_array'
]
=
$check_image_array
;
$list
[
$k
][
'check_image_array'
]
=
$check_image_array
;
$list
[
$k
][
'check_list'
]
=
$m_check
->
findByAll
(
'a.remark,a.create_time,b.name as agent_name'
,[
'apply_for_id'
=>
$v
[
'id'
]]);
$list
[
$k
][
'check_list'
]
=
$m_check
->
findByAll
(
'a.remark,a.create_time,b.name as agent_name'
,[
'apply_for_id'
=>
$v
[
'id'
]]);
$list
[
$k
][
'image_base_url'
]
=
'
'
;
$list
[
$k
][
'image_base_url'
]
=
ROOT_PATH
.
'public/static/chat_image/
'
;
}
}
return
$this
->
response
(
200
,
''
,
$list
);
return
$this
->
response
(
200
,
''
,
$list
);
}
}
...
...
application/model/AStore.php
View file @
964facd1
...
@@ -404,4 +404,21 @@ class AStore extends BaseModel
...
@@ -404,4 +404,21 @@ class AStore extends BaseModel
->
count
();
->
count
();
return
$result
;
return
$result
;
}
}
/**
* @param $field
* @param $params
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getStoreCost
(
$field
,
$params
)
{
$params
[
"a.status"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'f_office b'
,
'a.office_id = b.id'
,
'left'
)
->
where
(
$params
)
->
find
();
return
$result
;
}
}
}
\ No newline at end of file
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