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
0bce7d00
Commit
0bce7d00
authored
May 21, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9404246e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
119 deletions
+66
-119
DailyPaper.php
application/api_broker/controller/DailyPaper.php
+49
-109
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+12
-9
DailyPaper.php
application/index/controller/DailyPaper.php
+5
-1
No files found.
application/api_broker/controller/DailyPaper.php
View file @
0bce7d00
...
...
@@ -34,17 +34,17 @@ class DailyPaper extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"store_id" => 730,//门店id
"is_store" => 0,//身份是否是店长,财务显示不一样 0店长 1财务
"daily_data" => "2018-12-18"
);
$this->userId = 5775;*/
/* $params = array(
"store_id" => 730,//门店id
"is_store" => 0,//身份是否是店长,财务显示不一样 0店长 1财务
"daily_data" => "2018-12-18"
);
$this->userId = 5775;*/
if
(
!
isset
(
$params
[
"store_id"
])
||
!
isset
(
$params
[
"is_store"
])
||
!
isset
(
$params
[
"daily_data"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$store_id
=
$params
[
"store_id"
];
$is_store
=
$params
[
"is_store"
];
$store_id
=
$params
[
"store_id"
];
$is_store
=
$params
[
"is_store"
];
$daily_data
=
$params
[
"daily_data"
];
$result
=
$this
->
service_
->
getDaily
(
$this
->
agentId
,
$store_id
,
$is_store
,
$daily_data
);
...
...
@@ -66,19 +66,19 @@ class DailyPaper extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 5775,//经纪人id
"agent_name" => "222",//经纪人姓名
"daily_date" => "2018-12-02",//日报日期
"alipay" => "12",//支付宝收款
"tenpay" => "2323",//微信收款
"realty_pay" => "232",//地产转帐
"family_pay" => "444",//世家公账
"private_bank" => "55",//3000账号
"cash" => "666",//现金
"pos" => "777",//pos机
"other_bank" => "888"//其他
);*/
/* $params = array(
"agent_id" => 5775,//经纪人id
"agent_name" => "222",//经纪人姓名
"daily_date" => "2018-12-02",//日报日期
"alipay" => "12",//支付宝收款
"tenpay" => "2323",//微信收款
"realty_pay" => "232",//地产转帐
"family_pay" => "444",//世家公账
"private_bank" => "55",//3000账号
"cash" => "666",//现金
"pos" => "777",//pos机
"other_bank" => "888"//其他
);*/
// 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"]) ||
...
...
@@ -102,88 +102,27 @@ class DailyPaper extends Basic
}
}
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$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"
];
$cash
=
$params
[
"cash"
];
$pos
=
$params
[
"pos"
];
$other_bank
=
$params
[
"other_bank"
];
$bank_card
=
$params
[
"bank_card"
];
$site_id
=
$this
->
siteId
;
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$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"
];
$cash
=
$params
[
"cash"
];
$pos
=
$params
[
"pos"
];
$other_bank
=
$params
[
"other_bank"
];
$bank_card
=
$params
[
"bank_card"
];
$site_id
=
$this
->
siteId
;
$bank_card_yun
=
$params
[
"bank_card_yun"
]
?
$params
[
"bank_card_yun"
]
:
0
;
$bank_card_lin
=
$params
[
"bank_card_lin"
]
?
$params
[
"bank_card_lin"
]
:
0
;
$bank_card_new
=
$params
[
"bank_card_new"
]
?
$params
[
"bank_card_new"
]
:
0
;
$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
,
$site_id
,
$bank_card
,
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
else
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"data"
]);
}
}
/**
* 财务审核新增
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
commitCheck
(){
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*$params = array(
"daily_id" => 1,//日报id
"agent_id" => 5775,//经纪人id
"agent_name" => "222",//经纪人姓名
"alipay" => "12",//支付宝收款
"tenpay" => "2323",//微信收款
"realty_pay" => "232",//地产转帐
"family_pay" => "444",//世家公账
"private_bank" => "55",//3000账号
"cash" => "666",//现金
"pos" => "777",//pos机
"other_bank" => "888",//其他,
"operation_status" => 1,//0审核通过 1转为已审核
"remark" => "888"//备注,
);*/
if
(
!
isset
(
$params
[
"daily_id"
])
||
empty
(
$params
[
"agent_id"
])
||
empty
(
$params
[
"agent_name"
])
||
!
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
[
"operation_status"
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$daily_id
=
$params
[
"daily_id"
];
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$alipay
=
$params
[
"alipay"
];
$tenpay
=
$params
[
"tenpay"
];
$realty_pay
=
$params
[
"realty_pay"
];
$private_bank
=
$params
[
"private_bank"
];
$family_pay
=
$params
[
"family_pay"
];
$cash
=
$params
[
"cash"
];
$pos
=
$params
[
"pos"
];
$other_bank
=
$params
[
"other_bank"
];
$remark
=
$params
[
"remark"
];
$operation_status
=
$params
[
"operation_status"
];
$tenpay_2
=
$params
[
"tenpay_2"
];
$alipay_2
=
$params
[
"alipay_2"
];
$bank_card
=
$params
[
"bank_card"
];
if
(
$operation_status
!=
0
&&
$operation_status
!=
1
){
return
$this
->
response
(
"101"
,
"审核状态错误"
);
}
$result
=
$this
->
service_
->
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
,
$tenpay_2
,
$alipay_2
,
$bank_card
);
$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
,
$site_id
,
$bank_card
,
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
else
{
...
...
@@ -195,23 +134,24 @@ class DailyPaper extends Basic
/**
* @return \think\Response
*/
public
function
getPayLogImg
(){
public
function
getPayLogImg
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"pay_log_id" => 1
);*/
if
(
!
isset
(
$params
[
"pay_log_id"
]))
{
/* $params = array(
"pay_log_id" => 1
);*/
if
(
!
isset
(
$params
[
"pay_log_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$img_list
=
$this
->
service_
->
getImgs
(
$params
[
"pay_log_id"
]);
if
(
count
(
$img_list
)
>
0
)
{
if
(
count
(
$img_list
)
>
0
)
{
$result
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
"img_info"
]
=
$img_list
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
...
...
application/api_broker/service/DailyPaperService.php
View file @
0bce7d00
...
...
@@ -188,9 +188,9 @@ class DailyPaperService
$total
[
"other_bank"
]
=
0
;
$total
[
"bank_card"
]
=
0
;
//71 筠姐上海银行卡 72林老师建行卡 73新同联福居银行卡 74陈志杰招商
$total
[
"bank_card_yun"
]
=
0
;
$total
[
"bank_card_lin"
]
=
0
;
$total
[
"bank_card_new"
]
=
0
;
$total
[
"bank_card_yun"
]
=
0
;
$total
[
"bank_card_lin"
]
=
0
;
$total
[
"bank_card_new"
]
=
0
;
$total
[
"bank_card_chen"
]
=
0
;
if
(
count
(
$total_arr
)
<=
0
)
{
return
$total
;
...
...
@@ -206,7 +206,7 @@ class DailyPaperService
case
12
:
$total
[
"alipay"
]
=
$item
[
"money"
];
break
;
case
13
:
case
13
:
$total
[
"alipay_3"
]
=
$item
[
"money"
];
break
;
case
20
:
...
...
@@ -218,7 +218,7 @@ class DailyPaperService
case
22
:
$total
[
"tenpay"
]
=
$item
[
"money"
];
break
;
case
23
:
case
23
:
$total
[
"tenpay_3"
]
=
$item
[
"money"
];
break
;
case
30
:
...
...
@@ -251,7 +251,7 @@ class DailyPaperService
case
73
:
$total
[
"bank_card_new"
]
=
$item
[
"money"
];
break
;
case
74
:
case
74
:
$total
[
"bank_card_chen"
]
=
$item
[
"money"
];
break
;
}
...
...
@@ -643,7 +643,7 @@ class DailyPaperService
*/
public
function
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
,
$tenpay_2
,
$alipay_2
,
$bank_card
,
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
)
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
,
$bank_card_chen
,
$tenpay_3
,
$alipay_3
)
{
$agent_info_arr
[
"agent_id"
]
=
$agent_id
;
$agent_info_field
=
"id,name,store_id,district_id,level"
;
...
...
@@ -660,7 +660,7 @@ class DailyPaperService
}
$params
=
$this
->
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
,
$tenpay_2
,
$alipay_2
,
$bank_card
,
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
);
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
,
$bank_card_chen
,
$tenpay_3
,
$alipay_3
);
$is_ok
=
$this
->
oDailyLogModel
->
addDailyCheck
(
$params
);
...
...
@@ -704,7 +704,7 @@ class DailyPaperService
*/
public
function
dailyLogBin
(
$daily_id
,
$agent_id
,
$agent_name
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
,
$tenpay_2
,
$alipay_2
,
$bank_card
,
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
)
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
,
$bank_card_chen
,
$tenpay_3
,
$alipay_3
)
{
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
...
...
@@ -725,6 +725,9 @@ class DailyPaperService
$arr
[
"bank_card_yun"
]
=
$bank_card_yun
;
$arr
[
"bank_card_lin"
]
=
$bank_card_lin
;
$arr
[
"bank_card_new"
]
=
$bank_card_new
;
$arr
[
"bank_card_new"
]
=
$bank_card_new
;
$arr
[
"alipay_3"
]
=
$alipay_3
;
$arr
[
"bank_card_chen"
]
=
$bank_card_chen
;
$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 @
0bce7d00
...
...
@@ -161,6 +161,7 @@ class DailyPaper extends Basic
!
isset
(
$params
[
"family_pay"
])
||
!
isset
(
$params
[
"private_bank"
])
||
!
isset
(
$params
[
"cash"
])
||
!
isset
(
$params
[
"pos"
])
||
!
isset
(
$params
[
"other_bank"
])
||
!
isset
(
$params
[
"operation_status"
])
//|| !isset($params["bank_card_yun"]) || !isset($params["bank_card_lin"]) || !isset($params["bank_card_new"])
//|| !isset($params["alipay_3"]) || !isset($params["tenpay_3"]) || !isset($params["bank_card_chen"])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
@@ -180,16 +181,19 @@ class DailyPaper extends Basic
$operation_status
=
$params
[
"operation_status"
];
$tenpay_2
=
$params
[
"tenpay_2"
];
$alipay_2
=
$params
[
"alipay_2"
];
$tenpay_3
=
$params
[
"tenpay_3"
];
$alipay_3
=
$params
[
"alipay_3"
];
$bank_card
=
$params
[
"bank_card"
];
$bank_card_yun
=
$params
[
"bank_card_yun"
]
?
$params
[
"bank_card_yun"
]
:
0
;
$bank_card_lin
=
$params
[
"bank_card_lin"
]
?
$params
[
"bank_card_lin"
]
:
0
;
$bank_card_new
=
$params
[
"bank_card_new"
]
?
$params
[
"bank_card_new"
]
:
0
;
$bank_card_chen
=
$params
[
"bank_card_chen"
]
?
$params
[
"bank_card_chen"
]
:
0
;
if
(
$operation_status
!=
0
&&
$operation_status
!=
1
)
{
return
$this
->
response
(
"101"
,
"审核状态错误"
);
}
$result
=
$this
->
service_
->
addDailyCheck
(
$daily_id
,
$agent_id
,
$agent_name
,
$alipay
,
$tenpay
,
$realty_pay
,
$family_pay
,
$private_bank
,
$cash
,
$pos
,
$other_bank
,
$remark
,
$operation_status
,
$tenpay_2
,
$alipay_2
,
$bank_card
,
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
);
$bank_card_yun
,
$bank_card_lin
,
$bank_card_new
,
$bank_card_chen
,
$tenpay_3
,
$alipay_3
);
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