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
13a1b47b
Commit
13a1b47b
authored
Apr 18, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
00d97aac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
ConvertOrder.php
application/api/controller/ConvertOrder.php
+17
-11
Basic.php
application/api/extend/Basic.php
+2
-1
Applies.php
application/model/Applies.php
+2
-2
JournalAccounts.php
application/model/JournalAccounts.php
+2
-2
Users.php
application/model/Users.php
+2
-1
No files found.
application/api/controller/ConvertOrder.php
View file @
13a1b47b
...
...
@@ -70,14 +70,16 @@ class ConvertOrder extends Basic
foreach
(
$appliesList
as
$item
)
{
$userInfo
=
$this
->
userModel
->
insertUserConvert
(
$this
->
userBin
(
$item
[
"customer"
],
$item
[
"customer"
],
$item
[
"phpone"
],
$item
[
"sex"
],
$item
[
"created"
]));
if
(
count
(
$userInfo
)
<=
0
)
continue
;
$reportParam
=
$this
->
reportBin
(
$item
[
"id"
],
$item
[
"agent_id"
],
$item
[
"phone"
],
$item
[
"realname"
],
$item
[
"agent_shop_id"
],
$userInfo
[
"id"
],
$userInfo
[
"user_phone"
]
,
$userInfo
[
"user_name"
],
$item
[
"vehicle"
],
$item
[
"agent_shop_id"
],
$item
[
"receptiontime"
],
$item
[
"created"
],
$item
[
"modified"
]);
$f_id
=
$this
->
reportModel
->
addReport
(
$reportParam
);
if
(
$f_id
>
0
)
{
$orderParam
=
$this
->
orderBin
(
$this
->
createOrderNumber
(),
$f_id
,
$item
[
"house_id"
]);
array_push
(
$orderArr
,
$orderParam
);
if
(
count
(
$userInfo
)
>
1
)
{
$reportParam
=
$this
->
reportBin
(
$item
[
"id"
],
$item
[
"agent_id"
],
$item
[
"phone"
],
$item
[
"realname"
],
$item
[
"agent_shop_id"
],
$userInfo
[
"id"
],
$userInfo
[
"user_phone"
]
,
$userInfo
[
"user_name"
],
$item
[
"vehicle"
],
$item
[
"agent_shop_id"
],
$item
[
"receptiontime"
],
$item
[
"created"
],
$item
[
"modified"
]);
$f_id
=
$this
->
reportModel
->
addReport
(
$reportParam
);
if
(
$f_id
>
0
)
{
$orderParam
=
$this
->
orderBin
(
$this
->
createOrderNumber
(),
$f_id
,
$item
[
"house_id"
],
$item
[
"created"
],
$item
[
"modified"
]);
array_push
(
$orderArr
,
$orderParam
);
}
}
}
$this
->
orderModel
->
insertOrderByAll
(
$orderArr
);
}
...
...
@@ -91,6 +93,7 @@ class ConvertOrder extends Basic
*/
public
function
convertMarchIn
()
{
set_time_limit
(
0
);
$total
=
$this
->
remarksModel
->
getRemarksCount
();
$pageSize
=
200
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
...
...
@@ -111,9 +114,10 @@ class ConvertOrder extends Basic
public
function
convertCollectingBill
()
{
set_time_limit
(
0
);
$field
=
"a.type,a.moneytype,a.money,a.trademark,a.remarks,a.created,a.modified,d.id as agent_id,b.id as report_id,c.id as order_id,c.order_no"
;
$collectingBillList
=
$this
->
journalaccountsModel
->
getJournalAccountsListByStatus
(
1
,
2000
,
$field
);
dump
(
$collectingBillList
);
dump
(
$collectingBillList
);
exit
;
$collectingBillArr
=
[];
foreach
(
$collectingBillList
as
$key
=>
$item
)
{
$collectingBillParams
=
$this
->
collectingBillBin
(
0
,
$item
[
"moneytype"
],
$item
[
"type"
],
$item
[
"money"
],
...
...
@@ -269,9 +273,11 @@ class ConvertOrder extends Basic
* @param $order_no
* @param $f_id
* @param $house_id
* @param $create_time
* @param $update_time
* @return mixed
*/
private
function
orderBin
(
$order_no
,
$f_id
,
$house_id
)
private
function
orderBin
(
$order_no
,
$f_id
,
$house_id
,
$create_time
,
$update_time
)
{
$houseModel
=
new
GHouses
();
$houseResult
=
$houseModel
->
getHouseDetail
(
"id,internal_title"
,
[
"id"
=>
$house_id
]);
...
...
@@ -280,8 +286,8 @@ class ConvertOrder extends Basic
$param
[
"f_id"
]
=
$f_id
;
$param
[
"house_id"
]
=
$house_id
;
$param
[
"house_title"
]
=
$house_title
;
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
())
;
$param
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
())
;
$param
[
"create_time"
]
=
$create_time
;
$param
[
"update_time"
]
=
$update_time
;
return
$param
;
}
...
...
application/api/extend/Basic.php
View file @
13a1b47b
...
...
@@ -50,6 +50,7 @@ class Basic extends Controller
"api/commentAndDeal"
,
"api/check_code"
,
"api/convertOrderByTime"
,
"api/convertMarchIn"
,
"api/convertCollectingBill"
,
);
...
...
@@ -82,7 +83,7 @@ class Basic extends Controller
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
tokenVerify
();
$this
->
tokenVerify
();
}
}
...
...
application/model/Applies.php
View file @
13a1b47b
...
...
@@ -26,7 +26,7 @@ class Applies extends Model
public
function
getApplies
(
$pageNo
,
$pageSize
,
$field
)
{
$where_
[
"transaction_status"
]
=
1
;
$where_
[
"transaction_status"
]
=
0
;
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
...
...
@@ -39,7 +39,7 @@ class Applies extends Model
}
public
function
getAppliesCount
()
{
$where_
[
"transaction_status"
]
=
1
;
$where_
[
"transaction_status"
]
=
0
;
return
$this
->
field
(
"a.id"
)
->
alias
(
"a"
)
...
...
application/model/JournalAccounts.php
View file @
13a1b47b
...
...
@@ -115,8 +115,8 @@ class JournalAccounts extends Model
return
$this
->
db
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
'o_report b'
,
'a.apply_id = b.id'
,
'
LEFT
'
)
->
join
(
'o_order c'
,
'b.id = c.f_id'
,
'
LEFT
'
)
->
join
(
'o_report b'
,
'a.apply_id = b.id'
,
'
right
'
)
->
join
(
'o_order c'
,
'b.id = c.f_id'
,
'
right
'
)
->
join
(
'agents d'
,
'a.operaaccount = d.realname'
,
'LEFT'
)
->
where
(
$params
)
->
limit
(
$pageSize
)
...
...
application/model/Users.php
View file @
13a1b47b
...
...
@@ -376,7 +376,8 @@ class Users extends Model
*/
public
function
insertUserConvert
(
$params
){
$where_
=
[];
if
(
!
isset
(
$params
[
"user_phone"
])
||
!
preg_match
(
'/^1[345678]\d{9}$/'
,
$params
[
"user_phone"
])){
$params
[
"user_phone"
]
=
strlen
(
$params
[
"user_phone"
])
>
11
?
substr
(
$params
[
"user_phone"
],
0
,
11
)
:
$params
[
"user_phone"
];
if
(
!
isset
(
$params
[
"user_phone"
])
||
!
preg_match
(
'/^1[3456789]\d{9}$/'
,
$params
[
"user_phone"
])){
return
null
;
}
$where_
[
"user_phone"
]
=
$params
[
"user_phone"
];
...
...
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