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
a83171d9
Commit
a83171d9
authored
Nov 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分佣方优化日志内容显示
parent
a88baa33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
Finance.php
application/index/controller/Finance.php
+25
-12
No files found.
application/index/controller/Finance.php
View file @
a83171d9
...
@@ -1750,7 +1750,10 @@ class Finance extends Basic
...
@@ -1750,7 +1750,10 @@ class Finance extends Basic
public
function
editRecordLog
(
int
$bargain_id
,
string
$step_content
=
''
,
int
$type
=
1
,
string
$house_number
=
''
,
int
$is_open
=
0
)
public
function
editRecordLog
(
int
$bargain_id
,
string
$step_content
=
''
,
int
$type
=
1
,
string
$house_number
=
''
,
int
$is_open
=
0
)
{
{
$house_number_table
=
$this
->
m_bargain
->
getCheckBargain
(
'a.house_number,c.internal_address'
,
(
int
)
$bargain_id
,
'10,11,12,13,20,21,30'
);
$house_number_table
=
$this
->
m_bargain
->
getCheckBargain
(
'a.house_number,c.internal_address'
,
(
int
)
$bargain_id
,
'10,11,12,13,20,21,30'
);
$step_content
.=
"[
{
$house_number_table
[
'internal_address'
]
}
]"
;
if
(
!
empty
(
$house_number_table
[
'internal_address'
]))
{
$step_content
.=
"[
{
$house_number_table
[
'internal_address'
]
}
]"
;
}
if
(
empty
(
$house_number
))
{
if
(
empty
(
$house_number
))
{
$house_number
=
$house_number_table
[
'house_number'
];
$house_number
=
$house_number_table
[
'house_number'
];
...
@@ -1845,7 +1848,7 @@ class Finance extends Basic
...
@@ -1845,7 +1848,7 @@ class Finance extends Basic
if
(
empty
(
$this
->
params
[
'bargain_id'
]))
{
if
(
empty
(
$this
->
params
[
'bargain_id'
]))
{
return
$this
->
response
(
101
,
'成交报告id为空'
);
return
$this
->
response
(
101
,
'成交报告id为空'
);
}
}
$field
=
'a.id,a.scale,a.agent_id,a.role,a.scale_fee,b.scale as new_scale,b.should_commission,a.create_time'
;
$field
=
'a.id,a.scale,a.agent_id,a.role,a.scale_fee,b.scale as new_scale,b.should_commission,a.create_time
,a.father_id
'
;
if
(
$this
->
request
->
isGet
())
{
if
(
$this
->
request
->
isGet
())
{
$data
=
$this
->
m_bargain
->
getBargainPartialDetail
(
$field
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]
]);
$data
=
$this
->
m_bargain
->
getBargainPartialDetail
(
$field
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]
]);
return
$this
->
response
(
200
,
''
,
$data
);
return
$this
->
response
(
200
,
''
,
$data
);
...
@@ -1881,22 +1884,32 @@ class Finance extends Basic
...
@@ -1881,22 +1884,32 @@ class Finance extends Basic
$this
->
updatePerformance
(
0
,
$data_arr
[
'agent_id'
]);
$this
->
updatePerformance
(
0
,
$data_arr
[
'agent_id'
]);
/*记录日志 start*/
/*记录日志 start*/
$bargain_data
=
$this
->
m_bargain
->
selectBargainByOrderNo
(
'agent_id,father_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]
]);
$father_id
=
$this
->
params
[
'bargain_id'
];
$father_id
=
$this
->
params
[
'bargain_id'
];
if
(
$
bargain_data
[
0
][
'father_id'
]
!
=
0
)
{
if
(
$
data_arr
[
'father_id'
]
=
=
0
)
{
$father_id
=
$
bargain_data
[
0
]
[
'father_id'
];
$father_id
=
$
data_arr
[
'father_id'
];
}
}
$agent_id
[
0
]
=
$bargain_data
[
0
][
'agent_id'
];
$content
=
''
;
$agent_id
[
1
]
=
$this
->
params
[
'agent_id'
];
if
(
$data_arr
[
'agent_id'
]
!=
$this
->
params
[
'agent_id'
])
{
$agent_id
[
0
]
=
$data_arr
[
'agent_id'
];
$agent_id
[
1
]
=
$this
->
params
[
'agent_id'
];
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
getAgentById
(
'id,name,phone'
,
[
'in_id'
=>
$agent_id
]);
$content
.=
'【分佣方:'
.
$agent_data
[
0
][
'name'
]
.
'-'
.
$agent_data
[
0
][
'phone'
]
.
'修改为:'
.
$agent_data
[
1
][
'name'
]
.
'-'
.
$agent_data
[
1
][
'phone'
]
.
'】'
;
}
$m_agent
=
new
AAgents
();
if
(
$this
->
params
[
'scale'
]
!=
$data_arr
[
'scale'
])
{
$agent_data
=
$m_agent
->
getAgentById
(
'id,name,phone'
,
[
'in_id'
=>
$agent_id
]);
$content
.=
'【分佣比例修改为:'
.
$this
->
params
[
'scale'
]
.
'】'
;
}
$content
=
'修改成交报告【编号:'
.
$father_id
.
'】【分佣方:'
.
$agent_data
[
0
][
'name'
]
.
'-'
.
$agent_data
[
0
][
'phone'
]
if
(
$this
->
params
[
'scale_fee'
]
!=
$data_arr
[
'scale_fee'
])
{
.
'修改为:'
.
$agent_data
[
1
][
'name'
]
.
'-'
.
$agent_data
[
1
][
'phone'
]
.
'】'
;
$content
.=
'【应分佣金修改为:'
.
$this
->
params
[
'scale_fee'
]
.
'】'
;
}
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
$content
);
if
(
!
empty
(
$content
))
{
$this
->
editRecordLog
(
$father_id
,
'【编号:'
.
$father_id
.
'】'
.
$content
);
}
/*记录日志 end*/
/*记录日志 end*/
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