关闭老系统的中药订单同步功能

This commit is contained in:
2025-08-29 09:15:16 +08:00
parent ec0f0a5b93
commit 788cfac9fe
2 changed files with 28 additions and 11 deletions

View File

@@ -44,6 +44,22 @@ class JacErpService
public function syncOrder($params){
throw new Exception('暂时关闭老接口的同步功能');
ds($params);
$response = (new Client(['http_errors' => false]))->post(
'http://127.0.0.1/open-api/test-api/send-china-prescription?keys=kB0sE7tZ3yT0jI1sD4wL2lI0kN6jO8cV4tO1zQ8zA5pgG5iW6zV0oB8vD6qV5cS7wQ5tN4cO8bG9gY6yL3lA6g',
[
'headers' => ['Content-Type' => 'application/json', 'userid' => $this->config['userid'], 'secret' => $this->config['secret']],
\GuzzleHttp\RequestOptions::JSON =>$params
]
);
$result = json_decode($response->getBody(),true);
ds($result);
if ($result['code']) {
throw new Exception($result['message']);
}
return true;
\Yii::info(__METHOD__."——同步订单至江奥川erp接口地址: ".$this->config['url'].'/tis-server/api/addTisApplyMaster');
$url = $this->config['url'].'/tis-server/api/addTisApplyMaster';
$params['hospital_code'] = $this->config['userid'];