This commit is contained in:
DingZQ
2025-03-22 12:49:41 +08:00
parent 8c930f1f7d
commit ea09d71604

View File

@@ -25,13 +25,18 @@ def queryallrecordsbydateproperty(date: str):
print(f'queryallrecordsbydateproperty: {date}')
try:
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property=head')
html = response.read().decode('utf-8')
#print(html)
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=link&property=flow')
html = response.read().decode('utf-8')
#print(html)
node_properties = ['head', 'pressure', 'actualdemand', 'quality']
for property in node_properties:
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=node&property={property}')
html = response.read().decode('utf-8')
#print(html)
link_properties = ['flow', 'velocity', 'headloss', 'quality']
for property in link_properties:
response = urllib.request.urlopen(f'http://localhost/queryallrecordsbydateproperty/?querydate={date}&querytype=link&property={property}')
html = response.read().decode('utf-8')
#print(html)
except urllib.error.URLError as e:
print("Error")