优化案件模块
This commit is contained in:
@@ -1758,11 +1758,15 @@ class caseManagementDetail(APIView):
|
||||
if not closing_application_list:
|
||||
closing_application_list = ""
|
||||
|
||||
# 将 AgencyContract 和 Closingapplication 字段的空数组转换为空字符串
|
||||
# 将 AgencyContract、Contractreturn 和 Closingapplication 字段的空数组转换为空字符串
|
||||
agency_contract_str = info.AgencyContract or ""
|
||||
if agency_contract_str.strip() in ["[]", ""]:
|
||||
agency_contract_str = ""
|
||||
|
||||
contractreturn_str = info.Contractreturn or ""
|
||||
if contractreturn_str.strip() in ["[]", ""]:
|
||||
contractreturn_str = ""
|
||||
|
||||
closing_application_str = info.Closingapplication or ""
|
||||
if closing_application_str.strip() in ["[]", ""]:
|
||||
closing_application_str = ""
|
||||
@@ -1781,6 +1785,19 @@ class caseManagementDetail(APIView):
|
||||
invoice_status_value = normalize_amount_value(info.invoice_status)
|
||||
paymentcollection_value = normalize_amount_value(info.paymentcollection)
|
||||
|
||||
# 将 AgencyContract、Contractreturn 和 Closingapplication 字段的空数组转换为空字符串
|
||||
agency_contract_str = info.AgencyContract or ""
|
||||
if agency_contract_str.strip() in ["[]", ""]:
|
||||
agency_contract_str = ""
|
||||
|
||||
contractreturn_str = info.Contractreturn or ""
|
||||
if contractreturn_str.strip() in ["[]", ""]:
|
||||
contractreturn_str = ""
|
||||
|
||||
closing_application_str = info.Closingapplication or ""
|
||||
if closing_application_str.strip() in ["[]", ""]:
|
||||
closing_application_str = ""
|
||||
|
||||
# 获取案件标签
|
||||
tags = info.tags.filter(is_deleted=False)
|
||||
tag_list = []
|
||||
@@ -1814,7 +1831,7 @@ class caseManagementDetail(APIView):
|
||||
'times': info.times or "", # 立案时间(没有数据时返回空字符串)
|
||||
"AgencyContract": agency_contract_str, # 代理合同(JSON字符串,没有文件时返回空字符串)
|
||||
"AgencyContractUrls": agency_contract_list if agency_contract_list else "", # 代理合同(URL列表,没有文件时返回空字符串)
|
||||
"Contractreturn": info.Contractreturn or "", # 合同返还(没有数据时返回空字符串)
|
||||
"Contractreturn": contractreturn_str, # 合同返还(没有数据时返回空字符串)
|
||||
"Closingapplication": closing_application_str, # 结案申请(JSON字符串,没有文件时返回空字符串)
|
||||
"ClosingapplicationUrls": closing_application_list if closing_application_list else "", # 结案申请(URL列表,没有文件时返回空字符串)
|
||||
"ChangeRequest": info.ChangeRequest or "", # 变更申请(兼容旧字段,没有数据时返回空字符串)
|
||||
@@ -4889,11 +4906,15 @@ class CaseListByTag(APIView):
|
||||
if not closing_application_list:
|
||||
closing_application_list = ""
|
||||
|
||||
# 将 AgencyContract 和 Closingapplication 字段的空数组转换为空字符串
|
||||
# 将 AgencyContract、Contractreturn 和 Closingapplication 字段的空数组转换为空字符串
|
||||
agency_contract_str = info.AgencyContract or ""
|
||||
if agency_contract_str.strip() in ["[]", ""]:
|
||||
agency_contract_str = ""
|
||||
|
||||
contractreturn_str = info.Contractreturn or ""
|
||||
if contractreturn_str.strip() in ["[]", ""]:
|
||||
contractreturn_str = ""
|
||||
|
||||
closing_application_str = info.Closingapplication or ""
|
||||
if closing_application_str.strip() in ["[]", ""]:
|
||||
closing_application_str = ""
|
||||
@@ -4924,7 +4945,7 @@ class CaseListByTag(APIView):
|
||||
'times': info.times,
|
||||
"AgencyContract": agency_contract_str, # 代理合同(JSON字符串,没有文件时返回空字符串)
|
||||
"AgencyContractUrls": agency_contract_list if agency_contract_list else "", # 代理合同(URL列表,没有文件时返回空字符串)
|
||||
"Contractreturn": info.Contractreturn,
|
||||
"Contractreturn": contractreturn_str, # 合同返还(没有数据时返回空字符串)
|
||||
"Closingapplication": closing_application_str, # 结案申请(JSON字符串,没有文件时返回空字符串)
|
||||
"ClosingapplicationUrls": closing_application_list if closing_application_list else "", # 结案申请(URL列表,没有文件时返回空字符串)
|
||||
"ChangeRequest": info.ChangeRequest,
|
||||
|
||||
Reference in New Issue
Block a user