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
d04b8787
Commit
d04b8787
authored
Aug 16, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审核判断逻辑
parent
232aa613
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
OBargainModel.php
application/model/OBargainModel.php
+16
-13
No files found.
application/model/OBargainModel.php
View file @
d04b8787
...
@@ -372,15 +372,15 @@ class OBargainModel extends Model
...
@@ -372,15 +372,15 @@ class OBargainModel extends Model
*/
*/
public
function
addCheckBargain
(
int
$id
,
array
$data
,
int
$source
,
int
$status
)
:
bool
public
function
addCheckBargain
(
int
$id
,
array
$data
,
int
$source
,
int
$status
)
:
bool
{
{
$this
->
startTrans
();
//
$this->startTrans();
$bargain_data
=
$this
->
field
(
'id,report_id,agent_id,order_no,order_id'
)
->
where
([
$bargain_data
=
$this
->
field
(
'id,report_id,agent_id,order_no,order_id'
)
->
where
([
'id'
=>
$id
,
'id'
=>
$id
,
'status'
=>
[
'in'
,
'10,11'
]
'status'
=>
[
'in'
,
'10,11
,20,21
'
]
])
->
find
();
])
->
find
();
if
(
$bargain_data
!=
''
)
{
if
(
$bargain_data
!=
''
)
{
$audit
=
new
OFinancialAudit
();
$audit
=
new
OFinancialAudit
();
$audit_data
=
$audit
->
getLastStep
(
$bargain_data
[
'id'
]);
$audit_data
=
$audit
->
getLastStep
(
$bargain_data
[
'id'
]);
//获取最后一次审核等级
$save_data
[
'bargain_id'
]
=
$bargain_data
[
'id'
];
$save_data
[
'bargain_id'
]
=
$bargain_data
[
'id'
];
$save_data
[
'agent_id'
]
=
$bargain_data
[
'agent_id'
];
$save_data
[
'agent_id'
]
=
$bargain_data
[
'agent_id'
];
...
@@ -410,21 +410,24 @@ class OBargainModel extends Model
...
@@ -410,21 +410,24 @@ class OBargainModel extends Model
}
}
if
(
$return
)
{
if
(
$return
)
{
if
(
$status
==
10
){
if
(
$data
[
'audit_level'
]
==
2
&&
$status
==
10
)
{
//审核开始
$update_data
[
'status'
]
=
11
;
}
elseif
(
$data
[
'audit_level'
]
==
2
&&
$status
==
11
)
{
//成交报告审核-三级审核结束
$update_data
[
'status'
]
=
13
;
$update_data
[
'status'
]
=
13
;
$update_data
[
'account_statement'
]
=
1
;
$update_data
[
'account_statement'
]
=
1
;
$update_data
[
'account_time'
]
=
date
(
'Y-m-d H:i:s'
);
$update_data
[
'account_time'
]
=
date
(
'Y-m-d H:i:s'
);
$this
->
where
(
'id'
,
$bargain_data
[
'id'
])
->
whereOr
(
'father_id'
,
$bargain_data
[
'id'
])
->
update
(
$update_data
);
}
elseif
(
$data
[
'audit_level'
]
==
2
&&
$status
==
20
)
{
//撤销审核结束
$update_data
[
'status'
]
=
21
;
$update_data
[
'account_statement'
]
=
1
;
$update_data
[
'account_time'
]
=
date
(
'Y-m-d H:i:s'
);
}
else
{
}
else
{
$update_data
[
'status'
]
=
11
;
//记录第几级审核-与 OFinancialAudit 表一致
$this
->
save
(
$update_data
,
[
'id'
=>
$bargain_data
[
'id'
]
]);
$update_data
[
'audit_level'
]
=
$save_data
[
'audit_level'
];
}
if
(
$data
[
'audit_level'
]
==
2
&&
$status
==
20
)
{
$this
->
where
(
'id'
,
$bargain_data
[
'id'
])
->
setField
(
'status'
,
21
);
}
}
$this
->
where
(
'id'
,
$bargain_data
[
'id'
])
->
whereOr
(
'father_id'
,
$bargain_data
[
'id'
])
->
update
(
$update_data
);
$this
->
commit
();
$this
->
commit
();
$result
=
true
;
$result
=
true
;
}
else
{
}
else
{
...
...
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