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
1978b198
Commit
1978b198
authored
Dec 17, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增财务提交
parent
321e53ef
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
26 deletions
+53
-26
DailyPaperService.php
application/api_broker/service/DailyPaperService.php
+26
-5
DailyPaper.php
application/index/controller/DailyPaper.php
+7
-21
ODaily.php
application/model/ODaily.php
+4
-0
ODailyLog.php
application/model/ODailyLog.php
+16
-0
No files found.
application/api_broker/service/DailyPaperService.php
View file @
1978b198
...
@@ -22,11 +22,13 @@ class DailyPaperService
...
@@ -22,11 +22,13 @@ class DailyPaperService
{
{
private
$oDailyModel
;
private
$oDailyModel
;
private
$aAgentsModel
;
private
$aAgentsModel
;
private
$oDailyLogModel
;
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
oDailyModel
=
new
ODaily
();
$this
->
oDailyModel
=
new
ODaily
();
$this
->
aAgentsModel
=
new
AAgents
();
$this
->
aAgentsModel
=
new
AAgents
();
$this
->
oDailyLogModel
=
new
ODailyLog
();
}
}
/**
/**
...
@@ -341,8 +343,7 @@ class DailyPaperService
...
@@ -341,8 +343,7 @@ class DailyPaperService
$params
[
"daily_id"
]
=
$daily_id
;
$params
[
"daily_id"
]
=
$daily_id
;
$params
[
"is_del"
]
=
0
;
$params
[
"is_del"
]
=
0
;
$oDailyLog
=
new
ODailyLog
();
return
$this
->
oDailyLogModel
->
getDailyLogList
(
$field
,
$params
,
1
,
15
);
return
$oDailyLog
->
getDailyLogList
(
$field
,
$params
,
1
,
15
);
}
}
...
@@ -430,16 +431,36 @@ class DailyPaperService
...
@@ -430,16 +431,36 @@ class DailyPaperService
}
}
$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
,
$agent_info
[
0
][
"store_id"
],
$agent_info
[
0
][
"district_id"
],
$remark
);
return
$this
->
oDailyModel
->
addDaily
(
$params
);
return
$this
->
oDailyLogModel
->
addDailyCheck
(
$params
);
}
}
/**
* @param $daily_id
* @param $agent_id
* @param $agent_name
* @param $daily_date
* @param $alipay
* @param $tenpay
* @param $realty_pay
* @param $family_pay
* @param $private_bank
* @param $cash
* @param $pos
* @param $other_bank
* @param $store_id
* @param $district_id
* @param $remark
* @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
,
$store_id
,
$district_id
,
$remark
)
{
{
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"daily_id"
]
=
$daily_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
$arr
[
"operation_id"
]
=
$agent_id
;
$arr
[
"operation_name"
]
=
$agent_name
;
$arr
[
"operation_name"
]
=
$agent_name
;
$arr
[
"store_id"
]
=
$store_id
;
$arr
[
"remark"
]
=
$remark
;
$arr
[
"district_id"
]
=
$district_id
;
$arr
[
"daily_date"
]
=
$daily_date
;
$arr
[
"daily_date"
]
=
$daily_date
;
$arr
[
"alipay"
]
=
$alipay
;
$arr
[
"alipay"
]
=
$alipay
;
$arr
[
"tenpay"
]
=
$tenpay
;
$arr
[
"tenpay"
]
=
$tenpay
;
...
...
application/index/controller/DailyPaper.php
View file @
1978b198
...
@@ -105,29 +105,15 @@ class DailyPaper extends Basic
...
@@ -105,29 +105,15 @@ class DailyPaper extends Basic
}
}
}
}
public
function
commitCheck
(){
$params
=
$this
->
params
;
/**
/**
* CREATE TABLE `o_daily_log` (
* 财务审核新增
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '财务日报审核日志',
* @return \think\Response
`daily_id` int(10) unsigned DEFAULT NULL COMMENT '财务日报id',
* @throws \think\db\exception\DataNotFoundException
`operation_id` int(10) unsigned DEFAULT NULL COMMENT '审核人',
* @throws \think\db\exception\ModelNotFoundException
`operation_name` varchar(60) DEFAULT '' COMMENT '审核人名字',
* @throws \think\exception\DbException
`remark` varchar(255) DEFAULT '' COMMENT '备注',
`alipay` decimal(10,2) DEFAULT '0.00' COMMENT '支付宝转账',
`tenpay` decimal(10,2) DEFAULT '0.00' COMMENT '微信转账',
`realty_pay` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '地产转账',
`family_pay` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '世家公账',
`private_bank` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '3000账号',
`cash` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '现金',
`pos` decimal(10,2) unsigned DEFAULT '0.00' COMMENT 'pos机',
`other_bank` decimal(10,2) DEFAULT '0.00' COMMENT '其他',
`is_del` tinyint(1) unsigned DEFAULT '0' COMMENT '0正常1删除',
`status` tinyint(1) unsigned DEFAULT '0' COMMENT '审核状态0已提交 1未审核 2已审核',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
*/
*/
public
function
commitCheck
(){
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"daily_id" => 1,
"daily_id" => 1,
"agent_id" => 5775,//经纪人id
"agent_id" => 5775,//经纪人id
...
...
application/model/ODaily.php
View file @
1978b198
...
@@ -49,6 +49,10 @@ class ODaily extends BaseModel{
...
@@ -49,6 +49,10 @@ class ODaily extends BaseModel{
->
select
();
->
select
();
}
}
/**
* @param $params
* @return int
*/
public
function
addDaily
(
$params
){
public
function
addDaily
(
$params
){
Db
::
startTrans
();
Db
::
startTrans
();
try
{
try
{
...
...
application/model/ODailyLog.php
View file @
1978b198
...
@@ -48,4 +48,19 @@ class ODailyLog extends Model
...
@@ -48,4 +48,19 @@ class ODailyLog extends Model
->
limit
(
$page_size
)
->
limit
(
$page_size
)
->
select
();
->
select
();
}
}
/**
* @param $params
* @return int
*/
public
function
addDailyCheck
(
$params
){
Db
::
startTrans
();
try
{
$this
->
db_
->
insertAll
(
$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