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
9a773bc0
Commit
9a773bc0
authored
Dec 22, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海信 - 工单系列操作接口
parent
e15e055b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
248 additions
and
24 deletions
+248
-24
Hisense.php
application/controllers/api/Hisense.php
+32
-0
Hisense.php
application/controllers/test/Hisense.php
+28
-5
ReceiveHisense.php
application/libraries/Receive/ReceiveHisense.php
+5
-0
Source.php
application/libraries/Source/Source.php
+20
-0
SourceHisense.php
application/libraries/Source/SourceHisense.php
+163
-19
No files found.
application/controllers/api/Hisense.php
View file @
9a773bc0
...
...
@@ -24,6 +24,38 @@ class Hisense extends BaseController
parent
::
__construct
();
ini_set
(
"max_execution_time"
,
1800
);
}
public
function
workOrderList
()
{
$param
=
$this
->
input
->
post
();
//验证参数
$obj
=
$this
->
receiveObj
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'workOrderList'
,
$values
);
$sourceObj
=
$this
->
sourceObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$result
=
$sourceObj
->
WorkOrderList
();
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
public
function
workOrderAccept
()
{
$param
=
$this
->
input
->
post
();
//验证参数
$obj
=
$this
->
receiveObj
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckWorkOrderAcceptValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'workOrderAccept'
,
$values
);
$sourceObj
=
$this
->
sourceObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$sourceObj
->
WorkOrderDo
(
'accept'
,
$values
[
'xxbh'
]);
}
public
function
informationFeedbackCondition
()
{
...
...
application/controllers/test/Hisense.php
View file @
9a773bc0
...
...
@@ -28,9 +28,10 @@ class Hisense extends BaseController
$account
=
[
0
=>
[
'u'
=>
'gdjdhfzh1'
,
'p'
=>
'BBb66666'
],
1
=>
[
'u'
=>
'gdjdqdwxh'
,
'p'
=>
'AAa77777'
],
];
$key
=
0
;
$key
=
1
;
self
::
$testu
=
$account
[
$key
][
'u'
];
self
::
$testp
=
$account
[
$key
][
'p'
];
}
...
...
@@ -38,8 +39,9 @@ class Hisense extends BaseController
public
function
test
()
{
$sobj
=
$this
->
sourceObj
();
$res
=
$sobj
->
InformationFeedbackDetail
(
"CC16112302769017"
);
$res
=
$sobj
->
WorkOrderDo
(
'accept'
,
'ZJ16122203844434'
);
print_r
(
$res
);
}
...
...
@@ -47,17 +49,38 @@ class Hisense extends BaseController
public
function
param
()
{
$str
=
"mark=1&partner=869218&objectId=&mobPhoneNum=&startTime=2016-11-09&endTime=2016-11-29&printTypeName=&processType=&statusName=&orderStatus="
;
$str
=
'refuse_reason=&perPageCount=15&personlist=ZJ16122203844735&project_no=&contact_count=1&contact_count=0&personlist=ZJ16122203844595&project_no=&contact_count=1&contact_count=0&project_no=&contact_count=1&contact_count=0&project_no=&contact_count=1&contact_count=0&jump=1&pageNo=1&sortName=ROW_ID+desc&imgName=document.img_a&imgSort=false&pMethod='
;
parse_str
(
$str
,
$r
);
$str
=
''
;
foreach
(
$r
as
$k
=>
$v
)
{
$str
.=
"'
{
$k
}
' =>
{
$v
}
,<br/>"
;
$str
.=
"'
{
$k
}
' =>
'
{
$v
}
'
,<br/>"
;
}
echo
$str
;
}
public
function
workOrderList
()
{
$obj
=
$this
->
receiveObj
();
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/hisense/workOrderList"
;
$result
=
curl_post
(
$url
,
$values
);
$this
->
show
(
$result
);
}
public
function
informationFeedbackCondition
()
{
$obj
=
$this
->
receiveObj
();
...
...
application/libraries/Receive/ReceiveHisense.php
View file @
9a773bc0
...
...
@@ -4,6 +4,11 @@ require 'Receive.php';
class
ReceiveHisense
extends
Receive
{
public
function
CheckWorkOrderAcceptValues
()
{
$fileds
=
[
'xxbh'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
CheckInformationFeedbackListValues
()
{
...
...
application/libraries/Source/Source.php
View file @
9a773bc0
...
...
@@ -251,4 +251,24 @@ class Source
return
$result
;
}
protected
function
PregTableTr
(
$tr
)
{
preg_match_all
(
'/<td[^>]*>[\s\S]*?<\/td>/'
,
$tr
,
$td
);
foreach
(
$td
[
0
]
as
$kk
=>
$vv
)
{
if
(
stripos
(
$vv
,
'<input'
)
!==
false
)
{
preg_match
(
'/value="([^"]+)"/'
,
$vv
,
$temp
);
$vv
=
isset
(
$temp
[
1
])
?
$temp
[
1
]
:
''
;
}
else
{
$vv
=
preg_replace
(
'/<[^>]+>/'
,
''
,
$vv
);
$vv
=
trim
(
$vv
);
}
$td
[
0
][
$kk
]
=
$vv
;
}
return
$td
[
0
];
}
}
\ No newline at end of file
application/libraries/Source/SourceHisense.php
View file @
9a773bc0
This diff is collapsed.
Click to expand it.
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