diff --git a/README.md b/README.md
index 23592cd..3d9f425 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ fzjgact/
1. **克隆项目**
```bash
- git clone <项目地址>
+ git clone http://124.223.26.33:3000/xiaji/fzjg_local.git
cd 分支机构活动
```
diff --git a/fzjgact/huodong/templates/branch_all.html b/fzjgact/huodong/templates/branch_all.html
index 1973787..9761be1 100644
--- a/fzjgact/huodong/templates/branch_all.html
+++ b/fzjgact/huodong/templates/branch_all.html
@@ -170,7 +170,6 @@
-
diff --git a/fzjgact/huodong/views.py b/fzjgact/huodong/views.py
index 5178861..caf6ee3 100644
--- a/fzjgact/huodong/views.py
+++ b/fzjgact/huodong/views.py
@@ -135,6 +135,8 @@ def BranchAll(request):
total_branch_count = len(branches_with_counts)
# 获取所有分支机构总数(包括没有活动的)
all_branch_count = Branch.objects.count()
+ fen_company_count = Branch.objects.filter(name__contains='分公司').count()
+ yingyebu_count = Branch.objects.filter(name__contains='营业部').count()
# 比如说end_time()的year是2024年,但是now()是2025年的2月,fileter出来,但是如果now()是2025年3月,则不显示
now = datetime.now()
print(f"当前月份是{now.month},年是{now.year}")
@@ -215,6 +217,8 @@ def BranchAll(request):
'latest_act': latest_act,
'total_branch_count':total_branch_count,
'all_branch_count': all_branch_count,
+ 'fen_company_count': fen_company_count,
+ 'yingyebu_count': yingyebu_count,
'branch_count': branch_count,
'ongoing_activities': ongoing_activities,
'total_activities': total_activities,
@@ -237,11 +241,19 @@ def Branchinfo(request):
type_a_count = branches.filter(category='A型').count()
type_b_count = branches.filter(category='B型').count()
type_c_count = branches.filter(category='C型').count()
+ all_branch_count = branches.count()
+ fen_company_count = branches.filter(name__contains='分公司').exclude(name__contains='(筹)').count()
+ yingyebu_count = branches.filter(name__contains='营业部').exclude(name__contains='(筹)').count()
+ preparing_count = branches.filter(name__contains='(筹)').count()
context = {
'branches_by_province': branches_by_province,
'type_a_count': type_a_count,
'type_b_count': type_b_count,
'type_c_count': type_c_count,
+ 'all_branch_count': all_branch_count,
+ 'fen_company_count': fen_company_count,
+ 'yingyebu_count': yingyebu_count,
+ 'preparing_count': preparing_count,
}
return render(request, 'branch_info.html', context)