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
144d201c
Commit
144d201c
authored
Dec 18, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
b132c6c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
13 deletions
+47
-13
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+15
-6
DailyPaper.php
application/index/controller/DailyPaper.php
+4
-2
ODaily.php
application/model/ODaily.php
+28
-5
No files found.
application/api_broker/service/DailyPaperService.php
View file @
144d201c
...
@@ -461,13 +461,14 @@ class DailyPaperService
...
@@ -461,13 +461,14 @@ class DailyPaperService
* @param $pos
* @param $pos
* @param $other_bank
* @param $other_bank
* @param $remark
* @param $remark
* @param $operation_status
* @return array|int
* @return array|int
* @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
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
public
function
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
)
{
{
$agent_info_arr
[
"agent_id"
]
=
$agent_id
;
$agent_info_arr
[
"agent_id"
]
=
$agent_id
;
$agent_info_field
=
"id,name,store_id,district_id,level"
;
$agent_info_field
=
"id,name,store_id,district_id,level"
;
...
@@ -483,9 +484,17 @@ class DailyPaperService
...
@@ -483,9 +484,17 @@ class DailyPaperService
return
[
"code"
=>
101
,
"msg"
=>
"您已经审核过了"
];
return
[
"code"
=>
101
,
"msg"
=>
"您已经审核过了"
];
}
}
$params
=
$this
->
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$params
=
$this
->
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$agent_info
[
0
][
"store_id"
],
$agent_info
[
0
][
"district_id"
],
$remark
);
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
);
$is_ok
=
$this
->
oDailyLogModel
->
addDailyCheck
(
$params
);
if
(
$is_ok
>
0
&&
$operation_status
==
1
){
//修改主表审核状态
$update_where
[
"id"
]
=
$daily_id
;
$update_params
[
"status"
]
=
1
;
$update_params
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$this
->
oDailyModel
->
updateDaily
(
$update_where
,
$update_params
);
}
return
$is_ok
;
return
$this
->
oDailyLogModel
->
addDailyCheck
(
$params
);
}
}
...
@@ -502,13 +511,12 @@ class DailyPaperService
...
@@ -502,13 +511,12 @@ class DailyPaperService
* @param $cash
* @param $cash
* @param $pos
* @param $pos
* @param $other_bank
* @param $other_bank
* @param $store_id
* @param $district_id
* @param $remark
* @param $remark
* @param $operation_status
* @return mixed
* @return mixed
*/
*/
public
function
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
public
function
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$
store_id
,
$district_id
,
$remark
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$
remark
,
$operation_status
)
{
{
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
...
@@ -523,6 +531,7 @@ class DailyPaperService
...
@@ -523,6 +531,7 @@ class DailyPaperService
$arr
[
"cash"
]
=
$cash
;
$arr
[
"cash"
]
=
$cash
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"operation_status"
]
=
$operation_status
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
return
$arr
;
...
...
application/index/controller/DailyPaper.php
View file @
144d201c
...
@@ -127,12 +127,13 @@ class DailyPaper extends Basic
...
@@ -127,12 +127,13 @@ class DailyPaper extends Basic
"cash" => "666",//现金
"cash" => "666",//现金
"pos" => "777",//pos机
"pos" => "777",//pos机
"other_bank" => "888"//其他,
"other_bank" => "888"//其他,
"operation_status" => 0//0审核通过 1转为已审核
"remark" => "888"//备注,
"remark" => "888"//备注,
);*/
);*/
if
(
!
isset
(
$params
[
"daily_id"
])
||
empty
(
$params
[
"agent_id"
])
||
empty
(
$params
[
"agent_name"
])
||
empty
(
$params
[
"daily_date"
])
||
if
(
!
isset
(
$params
[
"daily_id"
])
||
empty
(
$params
[
"agent_id"
])
||
empty
(
$params
[
"agent_name"
])
||
empty
(
$params
[
"daily_date"
])
||
!
isset
(
$params
[
"alipay"
])
||
!
isset
(
$params
[
"tenpay"
])
||
!
isset
(
$params
[
"realty_pay"
])
||
!
isset
(
$params
[
"alipay"
])
||
!
isset
(
$params
[
"tenpay"
])
||
!
isset
(
$params
[
"realty_pay"
])
||
!
isset
(
$params
[
"family_pay"
])
||
!
isset
(
$params
[
"private_bank"
])
||
!
isset
(
$params
[
"cash"
])
||
!
isset
(
$params
[
"family_pay"
])
||
!
isset
(
$params
[
"private_bank"
])
||
!
isset
(
$params
[
"cash"
])
||
!
isset
(
$params
[
"pos"
])
||
!
isset
(
$params
[
"other_bank"
])
!
isset
(
$params
[
"pos"
])
||
!
isset
(
$params
[
"other_bank"
])
||
!
isset
(
$params
[
"operation_status"
])
)
{
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
...
@@ -150,8 +151,9 @@ class DailyPaper extends Basic
...
@@ -150,8 +151,9 @@ class DailyPaper extends Basic
$pos
=
$params
[
"agent_id"
];
$pos
=
$params
[
"agent_id"
];
$other_bank
=
$params
[
"other_bank"
];
$other_bank
=
$params
[
"other_bank"
];
$remark
=
$params
[
"remark"
];
$remark
=
$params
[
"remark"
];
$operation_status
=
$params
[
"operation_status"
];
$is_ok
=
$this
->
service_
->
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$is_ok
=
$this
->
service_
->
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
);
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
);
if
(
$is_ok
>
0
){
if
(
$is_ok
>
0
){
return
$this
->
response
(
"200"
,
"success"
,[]);
return
$this
->
response
(
"200"
,
"success"
,[]);
}
else
{
}
else
{
...
...
application/model/ODaily.php
View file @
144d201c
<?php
<?php
namespace
app\model
;
namespace
app\model
;
use
think\Db
;
use
think\Db
;
...
@@ -11,7 +12,8 @@ use think\Model;
...
@@ -11,7 +12,8 @@ use think\Model;
* Time : 11:26 AM
* Time : 11:26 AM
* Intro:
* Intro:
*/
*/
class
ODaily
extends
BaseModel
{
class
ODaily
extends
BaseModel
{
protected
$table
=
"o_daily"
;
protected
$table
=
"o_daily"
;
private
$db_
;
private
$db_
;
...
@@ -32,12 +34,13 @@ class ODaily extends BaseModel{
...
@@ -32,12 +34,13 @@ class ODaily extends BaseModel{
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getDailyList
(
$field
,
$params
,
$page_no
,
$page_size
){
public
function
getDailyList
(
$field
,
$params
,
$page_no
,
$page_size
)
{
$where_
=
[];
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
if
(
isset
(
$params
[
"daily_date"
]))
{
if
(
isset
(
$params
[
"daily_date"
]))
{
$where_
[
"daily_date"
]
=
$params
[
"daily_date"
];
$where_
[
"daily_date"
]
=
$params
[
"daily_date"
];
}
}
$where_
[
"is_del"
]
=
0
;
$where_
[
"is_del"
]
=
0
;
...
@@ -53,7 +56,8 @@ class ODaily extends BaseModel{
...
@@ -53,7 +56,8 @@ class ODaily extends BaseModel{
* @param $params
* @param $params
* @return int
* @return int
*/
*/
public
function
addDaily
(
$params
){
public
function
addDaily
(
$params
)
{
Db
::
startTrans
();
Db
::
startTrans
();
try
{
try
{
$this
->
db_
->
insert
(
$params
);
$this
->
db_
->
insert
(
$params
);
...
@@ -64,4 +68,22 @@ class ODaily extends BaseModel{
...
@@ -64,4 +68,22 @@ class ODaily extends BaseModel{
return
0
;
return
0
;
}
}
}
}
/**
* @param $where
* @param $params
* @return int
*/
public
function
updateDaily
(
$where
,
$params
)
{
Db
::
startTrans
();
try
{
$this
->
where
(
$where
)
->
update
(
$params
);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
0
;
}
}
}
}
\ No newline at end of file
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