From c326341d6efd5f01068b8b240464c87698073163 Mon Sep 17 00:00:00 2001 From: P3ngSaM <61768364+P3ngSaM@users.noreply.github.com> Date: Mon, 9 May 2022 17:05:05 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=8A=A5=E5=91=8A=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Report/ReportImpl.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Report/ReportImpl.py b/Report/ReportImpl.py index 81c4f3f..4ce1014 100644 --- a/Report/ReportImpl.py +++ b/Report/ReportImpl.py @@ -138,7 +138,23 @@ class HandleReportData: def handle_part_07(): """ - 荣誉资质 + 荣誉资质(制造业) + 荣誉资质共六段,如果返回数据长度为1,则此企业没有荣誉资质,只显示最后一段话, + 如果长度大于1,则先处理第一段和第二段,第一段中返回字段存在无则删除此段 + """ + if len(data['资质荣誉']) == 1: + param[6]['小节内容'] = list() + describe = dict() + describe['段落'] = '经查询,公司无技术、产品品质或品牌等方面的荣誉资质。' + param[6]['小节内容'].append(describe) + else: + param[6]['小节内容'][0]['段落'] = param[6]['小节内容'][0]['段落'].format(**data['资质荣誉'][0]) + param[6]['小节内容'][1]['段落'] = param[6]['小节内容'][1]['段落'].format(**data['资质荣誉'][1]) + param[6]['小节内容'][-2]['表格'] = data['资质荣誉'][2] + + def handle_part_07_info(): + """ + 荣誉资质(信息技术业) 荣誉资质共六段,如果返回数据长度为1,则此企业没有荣誉资质,只显示最后一段话, 如果长度大于1,则先处理第一段和第二段,第一段中返回字段存在无则删除此段 """ @@ -168,7 +184,10 @@ class HandleReportData: handle_part_04() handle_part_05() handle_part_06() - handle_part_07() + if self.report_data['行业选择'][0] == '制造业': + handle_part_07() + else: + handle_part_07_info() return param def handle_paragraph_03(param):