Commit 95824262 authored by 蒋林's avatar 蒋林

1. 更换方法名称

parent db3cce1f
......@@ -269,41 +269,43 @@ class Galanz extends BaseController
}
//安装单-添加明细信息
public function addMachineUserProfileOrder()
public function addProductsUserProfileOrder()
{
$param = $this->input->post();
//验证参数
$obj = $this->receiveGalanzObj();
$obj->SetValues($param);
$obj->CheckAddMachineUserProfileOrderValues();
$obj->CheckAddProductsUserProfileOrderValues();
$values = $obj->GetValues();
$this->saveLog($values['id'], 'addMachineUserProfileOrder', $param);
$this->saveLog($values['id'], 'addProductsUserProfileOrder', $param);
$sourceGalanzObj = $this->sourceGalanzObj($values['account'], $values['pwd']);
$order = $sourceGalanzObj->UserProfileOrderDetail($values['id']);
$order = $obj->SetAddMachineUserProfileOrderValues($order, $values);
$result = $sourceGalanzObj->AddMachineUserProfileOrder($order['new_id'], $order);
$order = $obj->SetAddProductsUserProfileOrderValues($order, $values);
$result = $sourceGalanzObj->AddProductsUserProfileOrder($order['new_id'], $order);
$result = $this->diffOrder($result);
$obj->ReturnMessage(true, '', $result);
}
//安装单-删除明细信息
public function delMachineUserProfileOrder()
public function delProductsUserProfileOrder()
{
$param = $this->input->post();
//验证参数
$obj = $this->receiveGalanzObj();
$obj->SetValues($param);
$obj->CheckDelMachineUserProfileOrderValues();
$obj->CheckDelProductsUserProfileOrderValues();
$values = $obj->GetValues();
$this->saveLog($values['id'], 'delMachineUserProfileOrder', $param);
$sourceGalanzObj = $this->sourceGalanzObj($values['account'], $values['pwd']);
$order = $sourceGalanzObj->UserProfileOrderDetail($values['id']);
$order = $obj->SetDelMachineUserProfileOrderValues($order, $values);
$result = $sourceGalanzObj->DelMachineUserProfileOrder($order['new_id'], $order);
$order = $obj->SetDelProductsUserProfileOrderValues($order, $values);
$result = $sourceGalanzObj->DelProductsUserProfileOrder($order['new_id'], $order);
$result = $this->diffOrder($result);
$obj->ReturnMessage(true, '', $result);
}
......@@ -323,6 +325,7 @@ class Galanz extends BaseController
$sourceGalanzObj = $this->sourceGalanzObj($values['account'], $values['pwd']);
$order = $sourceGalanzObj->UserProfileOrderDetail($values['id']);
$result = $sourceGalanzObj->SendUserProfileOrder($order['new_id'], $order);
$result = $this->diffOrder($result);
$obj->ReturnMessage(true, '', $result);
}
......
......@@ -576,8 +576,8 @@ class Rgalanz extends BaseController
'installer' => '', //安装人员
'goldcard' => '', //金卡
'remarks' => '', //备注
'qualityresult' => '1',
'custadvice' => ' ', //顾客意见
'qualityresult' => '',
'custadvice' => '', //顾客意见
];
$data['nonce_str'] = $obj->GetNonceStr();
......@@ -593,7 +593,7 @@ class Rgalanz extends BaseController
$this->show($result['data']);
}
public function addMachineUserProfileOrder()
public function addProductsUserProfileOrder()
{
$obj = $this->galanzObj();
......@@ -610,7 +610,7 @@ class Rgalanz extends BaseController
$obj->SetSign();
$values = $obj->GetValues();
$url = self::$apiUrl . "api/galanz/addMachineUserProfileOrder";
$url = self::$apiUrl . "api/galanz/addProductsUserProfileOrder";
$result = $this->curlPost($url, $values);
$result['data'] = json_decode($result['data'], true);
......@@ -618,7 +618,7 @@ class Rgalanz extends BaseController
$this->show($result['data']);
}
public function delMachineUserProfileOrder()
public function delProductsUserProfileOrder()
{
$obj = $this->galanzObj();
......@@ -627,7 +627,7 @@ class Rgalanz extends BaseController
'account' => self::$testu,
'pwd' => self::$testp,
'id' => '1650bb3a-46b0-408c-9694-6549a8d9d068',
'chk' => 'de580f86-70db-4452-9c99-08d4aa273cbb'
'chk' => '22c31a3c-4d2c-48db-a12c-8be13602c926'
];
$data['nonce_str'] = $obj->GetNonceStr();
......@@ -635,7 +635,7 @@ class Rgalanz extends BaseController
$obj->SetSign();
$values = $obj->GetValues();
$url = self::$apiUrl . "api/galanz/delMachineUserProfileOrder";
$url = self::$apiUrl . "api/galanz/delProductsUserProfileOrder";
$result = $this->curlPost($url, $values);
$result['data'] = json_decode($result['data'], true);
......
......@@ -288,13 +288,13 @@ class ReceiveGalanz extends Receive
$this->SetDefaultValues($dfields);
}
public function CheckAddMachineUserProfileOrderValues()
public function CheckAddProductsUserProfileOrderValues()
{
$fileds = ['id', 'producenumber'];
$this->CheckValues($fileds);
}
public function SetAddMachineUserProfileOrderValues($order, $values)
public function SetAddProductsUserProfileOrderValues($order, $values)
{
if ($values['producenumber']) {
$order['txtproducenumber'] = trim($values['producenumber']);
......@@ -303,13 +303,13 @@ class ReceiveGalanz extends Receive
return $order;
}
public function CheckDelMachineUserProfileOrderValues()
public function CheckDelProductsUserProfileOrderValues()
{
$fileds = ['id', 'chk'];
$this->CheckValues($fileds);
}
public function SetDelMachineUserProfileOrderValues($order, $values)
public function SetDelProductsUserProfileOrderValues($order, $values)
{
if ($values['chk'] && $order['products']) {
foreach ($order['products'] as $kk => $vv) {
......
......@@ -657,7 +657,7 @@ class SourceGalanz extends Source
* @param $data
* @return mixed
*/
public function AddMachineUserProfileOrder($id, $data)
public function AddProductsUserProfileOrder($id, $data)
{
$result = $this->HandelUserProfileOrder($id, $data, 'Add');
$this->HandelOrderError($result);
......@@ -671,7 +671,7 @@ class SourceGalanz extends Source
* @param $data
* @return mixed
*/
public function DelMachineUserProfileOrder($id, $data)
public function DelProductsUserProfileOrder($id, $data)
{
$result = $this->HandelUserProfileOrder($id, $data, 'Del');
$this->HandelOrderError($result);
......
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