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
0707d8ea
Commit
0707d8ea
authored
Jul 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片
parent
c88ec277
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
Cost.php
application/index/controller/Cost.php
+11
-7
CostService.php
application/index/service/CostService.php
+6
-6
No files found.
application/index/controller/Cost.php
View file @
0707d8ea
...
...
@@ -223,24 +223,28 @@ class Cost extends Basic
public
function
checkCost
()
{
$code
=
101
;
if
(
empty
(
$this
->
params
[
'id'
]))
{
$params
=
$this
->
params
;
if
(
empty
(
$params
[
'id'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
switch
(
$this
->
params
[
'check_status'
])
{
switch
(
$params
[
'check_status'
])
{
case
1
:
$
this
->
params
[
'status'
]
=
1
;
break
;
$params
[
'status'
]
=
1
;
break
;
case
2
:
$
this
->
params
[
'status'
]
=
2
;
break
;
$params
[
'status'
]
=
2
;
break
;
case
3
:
$
this
->
params
[
'status'
]
=
3
;
break
;
$params
[
'status'
]
=
3
;
break
;
case
4
:
$this
->
params
[
'status'
]
=
4
;
break
;
$params
[
'img_name'
]
=
json_decode
(
$params
[
'img_name'
],
true
);
$params
[
'status'
]
=
4
;
break
;
default
:
return
$this
->
response
(
$code
,
'请求链接参数错误'
);
}
$service
=
new
CostService
();
$result
=
$service
->
check
(
$
this
->
params
,
$this
->
userId
);
$result
=
$service
->
check
(
$params
,
$this
->
userId
);
if
(
$result
[
'status'
]
!=
'fail'
)
{
$code
=
200
;
}
...
...
application/index/service/CostService.php
View file @
0707d8ea
...
...
@@ -34,7 +34,7 @@ class CostService
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
$where
[
'id'
]
=
$params
[
'id'
];
$where
[
'is_del'
]
=
$i
d
=
0
;
$where
[
'is_del'
]
=
$i
s_update_apply
=
0
;
$cost_data
=
$this
->
apply_model
->
findByOne
(
'id,status'
,
$where
);
if
(
empty
(
$cost_data
))
{
$result
[
'msg'
]
=
'无该记录'
;
...
...
@@ -66,13 +66,13 @@ class CostService
$num
=
$this
->
check_model
->
saveData
(
$save_check
);
if
(
$num
)
{
try
{
$i
d
=
$this
->
apply_model
->
updateData
([
'status'
=>
$params
[
'status'
]],
[
'id'
=>
$cost_data
[
'id'
]]);
$i
s_update_apply
=
$this
->
apply_model
->
updateData
([
'status'
=>
$params
[
'status'
]],
[
'id'
=>
$cost_data
[
'id'
]]);
if
(
$params
[
'status'
]
==
4
)
{
foreach
(
$params
[
'img_name'
]
as
$v
)
{
$img_arr
=
[
'img_id'
=>
$
id
,
$img_arr
[]
=
[
'img_id'
=>
$
cost_data
[
'id'
]
,
'img_type'
=>
2
,
'img_name'
=>
$v
[
'img_name'
]
'img_name'
=>
$v
];
}
...
...
@@ -85,7 +85,7 @@ class CostService
return
$result
;
}
}
if
(
$i
d
)
{
if
(
$i
s_update_apply
)
{
$result
[
'status'
]
=
'successful'
;
$result
[
'msg'
]
=
'审核成功'
;
}
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