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
64b18fee
Commit
64b18fee
authored
Sep 21, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 维修单发送调试
2. 维修单保存增加接口参数
parent
618fdadf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
19 deletions
+49
-19
Rgalanz.php
application/controllers/test/Rgalanz.php
+40
-16
ReceiveGalanz.php
application/libraries/Receive/ReceiveGalanz.php
+8
-0
SourceGalanz.php
application/libraries/Source/SourceGalanz.php
+1
-3
No files found.
application/controllers/test/Rgalanz.php
View file @
64b18fee
...
...
@@ -30,11 +30,11 @@ class Rgalanz extends BaseController
// self::$testu = 'K75516022';
// self::$testp = '123456';
//
self::$testu = 'W75509345';
//
self::$testp = 'dgqh!769';
self
::
$testu
=
'W75509345'
;
self
::
$testp
=
'dgqh!769'
;
self
::
$testu
=
'c01000005'
;
self
::
$testp
=
'weixiuhui010'
;
//
self::$testu = 'c01000005';
//
self::$testp = 'weixiuhui010';
$this
->
load
->
library
(
'Receive/ReceiveGalanz'
,
null
,
'ReceiveGalanz'
);
return
$this
->
ReceiveGalanz
;
...
...
@@ -115,7 +115,7 @@ class Rgalanz extends BaseController
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'work_order_no'
]
=
'WO201609
1403059
'
;
$data
[
'work_order_no'
]
=
'WO201609
2002698
'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
...
...
@@ -444,28 +444,30 @@ class Rgalanz extends BaseController
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'work_order_no'
=>
'WO201609
1403059
'
,
'work_order_no'
=>
'WO201609
2002698
'
,
'custname'
=>
''
,
'custmobile'
=>
''
,
'address'
=>
''
,
'shipdate'
=>
strtotime
(
'2015-05-18'
),
'broughtdate'
=>
''
,
'installdate'
=>
''
,
'visittime'
=>
''
,
'actualvisittime'
=>
strtotime
(
'2016-09-12 16:00:00'
),
'finishtime'
=>
''
,
'repairapply'
=>
''
,
'fault'
=>
''
,
'parts'
=>
''
,
];
$machine
=
[
'chk'
=>
'5e287744-896f-477b-a2cd-e74ea21126e1'
,
'producttypeid'
=>
'4a1cc115-875b-e411-80cb-00155d017501'
,
'producttypeidName'
=>
'微波炉'
,
'productmodelid'
=>
'adb078d7-875b-e411-80cb-00155d017501'
,
'productmodelidName'
=>
'微波炉'
,
'productnumber'
=>
'112100100001'
,
'modelnumber'
=>
'微波炉P70D10EP-QA(S0)'
,
];
//
$machine = [
//
'chk' => '5e287744-896f-477b-a2cd-e74ea21126e1',
//
'producttypeid' => '4a1cc115-875b-e411-80cb-00155d017501',
//
'producttypeidName' => '微波炉',
//
'productmodelid' => 'adb078d7-875b-e411-80cb-00155d017501',
//
'productmodelidName' => '微波炉',
//
'productnumber' => '112100100001',
//
'modelnumber' => '微波炉P70D10EP-QA(S0)',
//
];
// $fault = [
// 'chk' => 'de1f6e4c-2947-41dc-91aa-a8b69b384186',
...
...
@@ -486,7 +488,7 @@ class Rgalanz extends BaseController
// 'qty' => '2',
// ];
$data
[
'machine'
]
=
urlencode
(
json_encode
(
$machine
));
//
$data['machine'] = urlencode(json_encode($machine));
//$data['fault'] = urlencode(json_encode($fault));
//$data['parts'] = urlencode(json_encode($parts));
...
...
@@ -503,6 +505,28 @@ class Rgalanz extends BaseController
$this
->
show
(
$result
[
'data'
]);
}
public
function
sendWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'work_order_no'
]
=
'WO2016092002698'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/galanz/sendWorkOrder"
;
$result
=
$this
->
curlPost
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
[
'data'
]);
}
private
function
show
(
$data
)
{
echo
"<pre>"
;
...
...
application/libraries/Receive/ReceiveGalanz.php
View file @
64b18fee
...
...
@@ -146,9 +146,11 @@ class ReceiveGalanz extends Receive
'custname'
,
'custmobile'
,
'address'
,
'shipdate'
,
'broughtdate'
,
'installdate'
,
'visittime'
,
'actualvisittime'
,
'finishtime'
,
'repairapply'
,
'machine'
,
...
...
@@ -170,6 +172,9 @@ class ReceiveGalanz extends Receive
if
(
$values
[
'address'
])
{
$order
[
'new_address'
]
=
$values
[
'address'
];
}
if
(
$values
[
'shipdate'
])
{
$order
[
'new_shipdate'
]
=
date
(
'Y/m/d'
,
$values
[
'shipdate'
]);
}
if
(
$values
[
'broughtdate'
])
{
$order
[
'new_broughtdate'
]
=
date
(
'Y/m/d'
,
$values
[
'broughtdate'
]);
}
...
...
@@ -179,6 +184,9 @@ class ReceiveGalanz extends Receive
if
(
$values
[
'visittime'
])
{
$order
[
'new_visittime'
]
=
date
(
'Y/m/d H:i'
,
$values
[
'visittime'
]);
}
if
(
$values
[
'actualvisittime'
])
{
$order
[
'new_actualvisittime'
]
=
date
(
'Y/m/d H:i'
,
$values
[
'actualvisittime'
]);
}
if
(
$values
[
'finishtime'
])
{
$order
[
'new_finishtime'
]
=
date
(
'Y/m/d H:i'
,
$values
[
'finishtime'
]);
}
...
...
application/libraries/Source/SourceGalanz.php
View file @
64b18fee
...
...
@@ -1376,8 +1376,6 @@ class SourceGalanz extends Source
'ctl00$ContentData$ifamount'
=>
$data
[
'ifamount'
],
];
return
$post
;
$url
=
self
::
$host
.
'/Warranty/new_srv_userprofileEP.aspx?mainid=&mainidname=&attrcode=&id='
.
$id
;
$headers
=
$this
->
Header
(
$url
);
$result
=
$this
->
CurlPost
(
$url
,
$post
,
$headers
);
...
...
@@ -2173,7 +2171,7 @@ class SourceGalanz extends Source
{
preg_match
(
'/<scriptt[^>]*>alert\("([^"]+)"\);?<\/scriptt>/'
,
$html
,
$arr
);
$error
=
isset
(
$arr
[
1
])
?
$arr
[
1
]
:
''
;
if
(
$error
&&
!
in_array
(
$error
,
[
'已保存!'
]))
{
if
(
$error
&&
!
in_array
(
$error
,
[
'已保存!'
,
'发送成功!'
]))
{
return_msg
(
false
,
$error
);
}
}
...
...
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