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
19ad83df
Commit
19ad83df
authored
May 30, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
三级审核列表修改
parent
7012c977
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
Finance.php
application/index/controller/Finance.php
+12
-5
OBargainModel.php
application/model/OBargainModel.php
+4
-5
OFinancialAudit.php
application/model/OFinancialAudit.php
+2
-1
No files found.
application/index/controller/Finance.php
View file @
19ad83df
...
...
@@ -72,7 +72,6 @@ class Finance extends Basic
$where
[
'a.father_id'
]
=
0
;
$where
[
'c.is_del'
]
=
0
;
$where
[
'a.status'
]
=
10
;
$order
=
'e.id desc'
;
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
...
...
@@ -103,15 +102,21 @@ class Finance extends Basic
case
2
:
//成交报告列表-第二级审核
$where
[
'e.audit_level'
]
=
0
;
$where
[]
=
[
'EXP'
,
'e.id in (SELECT MAX(id) FROM o_financial_audit WHERE is_del = 0 and `status`<>3 GROUP BY bargain_id)'
];
$where
[
'e.is_del'
]
=
0
;
break
;
case
3
:
//成交报告列表-第三级审核
$where
[
'e.audit_level'
]
=
1
;
$where
[
'e.is_del'
]
=
0
;
$where
[]
=
[
'EXP'
,
'e.id in (SELECT MAX(id) FROM o_financial_audit WHERE is_del = 0 and `status`<>3 GROUP BY bargain_id)'
];
break
;
case
4
:
//成交报告列表-已结单
$where
[
'a.account_statement'
]
=
1
;
$where
[
'a.status'
]
=
11
;
$where
[
'e.audit_level'
]
=
2
;
break
;
/* case 5 :
//成交报告列表-待撤销
...
...
@@ -123,8 +128,8 @@ class Finance extends Basic
break;*/
default
:
//成交报告列表-第一级审核
$
where
[
'e.audit_level'
]
=
NULL
;
$
order
=
'a.id DESC'
;
$
order
=
'a.id DESC'
;
$
where
[]
=
[
'EXP'
,
'e.audit_level IS NULL or e.id not in (SELECT MAX(id) FROM o_financial_audit WHERE is_del = 0 and `status`<>3 GROUP BY bargain_id)'
]
;
}
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
...
...
@@ -164,6 +169,7 @@ class Finance extends Basic
$params
[
'audit_level'
]
=
$this
->
params
[
'check_status'
];
$params
[
'remark'
]
=
$this
->
params
[
'remark'
];
$status
=
$bargain
->
addCheckBargain
(
$this
->
params
[
'id'
],
$params
,
$this
->
params
[
'source'
],
$this
->
params
[
'status'
]);
if
(
empty
(
$status
))
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'审核失败'
;
...
...
@@ -1162,8 +1168,9 @@ class Finance extends Basic
$insert_data
[
'audit_id'
]
=
$this
->
userId
;
$insert_data
[
'audit_name'
]
=
$this
->
userName
;
$insert_data
[
'audit_level'
]
=
3
;
$data
=
$m_bargain
->
addCheckBargain
(
$this
->
params
[
'bargain_id'
],
$insert_data
,
1
,
10
);
$insert_data
[
'audit_level'
]
=
2
;
$insert_data
[
'is_del'
]
=
1
;
$data
=
$m_bargain
->
addCheckBargain
(
$this
->
params
[
'bargain_id'
],
$insert_data
,
1
,
10
);
$code
=
200
;
$msg
=
""
;
...
...
application/model/OBargainModel.php
View file @
19ad83df
...
...
@@ -254,6 +254,7 @@ class OBargainModel extends Model
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'o_financial_audit e'
,
'e.bargain_id = a.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
...
...
@@ -274,6 +275,7 @@ class OBargainModel extends Model
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'o_financial_audit e'
,
'e.bargain_id = a.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
();
}
...
...
@@ -331,14 +333,14 @@ class OBargainModel extends Model
if
(
$return
)
{
if
(
$data
[
'audit_level'
]
==
3
&&
$status
==
10
)
{
if
(
$data
[
'audit_level'
]
==
2
&&
$status
==
10
)
{
$update_data
[
'status'
]
=
11
;
$update_data
[
'account_statement'
]
=
1
;
$update_data
[
'account_time'
]
=
time
();
$this
->
save
(
$update_data
,
[
'id'
=>
$bargain_data
[
'id'
]
]);
}
if
(
$data
[
'audit_level'
]
==
3
&&
$status
==
20
)
{
if
(
$data
[
'audit_level'
]
==
2
&&
$status
==
20
)
{
$this
->
where
(
'id'
,
$bargain_data
[
'id'
])
->
setField
(
'status'
,
21
);
}
...
...
@@ -663,14 +665,11 @@ class OBargainModel extends Model
->
select
();
$m_agent
=
new
AAgents
();
$m_fee
=
new
OTaxes
();
foreach
(
$data
as
$k
=>
$v
)
{
if
(
isset
(
$v
[
'agent_id'
]))
{
$district_store
=
$m_agent
->
getStoreDistrict
(
'store_name,district_name'
,
[
'a.id'
=>
$v
[
'agent_id'
]
]);
$data
[
$k
][
'district_store'
]
=
$district_store
[
'district_name'
]
.
'-'
.
$district_store
[
'store_name'
];
}
// $data[$k]['tax_fee'] = $m_fee->where('bargain_id', $v['id'])->sum('fee');
}
return
$data
;
...
...
application/model/OFinancialAudit.php
View file @
19ad83df
...
...
@@ -43,7 +43,8 @@ class OFinancialAudit extends BaseModel
public
function
getLastStep
(
$bargain_id
)
{
return
$this
->
field
(
'id,audit_level'
)
->
where
([
'bargain_id'
=>
$bargain_id
,
'status'
=>
1
'status'
=>
1
,
'is_del'
=>
0
])
->
order
(
'id desc'
)
->
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