投标待办加入提交人
This commit is contained in:
18
User/migrations/0003_approval_applicant.py
Normal file
18
User/migrations/0003_approval_applicant.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('User', '0002_approval_rejection_reason'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='approval',
|
||||
name='applicant',
|
||||
field=models.CharField(blank=True, max_length=100, null=True),
|
||||
),
|
||||
]
|
||||
@@ -1409,8 +1409,19 @@ class roxyExhibition(APIView):
|
||||
itme["project_conflicts"] = []
|
||||
itme["bid_conflicts"] = []
|
||||
|
||||
# 如果是投标登记类型,检索冲突信息并添加到返回字段(与立项相同逻辑)
|
||||
# 如果是投标登记类型:返回提交人、冲突信息等(与立项相同逻辑)
|
||||
if info.type == "投标登记":
|
||||
# 提交人:优先从 Approval.applicant 取,否则从 content 解析「申请人:xxx」
|
||||
submitter = getattr(info, 'applicant', None)
|
||||
if not submitter and content and "申请人:" in content:
|
||||
import re
|
||||
m = re.search(r'申请人:([^,→\s]+)', content)
|
||||
if m:
|
||||
submitter = m.group(1).strip()
|
||||
itme["submitter"] = submitter or ""
|
||||
# 将提交人拼接到待办展示信息(content)中,便于列表一眼看到
|
||||
if submitter and ("提交人:" not in (itme.get("content") or "")):
|
||||
itme["content"] = (itme.get("content") or "").rstrip() + ",提交人:" + submitter
|
||||
try:
|
||||
from business.views import conflict_search
|
||||
bid_id = int(info.user_id)
|
||||
|
||||
Reference in New Issue
Block a user