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
be58cd41
Commit
be58cd41
authored
Aug 16, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新成交报告分佣方
parent
dd86d955
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
9 deletions
+98
-9
OBargainModel.php
application/model/OBargainModel.php
+92
-2
OFinancialAudit.php
application/model/OFinancialAudit.php
+5
-6
ResultsSummaryNewTask.php
application/task/controller/ResultsSummaryNewTask.php
+1
-1
No files found.
application/model/OBargainModel.php
View file @
be58cd41
...
@@ -17,7 +17,7 @@ class OBargainModel extends Model
...
@@ -17,7 +17,7 @@ class OBargainModel extends Model
protected
$table
=
"o_bargain"
;
protected
$table
=
"o_bargain"
;
private
$db_
;
private
$db_
;
function
__construct
()
public
function
__construct
()
{
{
$this
->
db_
=
Db
::
name
(
$this
->
table
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
}
...
@@ -173,6 +173,14 @@ class OBargainModel extends Model
...
@@ -173,6 +173,14 @@ class OBargainModel extends Model
->
select
();
->
select
();
}
}
/**
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainByOrderId
(
$field
,
$params
)
public
function
getBargainByOrderId
(
$field
,
$params
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -642,6 +650,14 @@ class OBargainModel extends Model
...
@@ -642,6 +650,14 @@ class OBargainModel extends Model
return
$data
;
return
$data
;
}
}
/**
* @param $params
* @param $type
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAddBargainNum
(
$params
,
$type
)
public
function
getAddBargainNum
(
$params
,
$type
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -687,6 +703,13 @@ class OBargainModel extends Model
...
@@ -687,6 +703,13 @@ class OBargainModel extends Model
return
$return
;
return
$return
;
}
}
/**
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getReceived
(
$params
)
public
function
getReceived
(
$params
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -711,6 +734,16 @@ class OBargainModel extends Model
...
@@ -711,6 +734,16 @@ class OBargainModel extends Model
}
}
/**
* @param $page_no
* @param $page_size
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getReceivedList
(
$page_no
,
$page_size
,
$field
,
$params
)
public
function
getReceivedList
(
$page_no
,
$page_size
,
$field
,
$params
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -737,6 +770,16 @@ class OBargainModel extends Model
...
@@ -737,6 +770,16 @@ class OBargainModel extends Model
}
}
/**
* @param $params
* @param $field
* @param $page_no
* @param $page_size
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAddBargainList
(
$params
,
$field
,
$page_no
,
$page_size
)
public
function
getAddBargainList
(
$params
,
$field
,
$page_no
,
$page_size
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -763,6 +806,15 @@ class OBargainModel extends Model
...
@@ -763,6 +806,15 @@ class OBargainModel extends Model
->
select
();
->
select
();
}
}
/**
* @param $field
* @param $params
* @param $is_case
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAddBargainOrderList
(
$field
,
$params
,
$is_case
)
public
function
getAddBargainOrderList
(
$field
,
$params
,
$is_case
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -1172,11 +1224,15 @@ class OBargainModel extends Model
...
@@ -1172,11 +1224,15 @@ class OBargainModel extends Model
/**
/**
* 获取分组统计数据
* 获取分组统计数据
*
* @param $field
* @param $field
* @param $params
* @param $params
* @param $type
* @param $type
* @param string $order
* @param string $order
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getTotalByAgentId
(
$field
,
$params
,
$type
,
$order
=
""
)
public
function
getTotalByAgentId
(
$field
,
$params
,
$type
,
$order
=
""
)
{
{
...
@@ -1208,7 +1264,16 @@ class OBargainModel extends Model
...
@@ -1208,7 +1264,16 @@ class OBargainModel extends Model
}
}
/**
* @param $where
* @param $filed
* @param $pageSize
* @param $pageNo
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
performancelInfo
(
$where
,
$filed
,
$pageSize
,
$pageNo
)
public
function
performancelInfo
(
$where
,
$filed
,
$pageSize
,
$pageNo
)
{
{
$result
=
$this
->
db_
$result
=
$this
->
db_
...
@@ -1229,6 +1294,11 @@ class OBargainModel extends Model
...
@@ -1229,6 +1294,11 @@ class OBargainModel extends Model
return
$result
;
return
$result
;
}
}
/**
* @param $where
* @param $filed
* @return int|string
*/
public
function
performancelInfoTotal
(
$where
,
$filed
)
public
function
performancelInfoTotal
(
$where
,
$filed
)
{
{
$result
=
$this
->
db_
$result
=
$this
->
db_
...
@@ -1245,4 +1315,23 @@ class OBargainModel extends Model
...
@@ -1245,4 +1315,23 @@ class OBargainModel extends Model
// echo $this->db_->getLastSql();
// echo $this->db_->getLastSql();
return
$result
;
return
$result
;
}
}
/**
* 根据成交报告id修改信息
*
* @param int $id
* @param array $data
* @return int
*/
public
function
updateBargain
(
int
$id
=
0
,
array
$data
=
[])
:
int
{
if
(
$id
)
{
$result
=
$this
->
where
(
'id'
,
$id
)
->
whereOr
(
'father_id'
,
$id
)
->
insertGetId
(
$data
);
}
else
{
$result
=
0
;
}
return
$result
;
}
}
}
\ No newline at end of file
application/model/OFinancialAudit.php
View file @
be58cd41
...
@@ -49,22 +49,21 @@ class OFinancialAudit extends BaseModel
...
@@ -49,22 +49,21 @@ class OFinancialAudit extends BaseModel
}
}
/**
/**
* 修改信息
*
* @param $id
* @param $id
* @param $params
* @param $params
* @return int
* @return int
* @throws \think\exception\PDOException
*/
*/
public
function
updateBargainById
(
$id
,
$params
)
public
function
updateBargainById
(
$id
,
$params
)
{
{
$params
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$params
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
Db
::
startTrans
();
$this
->
startTrans
();
try
{
try
{
$this
->
db_
->
where
(
'id'
,
$id
)
->
update
(
$params
);
$this
->
where
(
'id'
,
$id
)
->
update
(
$params
);
Db
::
commit
();
$this
->
commit
();
return
1
;
return
1
;
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
$this
->
rollback
();
return
0
;
return
0
;
}
}
}
}
...
...
application/task/controller/ResultsSummaryNewTask.php
View file @
be58cd41
...
@@ -79,7 +79,7 @@ class ResultsSummaryNewTask
...
@@ -79,7 +79,7 @@ class ResultsSummaryNewTask
* @param $agent_id
* @param $agent_id
* @param $store_id
* @param $store_id
* @param $district_id
* @param $district_id
* @param $total_time 比如修改了数据如成交报告,成交报告提交时间是昨天那么这里的时间就是昨天
* @param $total_time
string
比如修改了数据如成交报告,成交报告提交时间是昨天那么这里的时间就是昨天
*/
*/
public
function
updateTotalByAgentId
(
$agent_id
,
$store_id
,
$district_id
,
$total_time
)
public
function
updateTotalByAgentId
(
$agent_id
,
$store_id
,
$district_id
,
$total_time
)
{
{
...
...
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