Commit 37380f27 authored by 蒋林's avatar 蒋林

格兰仕 - 保存维修单 - 良品搜索

parent b6aeb8a5
......@@ -657,7 +657,7 @@ class Galanz extends BaseController
public function lookupParts()
{
$param = $this->input->post();
//验证参数
$obj = $this->receiveGalanzObj();
$obj->SetValues($param);
......@@ -666,7 +666,7 @@ class Galanz extends BaseController
$this->saveLog($values['errorpartsid'], 'lookupParts', $param);
$sourceGalanzObj = $this->sourceGalanzObj($values['account'], $values['pwd']);
$result = $sourceGalanzObj->LookupParts($values['siteid'], $values['errorpartsid'], $values['search']);
$result = $sourceGalanzObj->LookupParts($values['siteid'], $values['errorpartsid'], $values['search'], $values['type']);
$obj->ReturnMessage(true, '', $result);
}
......
......@@ -45,7 +45,7 @@ class Galanz extends BaseController
11 => ['u' => 'R75500046', 'p' => 'szwxh!755'],
];
$key = 11;
$key = 0;
self::$testu = $account[$key]['u'];
self::$testp = $account[$key]['p'];
//self::$testp = urlencode(str_aes($account[5]['p']));
......@@ -69,9 +69,10 @@ class Galanz extends BaseController
'account' => self::$testu,
'pwd' => self::$testp,
'name' => '',
'siteid' => '7a41b551-9aca-439e-99ed-5f05e54477fc',
'errorpartsid' => 'c6f7c2e0-7371-422b-95e2-625076ddfd5b',
'search' => '253019000135',
'siteid' => '6f562a61-3a22-4a16-9e42-f3306dcc10a0',
'errorpartsid' => '0c17512f-ee09-4b57-8d7f-d8b30f944171',
'type' => '',
'search' => '水位传感器',
];
$data['nonce_str'] = $obj->GetNonceStr();
......@@ -233,7 +234,7 @@ class Galanz extends BaseController
$data['appid'] = '10001';
$data['account'] = self::$testu;
$data['pwd'] = self::$testp;
$data['id'] = '5f0bb6cc-ae4c-44ec-a9f2-687bafd696d8';
$data['id'] = 'f2c11987-0080-46a6-a677-f0b6c2f7e1c2';
$data['nonce_str'] = $obj->GetNonceStr();
$obj->SetValues($data);
......
......@@ -634,9 +634,14 @@ class ReceiveGalanz extends Receive
$this->CheckValues($fileds);
$dfields = [
'search', //安装卡号
'type', //搜索类型: 1:名称; 2:卡号
'search', //搜索内容
];
$this->SetDefaultValues($dfields);
$select = ['', 'name', 'productnumber'];
$this->values['type'] = $this->SelectValues($this->values['type'], $select);
$this->values['type'] = $this->values['type'] ? : 'productnumber';
}
}
\ No newline at end of file
......@@ -1186,10 +1186,6 @@ class SourceGalanz extends Source
*/
public function LookupParts($siteid, $errorpartsid, $search = '', $type='name')
{
if ($search) {
$type = 'productnumber';
}
return $this->LookupSingle('lookupParts', $siteid.'%20'.$errorpartsid, $search, $type);
}
......
......@@ -904,7 +904,8 @@ chk | chk | 是 | String(32) | 95efe55c-b060-4354-8313-59a7ccba4ed8 | fault下
密码 | pwd | 是 | String(32) | c01000005 |
siteid | siteid | 是 | String(32) | 95efe55c-b060-4354-8313-59a7ccba4ed8
不良品id | errorpartsid | 是 | String(32) | 95efe55c-b060-4354-8313-59a7ccba4ed8
搜索 | search | 否 | String(32) | | 目前支持编码搜索
搜索类型 | type | 否 | String(32) | | 1:名称 2:卡号
搜索内容 | search | 否 | String(32) | |
###### 返回结果
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment