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
3ae4fc9e
Commit
3ae4fc9e
authored
Nov 10, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
志高-维修业务-浏览相关接口
parent
b66a0c28
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
271 additions
and
79 deletions
+271
-79
Chigo.php
application/controllers/api/Chigo.php
+54
-0
Chigo.php
application/controllers/test/Chigo.php
+73
-75
Receive.php
application/libraries/Receive/Receive.php
+4
-4
ReceiveChigo.php
application/libraries/Receive/ReceiveChigo.php
+65
-0
SourceChigo.php
application/libraries/Source/SourceChigo.php
+75
-0
No files found.
application/controllers/api/Chigo.php
View file @
3ae4fc9e
...
@@ -110,6 +110,60 @@ class Chigo extends BaseController
...
@@ -110,6 +110,60 @@ class Chigo extends BaseController
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
}
//家用维修业务-业务-安装单补录-浏览
public
function
queryInstallPatch
()
{
$param
=
$this
->
input
->
post
();
//验证参数
$obj
=
$this
->
receiveObj
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckQueryInstallPatchValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'queryInstallPatch'
,
$values
);
$sourceObj
=
$this
->
sourceObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$result
=
$sourceObj
->
QueryInstallPatch
(
$values
);
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
//家用维修业务-业务-维修过保机录入-浏览
public
function
queryOverdateBill
()
{
$param
=
$this
->
input
->
post
();
//验证参数
$obj
=
$this
->
receiveObj
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckQueryOverdateBillValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'queryOverdateBill'
,
$values
);
$sourceObj
=
$this
->
sourceObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$result
=
$sourceObj
->
QueryOverdateBill
(
$values
);
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
//家用维修业务-业务-维修单据结算-浏览
public
function
repairBrowseCloseAccount
()
{
$param
=
$this
->
input
->
post
();
//验证参数
$obj
=
$this
->
receiveObj
();
$obj
->
SetValues
(
$param
);
$obj
->
CheckRepairBrowseCloseAccountValues
();
$values
=
$obj
->
GetValues
();
$this
->
saveLog
(
''
,
'repairBrowseCloseAccount'
,
$values
);
$sourceObj
=
$this
->
sourceObj
(
$values
[
'account'
],
$values
[
'pwd'
]);
$result
=
$sourceObj
->
RepairBrowseCloseAccount
(
$values
);
$obj
->
ReturnMessage
(
true
,
''
,
$result
);
}
//服务商编号
//服务商编号
public
function
pickupAllSerNodeForUser
()
public
function
pickupAllSerNodeForUser
()
...
...
application/controllers/test/Chigo.php
View file @
3ae4fc9e
...
@@ -58,7 +58,7 @@ class Chigo extends BaseController
...
@@ -58,7 +58,7 @@ class Chigo extends BaseController
{
{
$xml
=
'<?xml version="1.0" encoding="gbk" standalone="yes"?>
$xml
=
'<?xml version="1.0" encoding="gbk" standalone="yes"?>
<DATAPACKET Version="2.0"><ACTION isquery="true"/><DATASET providername="
QueryRepairBill"><METADATA><FIELDS><FIELD attrname="INPUT_DATE_BEGIN" fieldtype="string" width="0"/><FIELD attrname="INPUT_DATE_END" fieldtype="string" width="0"/><FIELD attrname="NODE_ID" fieldtype="string" width="0"/><FIELD attrname="REPAIR_DATE_BEGIN" fieldtype="string" width="0"/><FIELD attrname="REPAIR_DATE_END" fieldtype="string" width="0"/><FIELD attrname="REPAIR_NO" fieldtype="string" width="0"/><FIELD attrname="MACHINE_MODEL" fieldtype="string" width="0"/></FIELDS><PARAMS/></METADATA><ROWDATA><ROW INPUT_DATE_BEGIN="2016-10-01" INPUT_DATE_END="2016-11-08" NODE_ID="" REPAIR_DATE_BEGIN="" REPAIR_DATE_END="" REPAIR_NO="" MACHINE_MODEL="<10
"/></ROWDATA></DATASET></DATAPACKET>
<DATAPACKET Version="2.0"><ACTION isquery="true"/><DATASET providername="
BrowseCloseAccount"><METADATA><FIELDS><FIELD attrname="PERIODB" fieldtype="string" width="0"/><FIELD attrname="PERIODE" fieldtype="string" width="0"/><FIELD attrname="SER_NODE_ID" fieldtype="string" width="0"/><FIELD attrname="CENTER_CODE" fieldtype="string" width="0"/><FIELD attrname="INS_REP" fieldtype="string" width="0"/><FIELD attrname="WXQX" fieldtype="string" width="0"/></FIELDS><PARAMS/></METADATA><ROWDATA><ROW PERIODB="201610" PERIODE="201611" SER_NODE_ID="0200145" CENTER_CODE="0801" INS_REP="C" WXQX="C
"/></ROWDATA></DATASET></DATAPACKET>
'
;
'
;
$sobj
=
$this
->
sourceObj
();
$sobj
=
$this
->
sourceObj
();
...
@@ -74,12 +74,7 @@ class Chigo extends BaseController
...
@@ -74,12 +74,7 @@ class Chigo extends BaseController
public
function
facilitatorReservation
()
public
function
facilitatorReservation
()
{
{
$obj
=
$this
->
receiveObj
();
$post
=
[
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'adat_begin'
=>
'20161012'
,
'adat_begin'
=>
'20161012'
,
'adat_end'
=>
'20161102'
,
'adat_end'
=>
'20161102'
,
'mobile'
=>
''
,
'mobile'
=>
''
,
...
@@ -88,27 +83,12 @@ class Chigo extends BaseController
...
@@ -88,27 +83,12 @@ class Chigo extends BaseController
'ano'
=>
'0020201610125742'
,
'ano'
=>
'0020201610125742'
,
];
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$this
->
httpPost
(
'facilitatorReservation'
,
$post
);
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/chigo/facilitatorReservation"
;
$result
=
curl_post
(
$url
,
$values
);
$result
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
}
public
function
visitingService
()
public
function
visitingService
()
{
{
$obj
=
$this
->
receiveObj
();
$post
=
[
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'adat_begin'
=>
'20161001'
,
'adat_begin'
=>
'20161001'
,
'adat_end'
=>
'20161130'
,
'adat_end'
=>
'20161130'
,
'mobile'
=>
''
,
'mobile'
=>
''
,
...
@@ -119,27 +99,13 @@ class Chigo extends BaseController
...
@@ -119,27 +99,13 @@ class Chigo extends BaseController
'bxcd'
=>
'1'
,
//报修催单: 1:选中; 0:未选中
'bxcd'
=>
'1'
,
//报修催单: 1:选中; 0:未选中
];
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$this
->
httpPost
(
'visitingService'
,
$post
);
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/chigo/visitingService"
;
$result
=
curl_post
(
$url
,
$values
);
$result
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
}
public
function
queryInstallBill
()
public
function
queryInstallBill
()
{
{
$obj
=
$this
->
receiveObj
();
$data
=
[
$post
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'input_date_begin'
=>
'20160927'
,
'input_date_begin'
=>
'20160927'
,
'input_date_end'
=>
'20161108'
,
'input_date_end'
=>
'20161108'
,
'telephone_no'
=>
''
,
'telephone_no'
=>
''
,
...
@@ -150,47 +116,83 @@ class Chigo extends BaseController
...
@@ -150,47 +116,83 @@ class Chigo extends BaseController
'warranty'
=>
'153178470'
,
'warranty'
=>
'153178470'
,
];
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$this
->
httpPost
(
'queryInstallBill'
,
$post
);
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/chigo/queryInstallBill"
;
$result
=
curl_post
(
$url
,
$values
);
$result
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
}
}
public
function
browseCloseAccount
()
public
function
browseCloseAccount
()
{
{
$obj
=
$this
->
receiveObj
();
$post
=
[
$data
=
[
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'periodb'
=>
'201610'
,
'periodb'
=>
'201610'
,
'periode'
=>
'201611'
,
'periode'
=>
'201611'
,
'ser_node_id'
=>
'0200145'
,
'ser_node_id'
=>
'0200145'
,
'center_code'
=>
'0801'
'center_code'
=>
'0801'
];
];
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$this
->
httpPost
(
'browseCloseAccount'
,
$post
);
$obj
->
SetValues
(
$data
);
}
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/chigo/browseCloseAccount"
;
public
function
queryRepairBill
()
$result
=
curl_post
(
$url
,
$values
);
{
$result
=
json_decode
(
$result
[
'data'
],
true
);
$post
=
[
'input_date_begin'
=>
'20161001'
,
'input_date_end'
=>
'20161108'
,
'node_id'
=>
'0200145'
,
'repair_date_begin'
=>
''
,
'repair_date_end'
=>
''
,
'repair_no'
=>
'201609235'
,
];
$this
->
show
(
$resul
t
);
$this
->
httpPost
(
'queryRepairBill'
,
$pos
t
);
}
}
public
function
queryRepairBill
()
public
function
queryInstallPatch
()
{
$post
=
[
'input_date_begin'
=>
''
,
'input_date_end'
=>
''
,
'telephone_no'
=>
''
,
'node_id'
=>
''
,
'install_date_begin'
=>
''
,
'install_date_end'
=>
''
,
'customer_name'
=>
''
,
'warranty'
=>
''
,
'barcode'
=>
''
,
];
$this
->
httpPost
(
'queryInstallPatch'
,
$post
);
}
public
function
queryOverdateBill
()
{
$post
=
[
'input_date_begin'
=>
''
,
'input_date_end'
=>
''
,
'node_id'
=>
''
,
'repair_date_begin'
=>
''
,
'repair_date_end'
=>
''
,
'repair_no'
=>
''
,
];
$this
->
httpPost
(
'queryOverdateBill'
,
$post
);
}
public
function
repairBrowseCloseAccount
()
{
$post
=
[
'periodb'
=>
'201610'
,
'periode'
=>
'201611'
,
'ser_node_id'
=>
'0200145'
,
'center_code'
=>
'0801'
,
'ins_rep'
=>
'0'
,
'wxqx'
=>
'0'
,
];
$this
->
httpPost
(
'repairBrowseCloseAccount'
,
$post
);
}
private
function
httpPost
(
$url
,
$post
)
{
{
$obj
=
$this
->
receiveObj
();
$obj
=
$this
->
receiveObj
();
...
@@ -198,27 +200,23 @@ class Chigo extends BaseController
...
@@ -198,27 +200,23 @@ class Chigo extends BaseController
'appid'
=>
'10001'
,
'appid'
=>
'10001'
,
'account'
=>
self
::
$testu
,
'account'
=>
self
::
$testu
,
'pwd'
=>
self
::
$testp
,
'pwd'
=>
self
::
$testp
,
'input_date_begin'
=>
'20161001'
,
'input_date_end'
=>
'20161108'
,
'node_id'
=>
'0200145'
,
'repair_date_begin'
=>
''
,
'repair_date_end'
=>
''
,
'repair_no'
=>
'201609235'
,
];
];
$data
=
array_merge
(
$data
,
$post
);
$url
=
self
::
$apiUrl
.
"api/chigo/"
.
$url
;
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$data
[
'nonce_str'
]
=
$obj
->
GetNonceStr
();
$obj
->
SetValues
(
$data
);
$obj
->
SetValues
(
$data
);
$obj
->
SetSign
();
$obj
->
SetSign
();
$values
=
$obj
->
GetValues
();
$values
=
$obj
->
GetValues
();
$url
=
self
::
$apiUrl
.
"api/chigo/queryRepairBill"
;
$result
=
curl_post
(
$url
,
$values
);
$result
=
curl_post
(
$url
,
$values
);
$result
=
json_decode
(
$result
[
'data'
],
true
);
$result
=
json_decode
(
$result
[
'data'
],
true
);
$this
->
show
(
$result
);
$this
->
show
(
$result
);
}
}
public
function
pickupAllSerNodeForUser
()
public
function
pickupAllSerNodeForUser
()
{
{
$obj
=
$this
->
receiveObj
();
$obj
=
$this
->
receiveObj
();
...
...
application/libraries/Receive/Receive.php
View file @
3ae4fc9e
...
@@ -228,7 +228,7 @@ class Receive
...
@@ -228,7 +228,7 @@ class Receive
protected
function
SelectValues
(
$val
,
$options
,
$default
=
''
)
protected
function
SelectValues
(
$val
,
$options
,
$default
=
''
)
{
{
if
(
empty
(
$val
)
)
{
if
(
$val
==
''
)
{
return
$val
;
return
$val
;
}
}
...
@@ -237,7 +237,7 @@ class Receive
...
@@ -237,7 +237,7 @@ class Receive
protected
function
IntValues
(
$val
,
$out
=
'int'
)
protected
function
IntValues
(
$val
,
$out
=
'int'
)
{
{
if
(
empty
(
$val
)
)
{
if
(
$val
==
''
)
{
return
$val
;
return
$val
;
}
}
...
@@ -248,7 +248,7 @@ class Receive
...
@@ -248,7 +248,7 @@ class Receive
protected
function
DateFormatValues
(
$date
,
$format
=
'Y-m-d'
)
protected
function
DateFormatValues
(
$date
,
$format
=
'Y-m-d'
)
{
{
if
(
empty
(
$date
)
)
{
if
(
$date
==
''
)
{
return
$date
;
return
$date
;
}
}
...
@@ -257,7 +257,7 @@ class Receive
...
@@ -257,7 +257,7 @@ class Receive
protected
function
TimeFormatValues
(
$time
,
$format
=
'Y-m-d'
)
protected
function
TimeFormatValues
(
$time
,
$format
=
'Y-m-d'
)
{
{
if
(
empty
(
$time
)
)
{
if
(
$time
==
''
)
{
return
$time
;
return
$time
;
}
}
...
...
application/libraries/Receive/ReceiveChigo.php
View file @
3ae4fc9e
...
@@ -116,4 +116,69 @@ class ReceiveChigo extends Receive
...
@@ -116,4 +116,69 @@ class ReceiveChigo extends Receive
$this
->
values
[
'repair_date_end'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'repair_date_end'
]);
$this
->
values
[
'repair_date_end'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'repair_date_end'
]);
}
}
public
function
CheckQueryInstallPatchValues
()
{
$fileds
=
[];
$this
->
CheckValues
(
$fileds
);
$dfields
=
[
'input_date_begin'
,
//20161011
'input_date_end'
,
'telephone_no'
,
'node_id'
,
'install_date_begin'
,
//20161011
'install_date_end'
,
'customer_name'
,
'warranty'
,
'barcode'
,
];
$this
->
SetDefaultValues
(
$dfields
);
$this
->
values
[
'input_date_begin'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'input_date_begin'
]);
$this
->
values
[
'input_date_end'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'input_date_end'
]);
$this
->
values
[
'install_date_begin'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'install_date_begin'
]);
$this
->
values
[
'install_date_end'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'install_date_end'
]);
}
public
function
CheckQueryOverdateBillValues
()
{
$fileds
=
[];
$this
->
CheckValues
(
$fileds
);
$dfields
=
[
'input_date_begin'
,
//20161011
'input_date_end'
,
'node_id'
,
//0200145
'repair_date_begin'
,
//20161011
'repair_date_end'
,
'repair_no'
,
//
];
$this
->
SetDefaultValues
(
$dfields
);
$this
->
values
[
'input_date_begin'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'input_date_begin'
]);
$this
->
values
[
'input_date_end'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'input_date_end'
]);
$this
->
values
[
'repair_date_begin'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'repair_date_begin'
]);
$this
->
values
[
'repair_date_end'
]
=
$this
->
DateFormatValues
(
$this
->
values
[
'repair_date_end'
]);
}
public
function
CheckRepairBrowseCloseAccountValues
()
{
$fileds
=
[
'ins_rep'
,
'wxqx'
];
$this
->
CheckValues
(
$fileds
);
$dfields
=
[
'periodb'
,
//201610
'periode'
,
'ser_node_id'
,
'center_code'
,
'ins_rep'
,
'wxqx'
];
$this
->
SetDefaultValues
(
$dfields
);
$select
=
[
'C'
,
'H'
];
$this
->
values
[
'ins_rep'
]
=
$this
->
SelectValues
(
$this
->
values
[
'ins_rep'
],
$select
);
$this
->
values
[
'wxqx'
]
=
$this
->
SelectValues
(
$this
->
values
[
'wxqx'
],
$select
);
}
}
}
\ No newline at end of file
application/libraries/Source/SourceChigo.php
View file @
3ae4fc9e
...
@@ -145,6 +145,72 @@ class SourceChigo extends Source
...
@@ -145,6 +145,72 @@ class SourceChigo extends Source
return
$data
;
return
$data
;
}
}
/**
* 家用维修业务-业务-安装单补录-浏览
* @param $condition
* @return array
*/
public
function
QueryInstallPatch
(
$condition
)
{
$post
=
[
'input_date_begin'
=>
$condition
[
'input_date_begin'
],
//输单日期 2016-10-01
'input_date_end'
=>
$condition
[
'input_date_end'
],
'telephone_no'
=>
$condition
[
'telephone_no'
],
//用户电话: 手机号码
'node_id'
=>
$condition
[
'node_id'
],
//服务商, PickupAllSerNodeForUser->node_id
'install_date_begin'
=>
$condition
[
'install_date_begin'
],
//安装日期 2016-10-01
'install_date_end'
=>
$condition
[
'install_date_end'
],
'customer_name'
=>
$condition
[
'customer_name'
],
//用户姓名
'warranty'
=>
$condition
[
'warranty'
],
//保修卡号
'barcode'
=>
$condition
[
'barcode'
],
//条码
];
//转码
$post
[
'customer_name'
]
=
$this
->
Utf8ToGbk
(
$post
[
'customer_name'
]);
$data
=
$this
->
HandelAction
(
'InstallPatchAction'
,
'QueryInstallPatch'
,
$post
);
return
$data
;
}
/**
* 家用维修业务-业务-维修过保机录入-浏览
* @param $condition
* @return array
*/
public
function
QueryOverdateBill
(
$condition
)
{
$post
=
[
'input_date_begin'
=>
$condition
[
'input_date_begin'
],
//输单日期: 2016-10-01
'input_date_end'
=>
$condition
[
'input_date_end'
],
'node_id'
=>
$condition
[
'node_id'
],
//服务商, PickupAllSerNodeForUser->node_id
'repair_date_begin'
=>
$condition
[
'repair_date_begin'
],
//维修日期: 2016-10-01
'repair_date_end'
=>
$condition
[
'repair_date_end'
],
'repair_no'
=>
$condition
[
'repair_no'
],
//维修单号: 201609235
];
$data
=
$this
->
HandelAction
(
'OverdateBillAction'
,
'QueryOverdateBill'
,
$post
);
return
$data
;
}
/**
* 家用维修业务-业务-维修单据结算-浏览
* @param $condition
* @return array
*/
public
function
RepairBrowseCloseAccount
(
$condition
)
{
$post
=
[
'periodb'
=>
$condition
[
'periodb'
],
//'201610'
'periode'
=>
$condition
[
'periode'
],
'ser_node_id'
=>
$condition
[
'ser_node_id'
],
//服务商, PickupAllSerNodeForUser->node_id
'center_code'
=>
$condition
[
'center_code'
],
//中心, PickupAllForUser->center_code
'ins_rep'
=>
$condition
[
'ins_rep'
],
//系统: C:志高; H:现代
'wxqx'
=>
$condition
[
'wxqx'
],
//业务类型: C:维修; H:清洗
];
$data
=
$this
->
HandelAction
(
'BrowseCloseAccount'
,
'BrowseCloseAccount'
,
$post
);
return
$data
;
}
//服务商编号
//服务商编号
public
function
PickupAllSerNodeForUser
()
public
function
PickupAllSerNodeForUser
()
...
@@ -214,6 +280,15 @@ class SourceChigo extends Source
...
@@ -214,6 +280,15 @@ class SourceChigo extends Source
$url
=
"http://58.254.204.86:9001/cus/RepairBillAction.do"
;
$url
=
"http://58.254.204.86:9001/cus/RepairBillAction.do"
;
break
;
break
;
//家用维修业务-安装单补录
case
'InstallPatchAction'
:
$url
=
"http://58.254.204.86:9001/cus/InstallPatchAction.do"
;
break
;
case
'OverdateBillAction'
:
$url
=
"http://58.254.204.86:9001/cus/OverdateBillAction.do"
;
break
;
default
:
default
:
$url
=
''
;
$url
=
''
;
}
}
...
...
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