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
347d2c9d
Commit
347d2c9d
authored
Jan 25, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
site_id
parent
96744d79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
DailyPaper.php
application/api_broker/controller/DailyPaper.php
+3
-2
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+8
-5
DailyPaper.php
application/index/controller/DailyPaper.php
+2
-1
No files found.
application/api_broker/controller/DailyPaper.php
View file @
347d2c9d
...
...
@@ -82,7 +82,7 @@ class DailyPaper extends Basic
if
(
empty
(
$params
[
"agent_id"
])
||
empty
(
$params
[
"agent_name"
])
||
empty
(
$params
[
"daily_date"
])
||
!
isset
(
$params
[
"alipay"
])
||
!
isset
(
$params
[
"tenpay"
])
||
!
isset
(
$params
[
"realty_pay"
])
||
!
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
[
'site_id'
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
@@ -100,8 +100,9 @@ class DailyPaper extends Basic
$cash
=
$params
[
"cash"
];
$pos
=
$params
[
"pos"
];
$other_bank
=
$params
[
"other_bank"
];
$site_id
=
$this
->
siteId
;
$result
=
$this
->
service_
->
addDaily
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$tenpay_2
,
$alipay_2
);
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$tenpay_2
,
$alipay_2
,
$site_id
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
else
{
...
...
application/api_broker/service/DailyPaperService.php
View file @
347d2c9d
...
...
@@ -106,7 +106,8 @@ class DailyPaperService
//todo 统计各金额
$result
[
"total_info"
]
=
$this
->
getTotal
(
$store_id
,
$daily_data
);
$result
[
"site_id"
]
=
$daily_info
[
'site_id'
];
unset
(
$daily_info
[
"site_id"
]);
return
[
"code"
=>
200
,
"data"
=>
$result
];
}
...
...
@@ -449,13 +450,14 @@ class DailyPaperService
* @param $other_bank
* @param $tenpay_2
* @param $alipay_2
* @param $site_id
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
addDaily
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$tenpay_2
,
$alipay_2
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$tenpay_2
,
$alipay_2
,
$site_id
)
{
$agent_info_arr
[
"agent_id"
]
=
$agent_id
;
$agent_info_field
=
"id,name,store_id,district_id,level"
;
...
...
@@ -470,7 +472,7 @@ class DailyPaperService
return
[
"code"
=>
101
,
"msg"
=>
"请勿重复提交日报"
];
}
$params
=
$this
->
dailyBin
(
$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"
],
$tenpay_2
,
$alipay_2
);
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$agent_info
[
0
][
"store_id"
],
$agent_info
[
0
][
"district_id"
],
$tenpay_2
,
$alipay_2
,
$site_id
);
$is_ok
=
$this
->
oDailyModel
->
addDaily
(
$params
);
if
(
$is_ok
>
0
)
{
return
[
"code"
=>
200
,
"data"
=>
null
];
...
...
@@ -480,7 +482,7 @@ class DailyPaperService
}
public
function
dailyBin
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
,
$tenpay_2
,
$alipay_2
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
,
$tenpay_2
,
$alipay_2
,
$site_id
)
{
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
...
...
@@ -497,6 +499,7 @@ class DailyPaperService
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"tenpay_2"
]
=
$tenpay_2
;
$arr
[
"alipay_2"
]
=
$alipay_2
;
$arr
[
"site_id"
]
=
$site_id
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
...
...
@@ -609,7 +612,7 @@ class DailyPaperService
private
function
getDailyInfo
(
$store_id
,
$daily_data
,
$type
=
0
)
{
$field_info_field
=
"id,agent_id,agent_name,daily_date,alipay,tenpay,realty_pay,family_pay,private_bank,
cash,pos,other_bank,status,create_time,update_time"
;
cash,pos,other_bank,status,create_time,update_time
,alipay_2,tenpay_2,site_id
"
;
if
(
$type
==
1
){
$daily_info_params
[
"agent_id"
]
=
$store_id
;
}
else
{
...
...
application/index/controller/DailyPaper.php
View file @
347d2c9d
...
...
@@ -100,8 +100,9 @@ class DailyPaper extends Basic
$cash
=
$params
[
"cash"
];
$pos
=
$params
[
"pos"
];
$other_bank
=
$params
[
"other_bank"
];
$site_id
=
$this
->
siteId
;
$result
=
$this
->
service_
->
addDaily
(
$agent_id
,
$agent_name
,
$daily_date
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
);
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$tenpay_2
,
$alipay_2
,
$site_id
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$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