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
a019056b
Commit
a019056b
authored
Aug 06, 2019
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0731-v3.3.6' of gitee.com:zwyjjc/tl_estate into 0731-v3.3.6
parents
2f36640e
5f14fb00
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
0 deletions
+172
-0
DailyPaper.php
application/api_broker/controller/DailyPaper.php
+4
-0
DailyUncommitted.php
application/index/controller/DailyUncommitted.php
+83
-0
ODailyUncommittedModel.php
application/model/ODailyUncommittedModel.php
+83
-0
route.php
application/route.php
+2
-0
No files found.
application/api_broker/controller/DailyPaper.php
View file @
a019056b
...
...
@@ -178,4 +178,7 @@ class DailyPaper extends Basic
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
\ No newline at end of file
application/index/controller/DailyUncommitted.php
0 → 100644
View file @
a019056b
<?php
namespace
app\index\controller
;
use
app\api\service\AccountBalanceService
;
use
app\api_broker\service\RedisCacheService
;
use
app\index\extend\Basic
;
use
app\model\GReceiptOperatingRecords
;
use
app\model\ODailyUncommittedModel
;
use
think\Request
;
class
DailyUncommitted
extends
Basic
{
private
$m_daily_uncommitted
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
m_daily_uncommitted
=
new
ODailyUncommittedModel
();
}
/**
* 新增记录
* @param $agents_id
* @param $type
* @param $pay_log_id
* @return bool
*/
public
function
addOperating
(
$agents_id
,
$type
,
$pay_log_id
)
{
// $data["agents_id"] = $agents_id;
// $data["type"] = $type;
// $data["remark"] = $type == 1 ? "删除收款ID:{$pay_log_id}" : "撤销调整收款ID:{$pay_log_id}";
// $data["pay_log_id"] = $pay_log_id;
//
// $result = $this->m_receipt_operating_records->saveOperating($data);//int(1)
//
// if ($result) {
// return true;
// } else {
// return false;
// }
}
/**
* 财务日报未提交 记录
* @return \think\Response
*/
public
function
DailyUncommittedList
()
{
$params
=
$this
->
params
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$conditions
=
[];
if
(
!
empty
(
$params
[
'daily_date'
])
)
{
if
(
!
checkTimeData
(
$params
[
'daily_date'
])){
return
$this
->
response
(
"101"
,
'非法时间'
);
}
$conditions
[
'a.daily_date'
]
=
$params
[
'daily_date'
];
}
if
(
!
empty
(
$params
[
'store_id'
]))
{
$conditions
[
'a.store_id'
]
=
$params
[
'store_id'
];
}
$conditions
[
'a.status'
]
=
1
;
$field
=
'a.daily_date,b.store_name'
;
$result
=
$this
->
m_daily_uncommitted
->
getDailyUncommittedList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
if
(
!
$result
)
return
$this
->
response
(
"200"
,
"成功"
,
[]);
$result_total
=
$this
->
m_daily_uncommitted
->
getDailyUncommittedTotal
(
$field
,
$conditions
);
$data
[
'list'
]
=
$result
;
$data
[
'total'
]
=
$result_total
;
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
}
}
\ No newline at end of file
application/model/ODailyUncommittedModel.php
0 → 100755
View file @
a019056b
<?php
namespace
app\model
;
use
think\Db
;
use
think\Model
;
class
ODailyUncommittedModel
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'o_daily_uncommitted'
;
private
$db_
;
public
function
__construct
(
$data
=
[])
{
parent
::
__construct
(
$data
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
public
function
saveDailyUncommitted
(
$data
)
{
$time
=
date
(
"Y-m-d H:i:s"
,
time
());
$data
[
'a.create_time'
]
=
$time
;
$data
[
'a.update_time'
]
=
$time
;
$data
[
'a.is_del'
]
=
0
;
return
$this
->
db_
->
insert
(
$data
);
}
/**
* 查询数据
*/
public
function
getDailyUncommitted
(
$field
,
$params
)
{
$params
[
"a.is_del"
]
=
0
;
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
where
(
$params
)
->
find
();
//echo $this->getLastSql();
return
$result
;
}
/**
* 财务日报未提交 记录
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getDailyUncommittedList
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_store b"
,
"a.store_id=b.id"
,
"left"
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
'a.id desc'
)
->
select
();
return
$result
;
}
/**
* 财务日报未提交 记录
* @param $field
* @param $params
* @return int|string
*/
public
function
getDailyUncommittedTotal
(
$field
,
$params
)
{
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_store b"
,
"a.store_id=b.id"
,
"left"
)
->
where
(
$params
)
->
count
();
return
$result
;
}
}
application/route.php
View file @
a019056b
...
...
@@ -569,6 +569,8 @@ Route::group('index', [
'receiptOperatingRecordsList'
=>
[
'index/ReceiptOperatingRecords/receiptOperatingRecordsList'
,
[
'method'
=>
'POST|GET'
]],
'DailyUncommittedList'
=>
[
'index/DailyUncommitted/DailyUncommittedList'
,
[
'method'
=>
'POST|GET'
]],
]);
...
...
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