Spaces:
Sleeping
Sleeping
Update flows.json
Browse files- flows.json +63 -35
flows.json
CHANGED
|
@@ -37,13 +37,14 @@
|
|
| 37 |
},
|
| 38 |
"nodes": [
|
| 39 |
"3669dccf88588c53",
|
| 40 |
-
"337dce259e3f40ec",
|
| 41 |
"1c6ca2674ef8a478",
|
| 42 |
-
"21747cce1c8e8b69"
|
|
|
|
|
|
|
| 43 |
],
|
| 44 |
"x": 34,
|
| 45 |
-
"y":
|
| 46 |
-
"w":
|
| 47 |
"h": 82
|
| 48 |
},
|
| 49 |
{
|
|
@@ -62,7 +63,7 @@
|
|
| 62 |
"1d78dc7e20a94f0f"
|
| 63 |
],
|
| 64 |
"x": 34,
|
| 65 |
-
"y":
|
| 66 |
"w": 752,
|
| 67 |
"h": 82
|
| 68 |
},
|
|
@@ -252,30 +253,13 @@
|
|
| 252 |
"senderr": false,
|
| 253 |
"headers": [],
|
| 254 |
"x": 280,
|
| 255 |
-
"y":
|
| 256 |
"wires": [
|
| 257 |
[
|
| 258 |
"21747cce1c8e8b69"
|
| 259 |
]
|
| 260 |
]
|
| 261 |
},
|
| 262 |
-
{
|
| 263 |
-
"id": "337dce259e3f40ec",
|
| 264 |
-
"type": "debug",
|
| 265 |
-
"z": "fa36f2aea8694548",
|
| 266 |
-
"g": "249a6593b77d86f9",
|
| 267 |
-
"name": "debug 1",
|
| 268 |
-
"active": true,
|
| 269 |
-
"tosidebar": true,
|
| 270 |
-
"console": false,
|
| 271 |
-
"tostatus": false,
|
| 272 |
-
"complete": "false",
|
| 273 |
-
"statusVal": "",
|
| 274 |
-
"statusType": "auto",
|
| 275 |
-
"x": 580,
|
| 276 |
-
"y": 340,
|
| 277 |
-
"wires": []
|
| 278 |
-
},
|
| 279 |
{
|
| 280 |
"id": "1c6ca2674ef8a478",
|
| 281 |
"type": "inject",
|
|
@@ -291,7 +275,7 @@
|
|
| 291 |
"vt": "str"
|
| 292 |
}
|
| 293 |
],
|
| 294 |
-
"repeat": "
|
| 295 |
"crontab": "",
|
| 296 |
"once": false,
|
| 297 |
"onceDelay": 0.1,
|
|
@@ -299,7 +283,7 @@
|
|
| 299 |
"payload": "",
|
| 300 |
"payloadType": "date",
|
| 301 |
"x": 140,
|
| 302 |
-
"y":
|
| 303 |
"wires": [
|
| 304 |
[
|
| 305 |
"3669dccf88588c53"
|
|
@@ -315,11 +299,11 @@
|
|
| 315 |
"property": "payload",
|
| 316 |
"action": "",
|
| 317 |
"pretty": false,
|
| 318 |
-
"x":
|
| 319 |
-
"y":
|
| 320 |
"wires": [
|
| 321 |
[
|
| 322 |
-
"
|
| 323 |
]
|
| 324 |
]
|
| 325 |
},
|
|
@@ -348,7 +332,7 @@
|
|
| 348 |
}
|
| 349 |
],
|
| 350 |
"x": 280,
|
| 351 |
-
"y":
|
| 352 |
"wires": [
|
| 353 |
[
|
| 354 |
"74761521d6f20043"
|
|
@@ -370,7 +354,7 @@
|
|
| 370 |
"vt": "str"
|
| 371 |
}
|
| 372 |
],
|
| 373 |
-
"repeat": "
|
| 374 |
"crontab": "",
|
| 375 |
"once": false,
|
| 376 |
"onceDelay": 0.1,
|
|
@@ -378,7 +362,7 @@
|
|
| 378 |
"payload": "",
|
| 379 |
"payloadType": "date",
|
| 380 |
"x": 140,
|
| 381 |
-
"y":
|
| 382 |
"wires": [
|
| 383 |
[
|
| 384 |
"9d78ce6e52ba16d5"
|
|
@@ -403,7 +387,7 @@
|
|
| 403 |
"senderr": false,
|
| 404 |
"headers": [],
|
| 405 |
"x": 700,
|
| 406 |
-
"y":
|
| 407 |
"wires": [
|
| 408 |
[]
|
| 409 |
]
|
|
@@ -418,7 +402,7 @@
|
|
| 418 |
"action": "",
|
| 419 |
"pretty": true,
|
| 420 |
"x": 410,
|
| 421 |
-
"y":
|
| 422 |
"wires": [
|
| 423 |
[
|
| 424 |
"2ecbefab5b092fcd"
|
|
@@ -430,7 +414,7 @@
|
|
| 430 |
"type": "function",
|
| 431 |
"z": "fa36f2aea8694548",
|
| 432 |
"g": "d1a03a3787fecadc",
|
| 433 |
-
"name": "
|
| 434 |
"func": "msg.payload = msg.payload.data.list\nreturn msg;",
|
| 435 |
"outputs": 1,
|
| 436 |
"timeout": 0,
|
|
@@ -439,11 +423,55 @@
|
|
| 439 |
"finalize": "",
|
| 440 |
"libs": [],
|
| 441 |
"x": 540,
|
| 442 |
-
"y":
|
| 443 |
"wires": [
|
| 444 |
[
|
| 445 |
"1d78dc7e20a94f0f"
|
| 446 |
]
|
| 447 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
}
|
| 449 |
]
|
|
|
|
| 37 |
},
|
| 38 |
"nodes": [
|
| 39 |
"3669dccf88588c53",
|
|
|
|
| 40 |
"1c6ca2674ef8a478",
|
| 41 |
+
"21747cce1c8e8b69",
|
| 42 |
+
"9a1af788832a1aea",
|
| 43 |
+
"e0e50f0fe514c9a3"
|
| 44 |
],
|
| 45 |
"x": 34,
|
| 46 |
+
"y": 259,
|
| 47 |
+
"w": 792,
|
| 48 |
"h": 82
|
| 49 |
},
|
| 50 |
{
|
|
|
|
| 63 |
"1d78dc7e20a94f0f"
|
| 64 |
],
|
| 65 |
"x": 34,
|
| 66 |
+
"y": 359,
|
| 67 |
"w": 752,
|
| 68 |
"h": 82
|
| 69 |
},
|
|
|
|
| 253 |
"senderr": false,
|
| 254 |
"headers": [],
|
| 255 |
"x": 280,
|
| 256 |
+
"y": 300,
|
| 257 |
"wires": [
|
| 258 |
[
|
| 259 |
"21747cce1c8e8b69"
|
| 260 |
]
|
| 261 |
]
|
| 262 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
{
|
| 264 |
"id": "1c6ca2674ef8a478",
|
| 265 |
"type": "inject",
|
|
|
|
| 275 |
"vt": "str"
|
| 276 |
}
|
| 277 |
],
|
| 278 |
+
"repeat": "150",
|
| 279 |
"crontab": "",
|
| 280 |
"once": false,
|
| 281 |
"onceDelay": 0.1,
|
|
|
|
| 283 |
"payload": "",
|
| 284 |
"payloadType": "date",
|
| 285 |
"x": 140,
|
| 286 |
+
"y": 300,
|
| 287 |
"wires": [
|
| 288 |
[
|
| 289 |
"3669dccf88588c53"
|
|
|
|
| 299 |
"property": "payload",
|
| 300 |
"action": "",
|
| 301 |
"pretty": false,
|
| 302 |
+
"x": 410,
|
| 303 |
+
"y": 300,
|
| 304 |
"wires": [
|
| 305 |
[
|
| 306 |
+
"9a1af788832a1aea"
|
| 307 |
]
|
| 308 |
]
|
| 309 |
},
|
|
|
|
| 332 |
}
|
| 333 |
],
|
| 334 |
"x": 280,
|
| 335 |
+
"y": 400,
|
| 336 |
"wires": [
|
| 337 |
[
|
| 338 |
"74761521d6f20043"
|
|
|
|
| 354 |
"vt": "str"
|
| 355 |
}
|
| 356 |
],
|
| 357 |
+
"repeat": "60",
|
| 358 |
"crontab": "",
|
| 359 |
"once": false,
|
| 360 |
"onceDelay": 0.1,
|
|
|
|
| 362 |
"payload": "",
|
| 363 |
"payloadType": "date",
|
| 364 |
"x": 140,
|
| 365 |
+
"y": 400,
|
| 366 |
"wires": [
|
| 367 |
[
|
| 368 |
"9d78ce6e52ba16d5"
|
|
|
|
| 387 |
"senderr": false,
|
| 388 |
"headers": [],
|
| 389 |
"x": 700,
|
| 390 |
+
"y": 400,
|
| 391 |
"wires": [
|
| 392 |
[]
|
| 393 |
]
|
|
|
|
| 402 |
"action": "",
|
| 403 |
"pretty": true,
|
| 404 |
"x": 410,
|
| 405 |
+
"y": 400,
|
| 406 |
"wires": [
|
| 407 |
[
|
| 408 |
"2ecbefab5b092fcd"
|
|
|
|
| 414 |
"type": "function",
|
| 415 |
"z": "fa36f2aea8694548",
|
| 416 |
"g": "d1a03a3787fecadc",
|
| 417 |
+
"name": "提取信息",
|
| 418 |
"func": "msg.payload = msg.payload.data.list\nreturn msg;",
|
| 419 |
"outputs": 1,
|
| 420 |
"timeout": 0,
|
|
|
|
| 423 |
"finalize": "",
|
| 424 |
"libs": [],
|
| 425 |
"x": 540,
|
| 426 |
+
"y": 400,
|
| 427 |
"wires": [
|
| 428 |
[
|
| 429 |
"1d78dc7e20a94f0f"
|
| 430 |
]
|
| 431 |
]
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"id": "9a1af788832a1aea",
|
| 435 |
+
"type": "function",
|
| 436 |
+
"z": "fa36f2aea8694548",
|
| 437 |
+
"g": "249a6593b77d86f9",
|
| 438 |
+
"name": "提取信息",
|
| 439 |
+
"func": "var plate = msg.payload.data.plate\nvar images = msg.payload.data.orderList[0].imageURLs\nvar intime = msg.payload.data.orderList[0].inTime\nvar parkingTime = msg.payload.data.orderList[0].parkingTime\nvar amountPayable = msg.payload.data.orderList[0].amountPayable\n\n// 假设从 msg.payload 中获取分钟数 \nconst minutes = parkingTime; \n \n// 计算小时数 \nconst hours = Math.floor(minutes / 60); \n \n// 计算剩余分钟数 \nconst remainingMinutes = minutes % 60; \n \n// 格式化输出 \nconst formattedTime = `${hours} 小时 ${remainingMinutes} 分钟`; \n \n// 指定时长 (3小时25分钟)\nconst targetTime = \"205\"; \n \n// 判断时间差是否达到指定时长 \nif (parkingTime >= targetTime) {{ \n // 这里可以添加具体的提示逻辑,例如通过 msg 发送消息到其他节点 \n var tips = \"on\"; \n}} else {{ \n var tips = \"off\"; \n}} \n\nmsg.payload = {\n plate: plate,\n imaUrl: images, // 入场照片\n intime: intime,\n parkingTime: formattedTime,\n tips: tips,\n amountPayable: amountPayable\n};\nreturn msg;\n",
|
| 440 |
+
"outputs": 1,
|
| 441 |
+
"timeout": 0,
|
| 442 |
+
"noerr": 0,
|
| 443 |
+
"initialize": "",
|
| 444 |
+
"finalize": "",
|
| 445 |
+
"libs": [],
|
| 446 |
+
"x": 560,
|
| 447 |
+
"y": 300,
|
| 448 |
+
"wires": [
|
| 449 |
+
[
|
| 450 |
+
"e0e50f0fe514c9a3"
|
| 451 |
+
]
|
| 452 |
+
]
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"id": "e0e50f0fe514c9a3",
|
| 456 |
+
"type": "http request",
|
| 457 |
+
"z": "fa36f2aea8694548",
|
| 458 |
+
"g": "249a6593b77d86f9",
|
| 459 |
+
"name": "parking",
|
| 460 |
+
"method": "POST",
|
| 461 |
+
"ret": "txt",
|
| 462 |
+
"paytoqs": "ignore",
|
| 463 |
+
"url": "https://push.727283671.xyz:4443/parking",
|
| 464 |
+
"tls": "",
|
| 465 |
+
"persist": false,
|
| 466 |
+
"proxy": "",
|
| 467 |
+
"insecureHTTPParser": false,
|
| 468 |
+
"authType": "",
|
| 469 |
+
"senderr": false,
|
| 470 |
+
"headers": [],
|
| 471 |
+
"x": 740,
|
| 472 |
+
"y": 300,
|
| 473 |
+
"wires": [
|
| 474 |
+
[]
|
| 475 |
+
]
|
| 476 |
}
|
| 477 |
]
|