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
c66ae66b
Commit
c66ae66b
authored
Aug 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告修改-撤销修改
parent
a746bb44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
Finance.php
application/index/controller/Finance.php
+16
-2
OBargainModel.php
application/model/OBargainModel.php
+6
-5
No files found.
application/index/controller/Finance.php
View file @
c66ae66b
...
@@ -1364,9 +1364,8 @@ class Finance extends Basic
...
@@ -1364,9 +1364,8 @@ 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
)
{
{
$m_bargain
=
new
OBargainModel
();
$m_bargain
=
new
OBargainModel
();
$house_number_table
=
$m_bargain
->
getCheckBargain
(
'a.house_number,c.internal_address'
,
(
int
)
$bargain_id
);
$house_number_table
=
$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'
]
}
]"
;
$step_content
.=
"[
{
$house_number_table
[
'internal_address'
]
}
]"
;
if
(
empty
(
$house_number
))
{
if
(
empty
(
$house_number
))
{
...
@@ -1542,7 +1541,22 @@ class Finance extends Basic
...
@@ -1542,7 +1541,22 @@ class Finance extends Basic
$code
=
200
;
$code
=
200
;
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
'[撤销成交报告]'
,
3
);
//日志记录
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
'[撤销成交报告]'
,
3
);
//日志记录
$this
->
updatePerformance
(
$this
->
params
[
'bargain_id'
]);
$this
->
updatePerformance
(
$this
->
params
[
'bargain_id'
]);
$bargain
=
new
OBargainModel
();
$bargain_data
=
$bargain
->
getBargainDetail
(
'order_id,order_no,agent_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]]);
$financial_data
[
'bargain_id'
]
=
$this
->
params
[
'bargain_id'
];
$financial_data
[
'audit_name'
]
=
$this
->
userName
;
$financial_data
[
'audit_id'
]
=
$this
->
userId
;
$financial_data
[
'agent_id'
]
=
$bargain_data
[
0
][
'agent_id'
];
$financial_data
[
'order_no'
]
=
$bargain_data
[
0
][
'order_no'
];
$financial_data
[
'order_id'
]
=
$bargain_data
[
0
][
'order_id'
];
$financial_data
[
'status'
]
=
0
;
$financial_data
[
'source'
]
=
3
;
$financial_data
[
'order_no'
]
=
0
;
$financial_data
[
'audit_level'
]
=
0
;
$financial_data
[
'remark'
]
=
$this
->
params
[
'remark'
];
$financial_data
[
'audit_id'
]
=
$this
->
userId
;
$m_financial
->
addAudit
(
$financial_data
);
$msg
=
'撤销成功'
;
$msg
=
'撤销成功'
;
}
else
{
}
else
{
$code
=
101
;
$code
=
101
;
...
...
application/model/OBargainModel.php
View file @
c66ae66b
...
@@ -426,7 +426,7 @@ class OBargainModel extends Model
...
@@ -426,7 +426,7 @@ class OBargainModel extends Model
//是否有审核记录,只做一次审核。
//是否有审核记录,只做一次审核。
if
(
isset
(
$audit_data
[
'id'
]))
{
if
(
isset
(
$audit_data
[
'id'
]))
{
if
(
$source
==
3
&&
$
status
==
20
)
{
if
(
$source
==
3
&&
$
data
[
'audit_level'
]
==
3
)
{
$save_data
[
'status'
]
=
4
;
$save_data
[
'status'
]
=
4
;
}
}
...
@@ -1198,19 +1198,20 @@ class OBargainModel extends Model
...
@@ -1198,19 +1198,20 @@ class OBargainModel extends Model
/**
/**
* 获取正常成交报告
* 获取正常成交报告
*
*
* @param $field
* @param string $field
* @param $id
* @param int $id
* @param string $status
* @return array|false|\PDOStatement|string|Model
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getCheckBargain
(
string
$field
,
int
$id
)
public
function
getCheckBargain
(
string
$field
,
int
$id
,
$status
=
'10,11'
)
{
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_order b'
,
'a.order_id=b.id'
,
'left'
)
->
join
(
'o_order b'
,
'a.order_id=b.id'
,
'left'
)
->
join
(
'g_houses c'
,
'b.house_id=c.id'
,
'left'
)
->
join
(
'g_houses c'
,
'b.house_id=c.id'
,
'left'
)
->
where
(
'a.status'
,
'in'
,
'10,11'
)
->
where
(
'a.status'
,
'in'
,
$status
)
->
where
(
'a.id'
,
$id
)
->
where
(
'a.id'
,
$id
)
->
find
();
->
find
();
}
}
...
...
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