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
062ac854
Commit
062ac854
authored
Dec 20, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
撤销成功报告优化
parent
995a8ebf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
Finance.php
application/index/controller/Finance.php
+26
-20
No files found.
application/index/controller/Finance.php
View file @
062ac854
...
@@ -2094,6 +2094,11 @@ class Finance extends Basic
...
@@ -2094,6 +2094,11 @@ class Finance extends Basic
return
$this
->
response
(
101
,
'参数错误'
);
return
$this
->
response
(
101
,
'参数错误'
);
}
}
$check
=
$this
->
updatePerformanceAll
(
$this
->
params
[
'bargain_id'
]);
if
(
$check
[
'status'
]
==
'fail'
)
{
return
$this
->
response
(
101
,
'更新个人业绩失败,请重试!'
);
}
$params
[
'content'
]
=
trim
(
$this
->
params
[
'content'
]);
//撤销原因
$params
[
'content'
]
=
trim
(
$this
->
params
[
'content'
]);
//撤销原因
$m_financial
=
new
OFinancialAudit
();
$m_financial
=
new
OFinancialAudit
();
$result
=
$m_financial
->
backOutUpdate
(
$this
->
params
[
'bargain_id'
],
$params
);
$result
=
$m_financial
->
backOutUpdate
(
$this
->
params
[
'bargain_id'
],
$params
);
...
@@ -2101,8 +2106,6 @@ class Finance extends Basic
...
@@ -2101,8 +2106,6 @@ class Finance extends Basic
if
(
$result
)
{
if
(
$result
)
{
$code
=
200
;
$code
=
200
;
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
'[撤销成交报告]'
,
3
);
//日志记录
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
'[撤销成交报告]'
,
3
);
//日志记录
$this
->
updatePerformanceAll
(
$this
->
params
[
'bargain_id'
],
1
);
$bargain_data
=
$this
->
m_bargain
->
getBargainDetail
(
'order_id,order_no,agent_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]
]);
$bargain_data
=
$this
->
m_bargain
->
getBargainDetail
(
'order_id,order_no,agent_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]
]);
$financial_data
[
'bargain_id'
]
=
$this
->
params
[
'bargain_id'
];
$financial_data
[
'bargain_id'
]
=
$this
->
params
[
'bargain_id'
];
$financial_data
[
'audit_name'
]
=
$this
->
userName
;
$financial_data
[
'audit_name'
]
=
$this
->
userName
;
...
@@ -2157,28 +2160,31 @@ class Finance extends Basic
...
@@ -2157,28 +2160,31 @@ class Finance extends Basic
* 更新多人业绩
* 更新多人业绩
*
*
* @param int $bargain_id
* @param int $bargain_id
* @param int $is_select 重新统计经纪人业绩
* @return array
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
private
function
updatePerformanceAll
(
int
$bargain_id
=
0
,
$is_select
=
0
)
:
bool
private
function
updatePerformanceAll
(
int
$bargain_id
=
0
)
:
array
{
{
$where
=
$update_data
=
[];
try
{
if
(
$bargain_id
)
{
$where
=
$update_data
=
[];
$where
[
'b.id'
]
=
$bargain_id
;
if
(
$bargain_id
)
{
}
$where
[
'b.id'
]
=
$bargain_id
;
if
(
!
empty
(
$where
))
{
}
//获取被修改人信息
if
(
!
empty
(
$where
))
{
$m_agent
=
new
AAgents
();
//获取被修改人信息
$agent_data
=
$m_agent
->
agentBargainAll
(
'a.id,a.store_id,a.district_id,b.create_time'
,
$where
);
$m_agent
=
new
AAgents
();
foreach
(
$agent_data
as
$k
=>
$v
)
{
$agent_data
=
$m_agent
->
agentBargainAll
(
'a.id,a.store_id,a.district_id,b.create_time'
,
$where
);
$create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
foreach
(
$agent_data
as
$k
=>
$v
)
{
$this
->
totalOfficialReceipts
(
$v
[
'id'
],
$v
[
'district_id'
],
$v
[
'store_id'
],
$create_time
);
$create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
$this
->
totalOfficialReceipts
(
$v
[
'id'
],
$v
[
'district_id'
],
$v
[
'store_id'
],
$create_time
);
}
}
}
$data
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
'内部错误:'
.
$e
->
getMessage
();
}
}
return
true
;
return
$data
;
}
}
private
function
updatePerformanceData
(
$id
,
$create_time
,
$store_id
,
$district_id
)
{
private
function
updatePerformanceData
(
$id
,
$create_time
,
$store_id
,
$district_id
)
{
...
...
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