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
2f33d47a
Commit
2f33d47a
authored
Jun 28, 2019
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0618-v3.3.2' of
https://gitee.com/zwyjjc/tl_estate
into 0618-v3.3.2
parents
4d0b9d32
37a47b62
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
94 additions
and
64 deletions
+94
-64
Statement.php
application/api_broker/controller/Statement.php
+5
-5
User.php
application/api_broker/controller/User.php
+2
-2
StatementService.php
application/api_broker/service/StatementService.php
+0
-0
ChatVerifyValidate.php
application/chat/validate/ChatVerifyValidate.php
+3
-3
Finance.php
application/index/controller/Finance.php
+1
-1
Member.php
application/index/controller/Member.php
+1
-1
OfficeFinance.php
application/index/controller/OfficeFinance.php
+1
-1
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+4
-0
UserLogService.php
application/index/service/UserLogService.php
+1
-1
UserService.php
application/index/service/UserService.php
+22
-17
OBargainModel.php
application/model/OBargainModel.php
+50
-30
OPartialCommission.php
application/model/OPartialCommission.php
+1
-0
ORealIncome.php
application/model/ORealIncome.php
+1
-1
inspectionRecordAllOffice.js
public/resource/js/inspectionRecordAllOffice.js
+2
-2
No files found.
application/api_broker/controller/Statement.php
View file @
2f33d47a
...
@@ -39,7 +39,7 @@ class Statement extends Basic
...
@@ -39,7 +39,7 @@ class Statement extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
$this
->
params
;
// big_log('日报周报获取新增数据-dayStatement');
// big_log('日报周报获取新增数据-dayStatement');
big_log
(
$params
);
// big_log(json_encode($params)
);
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"time_start"
])
||
!
isset
(
$params
[
"time_end"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"time_start"
])
||
!
isset
(
$params
[
"time_end"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
...
@@ -248,18 +248,19 @@ class Statement extends Basic
...
@@ -248,18 +248,19 @@ class Statement extends Basic
$field
=
"id,store_id,district_id,level,name,phone,sex,status"
;
$field
=
"id,store_id,district_id,level,name,phone,sex,status"
;
$agentModel
=
new
AAgents
();
$agentModel
=
new
AAgents
();
$agent_result
=
$agentModel
->
getAgentById
(
$field
,
[
"agent_id"
=>
$params
[
"agent_id"
]
]);
$agent_result
=
$agentModel
->
getAgentById
(
$field
,
[
"agent_id"
=>
$params
[
"agent_id"
]
]);
if
(
!
$agent_result
){
if
(
!
$agent_result
){
return
$this
->
response
(
"200"
,
"request is null"
);
return
$this
->
response
(
"200"
,
"request is null"
);
}
}
$store_id
=
$agent_result
[
0
][
"store_id"
];
$store_id
=
$agent_result
[
0
][
"store_id"
];
$district_id
=
$agent_result
[
0
][
"district_id"
];
$district_id
=
$agent_result
[
0
][
"district_id"
];
switch
(
$agent_result
[
0
][
"level"
])
{
switch
(
$agent_result
[
0
][
"level"
])
{
case
10
:
case
10
:
#业务员
#业务员
$agent_level
=
0
;
$agent_level
=
0
;
$result
=
$this
->
service_
->
selectStatementForClerk
(
$params
[
"agent_id"
],
$this
->
siteId
);
$result
=
$this
->
service_
->
selectStatementForClerk
(
$params
[
"agent_id"
],
$agent_level
,
$store_id
,
$district_id
);
break
;
break
;
case
20
:
case
20
:
#店长
#店长
...
@@ -276,8 +277,7 @@ class Statement extends Basic
...
@@ -276,8 +277,7 @@ class Statement extends Basic
#总监
#总监
$agent_level
=
2
;
$agent_level
=
2
;
if
(
$params
[
"type"
]
==
0
){
#日报
if
(
$params
[
"type"
]
==
0
){
#日报
$result
=
$this
->
service_
->
selectStatementForDistrictWithDay
(
$params
[
"agent_id"
],
$agent_level
,
$result
=
$this
->
service_
->
selectStatementForDistrictWithDay
(
$agent_level
,
$district_id
);
$store_id
,
$district_id
);
}
else
{
#周报
}
else
{
#周报
$result
=
$this
->
service_
->
selectStatementForDistrictWithWeek
(
$params
[
"agent_id"
],
$agent_level
,
$result
=
$this
->
service_
->
selectStatementForDistrictWithWeek
(
$params
[
"agent_id"
],
$agent_level
,
$store_id
,
$district_id
);
$store_id
,
$district_id
);
...
...
application/api_broker/controller/User.php
View file @
2f33d47a
...
@@ -275,7 +275,7 @@ class User extends Basic
...
@@ -275,7 +275,7 @@ class User extends Basic
$return_user_list
[
$k
][
'user_phone'
]
=
substr_replace
(
$return_user_list
[
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$return_user_list
[
$k
][
'user_phone'
]
=
substr_replace
(
$return_user_list
[
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$return_user_list
[
$k
][
'site_ids_name'
]
=
$user_service
->
userSiteName
(
$v
[
"site_ids"
]);
$return_user_list
[
$k
][
'site_ids_name'
]
=
$user_service
->
userSiteName
(
$v
[
"site_ids"
]);
$return_user_list
[
$k
][
'user_name'
]
=
$v
[
'user_name'
]
&&
$v
[
'entrust_type'
]
==
0
?
"
[
{
$v
[
'concrete_industry'
]
}
]
{
$v
[
'user_name'
]
}
"
:
$v
[
'user_name'
];
$return_user_list
[
$k
][
'user_name'
]
=
$v
[
'user_name'
]
&&
$v
[
'entrust_type'
]
==
0
?
"
{
$v
[
'concrete_industry'
]
}
,
{
$v
[
'user_name'
]
}
"
:
$v
[
'user_name'
];
}
}
...
@@ -844,7 +844,7 @@ class User extends Basic
...
@@ -844,7 +844,7 @@ class User extends Basic
}
}
$s_index_user
=
new
UserService
();
$s_index_user
=
new
UserService
();
//新增
//新增
$add_res
=
$s_index_user
->
addUserBind
(
$this
->
params
[
'user_id'
],
$this
->
params
[
'bind_id'
]);
$add_res
=
$s_index_user
->
addUserBind
(
$this
->
params
[
'user_id'
],
$this
->
params
[
'bind_id'
]
,
$this
->
agentId
);
if
(
$add_res
===
true
)
{
if
(
$add_res
===
true
)
{
return
$this
->
response
(
"200"
,
"绑定成功"
);
return
$this
->
response
(
"200"
,
"绑定成功"
);
}
else
{
}
else
{
...
...
application/api_broker/service/StatementService.php
View file @
2f33d47a
This diff is collapsed.
Click to expand it.
application/chat/validate/ChatVerifyValidate.php
View file @
2f33d47a
...
@@ -15,11 +15,11 @@ class ChatVerifyValidate extends Validate
...
@@ -15,11 +15,11 @@ class ChatVerifyValidate extends Validate
{
{
/**
/**
*
$target_type = $params['target_type']; // 消息类型 users 给用户发消息。chatgroups: 给群发消息,chatrooms: 给聊天室发消息
* $target_type = $params['target_type']; // 消息类型 users 给用户发消息。chatgroups: 给群发消息,chatrooms: 给聊天室发消息
* $target = $params['target']; //接受人 if target_type 群 者表示群id
* $target = $params['target']; //接受人 if target_type 群 者表示群id
* $source = $params['source']; //消息来源 1c端app 2b端app 3其他
* $source = $params['source']; //消息来源 1c端app 2b端app 3其他
* $is_user = $params['is_user']; //发送人是否是会员 0是1经济人
* $is_user = $params['is_user']; //发送人是否是会员 0是1经济人
* $type = $params['type']; //消息类型 1文字 2图片 3楼盘 4
经纪人
* $type = $params['type']; //消息类型 1文字 2图片 3楼盘 4
客户 5 办公楼
* $msg_content = $params['msg_content'];
* $msg_content = $params['msg_content'];
* $from = $params['from']; //消息发送人
* $from = $params['from']; //消息发送人
* @var array
* @var array
...
@@ -29,7 +29,7 @@ class ChatVerifyValidate extends Validate
...
@@ -29,7 +29,7 @@ class ChatVerifyValidate extends Validate
'target'
=>
'require'
,
'target'
=>
'require'
,
'source'
=>
'require|in:1,2,3'
,
'source'
=>
'require|in:1,2,3'
,
'is_user'
=>
'require|in:0,1'
,
'is_user'
=>
'require|in:0,1'
,
'type'
=>
'require|in:1,2,3,4'
,
'type'
=>
'require|in:1,2,3,4
,5
'
,
'msg_content'
=>
'require'
,
'msg_content'
=>
'require'
,
'from'
=>
'require'
,
'from'
=>
'require'
,
];
];
...
...
application/index/controller/Finance.php
View file @
2f33d47a
...
@@ -2791,7 +2791,7 @@ class Finance extends Basic
...
@@ -2791,7 +2791,7 @@ class Finance extends Basic
if
(
!
empty
(
$where
))
{
if
(
!
empty
(
$where
))
{
//获取被修改人信息
//获取被修改人信息
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
agentBargain
Office
All
(
'a.id,a.store_id,a.district_id,d.income_time,b.create_time'
,
$where
);
$agent_data
=
$m_agent
->
agentBargainAll
(
'a.id,a.store_id,a.district_id,d.income_time,b.create_time'
,
$where
);
foreach
(
$agent_data
as
$k
=>
$v
)
{
foreach
(
$agent_data
as
$k
=>
$v
)
{
$income_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'income_time'
]));
$income_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'income_time'
]));
$create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
$create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
...
...
application/index/controller/Member.php
View file @
2f33d47a
...
@@ -615,7 +615,7 @@ class Member extends Basic{
...
@@ -615,7 +615,7 @@ class Member extends Basic{
}
}
$s_index_user
=
new
UserService
();
$s_index_user
=
new
UserService
();
//新增
//新增
$add_res
=
$s_index_user
->
addUserBind
(
$this
->
params
[
'user_id'
],
$this
->
params
[
'bind_id'
]);
$add_res
=
$s_index_user
->
addUserBind
(
$this
->
params
[
'user_id'
],
$this
->
params
[
'bind_id'
]
,
$this
->
userId
);
if
(
$add_res
===
true
)
{
if
(
$add_res
===
true
)
{
return
$this
->
response
(
"200"
,
"绑定成功"
);
return
$this
->
response
(
"200"
,
"绑定成功"
);
}
else
{
}
else
{
...
...
application/index/controller/OfficeFinance.php
View file @
2f33d47a
...
@@ -65,7 +65,7 @@ class OfficeFinance extends Basic
...
@@ -65,7 +65,7 @@ class OfficeFinance extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$where
=
[];
$where
=
[];
//
$where['a.confirm_status'] = 1;
$where
[
'a.confirm_status'
]
=
1
;
$where
[
'a.is_del'
]
=
$select
=
0
;
$where
[
'a.is_del'
]
=
$select
=
0
;
$where
[
'b.status'
]
=
[
'in'
,
'10,11,13'
];
$where
[
'b.status'
]
=
[
'in'
,
'10,11,13'
];
...
...
application/index/service/OfficeRoomService.php
View file @
2f33d47a
...
@@ -698,6 +698,10 @@ class OfficeRoomService
...
@@ -698,6 +698,10 @@ class OfficeRoomService
$result
[
'is_collect'
]
=
$this
->
isCollect
(
$result
[
'id'
],
$agent_id
);
$result
[
'is_collect'
]
=
$this
->
isCollect
(
$result
[
'id'
],
$agent_id
);
//是否可编辑
//是否可编辑
$result
[
'is_can_edit'
]
=
$this
->
isCanEdit
(
$result
[
'id'
],
$agent_id
);
$result
[
'is_can_edit'
]
=
$this
->
isCanEdit
(
$result
[
'id'
],
$agent_id
);
//微信分享图 原来的随机图
$external_image
=
$this
->
getCarouselImageByOne
(
$result
[
'id'
],
2
);
$result
[
'external_image'
]
=
$external_image
?
$external_image
[
'image_path'
]
:
null
;
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
}
}
...
...
application/index/service/UserLogService.php
View file @
2f33d47a
...
@@ -240,7 +240,7 @@ class UserLogService
...
@@ -240,7 +240,7 @@ class UserLogService
if
(
count
(
$result
)
<=
0
)
{
if
(
count
(
$result
)
<=
0
)
{
return
[
"code"
=>
101
,
"msg"
=>
"没找到此条用户信息"
];
return
[
"code"
=>
101
,
"msg"
=>
"没找到此条用户信息"
];
}
}
$result
[
'user_name'
]
=
$result
[
'user_name'
]
&&
$result
[
'entrust_type'
]
==
0
?
"
[
{
$result
[
'concrete_industry'
]
}
]
{
$result
[
'user_name'
]
}
"
:
$result
[
'user_name'
];
$result
[
'user_name'
]
=
$result
[
'user_name'
]
&&
$result
[
'entrust_type'
]
==
0
?
"
{
$result
[
'concrete_industry'
]
}
,
{
$result
[
'user_name'
]
}
"
:
$result
[
'user_name'
];
$result
[
'user_pic'
]
=
!
empty
(
$result
[
"user_pic"
])
?
HEADERIMGURL
.
$result
[
"user_pic"
]
:
$result
[
"other_pic"
];
$result
[
'user_pic'
]
=
!
empty
(
$result
[
"user_pic"
])
?
HEADERIMGURL
.
$result
[
"user_pic"
]
:
$result
[
"other_pic"
];
#判断是否纯房东 0:否 1:是
#判断是否纯房东 0:否 1:是
...
...
application/index/service/UserService.php
View file @
2f33d47a
...
@@ -714,7 +714,7 @@ class UserService
...
@@ -714,7 +714,7 @@ class UserService
* @param $bind_id
* @param $bind_id
* @return int
* @return int
*/
*/
public
function
addUserBind
(
$user_id
,
$bind_id
){
public
function
addUserBind
(
$user_id
,
$bind_id
,
$agent_id
){
if
(
!
$user_id
or
!
$bind_id
){
if
(
!
$user_id
or
!
$bind_id
){
return
'参数不全'
;
return
'参数不全'
;
}
}
...
@@ -752,7 +752,8 @@ class UserService
...
@@ -752,7 +752,8 @@ class UserService
$params_
[
'bind_id'
]
=
$params_bind_id
;
$params_
[
'bind_id'
]
=
$params_bind_id
;
$res
=
$this
->
user
->
updateUsers
(
$params_user_id
,
$params_
);
$res
=
$this
->
user
->
updateUsers
(
$params_user_id
,
$params_
);
if
(
$res
==
1
){
if
(
$res
==
1
){
$this
->
userDoLog
(
$user_id
,
$params_user_id
,
$params_bind_id
,
1
);
$this
->
userDoLog
(
$params_user_id
,
$params_bind_id
,
$agent_id
,
1
);
$this
->
userDoLog
(
$params_bind_id
,
$params_user_id
,
$agent_id
,
1
);
$redis_service
=
new
RedisCacheService
();
$redis_service
=
new
RedisCacheService
();
$redis_service
->
userCache
(
$user_id
);
$redis_service
->
userCache
(
$user_id
);
return
true
;
return
true
;
...
@@ -761,6 +762,22 @@ class UserService
...
@@ -761,6 +762,22 @@ class UserService
}
}
}
}
/**
* 记录操作日志
* @param $user_id
* @param $remove_bind_id
* @param $agent_id
* @param int $type
*/
private
function
userDoLog
(
$user_id
,
$remove_bind_id
,
$agent_id
,
$type
=
0
)
{
$records
=
new
GOperatingRecords
();
$remark
=
'与ID: '
.
$remove_bind_id
.
'解除绑定关系'
;
if
(
$type
==
1
){
$remark
=
'与ID: '
.
$remove_bind_id
.
'添加绑定'
;
}
$records
->
record
(
$agent_id
,
8
,
$remark
,
''
,
$user_id
);
}
/**
/**
* 解除绑定关系
* 解除绑定关系
* @param $now_user_id //当前详情页客户
* @param $now_user_id //当前详情页客户
...
@@ -805,6 +822,9 @@ class UserService
...
@@ -805,6 +822,9 @@ class UserService
return
0
;
return
0
;
}
}
/**
/**
* 客户绑定详情
* 客户绑定详情
* @param $user_id
* @param $user_id
...
@@ -831,21 +851,6 @@ class UserService
...
@@ -831,21 +851,6 @@ class UserService
return
$user_info_list
;
return
$user_info_list
;
}
}
/**
* 记录操作日志
* @param $id
* @param $remove_bind_id
* @param $agent_id
*/
private
function
userDoLog
(
$id
,
$remove_bind_id
,
$agent_id
,
$type
=
0
)
{
$records
=
new
GOperatingRecords
();
$remark
=
'与ID: '
.
$remove_bind_id
.
'解除绑定关系'
;
if
(
$type
==
1
){
$remark
=
'与ID: '
.
$remove_bind_id
.
'添加绑定'
;
}
$records
->
record
(
$agent_id
,
8
,
$remark
,
''
,
$id
);
}
/**
/**
...
...
application/model/OBargainModel.php
View file @
2f33d47a
...
@@ -640,7 +640,7 @@ class OBargainModel extends Model
...
@@ -640,7 +640,7 @@ class OBargainModel extends Model
if
(
isset
(
$params
[
"create_time"
]))
{
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"c.income_time"
]
=
$params
[
"create_time"
];
$where_
[
"c.income_time"
]
=
$params
[
"create_time"
];
}
}
$where_
[
"a.status"
]
=
array
(
"in"
,
"10,11,13"
);
return
Db
::
table
(
$this
->
table
)
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
...
@@ -825,6 +825,45 @@ class OBargainModel extends Model
...
@@ -825,6 +825,45 @@ class OBargainModel extends Model
->
select
();
->
select
();
return
$return
;
return
$return
;
}
}
public
function
getAddBargainNumV3
(
$params
,
$type
)
{
$where_
=
[];
$field
=
""
;
$join
=
[];
if
(
$type
==
1
)
{
$field
=
"sum(scale_fee) as num"
;
$where_
[
"a.status"
]
=
array
(
"in"
,
'10,11,13'
);
}
elseif
(
$type
==
2
)
{
$field
=
"sum(practical_fee) as num"
;
}
elseif
(
$type
==
3
)
{
$field
=
"count(1) as num"
;
$where_
[
"a.role"
]
=
3
;
//必须是反签方1
$where_
[
"a.status"
]
=
array
(
"in"
,
'10,11,13'
);
}
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
array_push
(
$join
,
[
' o_order b'
,
'a.order_id = b.id'
,
'left'
]);
}
$return
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
$join
)
->
where
(
$where_
)
->
select
();
return
$return
;
}
/**
/**
* @param $params
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
...
@@ -1367,7 +1406,6 @@ class OBargainModel extends Model
...
@@ -1367,7 +1406,6 @@ class OBargainModel extends Model
->
field
(
$filed
)
->
field
(
$filed
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_partial_commission b"
,
"a.id = b.bargain_id"
,
"left"
)
->
join
(
"o_partial_commission b"
,
"a.id = b.bargain_id"
,
"left"
)
->
join
(
"o_real_income c"
,
"b.real_income_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
where
(
$where_
)
->
whereOr
(
$whereOr_
)
->
whereOr
(
$whereOr_
)
->
order
(
"a.id asc"
)
->
order
(
"a.id asc"
)
...
@@ -1453,15 +1491,15 @@ class OBargainModel extends Model
...
@@ -1453,15 +1491,15 @@ class OBargainModel extends Model
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
order
(
"Obargain.create_time desc"
)
->
order
(
"Obargain.create_time desc"
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
//echo $this->db_->getLastSql();
//echo $this->db_->getLastSql();
return
$result
;
return
$result
;
}
}
...
@@ -1474,8 +1512,8 @@ class OBargainModel extends Model
...
@@ -1474,8 +1512,8 @@ class OBargainModel extends Model
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
order
(
"Obargain.create_time desc"
)
->
order
(
"Obargain.create_time desc"
)
...
@@ -1493,8 +1531,8 @@ class OBargainModel extends Model
...
@@ -1493,8 +1531,8 @@ class OBargainModel extends Model
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
order
(
"Obargain.create_time desc"
)
->
order
(
"Obargain.create_time desc"
)
...
@@ -1517,8 +1555,8 @@ class OBargainModel extends Model
...
@@ -1517,8 +1555,8 @@ class OBargainModel extends Model
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"o_order Oorder"
,
"Obargain.order_id = Oorder.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"g_houses Houses"
,
"Oorder.house_id = Houses.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
->
join
(
"a_agents Agent"
,
"Obargain.agent_id = Agent.id"
,
"left"
)
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_store Store', 'Agent.store_id = Store.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
// ->join('a_district District', 'Agent.district_id = District.id', 'left')
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
join
(
'o_partial_commission PartialCommission'
,
'PartialCommission.bargain_id = Obargain.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
...
@@ -1588,7 +1626,7 @@ class OBargainModel extends Model
...
@@ -1588,7 +1626,7 @@ class OBargainModel extends Model
//$where_["trade_type"] = 10;//产品要求统计数量必须是出租类型的180620
//$where_["trade_type"] = 10;//产品要求统计数量必须是出租类型的180620
$params
[
"a.role"
]
=
3
;
//必须是反签方
$params
[
"a.role"
]
=
3
;
//必须是反签方
$params
[
'c.shop_type'
]
=
$type
==
0
?
0
:
1
;
$params
[
'c.shop_type'
]
=
$type
==
0
?
0
:
1
;
// dump($params);
// dump($params);
$return
=
Db
::
table
(
$this
->
table
)
$return
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
...
@@ -1632,24 +1670,6 @@ class OBargainModel extends Model
...
@@ -1632,24 +1670,6 @@ class OBargainModel extends Model
->
select
();
->
select
();
}
}
/**
* @param $field
* @param $where
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
agentBargainIncome
(
$field
,
$where
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'office_o_partial_commission c'
,
'a.id = c.bargain_id'
,
'left'
)
->
join
(
'office_o_real_income d'
,
'c.real_income_id = d.id'
,
'left'
)
->
where
(
$where
)
->
select
();
}
/**
/**
* @param $field
* @param $field
* @param $where
* @param $where
...
...
application/model/OPartialCommission.php
View file @
2f33d47a
...
@@ -42,6 +42,7 @@ class OPartialCommission extends BaseModel
...
@@ -42,6 +42,7 @@ class OPartialCommission extends BaseModel
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
big_log
(
$this
->
getLastSql
());
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$fields_str
=
'a.id,a.name,a.phone,b.store_name'
;
$fields_str
=
'a.id,a.name,a.phone,b.store_name'
;
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
...
...
application/model/ORealIncome.php
View file @
2f33d47a
...
@@ -147,7 +147,7 @@ class ORealIncome extends BaseModel
...
@@ -147,7 +147,7 @@ class ORealIncome extends BaseModel
$params
[
'a.is_del'
]
=
0
;
$params
[
'a.is_del'
]
=
0
;
return
$this
->
field
(
$field
)
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
alias
(
'a'
)
->
join
(
'o
ffice_o
_partial_commission b'
,
'a.id = b.real_income_id'
,
'left'
)
->
join
(
'o_partial_commission b'
,
'a.id = b.real_income_id'
,
'left'
)
->
join
(
'a_agents c'
,
'b.agent_id = c.id'
,
'left'
)
->
join
(
'a_agents c'
,
'b.agent_id = c.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
select
();
->
select
();
...
...
public/resource/js/inspectionRecordAllOffice.js
View file @
2f33d47a
...
@@ -191,11 +191,11 @@ define(['doT', 'text!temp/inspectionRecordAllOffice_list_template_tpl.html', 'cs
...
@@ -191,11 +191,11 @@ define(['doT', 'text!temp/inspectionRecordAllOffice_list_template_tpl.html', 'cs
$
(
"#is_show_store"
).
hide
();
$
(
"#is_show_store"
).
hide
();
}
}
if
(
!
check_auth
(
'index/inspectionRecordDistrict/2'
))
{
if
(
!
check_auth
(
'
office_
index/inspectionRecordDistrict/2'
))
{
$
(
"#is_show_district"
).
hide
();
$
(
"#is_show_district"
).
hide
();
}
}
if
(
!
check_auth
(
'index/inspectionRecordAll/3'
))
{
if
(
!
check_auth
(
'
office_
index/inspectionRecordAll/3'
))
{
$
(
"#is_show_all"
).
hide
();
$
(
"#is_show_all"
).
hide
();
}
}
$
(
"#our"
).
click
(
function
()
{
$
(
"#our"
).
click
(
function
()
{
...
...
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