Commit d15c03476bb72b448488fff52fb8ef0cade7f014

Authored by xp.Huang
2 parents 852b6102 462e7fa1

Merge branch 'fix/tcp-device-send-command' into 'main_dev'

fix: 修复tcp服务命令下发

See merge request yunteng/thingskit-scada!121
@@ -16440,7 +16440,7 @@ class HandleDataInteraction { @@ -16440,7 +16440,7 @@ class HandleDataInteraction {
16440 /** 16440 /**
16441 * @type {command: string , commandType: string, service: string, wary: string, tcpCommand: string} 16441 * @type {command: string , commandType: string, service: string, wary: string, tcpCommand: string}
16442 */ 16442 */
16443 - let { command, way, service, callType } = content 16443 + let { command, way, service, callType, transportType } = content
16444 const identifier = content?.identifier 16444 const identifier = content?.identifier
16445 16445
16446 let params 16446 let params
@@ -16459,6 +16459,10 @@ class HandleDataInteraction { @@ -16459,6 +16459,10 @@ class HandleDataInteraction {
16459 params = await getTCPCommand(value, dataSource) 16459 params = await getTCPCommand(value, dataSource)
16460 } 16460 }
16461 16461
  16462 + if (transportType == 'TCP' && content?.commandType == '1') {
  16463 + params = value.replaceAll(/\s/g, '').toUpperCase()
  16464 + }
  16465 +
16462 if (!params) return 16466 if (!params) return
16463 16467
16464 if (service) { 16468 if (service) {