Commit 748c9a7b by dong

fix20230201

parent ca83f1ef
...@@ -89,6 +89,8 @@ def project_stalker(): ...@@ -89,6 +89,8 @@ def project_stalker():
def project_map(): def project_map():
req_dic = request.get_json() req_dic = request.get_json()
district_name = req_dic['district_name'] district_name = req_dic['district_name']
# current_year = datetime.now().year
current_year = '2022'
try: try:
project_obj_count1 = 0 project_obj_count1 = 0
project_obj_count2 = 0 project_obj_count2 = 0
...@@ -98,11 +100,11 @@ def project_map(): ...@@ -98,11 +100,11 @@ def project_map():
ProjectManagement.is_delete == 0 ProjectManagement.is_delete == 0
).all() ).all()
for project_obj in project_obj_list: for project_obj in project_obj_list:
if project_obj.sign_time: if project_obj.sign_time and current_year in project_obj.sign_time:
project_obj_count1 += 1 project_obj_count1 += 1
if project_obj.start_time: if project_obj.start_time and current_year in project_obj.start_time:
project_obj_count2 += 1 project_obj_count2 += 1
if project_obj.end_time: if project_obj.end_time and current_year in project_obj.end_time:
project_obj_count3 += 1 project_obj_count3 += 1
data = { data = {
"project_obj_count1": project_obj_count1, "project_obj_count1": project_obj_count1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment