|
@@ -98,10 +98,15 @@ class JRFIDServerService extends Service
|
|
|
if(empty($data['id'])) return [false, '数据ID不能为空'];
|
|
|
if(empty($data['type'])) return [false, '打印数据类型不能为空'];
|
|
|
|
|
|
+ $size = $data['size'] ?? 10;
|
|
|
+ $number = $data['number'] ?? 1;
|
|
|
+
|
|
|
$rsaService = new RsaEncryptionService();
|
|
|
$dataToEncrypt = [
|
|
|
'id' => $data['id'],
|
|
|
'type' => $data['type'],
|
|
|
+ 'size' => $size,
|
|
|
+ 'number' => $number,
|
|
|
];
|
|
|
$encryptedData = $rsaService->encrypt(json_encode($dataToEncrypt));
|
|
|
|
|
@@ -289,6 +294,11 @@ class JRFIDServerService extends Service
|
|
|
if(! empty($result['status']) && $result['status'] == 'error') return [false, $result['message']];
|
|
|
if(! empty($result['type']) && $result['type'] == 'errorVm') return [false, $result['message']];
|
|
|
|
|
|
+ if(! isset($result['furn_pro_flow_dt_a'])) {
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
+ return [false, $error];
|
|
|
+ }
|
|
|
+
|
|
|
return [true, $result];
|
|
|
}
|
|
|
|
|
@@ -456,6 +466,30 @@ class JRFIDServerService extends Service
|
|
|
return [true, $result['data']];
|
|
|
}
|
|
|
|
|
|
+ public function screenGetProDtData($data,$param){
|
|
|
+ if(empty($data['id'])) return [false, '数据ID不能为空'];
|
|
|
+ if(empty($data['type'])) return [false, 'TYPE不能为空'];
|
|
|
+
|
|
|
+ $url = config("j_rfid.screenGetProDtData");
|
|
|
+ $post = [
|
|
|
+ 'id' => $data['id'],
|
|
|
+ 'type' => $data['type'],
|
|
|
+ ];
|
|
|
+
|
|
|
+ list($status,$result) = $this->post_helper($url,json_encode($post),$param['header']);
|
|
|
+ if(! $status) return [false, $result];
|
|
|
+
|
|
|
+ if(! empty($result['status']) && $result['status'] == 'error') return [false, $result['message']];
|
|
|
+ if(! empty($result['type']) && $result['type'] == 'errorVm') return [false, $result['message']];
|
|
|
+
|
|
|
+ if(! isset($result['furn_pro_flow_dt_a'])) {
|
|
|
+ $error = $result[0]['message'] ?? "操作失败,请刷新页面";
|
|
|
+ return [false, $error];
|
|
|
+ }
|
|
|
+
|
|
|
+ return [true, $result];
|
|
|
+ }
|
|
|
+
|
|
|
public function post_helper($url, $data, $header = [], $timeout = 20){
|
|
|
$file_name = 'record_' . date("Y-m-d") . '.txt';
|
|
|
file_put_contents($file_name,date('Y-m-d H:i:s') . PHP_EOL. "请求API:" . $url . PHP_EOL . "请求参数:" . $data . PHP_EOL . "请求头部:" . json_encode($header) . PHP_EOL,8);
|