Browse Source

refactor: 更新高压发生器和探测器设备URI从DIOS更改为CCOS

- 在API接口、测试用例、文档和模拟处理器中统一将设备URI从DIOS/DEVICE/Generator和DIOS/DEVICE/Detector更改为CCOS/DEVICE/Generator和CCOS/DEVICE/Detector
- 确保设备通信和测试的一致性

改动文件:
- cypress/e2e/exam/reset-generator.cy.ts
- cypress/support/mock/handlers/device.ts
- docs/测试/重置高压发生器功能测试方案.md
- docs/需求/APR参数管理流程.md
- mocks/handlers.md
- package.json
- src/API/exam/APRActions.ts
- src/API/exam/detectorAPI.ts
- src/API/exam/deviceActions.ts
- src/API/exam/generatorAPI.ts
- CHANGELOG.md
dengdx 3 hours ago
parent
commit
3c2948b9fa

+ 20 - 0
CHANGELOG.md

@@ -2,6 +2,26 @@
 
 本项目的所有重要变更都将记录在此文件中.
 
+## [1.70.6] - 2026-01-20 19:08
+
+refactor (1.70.5 -> 1.70.6): 更新高压发生器和探测器设备URI从DIOS更改为CCOS
+
+- 在API接口、测试用例、文档和模拟处理器中统一将设备URI从DIOS/DEVICE/Generator和DIOS/DEVICE/Detector更改为CCOS/DEVICE/Generator和CCOS/DEVICE/Detector
+- 确保设备通信和测试的一致性
+
+改动文件:
+
+- cypress/e2e/exam/reset-generator.cy.ts
+- cypress/support/mock/handlers/device.ts
+- docs/测试/重置高压发生器功能测试方案.md
+- docs/需求/APR参数管理流程.md
+- mocks/handlers.md
+- package.json
+- src/API/exam/APRActions.ts
+- src/API/exam/detectorAPI.ts
+- src/API/exam/deviceActions.ts
+- src/API/exam/generatorAPI.ts
+
 ## [1.70.5] - 2026-01-20 16:52
 
 fix (1.70.4 -> 1.70.5): 修复聚焦输入时禁用扫码枪键盘监听,避免用户键盘不可输入到注册表单中的文本框

+ 5 - 5
config/dev.ts

@@ -81,18 +81,18 @@ export default {
     devServer: {
       proxy: {
         '/dr': {
-          target: 'http://192.168.110.13', // 你的后端服务地址
+          // target: 'http://192.168.110.13', // 你的后端服务地址
           // target: 'http://192.168.110.133',
-          // target: 'http://192.168.110.239',
+          target: 'http://192.168.110.239',
           changeOrigin: true, // 允许跨域
           // pathRewrite: {
           //   '^/dr/api': '' // 可选,用于重写路径
           // }
         },
         '/mqtt': {
-          target: 'ws://192.168.110.13:8083', // MQTT WebSocket 服务地址
+          // target: 'ws://192.168.110.13:8083', // MQTT WebSocket 服务地址
           // target: 'ws://192.168.110.133:8083',
-          // target: 'ws://192.168.110.239:8083',
+          target: 'ws://192.168.110.239:8083',
           changeOrigin: true,
           ws: true, // 启用 WebSocket 代理
           // pathRewrite: {
@@ -100,7 +100,7 @@ export default {
           // }
         },
       },
-      server: 'https', // 启用 HTTPS ,为了开发环境测试打开摄像头功能
+      // server: 'https', // 启用 HTTPS ,为了开发环境测试打开摄像头功能
       host: '0.0.0.0', // 监听所有网络接口
       open: false, // 可选:是否自动打开浏览器
       port: 10086, // 可选:指定端口号

+ 1 - 1
cypress/e2e/exam/reset-generator.cy.ts

@@ -91,7 +91,7 @@ describe('重置高压发生器功能测试', () => {
       cy.wait('@resetDevice').then((interception) => {
         // 验证请求体
         expect(interception.request.body).to.deep.include({
-          deviceUri: 'DIOS/DEVICE/Generator',
+          deviceUri: 'CCOS/DEVICE/Generator',
           reqName: 'RESET',
         });
 

+ 1 - 1
cypress/support/mock/handlers/device.ts

@@ -119,7 +119,7 @@ export function mockDeviceActionSuccess() {
  * @access 需要认证
  * 
  * @param {Object} requestBody - 请求体
- * @param {string} requestBody.deviceUri - 设备URI (DIOS/DEVICE/Generator)
+ * @param {string} requestBody.deviceUri - 设备URI (CCOS/DEVICE/Generator)
  * @param {string} requestBody.reqName - 请求名称 (RESET)
  * 
  * @returns {Object} 成功响应

+ 1 - 1
docs/测试/重置高压发生器功能测试方案.md

@@ -44,7 +44,7 @@ interface DeviceState {
 ```json
 POST /auth/device/action
 {
-  "deviceUri": "DIOS/DEVICE/Generator",
+  "deviceUri": "CCOS/DEVICE/Generator",
   "reqName": "RESET",
   "reqParam": "",
   "reqTransaction": "",

+ 1 - 1
docs/需求/APR参数管理流程.md

@@ -197,7 +197,7 @@
 
 ```typescript
 {
-  deviceUri: "DIOS/DEVICE/Generator",
+  deviceUri: "CCOS/DEVICE/Generator",
   reqName: "SetAPR",
   reqParam: JSON.stringify({
     P0: {

+ 2 - 2
mocks/handlers.md

@@ -2874,7 +2874,7 @@ Example:
 
 | 参数名称  | 数据类型 | 默认值                | 不为空 | 描述 |
 | --------- | -------- | --------------------- | ------ | ---- |
-| deviceUri | string   | DIOS/DEVICE/Generator | true   |      |
+| deviceUri | string   | CCOS/DEVICE/Generator | true   |      |
 
 ### Response Status: 200 (OK)
 
@@ -2917,7 +2917,7 @@ Example:
 
 | 参数名称       | 数据类型 | 默认值                | 不为空 | 描述 |
 | -------------- | -------- | --------------------- | ------ | ---- |
-| deviceUri      | string   | DIOS/DEVICE/Generator | true   |      |
+| deviceUri      | string   | CCOS/DEVICE/Generator | true   |      |
 | reqName        | string   | IncParam_KV           | true   |      |
 | reqParam       | string   |                       | true   |      |
 | reqTransaction | string   |                       | true   |      |

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "zsis",
-  "version": "1.70.5",
+  "version": "1.70.6",
   "private": true,
   "description": "医学成像系统",
   "main": "main.js",

+ 1 - 1
src/API/exam/APRActions.ts

@@ -131,7 +131,7 @@ interface DeviceActionMessage {
   reqClientID: string;
 }
 
-const pathOfGenerator = 'DIOS/DEVICE/Generator';
+const pathOfGenerator = 'CCOS/DEVICE/Generator';
 
 const sendDeviceAction = async (reqName: string) => {
   const message: DeviceActionMessage = {

+ 2 - 2
src/API/exam/detectorAPI.ts

@@ -12,7 +12,7 @@ interface OpenDeviceResponse {
 
 const openDetector = async (): Promise<OpenDeviceResponse> => {
   const response = await axiosInstance.post('/auth/device/open', {
-    deviceUri: 'DIOS/DEVICE/Detector',
+    deviceUri: 'CCOS/DEVICE/Detector',
   });
   return response.data;
 };
@@ -24,7 +24,7 @@ const prepareForAcquisition = async (
   reqClientID: string
 ): Promise<OpenDeviceResponse> => {
   const response = await axiosInstance.post('/auth/device/action', {
-    deviceUri: 'DIOS/DEVICE/Detector',
+    deviceUri: 'CCOS/DEVICE/Detector',
     reqName,
     reqParam,
     reqTransaction,

+ 1 - 1
src/API/exam/deviceActions.ts

@@ -3,7 +3,7 @@ import axiosInstance from '../interceptor';
 /**
  * 对所有设备的指令
  */
-const generatorUri = 'DIOS/DEVICE/Generator';
+const generatorUri = 'CCOS/DEVICE/Generator';
 
 interface DeviceActionMessage {
   deviceUri: string;

+ 2 - 2
src/API/exam/generatorAPI.ts

@@ -12,7 +12,7 @@ interface OpenDeviceResponse {
 
 const openGenerator = async (): Promise<OpenDeviceResponse> => {
   const response = await axiosInstance.post('/auth/device/open', {
-    deviceUri: 'DIOS/DEVICE/Generator',
+    deviceUri: 'CCOS/DEVICE/Generator',
   });
   return response.data;
 };
@@ -25,7 +25,7 @@ interface DeviceActionMessage {
   reqClientID: string;
 }
 
-const pathOfGenerator = 'DIOS/DEVICE/Generator';
+const pathOfGenerator = 'CCOS/DEVICE/Generator';
 /**
  * 状态设置 。 用于demo环境。
  * @param {string} status - The sync status to set (e.g., '1', '2', '3')