        d=Document(f/'source.docx');missing=[]
        for p in d.paragraphs:
            for key in ['company','contact','phone']:
                if '{{'+key+'}}' in p.text:
                    value=output.get(key)
                    if value is None:missing.append(key);value='[[待确认:'+key+']]'
                    p.text=p.text.replace('{{'+key+'}}',str(value))
        d.save(f/'filled-template.docx');text='\n'.join(p.text for p in Document(f/'filled-template.docx').paragraphs);ck('缺失电话保持待确认',output.get('phone') is None and missing==['phone'] and '[[待确认:phone]]' in text);ck('已给公司与联系人正确','星海实验室' in text and '林青' in text);dump(f/'missing-fields.json',missing);result={'missing':missing,'text':text};art+=['missing-fields.json'];add_native(f/'filled-template.docx')
