Commit 95609c3672dc71b8bfb0070f113eddd85aa7bbac

Authored by ww
1 parent 2876552a

fix: 修复设备列表下发命令tcp命令存在服务标识符

@@ -75,13 +75,11 @@ @@ -75,13 +75,11 @@
75 command.params = 75 command.params =
76 transportType === TransportTypeEnum.TCP 76 transportType === TransportTypeEnum.TCP
77 ? field[CommandFieldsEnum.TCP_SERVICE] 77 ? field[CommandFieldsEnum.TCP_SERVICE]
78 - : field[CommandFieldsEnum.MODEL_INPUT]; 78 + : {
  79 + [field[CommandFieldsEnum.SERVICE]]: field[CommandFieldsEnum.MODEL_INPUT],
  80 + };
79 command.additionalInfo = { cmdType: 1 }; 81 command.additionalInfo = { cmdType: 1 };
80 - command.params = {  
81 - [field[CommandFieldsEnum.SERVICE]]: command.params,  
82 - };  
83 } 82 }
84 -  
85 commandIssuanceApi( 83 commandIssuanceApi(
86 field[CommandFieldsEnum.CUSTOM_TYPE] as CommandDeliveryWayEnum, 84 field[CommandFieldsEnum.CUSTOM_TYPE] as CommandDeliveryWayEnum,
87 props.deviceDetail.tbDeviceId, 85 props.deviceDetail.tbDeviceId,
@@ -277,7 +277,7 @@ @@ -277,7 +277,7 @@
277 277
278 const isCustomCommand = Number(value.commandType) === CommandTypeEnum.CUSTOM; 278 const isCustomCommand = Number(value.commandType) === CommandTypeEnum.CUSTOM;
279 279
280 - const thingsModelKeys = Reflect.get(value, 'thingsModelKeys'); 280 + const thingsModelKeys = Reflect.get(value, 'thingsModelKeys') || [];
281 281
282 if (!isCustomCommand) { 282 if (!isCustomCommand) {
283 for (const key of thingsModelKeys) { 283 for (const key of thingsModelKeys) {