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
c717f3ca
Commit
c717f3ca
authored
Jan 25, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务日报增加字段
parent
479fad07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
DailyPaper.php
application/api_broker/controller/DailyPaper.php
+3
-1
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+14
-15
DailyPaper.php
application/index/controller/DailyPaper.php
+2
-0
No files found.
application/api_broker/controller/DailyPaper.php
View file @
c717f3ca
...
...
@@ -92,6 +92,8 @@ class DailyPaper extends Basic
$daily_date
=
$params
[
"daily_date"
];
$alipay
=
$params
[
"alipay"
];
$tenpay
=
$params
[
"tenpay"
];
$tenpay_2
=
$params
[
"tenpay_2"
];
$alipay_2
=
$params
[
"alipay_2"
];
$realty_pay
=
$params
[
"realty_pay"
];
$private_bank
=
$params
[
"private_bank"
];
$family_pay
=
$params
[
"family_pay"
];
...
...
@@ -99,7 +101,7 @@ class DailyPaper extends Basic
$pos
=
$params
[
"pos"
];
$other_bank
=
$params
[
"other_bank"
];
$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
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
else
{
...
...
application/api_broker/service/DailyPaperService.php
View file @
c717f3ca
...
...
@@ -164,7 +164,9 @@ class DailyPaperService
$payLogModel
=
new
OPayLogModel
();
$total_arr
=
$payLogModel
->
getTotal
(
$field
,
$params
,
"pay_type"
);
$total
[
"alipay"
]
=
0
;
$total
[
"alipay_2"
]
=
0
;
$total
[
"tenpay"
]
=
0
;
$total
[
"tenpay_2"
]
=
0
;
$total
[
"pos"
]
=
0
;
$total
[
"realty_pay"
]
=
0
;
$total
[
"family_pay"
]
=
0
;
...
...
@@ -177,16 +179,16 @@ class DailyPaperService
foreach
(
$total_arr
as
$item
)
{
switch
(
$item
[
"pay_type"
])
{
case
10
:
$total
[
"alipay1"
]
=
$item
[
"money"
];
$total
[
"alipay
_
1"
]
=
$item
[
"money"
];
break
;
case
11
:
$total
[
"alipay2"
]
=
$item
[
"money"
];
$total
[
"alipay
_
2"
]
=
$item
[
"money"
];
break
;
case
20
:
$total
[
"tenpay1"
]
=
$item
[
"money"
];
$total
[
"tenpay
_
1"
]
=
$item
[
"money"
];
break
;
case
21
:
$total
[
"tenpay2"
]
=
$item
[
"money"
];
$total
[
"tenpay
_
2"
]
=
$item
[
"money"
];
break
;
case
30
:
$total
[
"pos"
]
=
$item
[
"money"
];
...
...
@@ -208,12 +210,6 @@ class DailyPaperService
break
;
}
}
$total
[
"alipay"
]
=
$total
[
"alipay1"
]
+
$total
[
"alipay2"
];
$total
[
"tenpay"
]
=
$total
[
"tenpay1"
]
+
$total
[
"tenpay2"
];
unset
(
$total
[
"alipay1"
]);
unset
(
$total
[
"alipay2"
]);
unset
(
$total
[
"tenpay1"
]);
unset
(
$total
[
"tenpay2"
]);
return
$total
;
}
...
...
@@ -439,7 +435,6 @@ class DailyPaperService
return
$this
->
oDailyLogModel
->
getDailyLogList
(
$field
,
$params
,
1
,
15
);
}
/**
* @param $agent_id
* @param $agent_name
...
...
@@ -452,13 +447,15 @@ class DailyPaperService
* @param $cash
* @param $pos
* @param $other_bank
* @return array|int
* @param $tenpay_2
* @param $alipay_2
* @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
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$tenpay_2
,
$alipay_2
)
{
$agent_info_arr
[
"agent_id"
]
=
$agent_id
;
$agent_info_field
=
"id,name,store_id,district_id,level"
;
...
...
@@ -473,7 +470,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"
]);
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$agent_info
[
0
][
"store_id"
],
$agent_info
[
0
][
"district_id"
]
,
$tenpay_2
,
$alipay_2
);
$is_ok
=
$this
->
oDailyModel
->
addDaily
(
$params
);
if
(
$is_ok
>
0
)
{
return
[
"code"
=>
200
,
"data"
=>
null
];
...
...
@@ -483,7 +480,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
)
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$store_id
,
$district_id
,
$tenpay_2
,
$alipay_2
)
{
$arr
[
"agent_id"
]
=
$agent_id
;
$arr
[
"agent_name"
]
=
$agent_name
;
...
...
@@ -498,6 +495,8 @@ class DailyPaperService
$arr
[
"cash"
]
=
$cash
;
$arr
[
"pos"
]
=
$pos
;
$arr
[
"other_bank"
]
=
$other_bank
;
$arr
[
"tenpay_2"
]
=
$tenpay_2
;
$arr
[
"alipay_2"
]
=
$alipay_2
;
$arr
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
...
...
application/index/controller/DailyPaper.php
View file @
c717f3ca
...
...
@@ -91,6 +91,8 @@ class DailyPaper extends Basic
$agent_name
=
$params
[
"agent_name"
];
$daily_date
=
$params
[
"daily_date"
];
$alipay
=
$params
[
"alipay"
];
$tenpay_2
=
$params
[
"tenpay_2"
];
$alipay_2
=
$params
[
"alipay_2"
];
$tenpay
=
$params
[
"tenpay"
];
$realty_pay
=
$params
[
"realty_pay"
];
$private_bank
=
$params
[
"private_bank"
];
...
...
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