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
5344297d
Commit
5344297d
authored
Sep 12, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into 0910-v2.9.1
# Conflicts: # application/index/controller/Finance.php # application/route.php
parents
c878020d
d23c7620
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
9 deletions
+45
-9
PerformanceService.php
application/api_broker/service/PerformanceService.php
+1
-1
Finance.php
application/index/controller/Finance.php
+38
-6
OBargainModel.php
application/model/OBargainModel.php
+1
-0
TAgentTotalModel.php
application/model/TAgentTotalModel.php
+4
-1
route.php
application/route.php
+1
-1
No files found.
application/api_broker/service/PerformanceService.php
View file @
5344297d
...
...
@@ -556,7 +556,7 @@ class PerformanceService
{
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
dump
(
$params
);
//
dump($params);
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"
;
...
...
application/index/controller/Finance.php
View file @
5344297d
...
...
@@ -802,7 +802,7 @@ class Finance extends Basic
}
$m_bargain
=
new
OBargainModel
();
$bargain_data
=
$m_bargain
->
getCheckBargain
(
'a.id,a.agent_id,a.role'
,
$this
->
params
[
'bargain_id'
]);
$bargain_data
=
$m_bargain
->
getCheckBargain
(
'a.id,a.agent_id,a.role
,a.create_time,d.store_id,d.district_id
'
,
$this
->
params
[
'bargain_id'
]);
//排除成交报告其它状态
if
(
empty
(
$bargain_data
[
'id'
]))
{
...
...
@@ -845,6 +845,16 @@ class Finance extends Basic
$log_data
[]
=
"[分佣比例(%):
{
$item
[
'scale'
]
}
][应分佣金(元):
{
$item
[
'should_commission'
]
}
][实分佣金(元):
{
$item
[
'real_fee'
]
}
]"
.
"[手续费(元):
{
$item
[
'service_charge'
]
}
][慈善基金(元):
{
$item
[
'charity_fund'
]
}
]"
.
"[现金奖(元):
{
$item
[
'cash'
]
}
][实收佣金(元):
{
$item
[
'practical_fee'
]
}
]"
;
$bargain_update_data
[]
=
[
'bargain_id'
=>
$this
->
params
[
'bargain_id'
],
'scale_fee'
=>
$item
[
'should_commission'
],
'scale'
=>
$item
[
'scale'
],
'agent_id'
=>
$item
[
'agent_id'
],
'store_id'
=>
$bargain_data
[
'store_id'
],
'district_id'
=>
$bargain_data
[
'district_id'
],
'create_time'
=>
$bargain_data
[
'create_time'
],
];
}
else
{
$add_arr
[
$j
][
'bargain_id'
]
=
$this
->
params
[
'bargain_id'
];
$add_arr
[
$j
][
'practical_fee'
]
=
$item
[
'practical_fee'
];
...
...
@@ -867,6 +877,16 @@ class Finance extends Basic
$add_arr
[
$j
][
'confirm_status'
]
=
1
;
}
$j
++
;
$bargain_update_data
[]
=
[
'bargain_id'
=>
$this
->
params
[
'bargain_id'
],
'scale_fee'
=>
$item
[
'should_commission'
],
'scale'
=>
$item
[
'scale'
],
'agent_id'
=>
$item
[
'agent_id'
],
'store_id'
=>
$bargain_data
[
'store_id'
],
'district_id'
=>
$bargain_data
[
'district_id'
],
'create_time'
=>
$bargain_data
[
'create_time'
],
];
}
}
...
...
@@ -887,6 +907,15 @@ class Finance extends Basic
$m_partial
->
addCommission
(
$params
);
}
if
(
!
empty
(
$bargain_update_data
))
{
foreach
(
$bargain_update_data
as
$k
=>
$v
)
{
$update_data
[
'scale_fee'
]
=
$v
[
'scale_fee'
];
$update_data
[
'scale'
]
=
$v
[
'scale'
];
$update_data
[
'agent_id'
]
=
$v
[
'agent_id'
];
$m_bargain
->
updateBargainById
(
$v
[
'bargain_id'
],
$update_data
);
$this
->
updatePerformanceData
(
$v
[
'agent_id'
],
$v
[
'create_time'
],
$v
[
'store_id'
],
$v
[
'district_id'
]);
}
}
// $data = $m_partial->addCommission($this->params, $this->userId);
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
...
...
@@ -1644,13 +1673,16 @@ class Finance extends Basic
//获取被修改人信息
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
agentBargainDetail
(
'a.id,a.store_id,a.district_id,b.create_time'
,
[
'b.id'
=>
$bargain_id
]);
//更新业绩统计
$sum
=
new
ResultsSummaryNewTask
();
$date
=
date
(
'Y-m-d'
,
strtotime
(
$agent_data
[
'create_time'
]));
$sum
->
updateTotalByAgentId
(
$agent_data
[
'id'
],
$agent_data
[
'store_id'
],
$agent_data
[
'district_id'
],
$date
);
//被修改的人
$this
->
updatePerformanceData
(
$agent_data
[
'id'
],
$agent_data
[
'create_time'
],
$agent_data
[
'store_id'
],
$agent_data
[
'district_id'
]);
}
return
true
;
}
private
function
updatePerformanceData
(
$id
,
$create_time
,
$store_id
,
$district_id
)
{
//更新业绩统计
$sum
=
new
ResultsSummaryNewTask
();
$date
=
date
(
'Y-m-d'
,
strtotime
(
$create_time
));
$sum
->
updateTotalByAgentId
(
$id
,
$store_id
,
$district_id
,
$date
);
//被修改的人
}
}
application/model/OBargainModel.php
View file @
5344297d
...
...
@@ -1249,6 +1249,7 @@ class OBargainModel extends Model
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_order b'
,
'a.order_id=b.id'
,
'left'
)
->
join
(
'g_houses c'
,
'b.house_id=c.id'
,
'left'
)
->
join
(
'a_agents d'
,
'a.agent_id=d.id'
,
'left'
)
->
where
(
'a.status'
,
'in'
,
$status
)
->
where
(
'a.id'
,
$id
)
->
find
();
...
...
application/model/TAgentTotalModel.php
View file @
5344297d
...
...
@@ -48,7 +48,10 @@ class TAgentTotalModel extends Model
{
Db
::
startTrans
();
try
{
$this
->
saveAll
(
$params
);
foreach
(
$params
as
$k
=>
$v
)
{
$this
->
db_
->
table
(
$this
->
table
)
->
update
(
$v
);
}
// $this->saveAll($params);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
...
...
application/route.php
View file @
5344297d
...
...
@@ -462,7 +462,7 @@ Route::group('task', [
'updateShopTask'
=>
[
'task/JobTask/updateShopTask'
,
[
'method'
=>
'post | get'
]
],
//默认跟进
'updateShopImageIdTask'
=>
[
'task/JobTask/updateShopImageIdTask'
,
[
'method'
=>
'post | get'
]
],
//默认图片
'updateShopAddress'
=>
[
'task/JobTask/updateShopAddress'
,
[
'method'
=>
'get'
]
],
//默认图片
'updateShopAddress'
=>
[
'task/JobTask/updateShopAddress'
,
[
'method'
=>
'get'
]
],
//默认图片
'push'
=>
[
'task/PushMessageTask/push'
,
[
'method'
=>
'get'
]
]
//推送
]);
...
...
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