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
1e4ef520
Commit
1e4ef520
authored
Oct 25, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改转勤
parent
71996dc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
BrokerService.php
application/index/service/BrokerService.php
+8
-7
No files found.
application/index/service/BrokerService.php
View file @
1e4ef520
...
@@ -63,11 +63,13 @@ class BrokerService
...
@@ -63,11 +63,13 @@ class BrokerService
$agent_data
=
$this
->
m_agent
->
verifyUser
(
'id,phone,password,site_id,district_id'
,
''
,
$where
);
$agent_data
=
$this
->
m_agent
->
verifyUser
(
'id,phone,password,site_id,district_id'
,
''
,
$where
);
if
(
empty
(
$data
[
'id'
]))
{
if
(
empty
(
$data
[
'id'
]))
{
if
(
!
empty
(
$agent_data
[
'status'
])
&&
$agent_data
[
'status'
]
==
3
)
{
$result
[
'msg'
]
=
'该用户已转勤'
;
}
if
(
!
empty
(
$agent_data
))
{
if
(
!
empty
(
$agent_data
))
{
$result
[
'msg'
]
=
'该用户已存在'
;
$result
[
'msg'
]
=
'该用户已存在'
;
return
$result
;
return
$result
;
}
}
$agent_old
=
$this
->
m_agent
->
getAgentById
(
'id'
,
[
'phone'
=>
$data
[
'phone'
],
'status'
=>
0
]);
$agent_old
=
$this
->
m_agent
->
getAgentById
(
'id'
,
[
'phone'
=>
$data
[
'phone'
],
'status'
=>
0
]);
if
(
empty
(
$data
[
'confirm_old'
]))
{
if
(
empty
(
$data
[
'confirm_old'
]))
{
if
(
!
empty
(
$agent_old
[
0
][
'id'
]))
{
if
(
!
empty
(
$agent_old
[
0
][
'id'
]))
{
...
@@ -109,7 +111,6 @@ class BrokerService
...
@@ -109,7 +111,6 @@ class BrokerService
}
}
$id
=
$this
->
m_agent
->
saveAgent
(
$data
);
$id
=
$this
->
m_agent
->
saveAgent
(
$data
);
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
$result
[
'status'
]
=
'successful'
;
$result
[
'status'
]
=
'successful'
;
$result
[
'data'
]
=
[
'id'
=>
$id
];
$result
[
'data'
]
=
[
'id'
=>
$id
];
...
@@ -124,24 +125,24 @@ class BrokerService
...
@@ -124,24 +125,24 @@ class BrokerService
$update_user
[
$k
][
'agent_id'
]
=
$id
;
$update_user
[
$k
][
'agent_id'
]
=
$id
;
}
}
$record_data
[
'user_id'
]
=
empty
(
$user_id_arr
)
?
""
:
ex
plode
(
','
,
$user_id_arr
);
$record_data
[
'user_id'
]
=
empty
(
$user_id_arr
)
?
""
:
im
plode
(
','
,
$user_id_arr
);
$m_house
=
new
GHousesToAgents
();
$m_house
=
new
GHousesToAgents
();
$house_where
[
'is_del'
]
=
0
;
$house_where
[
'is_del'
]
=
0
;
$house_where
[
'agents_id'
]
=
$change_old_id
;
$house_where
[
'agents_id'
]
=
$change_old_id
;
$house_where
[
'type'
]
=
[
'in'
,
'2,3'
];
$house_where
[
'type'
]
=
[
'in'
,
'2,3'
];
$house_id_arr
=
$m_house
->
getAgentHouseOne
(
'
houses_
id'
,
$house_where
);
$house_id_arr
=
$m_house
->
getAgentHouseOne
(
'id'
,
$house_where
);
foreach
(
$house_id_arr
as
$k
=>
$v
)
{
foreach
(
$house_id_arr
as
$k
=>
$v
)
{
$update_house
[
$k
][
'
houses_
id'
]
=
$v
;
$update_house
[
$k
][
'id'
]
=
$v
;
$update_house
[
$k
][
'agents_id'
]
=
$id
;
$update_house
[
$k
][
'agents_id'
]
=
$id
;
}
}
$house_id_arr
=
array_unique
(
$house_id_arr
);
$house_id_arr
=
array_unique
(
$house_id_arr
);
$record_data
[
'house_id'
]
=
empty
(
$
user_id_arr
)
?
""
:
ex
plode
(
','
,
$house_id_arr
);
$record_data
[
'house_id'
]
=
empty
(
$
house_id_arr
)
?
""
:
im
plode
(
','
,
$house_id_arr
);
$m_records
=
new
AOperatingRecords
();
$m_records
=
new
AOperatingRecords
();
$record_data
[
'remark'
]
=
'
经纪人转勤操作'
;
$record_data
[
'remark'
]
=
'
转勤,旧id:'
.
$change_old_id
;
$record_data
[
'type'
]
=
0
;
$record_data
[
'type'
]
=
0
;
$record_data
[
'operation_id'
]
=
$operation_id
;
$record_data
[
'operation_id'
]
=
$operation_id
;
$record_data
[
'agent_id'
]
=
$id
;
$record_data
[
'agent_id'
]
=
$id
;
...
...
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