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
11ec6a8b
Commit
11ec6a8b
authored
Sep 23, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 安装单发送
parent
7959c0f0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
853 deletions
+52
-853
Galanz.php
application/controllers/api/Galanz.php
+7
-0
Rgalanz.php
application/controllers/test/Rgalanz.php
+0
-666
Sgalanz.php
application/controllers/test/Sgalanz.php
+0
-150
ReceiveGalanz.php
application/libraries/Receive/ReceiveGalanz.php
+39
-35
SourceGalanz.php
application/libraries/Source/SourceGalanz.php
+6
-2
No files found.
application/controllers/api/Galanz.php
View file @
11ec6a8b
...
...
@@ -264,6 +264,7 @@ class Galanz extends BaseController
$order
=
$sourceGalanzObj
->
UserProfileOrderDetail
(
$values
[
'id'
]);
$order
=
$obj
->
SetSaveUserProfileOrderValues
(
$order
,
$values
);
$result
=
$sourceGalanzObj
->
SaveUserProfileOrder
(
$order
[
'new_id'
],
$order
);
$result
=
$this
->
diffOrder
(
$result
);
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
...
...
@@ -324,6 +325,12 @@ class Galanz extends BaseController
$sourceGalanzObj
=
$this
->
sourceGalanzObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$order
=
$sourceGalanzObj
->
UserProfileOrderDetail
(
$values
[
'id'
]);
//已发送
if
(
$order
[
'zhuangtai_value'
]
==
1
||
$order
[
'zhuangtai_name'
]
==
'已发送'
)
{
$obj
->
ReturnMessage
(
false
,
$order
[
'zhuangtai_name'
]);
}
$result
=
$sourceGalanzObj
->
SendUserProfileOrder
(
$order
[
'new_id'
],
$order
);
$result
=
$this
->
diffOrder
(
$result
);
...
...
application/controllers/test/Rgalanz.php
deleted
100644 → 0
View file @
7959c0f0
This diff is collapsed.
Click to expand it.
application/controllers/test/Sgalanz.php
deleted
100644 → 0
View file @
7959c0f0
<?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
userProfileOrderDetail
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
UserProfileOrderDetail
(
'cede5a21-0c3a-42ad-8f43-cc9810c1f1f1'
);
$this
->
show
(
$list
);
}
public
function
saveOrder
()
{
$obj
=
$this
->
galanzObj
();
$order
=
$obj
->
OrderDetail
(
'a7babae4-df15-4405-b5d2-2301554b6292'
);
$result
=
$obj
->
SaveOrder
(
$order
[
'new_id'
],
$order
);
$this
->
show
(
$result
);
}
public
function
createWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$order
=
$obj
->
OrderDetail
(
'a7babae4-df15-4405-b5d2-2301554b6292'
);
$result
=
$obj
->
CreateWorkOrder
(
$order
[
'new_id'
],
$order
);
$this
->
show
(
$result
);
}
public
function
searchOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchOrder
(
'CALL2015111004668'
);
$this
->
show
(
$list
);
}
public
function
searchWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchWorkOrder
(
'WO2016091000701'
);
$this
->
show
(
$list
);
}
public
function
searchUserProfieOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
SearchUserProfieOrder
(
'13693637226'
);
$this
->
show
(
$list
);
}
public
function
orderDetail
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
OrderDetail
(
'07be1e36-75bd-4394-8a6f-d09e387e869e'
);
$this
->
show
(
$list
);
}
public
function
workOrderDetail
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
WorkOrderDetail
(
'cb027cbf-a702-4c91-82ba-e5f323e854eb'
);
$this
->
show
(
$list
);
}
public
function
prodAddWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
WorkOrderDetail
(
'cb027cbf-a702-4c91-82ba-e5f323e854eb'
);
//$result = $obj->ProdAddWorkOrder($list['new_id'], $list);
$result
=
$obj
->
ProdGetWorkOrder
(
$list
[
'new_id'
],
$list
,
'15H551100010330'
);
$this
->
show
(
$result
);
}
public
function
errorAddWorkOrder
()
{
$obj
=
$this
->
galanzObj
();
$list
=
$obj
->
WorkOrderDetail
(
'b4562475-1eac-415d-8713-653f8ea7d7c3'
);
$result
=
$obj
->
ErrorAddWorkOrder
(
$list
[
'new_id'
],
$list
);
$this
->
show
(
$result
);
}
public
function
lookupSingle
()
{
$obj
=
$this
->
galanzObj
();
//$list = $obj->WorkOrderDetail('b4562475-1eac-415d-8713-653f8ea7d7c3');
$result
[
'a'
]
=
$obj
->
LookupProductByGroup
(
'fabf8619-07cc-4164-929e-9d433301d625'
,
'微波炉P70D10EP-QA(P0)'
);
// $result['b'] = $obj->LookupErrormModule('c73cf4b6-0a8d-4810-961f-111bcb925727');
// $result['c'] = $obj->LookupErrorGroup('a7af025a-d061-e411-80cb-00155d016a1c');
// $result['c'] = $obj->LookupErrorSolution($result['b'][0]['id']);
// $result['d1'] = $obj->LookupErrorParts($result['c'][0]['id'], 'c7d14361-df35-4147-966f-ee671298d3eb');
// $result['d2'] = $obj->LookupParts('6f562a61-3a22-4a16-9e42-f3306dcc10a0', '48e24c55-7b53-46ae-8e43-c20e2435adbc');
$this
->
show
(
$result
);
}
public
function
getData
()
{
$obj
=
$this
->
galanzObj
();
$result
=
$obj
->
GetProductTypeById
(
'66d07939-8c72-478f-a586-b4956b92b1af'
);
$this
->
show
(
$result
);
}
private
function
galanzObj
()
{
$account
=
[
'username'
=>
'c01000005'
,
'pwd'
=>
'weixiuhui010'
];
// $account = [
// 'username' => 'K75516022',
// 'pwd' => '123456'
// ];
// $account = [
// 'username' => 'W75509345',
// 'pwd' => 'dgqh!769'
// ];
$this
->
load
->
library
(
'Source/SourceGalanz'
,
$account
,
'SourceGalanz'
);
return
$this
->
SourceGalanz
;
}
private
function
show
(
$data
)
{
echo
"<pre>"
;
print_r
(
$data
);
}
}
\ No newline at end of file
application/libraries/Receive/ReceiveGalanz.php
View file @
11ec6a8b
...
...
@@ -270,6 +270,7 @@ class ReceiveGalanz extends Receive
$this
->
CheckValues
(
$fileds
);
$dfields
=
[
'cardno'
,
//安装卡号
'contactname'
,
//姓名
'mobile'
,
//手机
'telephone'
,
//电话
...
...
@@ -288,44 +289,12 @@ class ReceiveGalanz extends Receive
$this
->
SetDefaultValues
(
$dfields
);
}
public
function
CheckAddProductsUserProfileOrderValues
()
{
$fileds
=
[
'id'
,
'producenumber'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
SetAddProductsUserProfileOrderValues
(
$order
,
$values
)
{
if
(
$values
[
'producenumber'
])
{
$order
[
'txtproducenumber'
]
=
trim
(
$values
[
'producenumber'
]);
}
return
$order
;
}
public
function
CheckDelProductsUserProfileOrderValues
()
{
$fileds
=
[
'id'
,
'chk'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
SetDelProductsUserProfileOrderValues
(
$order
,
$values
)
{
if
(
$values
[
'chk'
]
&&
$order
[
'products'
])
{
foreach
(
$order
[
'products'
]
as
$kk
=>
$vv
)
{
if
(
$values
[
'chk'
]
==
$vv
[
'chk'
])
{
$vv
[
'checked'
]
=
1
;
$order
[
'products'
][
$kk
]
=
$vv
;
}
}
}
return
$order
;
}
public
function
SetSaveUserProfileOrderValues
(
$order
,
$values
)
{
//处理基本信息参数
if
(
$values
[
'cardno'
]
!==
false
)
{
$order
[
'new_name'
]
=
trim
(
$values
[
'cardno'
]);
}
if
(
$values
[
'contactname'
])
{
$order
[
'new_contactname'
]
=
trim
(
$values
[
'contactname'
]);
}
...
...
@@ -372,6 +341,41 @@ class ReceiveGalanz extends Receive
return
$order
;
}
public
function
CheckAddProductsUserProfileOrderValues
()
{
$fileds
=
[
'id'
,
'producenumber'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
SetAddProductsUserProfileOrderValues
(
$order
,
$values
)
{
if
(
$values
[
'producenumber'
])
{
$order
[
'txtproducenumber'
]
=
trim
(
$values
[
'producenumber'
]);
}
return
$order
;
}
public
function
CheckDelProductsUserProfileOrderValues
()
{
$fileds
=
[
'id'
,
'chk'
];
$this
->
CheckValues
(
$fileds
);
}
public
function
SetDelProductsUserProfileOrderValues
(
$order
,
$values
)
{
if
(
$values
[
'chk'
]
&&
$order
[
'products'
])
{
foreach
(
$order
[
'products'
]
as
$kk
=>
$vv
)
{
if
(
$values
[
'chk'
]
==
$vv
[
'chk'
])
{
$vv
[
'checked'
]
=
1
;
$order
[
'products'
][
$kk
]
=
$vv
;
}
}
}
return
$order
;
}
public
function
CheckSendUserProfileOrderValues
()
{
$fileds
=
[
'id'
];
...
...
application/libraries/Source/SourceGalanz.php
View file @
11ec6a8b
...
...
@@ -2375,8 +2375,12 @@ class SourceGalanz extends Source
{
preg_match
(
'/<scriptt[^>]*>alert\("([^"]+)"\);?<\/scriptt>/'
,
$html
,
$arr
);
$error
=
isset
(
$arr
[
1
])
?
$arr
[
1
]
:
''
;
if
(
$error
&&
!
in_array
(
$error
,
[
'已保存!'
,
'发送成功!'
]))
{
return_msg
(
false
,
$error
);
$error_needle
=
[
'已保存'
,
'成功'
];
foreach
(
$error_needle
as
$key
=>
$value
)
{
if
(
stripos
(
$error
,
$value
)
!==
false
)
{
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