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
5fad1500
Commit
5fad1500
authored
Dec 16, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格兰仕 添加跟踪内容
parent
14a96c07
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
122 additions
and
4 deletions
+122
-4
Galanz.php
application/controllers/api/Galanz.php
+21
-0
Galanz.php
application/controllers/test/Galanz.php
+26
-2
ReceiveGalanz.php
application/libraries/Receive/ReceiveGalanz.php
+15
-0
SourceGalanz.php
application/libraries/Source/SourceGalanz.php
+60
-2
No files found.
application/controllers/api/Galanz.php
View file @
5fad1500
...
...
@@ -225,6 +225,27 @@ class Galanz extends BaseController
}
//添加跟踪内容
public
function
callOrderAddFollow
()
{
$param
=
$this
->
input
->
post
();
//验证参数
$obj
=
$this
->
receiveGalanzObj
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckCallOrderAddFollowValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
$values
[
'id'
],
'callOrderAddFollow'
,
$param
);
$sourceGalanzObj
=
$this
->
sourceGalanzObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$order
=
$this
->
getCallOrder
(
$values
[
'id'
],
$sourceGalanzObj
);
$order
=
$obj
->
SetCallOrderAddFollowValues
(
$order
,
$values
);
$result
=
$sourceGalanzObj
->
CallOrderAddFollow
(
$order
[
'new_id'
],
$order
);
$result
=
$this
->
diffOrder
(
$result
);
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
//转录安装单
public
function
createUserProfileOrder
()
{
...
...
application/controllers/test/Galanz.php
View file @
5fad1500
...
...
@@ -41,9 +41,10 @@ class Galanz extends BaseController
7
=>
[
'u'
=>
'c02000043'
,
'p'
=>
'weixiuhui09'
],
8
=>
[
'u'
=>
'R75510005'
,
'p'
=>
'dgqh!769'
],
9
=>
[
'u'
=>
'W75509335'
,
'p'
=>
'szwxh!755'
],
10
=>
[
'u'
=>
'W02029017'
,
'p'
=>
'weixiuhui09'
],
];
$key
=
5
;
$key
=
10
;
self
::
$testu
=
$account
[
$key
][
'u'
];
self
::
$testp
=
$account
[
$key
][
'p'
];
//self::$testp = urlencode(str_aes($account[5]['p']));
...
...
@@ -179,7 +180,7 @@ class Galanz extends BaseController
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'id'
]
=
'
e8ed9016-d621-45b3-9015-60fc3de89833
'
;
$data
[
'id'
]
=
'
890bd97f-9e1b-4528-a9cd-d4625f484fdb
'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
...
...
@@ -262,6 +263,29 @@ class Galanz extends BaseController
$this
->
show
(
$result
);
}
public
function
callOrderAddFollow
()
{
$obj
=
$this
->
galanzObj
();
$data
[
'appid'
]
=
'10001'
;
$data
[
'account'
]
=
self
::
$testu
;
$data
[
'pwd'
]
=
self
::
$testp
;
$data
[
'id'
]
=
'890bd97f-9e1b-4528-a9cd-d4625f484fdb'
;
$data
[
'txtFollowmemo'
]
=
'16号上门'
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/galanz/callOrderAddFollow"
;
$result
=
curl_post
(
$url
,
$values
);
$result
[
'data'
]
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
public
function
createUserProfileOrder
()
{
$obj
=
$this
->
galanzObj
();
...
...
application/libraries/Receive/ReceiveGalanz.php
View file @
5fad1500
...
...
@@ -161,6 +161,21 @@ class ReceiveGalanz extends Receive
}
public
function
CheckCallOrderAddFollowValues
()
{
$fileds
=
[
'id'
,
'txtFollowmemo'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
SetCallOrderAddFollowValues
(
$order
,
$values
)
{
if
(
$values
[
'txtFollowmemo'
])
{
$order
[
'txtFollowmemo'
]
=
trim
(
$values
[
'txtFollowmemo'
]);
}
return
$order
;
}
/**
* 转录维修单
*/
...
...
application/libraries/Source/SourceGalanz.php
View file @
5fad1500
...
...
@@ -151,6 +151,21 @@ class SourceGalanz extends Source
return
$order
;
}
/**
* 派工订单添加跟踪内容
* @param $id
* @param $data
* @return mixed
*/
public
function
CallOrderAddFollow
(
$id
,
$data
)
{
$result
=
$this
->
HandelCallOrder
(
$id
,
$data
,
'AddFollow'
);
$this
->
HandelOrderError
(
$result
);
$order
=
$this
->
OrderDetail
(
$id
);
return
$order
;
}
/**
* 派工单转维修单
* @param $id
...
...
@@ -590,6 +605,27 @@ class SourceGalanz extends Source
$order
[
$kk
]
=
$this
->
OrderFormValue
(
$result
,
$vv
[
'reg'
],
$vv
[
'type'
]);
}
//跟踪内容列表
$order
[
'follow'
]
=
[];
preg_match
(
'/id="grouplist"[\s\S]+?<tbody>([\s\S]+?)<\/tbody>/'
,
$result
,
$follow
);
if
(
isset
(
$follow
[
1
]))
{
preg_match_all
(
'/<tr>[\s\S]+?<\/tr>/'
,
$follow
[
1
],
$followTr
);
//$order['follow'] = $followTr;
if
(
$followTr
[
0
])
{
foreach
(
$followTr
[
0
]
as
$k
=>
$v
)
{
preg_match_all
(
'/<td[^>]+>[\s\S]+?<\/td>/'
,
$v
,
$followTd
);
if
(
$followTd
)
{
$order
[
'follow'
][
$k
][
'name'
]
=
trim
(
preg_replace
(
'/<[^>]+>/'
,
''
,
$followTd
[
0
][
0
]));
$order
[
'follow'
][
$k
][
'text'
]
=
trim
(
preg_replace
(
'/<[^>]+>/'
,
''
,
$followTd
[
0
][
1
]));
$order
[
'follow'
][
$k
][
'time'
]
=
trim
(
preg_replace
(
'/<[^>]+>/'
,
''
,
$followTd
[
0
][
2
]));
}
}
}
}
return
$order
;
}
...
...
@@ -1367,7 +1403,7 @@ class SourceGalanz extends Source
'ctl00$ContentData$new_sitedealremarks'
=>
$data
[
'new_sitedealremarks'
],
'ctl00$ContentData$new_sentsiteid'
=>
$data
[
'new_sentsiteid'
],
'ctl00$ContentData$new_ServicePersonnel'
=>
$data
[
'new_ServicePersonnel'
],
'ctl00$ContentData$txtFollowmemo'
=>
$data
[
'txtFollowmemo'
]
,
'ctl00$ContentData$txtFollowmemo'
=>
''
,
];
switch
(
$type
)
{
...
...
@@ -1403,8 +1439,30 @@ class SourceGalanz extends Source
case
'Refuse'
:
$post
[
'__EVENTTARGET'
]
=
'ctl00$ContentHeader$btnRefuse'
;
break
;
}
case
'AddFollow'
:
$post
[
'ctl00$ContentHeader$hidState'
]
=
'1'
;
$post
[
'ctl00$ContentData$new_confirmcode1'
]
=
''
;
$post
[
'ctl00$ContentData$new_siteaccepttime'
]
=
$data
[
'new_siteaccepttime'
];
$post
[
'ctl00$ContentData$new_sitecontacttime'
]
=
$data
[
'new_sitecontacttime'
];
$post
[
'ctl00$ContentData$new_siteappointmenttime'
]
=
$data
[
'new_siteappointmenttime'
];
$post
[
'ctl00$ContentData$new_actualvisittime'
]
=
$data
[
'new_actualvisittime'
];
$post
[
'ctl00$ContentData$new_isguaranty'
]
=
$data
[
'new_isguaranty'
];
$post
[
'ctl00$ContentData$new_finishstatus'
]
=
$data
[
'new_finishstatus'
];
if
(
$data
[
'new_finishstatus'
]
===
false
)
{
$post
[
'ctl00$ContentData$new_unfinishreason'
]
=
$data
[
'new_unfinishreason'
];
}
else
{
$post
[
'ctl00$ContentData$new_finishtime'
]
=
$data
[
'new_finishtime'
];
$post
[
'ctl00$ContentData$new_complete_reason'
]
=
$data
[
'new_complete_reason'
];
}
$post
[
'ctl00$ContentData$new_usr_staffandallowanceid'
]
=
''
;
$post
[
'ctl00$ContentData$txtFollowmemo'
]
=
$data
[
'txtFollowmemo'
];
$post
[
'ctl00$ContentData$btnAddFollow'
]
=
'添加'
;
break
;
}
//return_msg(true, '', $post);
$url
=
self
::
$host
.
'/Complaint/new_srv_callinEP.aspx?mainid=&mainidname=&attrcode=&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