Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
weixiuhui
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
蒋林
weixiuhui
Commits
bd13b9cd
Commit
bd13b9cd
authored
Aug 23, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 搜索维修单
2. 获取维修单详情 3. api返回修改
parent
38adbe41
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
701 additions
and
191 deletions
+701
-191
Welcome.php
application/controllers/Welcome.php
+1
-66
Galanz.php
application/controllers/api/Galanz.php
+63
-45
Galanz.php
application/controllers/task/Galanz.php
+1
-1
Rgalanz.php
application/controllers/test/Rgalanz.php
+62
-0
Sgalanz.php
application/controllers/test/Sgalanz.php
+60
-0
Receive.php
application/libraries/Receive/Receive.php
+18
-16
ReceiveGalanz.php
application/libraries/Receive/ReceiveGalanz.php
+4
-4
SourceGalanz.php
application/libraries/Source/SourceGalanz.php
+487
-59
galanz_.gif
public/captcha/galanz_.gif
+0
-0
galanz_.cookie
public/cookie/galanz_.cookie
+5
-0
No files found.
application/controllers/Welcome.php
View file @
bd13b9cd
...
@@ -6,74 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
...
@@ -6,74 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
*/
class
Welcome
extends
BaseController
{
class
Welcome
extends
BaseController
{
public
function
order
()
{
$this
->
load
->
config
(
'account'
,
true
);
$account
=
$this
->
config
->
item
(
'account'
);
$galanzAccount
=
$account
[
'galanz'
];
var_dump
(
$galanzAccount
);
die
();
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$galanzAccount
[
'c01000005'
],
'SourceGalanz'
);
$order
=
$this
->
SourceGalanz
->
OrderDetail
(
'8e2a13a1-5624-4b1e-a36f-93adcc08befa'
);
echo
"<pre>"
;
print_r
(
$order
);
}
public
function
t
()
public
function
t
()
{
{
$this
->
load
->
library
(
'Push/PushGalanz'
,
null
,
'PushGalanz'
);
echo
'11'
;
$result
=
$this
->
PushGalanz
->
GetToken
();
print_r
(
$result
);
}
}
public
function
api
()
{
$this
->
load
->
library
(
'Receive/ReceiveGalanz'
,
null
,
'ReceiveGalanz'
);
$data
[
'appid'
]
=
'10001'
;
$data
[
'out_trade_no'
]
=
'CALL2016082200544'
;
$data
[
'nonce_str'
]
=
$this
->
ReceiveGalanz
->
GetNonceStr
();
$this
->
ReceiveGalanz
->
SetValues
(
$data
);
$this
->
ReceiveGalanz
->
SetSign
();
$values
=
$this
->
ReceiveGalanz
->
GetValues
();
$url
=
"http://testwxh.pp.cc/api/galanz/getOrderDetail"
;
$result
=
$this
->
curlPost
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
echo
"<pre>"
;
print_r
(
$result
);
}
protected
function
curlGet
(
$url
)
{
$curl
=
curl_init
();
curl_setopt
(
$curl
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$curl
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
1
);
$result
=
curl_exec
(
$curl
);
//执行cURL抓取页面内容
$code
=
curl_getinfo
(
$curl
,
CURLINFO_HTTP_CODE
);
curl_close
(
$curl
);
return
[
'code'
=>
$code
,
'data'
=>
$result
];
}
protected
function
curlPost
(
$url
,
$post
)
{
$curl
=
curl_init
();
curl_setopt
(
$curl
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$curl
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
http_build_query
(
$post
));
$result
=
curl_exec
(
$curl
);
$code
=
curl_getinfo
(
$curl
,
CURLINFO_HTTP_CODE
);
curl_close
(
$curl
);
return
[
'code'
=>
$code
,
'data'
=>
$result
];
}
}
}
application/controllers/api/Galanz.php
View file @
bd13b9cd
...
@@ -20,33 +20,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
...
@@ -20,33 +20,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class
Galanz
extends
BaseController
class
Galanz
extends
BaseController
{
{
protected
static
$receiveGalanzObj
=
null
;
public
function
__construct
()
public
function
__construct
()
{
{
parent
::
__construct
();
parent
::
__construct
();
$this
->
load
->
library
(
'Receive/ReceiveGalanz'
,
null
,
'ReceiveGalanz'
);
self
::
$receiveGalanzObj
=
$this
->
ReceiveGalanz
;
}
private
function
getAccount
(
$username
)
{
$this
->
load
->
config
(
'account'
,
true
);
$account
=
$this
->
config
->
item
(
'account'
);
$galanzAccount
=
$account
[
'galanz'
];
return
$galanzAccount
[
$username
];
}
}
//订单详情
public
function
getOrderDetail
()
public
function
getOrderDetail
()
{
{
$param
=
$this
->
input
->
post
();
$param
=
$this
->
input
->
post
();
//验证参数
//验证参数
self
::
$receiveGalanzObj
->
SetValues
(
$param
);
$obj
=
$this
->
receiveGalanzObj
();
self
::
$receiveGalanzObj
->
CheckGetOrderDetailValues
();
$obj
->
SetValues
(
$param
);
$values
=
self
::
$receiveGalanzObj
->
GetValues
();
$obj
->
CheckGetOrderDetailValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
$values
[
'out_trade_no'
],
'getOrderDetail'
,
$param
);
$this
->
saveLog
(
$values
[
'out_trade_no'
],
'getOrderDetail'
,
$param
);
...
@@ -54,31 +42,37 @@ class Galanz extends BaseController
...
@@ -54,31 +42,37 @@ class Galanz extends BaseController
$info
=
$this
->
galanz_model
->
infoByNewName
(
$values
[
'out_trade_no'
]);
$info
=
$this
->
galanz_model
->
infoByNewName
(
$values
[
'out_trade_no'
]);
if
(
empty
(
$info
))
{
if
(
empty
(
$info
))
{
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10101'
,
'订单不存在'
);
$obj
->
ReturnMessage
(
false
,
'订单不存在'
);
}
}
//订单账号
//订单详情
$account
=
$this
->
getAccount
(
$info
[
'new_username'
]);
$sourceGalanzObj
=
$this
->
sourceGalanzObj
(
$info
[
'new_username'
],
$obj
);
$order
=
$sourceGalanzObj
->
OrderDetail
(
$info
[
'new_id'
]);
$obj
->
ReturnMessage
(
true
,
''
,
$order
);
}
//获取订单详情
//搜索订单
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$account
,
'SourceGalanz'
);
public
function
searchOrder
()
$order
=
$this
->
SourceGalanz
->
OrderDetail
(
$info
[
'new_id'
]);
{
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10000'
,
''
,
$order
);
}
}
//搜索维修单
//保存订单
//保存订单
public
function
saveOrder
()
public
function
saveOrder
()
{
{
$param
=
$this
->
input
->
post
();
$param
=
$this
->
input
->
post
();
//验证参数
//验证参数
self
::
$receiveGalanzObj
->
SetValues
(
$param
);
$obj
=
$this
->
receiveGalanzObj
();
self
::
$receiveGalanzObj
->
CheckSaveOrderValues
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckSaveOrderValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'saveOrder'
,
$param
);
$this
->
saveLog
(
''
,
'saveOrder'
,
$param
);
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10000'
);
$obj
->
ReturnMessage
(
true
,
''
,
$values
);
}
}
//拒绝订单
//拒绝订单
...
@@ -87,12 +81,13 @@ class Galanz extends BaseController
...
@@ -87,12 +81,13 @@ class Galanz extends BaseController
$param
=
$this
->
input
->
post
();
$param
=
$this
->
input
->
post
();
//验证参数
//验证参数
self
::
$receiveGalanzObj
->
SetValues
(
$param
);
$obj
=
$this
->
receiveGalanzObj
();
self
::
$receiveGalanzObj
->
CheckRefuseOrderValues
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckRefuseOrderValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'refuseOrder'
,
$param
);
$this
->
saveLog
(
''
,
'refuseOrder'
,
$param
);
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10000'
);
$obj
->
ReturnMessage
(
true
,
''
,
$values
);
}
}
//接受订单
//接受订单
...
@@ -101,12 +96,13 @@ class Galanz extends BaseController
...
@@ -101,12 +96,13 @@ class Galanz extends BaseController
$param
=
$this
->
input
->
post
();
$param
=
$this
->
input
->
post
();
//验证参数
//验证参数
self
::
$receiveGalanzObj
->
SetValues
(
$param
);
$obj
=
$this
->
receiveGalanzObj
();
self
::
$receiveGalanzObj
->
CheckAcceptOrderValues
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckAcceptOrderValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'acceptOrder'
,
$param
);
$this
->
saveLog
(
''
,
'acceptOrder'
,
$param
);
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10000'
);
$obj
->
ReturnMessage
(
true
,
''
,
$values
);
}
}
//转录维修单
//转录维修单
...
@@ -115,12 +111,13 @@ class Galanz extends BaseController
...
@@ -115,12 +111,13 @@ class Galanz extends BaseController
$param
=
$this
->
input
->
post
();
$param
=
$this
->
input
->
post
();
//验证参数
//验证参数
self
::
$receiveGalanzObj
->
SetValues
(
$param
);
$obj
=
$this
->
receiveGalanzObj
();
self
::
$receiveGalanzObj
->
CheckCreateWorkOrderValues
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckCreateWorkOrderValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'createWorkOrder'
,
$param
);
$this
->
saveLog
(
''
,
'createWorkOrder'
,
$param
);
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10000'
);
$obj
->
ReturnMessage
(
true
,
''
,
$values
);
}
}
//转录安装单
//转录安装单
...
@@ -129,13 +126,13 @@ class Galanz extends BaseController
...
@@ -129,13 +126,13 @@ class Galanz extends BaseController
$param
=
$this
->
input
->
post
();
$param
=
$this
->
input
->
post
();
//验证参数
//验证参数
self
::
$receiveGalanzObj
->
SetValues
(
$param
);
$obj
=
$this
->
receiveGalanzObj
();
self
::
$receiveGalanzObj
->
CheckCreateUserprofileOrderValues
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckCreateUserprofileOrderValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'createUserprofileOrder'
,
$param
);
$this
->
saveLog
(
''
,
'createUserprofileOrder'
,
$param
);
$obj
->
ReturnMessage
(
true
,
''
,
$values
);
self
::
$receiveGalanzObj
->
ReturnMessage
(
'10000'
);
}
}
private
function
saveLog
(
$search
,
$method
,
$data
)
private
function
saveLog
(
$search
,
$method
,
$data
)
...
@@ -145,4 +142,25 @@ class Galanz extends BaseController
...
@@ -145,4 +142,25 @@ class Galanz extends BaseController
$this
->
api_log_model
->
add
(
$search
,
'galanz'
,
$method
,
$data
);
$this
->
api_log_model
->
add
(
$search
,
'galanz'
,
$method
,
$data
);
}
}
private
function
receiveGalanzObj
()
{
$this
->
load
->
library
(
'Receive/ReceiveGalanz'
,
null
,
'ReceiveGalanz'
);
return
$this
->
ReceiveGalanz
;
}
private
function
sourceGalanzObj
(
$username
,
$obj
)
{
$this
->
load
->
config
(
'account'
,
true
);
$account
=
$this
->
config
->
item
(
'account'
);
$galanzAccount
=
$account
[
'galanz'
];
if
(
!
array_key_exists
(
$username
,
$galanzAccount
))
{
$obj
->
ReturnMessage
(
false
,
'用户名不存在'
);
}
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$galanzAccount
[
$username
],
'SourceGalanz'
);
return
$this
->
SourceGalanz
;
}
}
}
\ No newline at end of file
application/controllers/task/Galanz.php
View file @
bd13b9cd
...
@@ -65,7 +65,7 @@ class Galanz extends BaseController
...
@@ -65,7 +65,7 @@ class Galanz extends BaseController
$endTime
=
date
(
"Y/m/d"
,
strtotime
(
$nowTime
)
+
86400
);
$endTime
=
date
(
"Y/m/d"
,
strtotime
(
$nowTime
)
+
86400
);
$orders
=
$this
->
SourceGalanz
->
SearchOrder
(
$startTime
,
$endTime
);
$orders
=
$this
->
SourceGalanz
->
SearchOrder
(
''
,
''
,
$startTime
,
$endTime
);
if
(
empty
(
$orders
))
{
if
(
empty
(
$orders
))
{
return
false
;
return
false
;
...
...
application/controllers/test/Rgalanz.php
0 → 100644
View file @
bd13b9cd
<?php
/**
* Created by PhpStorm.
* User: LinJiangL
* Date: 16/8/23
* Time: 下午1:58
*/
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
/**
* 接口测试
*
* @property SourceGalanz SourceGalanz
*/
class
Rgalanz
extends
BaseController
{
public
function
getOrderDetail
()
{
$obj
=
$this
->
galanzObj
();
$data
[
'appid'
]
=
'10001'
;
$data
[
'out_trade_no'
]
=
'CALL2016082200544'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
"http://wxh.pp.cn/api/galanz/getOrderDetail"
;
$result
=
$this
->
curlPost
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
[
'data'
]);
}
private
function
galanzObj
()
{
$this
->
load
->
library
(
'Receive/ReceiveGalanz'
,
null
,
'ReceiveGalanz'
);
return
$this
->
ReceiveGalanz
;
}
private
function
show
(
$data
)
{
echo
"<pre>"
;
print_r
(
$data
);
}
protected
function
curlPost
(
$url
,
$post
)
{
$curl
=
curl_init
();
curl_setopt
(
$curl
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$curl
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$curl
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$curl
,
CURLOPT_POSTFIELDS
,
http_build_query
(
$post
));
$result
=
curl_exec
(
$curl
);
$code
=
curl_getinfo
(
$curl
,
CURLINFO_HTTP_CODE
);
curl_close
(
$curl
);
return
[
'code'
=>
$code
,
'data'
=>
$result
];
}
}
\ No newline at end of file
application/controllers/test/Sgalanz.php
0 → 100644
View file @
bd13b9cd
<?php
/**
* Created by PhpStorm.
* User: LinJiangL
* Date: 16/8/23
* Time: 下午1:58
*/
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
/**
* 抓取数据接口测试
*
* @property SourceGalanz SourceGalanz
*/
class
Sgalanz
extends
BaseController
{
public
function
searchOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchOrder
(
'CALL2016082203611'
);
$this
->
show
(
$list
);
}
public
function
orderDetail
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
OrderDetail
(
'3911c4cd-6855-4a2c-8085-6e489972e6a3'
);
$this
->
show
(
$list
);
}
public
function
searchWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchWorkOrder
(
'WO2016082204280'
);
$this
->
show
(
$list
);
}
public
function
workOrderDetail
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
WorkOrderDetail
(
'07ef7b0e-9788-4d05-88a5-25adc4406aef'
);
$this
->
show
(
$list
);
}
private
function
galanzObj
(
$username
=
'c01000005'
)
{
$this
->
load
->
config
(
'account'
,
true
);
$account
=
$this
->
config
->
item
(
'account'
);
$galanzAccount
=
$account
[
'galanz'
];
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$galanzAccount
[
$username
],
'SourceGalanz'
);
return
$this
->
SourceGalanz
;
}
private
function
show
(
$data
)
{
echo
"<pre>"
;
print_r
(
$data
);
}
}
\ No newline at end of file
application/libraries/Receive/Receive.php
View file @
bd13b9cd
...
@@ -159,12 +159,12 @@ class Receive
...
@@ -159,12 +159,12 @@ class Receive
/**
/**
* 返回数据
* 返回数据
* @param string $code
* @param bool $code
* @param string $data
* @param string $msg
* @param string $msg
* @return array
* @param array $data
* @return string
*/
*/
public
function
ReturnMessage
(
$code
=
'10000'
,
$msg
=
''
,
$data
=
''
)
public
function
ReturnMessage
(
$code
=
true
,
$msg
=
''
,
$data
=
[]
)
{
{
echo
$this
->
SetErrorCode
(
$code
,
$msg
,
$data
);
echo
$this
->
SetErrorCode
(
$code
,
$msg
,
$data
);
die
();
die
();
...
@@ -172,23 +172,25 @@ class Receive
...
@@ -172,23 +172,25 @@ class Receive
/**
/**
* 返回数据
* 返回数据
* @param string $code
* @param bool $code
* @param string $data
* @param string $msg
* @param string $msg
* @return array
* @param array $data
* @return string
*/
*/
public
function
SetErrorCode
(
$code
=
'10000'
,
$msg
=
''
,
$data
=
''
)
public
function
SetErrorCode
(
$code
=
true
,
$msg
=
''
,
$data
=
[]
)
{
{
$error
=
[
$return
[
'return_code'
]
=
$code
?
'SUCCESS'
:
'FAIL'
;
'10000'
=>
'OK'
,
$return
[
'return_msg'
]
=
$code
?
'成功'
:
$msg
;
'10001'
=>
'APPID错误'
,
'10002'
=>
'签名错误'
,
'10999'
=>
'参数错误'
,
];
$msg
=
isset
(
$error
[
$code
])
?
$error
[
$code
]
:
$msg
;
if
(
$data
)
{
if
(
!
is_array
(
$data
))
{
$return
[
'return_data'
]
=
$data
;
}
$return
=
array_merge
(
$return
,
$data
);
}
return
json_encode
(
[
'code'
=>
$code
,
'msg'
=>
$msg
,
'data'
=>
$data
]
,
JSON_UNESCAPED_UNICODE
);
return
json_encode
(
$return
,
JSON_UNESCAPED_UNICODE
);
}
}
}
}
\ No newline at end of file
application/libraries/Receive/ReceiveGalanz.php
View file @
bd13b9cd
...
@@ -14,15 +14,15 @@ class ReceiveGalanz extends Receive
...
@@ -14,15 +14,15 @@ class ReceiveGalanz extends Receive
public
function
CheckPublicValues
()
public
function
CheckPublicValues
()
{
{
if
(
!
$this
->
GetValues
())
{
if
(
!
$this
->
GetValues
())
{
$this
->
ReturnMessage
(
'10999
'
);
$this
->
ReturnMessage
(
false
,
'参数错误!
'
);
}
}
if
(
$this
->
CheckAppid
()
==
false
)
{
if
(
$this
->
CheckAppid
()
==
false
)
{
$this
->
ReturnMessage
(
'10001
'
);
$this
->
ReturnMessage
(
false
,
'缺少appid参数!
'
);
}
}
if
(
$this
->
CheckSign
()
==
false
)
{
if
(
$this
->
CheckSign
()
==
false
)
{
$this
->
ReturnMessage
(
'10002
'
);
$this
->
ReturnMessage
(
false
,
'签名错误!
'
);
}
}
}
}
...
@@ -34,7 +34,7 @@ class ReceiveGalanz extends Receive
...
@@ -34,7 +34,7 @@ class ReceiveGalanz extends Receive
$this
->
CheckPublicValues
();
$this
->
CheckPublicValues
();
if
(
!
array_key_exists
(
'out_trade_no'
,
$this
->
values
)
||
$this
->
values
[
'out_trade_no'
]
==
''
)
{
if
(
!
array_key_exists
(
'out_trade_no'
,
$this
->
values
)
||
$this
->
values
[
'out_trade_no'
]
==
''
)
{
$this
->
ReturnMessage
(
'10003'
,
'缺少out_trade_no参数!'
);
$this
->
ReturnMessage
(
false
,
'缺少out_trade_no参数!'
);
}
}
}
}
...
...
application/libraries/Source/SourceGalanz.php
View file @
bd13b9cd
...
@@ -32,11 +32,8 @@ class SourceGalanz extends Source
...
@@ -32,11 +32,8 @@ class SourceGalanz extends Source
$this
->
IsLogin
();
$this
->
IsLogin
();
}
}
public
function
SearchOrder
(
$
startTime
=
''
,
$endTime
=
''
,
$limit
=
500
)
public
function
SearchOrder
(
$
new_name
=
''
,
$mobile
=
''
,
$startTime
=
''
,
$endTime
=
''
)
{
{
$url
=
'http://202.104.26.131:3081/Complaint/new_srv_callinMP.aspx?type=unsubscribe'
;
$content
=
$this
->
GetUrlContents
(
$url
);
$post
=
[
$post
=
[
'__EVENTTARGET'
=>
'ctl00$ContentQuery$btnQuery'
,
'__EVENTTARGET'
=>
'ctl00$ContentQuery$btnQuery'
,
'__EVENTARGUMENT'
=>
''
,
'__EVENTARGUMENT'
=>
''
,
...
@@ -46,21 +43,23 @@ class SourceGalanz extends Source
...
@@ -46,21 +43,23 @@ class SourceGalanz extends Source
'ctl00$ContentQuery$hidMainId'
=>
''
,
'ctl00$ContentQuery$hidMainId'
=>
''
,
'ctl00$ContentQuery$hidAttrCode'
=>
''
,
'ctl00$ContentQuery$hidAttrCode'
=>
''
,
'ctl00$ContentQuery$hidMainIdName'
=>
''
,
'ctl00$ContentQuery$hidMainIdName'
=>
''
,
'ctl00$ContentQuery$new_name'
=>
''
,
'ctl00$ContentQuery$new_name'
=>
$new_name
,
'ctl00$ContentQuery$new_custname'
=>
''
,
'ctl00$ContentQuery$new_custname'
=>
''
,
'ctl00$ContentQuery$ddlfinishstatus'
=>
''
,
'ctl00$ContentQuery$ddlfinishstatus'
=>
''
,
'ctl00$ContentQuery$startTime'
=>
$startTime
,
'ctl00$ContentQuery$startTime'
=>
$startTime
,
'ctl00$ContentQuery$endTime'
=>
$endTime
,
'ctl00$ContentQuery$endTime'
=>
$endTime
,
'ctl00$ContentQuery$ddlIsAccept'
=>
''
,
'ctl00$ContentQuery$ddlIsAccept'
=>
''
,
'ctl00$ContentQuery$new_custtel'
=>
''
,
'ctl00$ContentQuery$new_custtel'
=>
$mobile
,
'ctl00$ContentQuery$new_address'
=>
''
,
'ctl00$ContentQuery$new_address'
=>
''
,
'ctl00$ContentQuery$ddlcallintype'
=>
''
,
'ctl00$ContentQuery$ddlcallintype'
=>
''
,
'ctl00$ContentQuery$new_isReminder'
=>
''
,
'ctl00$ContentQuery$new_isReminder'
=>
''
,
'ctl00$ContentQuery$new_ServicePersonnel'
=>
''
,
'ctl00$ContentQuery$new_ServicePersonnel'
=>
''
,
'ctl00$ContentData$PagerToolBar1$ctl00'
=>
$limit
,
'ctl00$ContentData$PagerToolBar1$ctl00'
=>
500
,
'ctl00$ContentData$PagerToolBar1$ctl05'
=>
1
'ctl00$ContentData$PagerToolBar1$ctl05'
=>
1
];
];
$url
=
'http://202.104.26.131:3081/Complaint/new_srv_callinMP.aspx?type=unsubscribe'
;
$content
=
$this
->
GetUrlContents
(
$url
);
preg_match
(
'/<input[^>]+name="__VIEWSTATE"[^>]+value="([^"]*)"/'
,
$content
,
$arr
);
preg_match
(
'/<input[^>]+name="__VIEWSTATE"[^>]+value="([^"]*)"/'
,
$content
,
$arr
);
$post
[
'__VIEWSTATE'
]
=
$arr
[
1
];
$post
[
'__VIEWSTATE'
]
=
$arr
[
1
];
...
@@ -98,53 +97,7 @@ class SourceGalanz extends Source
...
@@ -98,53 +97,7 @@ class SourceGalanz extends Source
public
function
OrderDetail
(
$id
)
public
function
OrderDetail
(
$id
)
{
{
$orderField
=
[
$orderField
=
$this
->
OrderFormFields
();
'new_name'
=>
'id="new_name"[^>]+value="([^"]*)"'
,
//受理单号
'new_callintime'
=>
'id="new_callintime"[^>]+value="([^"]*)"'
,
//受理时间
'new_sentstatus'
=>
'id="new_sentstatus"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
//派工状态
'new_custname'
=>
'id="new_custname"[^>]+value="([^"]*)"'
,
//顾客姓名
'new_custmobile'
=>
'id="new_custmobile"[^>]+value="([^"]*)"'
,
//顾客手机
'new_custtel'
=>
'id="new_custtel"[^>]+value="([^"]*)"'
,
//顾客电话
'new_provinceidName'
=>
'id="new_provinceidName"[^>]+value="([^"]*)"'
,
//省份
'new_cityidName'
=>
'id="new_cityidName"[^>]+value="([^"]*)"'
,
//城市
'new_countyidname'
=>
'id="new_countyidname"[^>]+value="([^"]*)"'
,
//区/县
'new_townidName'
=>
'id="new_townidName"[^>]+value="([^"]*)"'
,
//街道/镇
'new_address'
=>
'id="new_address"[^>]+value="([^"]*)"'
,
//地址
'new_visittime'
=>
'id="new_visittime"[^>]+value="([^"]*)"'
,
//要求上门时间
'new_producttype'
=>
'id="new_producttype"[^>]+value="([^"]*)"'
,
//机型
'new_csnumber'
=>
'id="new_csnumber"[^>]+value="([^"]*)"'
,
//机器条码
'new_installsiteidname'
=>
'id="new_installsiteidname"[^>]+value="([^"]*)"'
,
//安装网点
'new_broughtdate'
=>
'id="new_broughtdate"[^>]+value="([^"]*)"'
,
//购买日期
'new_installdate'
=>
'id="new_installdate"[^>]+value="([^"]*)"'
,
//安装日期
'new_errormoduleidName'
=>
'id="new_errormoduleidName"[^>]+value="([^"]*)"'
,
// 故障现象
'new_custdescription'
=>
'id="new_custdescription"[^>]+value="([^"]*)"'
,
//顾客描述
'new_remarks'
=>
'id="new_remarks"[^>]+value="([^"]*)"'
,
//投诉处理单备注
'new_callintype'
=>
'id="new_callintype"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
//受理类型
'new_productqty'
=>
'id="new_productqty"[^>]+value="([^"]*)"'
,
//机器台数
'new_market'
=>
'id="new_market"[^>]+value="([^"]*)"'
,
//购买商场
'new_acceptstatus'
=>
'id="new_acceptstatus"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
//是否接受
'new_siteaccepttime'
=>
'id="new_siteaccepttime"[^>]+value="([^"]*)"'
,
//网点接受时间
'new_sitecontacttime'
=>
'id="new_sitecontacttime"[^>]+value="([^"]*)"'
,
//网点联络时间
'new_siteappointmenttime'
=>
'id="new_siteappointmenttime"[^>]+value="([^"]*)"'
,
//预约上门时间
'new_actualvisittime'
=>
'id="new_actualvisittime"[^>]+value="([^"]*)"'
,
//实际上门时间
'new_isguaranty'
=>
'id="new_isguaranty"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
// 是否保内
'new_finishstatus'
=>
'id="new_finishstatus"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
//完成状态
'new_finishtime'
=>
'id="new_finishtime"[^>]+value="([^"]*)"'
,
//完成时间
'new_unfinishreason'
=>
'id="new_unfinishreason"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
//未完成原因
'new_complete_reason'
=>
'id="new_complete_reason"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
,
//完成方式
'new_sitedealremarks'
=>
'id="new_sitedealremarks"[^>]+value="([^"]*)"'
,
//备注
'new_ServicePersonnel'
=>
'id="new_ServicePersonnel"[^>]+value="([^"]*)"'
,
//服务人员
];
$url
=
'http://202.104.26.131:3081/Complaint/new_srv_callinEP.aspx?mainid=&mainidname=&attrcode=&id='
.
$id
;
$url
=
'http://202.104.26.131:3081/Complaint/new_srv_callinEP.aspx?mainid=&mainidname=&attrcode=&id='
.
$id
;
$result
=
$this
->
GetUrlContents
(
$url
);
$result
=
$this
->
GetUrlContents
(
$url
);
...
@@ -154,13 +107,105 @@ class SourceGalanz extends Source
...
@@ -154,13 +107,105 @@ class SourceGalanz extends Source
$order
[
'new_category'
]
=
self
::
$account
[
'category'
];
$order
[
'new_category'
]
=
self
::
$account
[
'category'
];
foreach
(
$orderField
as
$kk
=>
$vv
)
{
foreach
(
$orderField
as
$kk
=>
$vv
)
{
preg_match
(
"/
$vv
/"
,
$result
,
$val
);
$order
[
$kk
]
=
$this
->
OrderFormValue
(
$result
,
$vv
[
'reg'
],
$vv
[
'type'
]);
$order
[
$kk
]
=
isset
(
$val
[
1
])
?
$val
[
1
]
:
''
;
}
}
return
$order
;
return
$order
;
}
}
/**
* 查询维修单
* @param string $new_number
* @param string $mobile
* @return array
*/
public
function
SearchWorkOrder
(
$new_number
=
''
,
$mobile
=
''
)
{
$post
=
[
'__EVENTTARGET'
=>
'ctl00$ContentQuery$btnQuery'
,
'__EVENTARGUMENT'
=>
''
,
'__LASTFOCUS'
=>
''
,
'__VIEWSTATE'
=>
''
,
'ctl00$hidPageSiteMapTitle'
=>
'维修单'
,
'ctl00$ContentQuery$hidMainId'
=>
''
,
'ctl00$ContentQuery$hidAttrCode'
=>
''
,
'ctl00$ContentQuery$hidMainIdName'
=>
''
,
'ctl00$ContentQuery$new_finishtime_s'
=>
''
,
'ctl00$ContentQuery$new_finishtime_e'
=>
''
,
'ctl00$ContentQuery$new_number'
=>
$new_number
,
'ctl00$ContentQuery$new_custname'
=>
''
,
'ctl00$ContentQuery$new_custmobile'
=>
$mobile
,
'ctl00$ContentQuery$new_ischangepart'
=>
1
,
'ctl00$ContentQuery$new_returnfactory'
=>
1
,
'ctl00$ContentQuery$new_isrelief'
=>
1
,
'ctl00$ContentQuery$new_approvalstatus'
=>
''
,
'ctl00$ContentQuery$txtproducenumber'
=>
''
,
'ctl00$ContentQuery$new_name'
=>
''
,
'ctl00$ContentQuery$new_iskt'
=>
0
,
'ctl00$ContentData$PagerToolBar1$ctl00'
=>
500
,
'ctl00$ContentData$PagerToolBar1$ctl05'
=>
1
,
];
$url
=
'http://202.104.26.131:3081/repair/new_srv_workorderMP.aspx'
;
$content
=
$this
->
GetUrlContents
(
$url
);
preg_match
(
'/<input[^>]+name="__VIEWSTATE"[^>]+value="([^"]*)"/'
,
$content
,
$arr
);
$post
[
'__VIEWSTATE'
]
=
$arr
[
1
];
$headers
=
$this
->
Header
(
$url
);
$result
=
$this
->
CurlPost
(
$url
,
$post
,
$headers
);
$result
=
gzdecode
(
$result
[
'data'
]);
preg_match_all
(
'/(<tr>\s+<td class="checkbox">[\s\S]+?<\/tr>)/'
,
$result
,
$tr
);
$orders
=
[];
if
(
$tr
[
0
])
{
foreach
(
$tr
[
0
]
as
$k
=>
$v
)
{
preg_match_all
(
'/(<td[^>]*>[\s\S]+?<\/td>)/'
,
$v
,
$td
);
foreach
(
$td
[
0
]
as
$kk
=>
$vv
)
{
if
(
$kk
==
0
)
{
preg_match
(
'/value="([^"]+)"/'
,
$vv
,
$temp
);
$vv
=
$temp
[
1
];
}
else
{
$vv
=
preg_replace
(
'/<[^>]+>/'
,
''
,
$vv
);
$vv
=
trim
(
$vv
);
}
$td
[
0
][
$kk
]
=
$vv
;
}
$orders
[
$k
]
=
$td
[
0
];
}
}
return
$orders
;
}
public
function
WorkOrderDetail
(
$id
)
{
$orderField
=
$this
->
WorkOrderFormFields
();
$url
=
'http://202.104.26.131:3081/repair/new_srv_workorderEP.aspx?mainid=&mainidname=&attrcode=&id='
.
$id
;
$result
=
$this
->
GetUrlContents
(
$url
);
$order
[
'new_id'
]
=
$id
;
$order
[
'new_username'
]
=
self
::
$account
[
'username'
];
$order
[
'new_category'
]
=
self
::
$account
[
'category'
];
foreach
(
$orderField
as
$kk
=>
$vv
)
{
$order
[
$kk
]
=
$this
->
OrderFormValue
(
$result
,
$vv
[
'reg'
],
$vv
[
'type'
]);
}
return
$order
;
}
/**
* 是否登录
* 登录失败, 重试5次
* @param int $num
* @return mixed
*/
private
function
IsLogin
(
$num
=
0
)
private
function
IsLogin
(
$num
=
0
)
{
{
$url
=
'http://202.104.26.131:3081/Complaint/new_srv_callinMP.aspx?type=unsubscribe'
;
$url
=
'http://202.104.26.131:3081/Complaint/new_srv_callinMP.aspx?type=unsubscribe'
;
...
@@ -175,9 +220,7 @@ class SourceGalanz extends Source
...
@@ -175,9 +220,7 @@ class SourceGalanz extends Source
}
}
$num
++
;
$num
++
;
return
$this
->
IsLogin
(
$num
);
$this
->
IsLogin
(
$num
);
}
else
{
//echo '登陆成功';
}
}
}
}
...
@@ -209,6 +252,391 @@ class SourceGalanz extends Source
...
@@ -209,6 +252,391 @@ class SourceGalanz extends Source
return
$this
->
CurlPost
(
$loginUrl
,
$post
,
$headers
);
return
$this
->
CurlPost
(
$loginUrl
,
$post
,
$headers
);
}
}
private
function
OrderFormFields
()
{
return
[
'new_name'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_name'
)
],
//受理单号
'new_callintime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_callintime'
)
],
//受理时间
'new_sentstatus'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_sentstatus'
,
'select'
)
],
//派工状态: 1:未派工; 2:已派工; 3:已接受; 4:已拒绝; 5:已处理;
'new_custname'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custname'
)
],
//顾客姓名
'new_custmobile'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custmobile'
)
],
//顾客手机
'new_custtel'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custtel'
)
],
//顾客电话
'new_provinceidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_provinceidName'
)
],
//省份
'new_cityidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_cityidName'
)
],
//城市
'new_countyidname'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_countyidname'
)
],
//区/县
'new_townidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_townidName'
)
],
//街道/镇
'new_address'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_address'
)
],
//地址
'new_visittime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_visittime'
)
],
//要求上门时间
'new_producttype'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_producttype'
)
],
//机型
'new_csnumber'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_csnumber'
)
],
//机器条码
'new_installsiteidname'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_installsiteidname'
)
],
//安装网点
'new_broughtdate'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_broughtdate'
)
],
//购买日期
'new_installdate'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_installdate'
)
],
//安装日期
'new_errormoduleidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_errormoduleidName'
)
],
//故障现象
'new_custdescription'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custdescription'
)
],
//顾客描述
'new_remarks'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_remarks'
)
],
//投诉处理单备注
'new_callintype'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_callintype'
,
'select'
)
],
//受理类型: 1:咨询; 2:报修; 3:投诉; 4:安装; 5:建议; 6:移机
'new_productqty'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_productqty'
)
],
//机器台数
'new_market'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_market'
)
],
//购买商场
'new_acceptstatus'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_acceptstatus'
,
'select'
)
],
//是否接受: 1:是; 2:否;
'new_siteaccepttime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_siteaccepttime'
)
],
//网点接受时间
'new_sitecontacttime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_sitecontacttime'
)
],
//网点联络时间
'new_siteappointmenttime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_siteappointmenttime'
)
],
//预约上门时间
'new_actualvisittime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_actualvisittime'
)
],
//实际上门时间
'new_isguaranty'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_isguaranty'
,
'select'
)
],
//是否保内: 1:是; 2:否;
'new_finishstatus'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_finishstatus'
,
'select'
)
],
//完成状态: 1:是; 2:否;
'new_finishtime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_finishtime'
)
],
//完成时间
'new_unfinishreason'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_unfinishreason'
,
'select'
)
],
//未完成原因: 1:顾客改约时间; 2:网点改约时间; 3:待件; 4:其他; 5:用户不接电话
'new_complete_reason'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_complete_reason'
,
'select'
)
],
//完成方式: 1:是; 2:否;
'new_sitedealremarks'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_sitedealremarks'
)
],
//备注
'new_ServicePersonnel'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_ServicePersonnel'
)
],
//服务人员
];
}
private
function
WorkOrderFormFields
()
{
return
[
'new_sitecode'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'New_sitecode'
),
],
//网点编码
'new_siteidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_siteidName'
)
],
//网点名称
'new_srv_callinidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_srv_callinidName'
)
],
//受理单号
'new_approvalstatus'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_approvalstatus'
,
'select'
)
],
//单据状态: 1:待发送; 2:已发送; 3:驳回; 4:合格; 5:复议; 6:虚假单
'new_name'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_name'
)
],
//凭证单号
'new_productgroupidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_productgroupidName'
)
],
//产品线
'new_businessunitidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_businessunitidName'
)
],
//服务中心
'new_number'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_number'
)
],
//维修单流水号
'new_returnfactory'
=>
[
'type'
=>
'checkbox'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_returnfactory'
,
'checkbox'
)
],
//售前机: 0:否; 1:是
'new_uninvsestreasonName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_uninvsestreasonName'
)
],
//不合格原因
'new_custname'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custname'
)
],
//顾客姓名
'new_custmobile'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custmobile'
)
],
//顾客手机
'new_custtel'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_custtel'
)
],
//顾客电话
'new_provinceidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_provinceidName'
)
],
//省份
'new_cityidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_cityidName'
)
],
//城市
'new_countyidname'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_countyidname'
)
],
//区/县
'new_townidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_townidName'
)
],
//街道/镇
'new_address'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_address'
)
],
//客户地址
'new_shipdate'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'New_shipdate'
)
],
//生产日期
'new_market'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_market'
)
],
//购买商场
'new_broughtdate'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_broughtdate'
)
],
//购买日期
'new_installsiteidName'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_installsiteidName'
)
],
//安装网点
'new_installdate'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_installdate'
)
],
//安装日期
'new_time'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_time'
)
],
//受理时间
'new_visittime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_visittime'
)
],
//预约上门时间
'new_actualvisittime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_actualvisittime'
)
],
//实际上门时间
'new_finishtime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_finishtime'
)
],
//完成时间
'new_repairapply'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_repairapply'
)
],
//维修人员
'new_ischangepart'
=>
[
'type'
=>
'checkbox'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_ischangepart'
,
'checkbox'
)
],
//是否换件
'new_isremote'
=>
[
'type'
=>
'checkbox'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_isremote'
,
'checkbox'
)
],
//是否远程
'new_scope'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_scope'
,
'select'
)
],
//上门范围: 1:市区; 2:市郊; 3:市外
'new_distancekm'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_distancekm'
)
],
//上门距离
'new_isrelief'
=>
[
'type'
=>
'checkbox'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_isrelief'
,
'checkbox'
)
],
//是否减免
'new_reliefmemo'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_reliefmemo'
)
],
//减免备注
'new_isguaranty'
=>
[
'type'
=>
'checkbox'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_isguaranty'
,
'checkbox'
)
],
//是否保内
'new_siteremark'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_siteremark'
)
],
//网点备注
'new_baseamount'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_baseamount'
)
],
//维修费
'new_mileamount'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_mileamount'
)
],
//交通费
'new_arrivetime'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_arrivetime'
)
],
//上门时间
'new_satisfaction_manner'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_satisfaction_manner'
,
'select'
)
],
//服务态度: 1:好; 2:不好; 3:差;
'new_satisfaction_quality'
=>
[
'type'
=>
'select'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_satisfaction_quality'
,
'select'
)
],
//服务质量: 1:非常满意; 2:满意; 3:不满意;
'new_othersuggest'
=>
[
'type'
=>
'text'
,
'reg'
=>
$this
->
OrderFormReg
(
'new_othersuggest'
)
],
//其他意见
];
}
/**
* 匹配订单值
* @param $html
* @param $reg
* @param string $type
* @return int|string
*/
private
function
OrderFormValue
(
$html
,
$reg
,
$type
=
'text'
)
{
switch
(
$type
)
{
case
'select'
:
preg_match
(
"/
$reg
/"
,
$html
,
$val
);
$result
=
isset
(
$val
[
1
])
?
$val
[
1
]
:
''
;
break
;
case
'checkbox'
:
preg_match
(
"/
$reg
/"
,
$html
,
$val
);
$result
=
isset
(
$val
[
1
])
&&
$val
[
1
]
==
'checked'
?
1
:
0
;
break
;
default
:
preg_match
(
"/
$reg
/"
,
$html
,
$val
);
$result
=
isset
(
$val
[
1
])
?
$val
[
1
]
:
''
;
}
return
$result
;
}
/**
* 订单表单参数正则
*
* @param string $id 表单ID
* @param string $type 表单类型
* @return string
*/
private
function
OrderFormReg
(
$id
,
$type
=
'text'
)
{
switch
(
$type
)
{
case
'select'
:
$result
=
'id="'
.
$id
.
'"[\s\S]+?selected="selected"[^>]+value="([^"]*)"[^>]*>([^\<]*)<'
;
break
;
case
'checkbox'
:
$result
=
'id="'
.
$id
.
'"[^>]+checked="([^"]*)"'
;
break
;
default
:
$result
=
'id="'
.
$id
.
'"[^>]+value="([^"]*)"'
;
}
return
$result
;
}
public
function
Header
(
$referer
)
public
function
Header
(
$referer
)
{
{
$header
=
[
$header
=
[
...
...
public/captcha/galanz_.gif
0 → 100644
View file @
bd13b9cd
1.31 KB
public/cookie/galanz_.cookie
0 → 100644
View file @
bd13b9cd
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
#HttpOnly_202.104.26.131 FALSE / FALSE 0 ASP.NET_SessionId s25qsykf2gs54yyimlfkg3te
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