def addContent1(document,context,startYear,path): addTitle(document, "七、企业合并及合并财务报表", 1, False) addTitle(document, "(一)子企业情况", 2, True) df = filterDateFrame("子企业情况-国有企业",path,conditions=("持股比例(%)",)) # df = pd.read_excel(path, sheet_name="子企业情况-国有企业") dc = df.to_dict("split") addTable(document, dc, style=6)
def addContent6(document,context,startYear,path): df = filterDateFrame("本年不再纳入合并范围原子公司的情况-国有企业", path, conditions=("持股比例(%)",)) # df = pd.read_excel(path, sheet_name="本年不再纳入合并范围原子公司的情况-国有企业") dc = df.to_dict("split") addTitle(document, "(六)本年不再纳入合并范围的原子公司", 2, True) if len(dc["data"])==0: addParagraph(document, "不适用", "paragraph") else: addParagraph(document,"1、本年不再纳入合并范围原子公司的情况","paragraph") addTable(document, dc, style=6) addParagraph(document,"2、原子公司在处置日和上一会计期间资产负债表日的财务状况","paragraph") df = filterDateFrame("原子公司在处置日和上一会计期间资产负债表日的财务状况-国有企业", path, conditions=("处置日资产总额"),) # df = pd.read_excel(path, sheet_name="原子公司在处置日和上一会计期间资产负债表日的财务状况-国有企业") dc = df.to_dict("split") if len(dc["data"])==0: addParagraph(document, "不适用", "paragraph") else: titles = [["原子公司名称","处置日","处置日","nan","nan","上期末","nan","nan"],["nan","nan","资产总额","负债总额","所有者权益总额","资产总额","负债总额","所有者权益总额"]] titleLength = len(titles) rowLength = len(dc["index"]) + titleLength columnLength = len(dc["columns"]) table = createBorderedTable(document,rowLength,columnLength) addCombineTableTitle(table,titles) addContentToCombineTitle(document, dc, table, titleLength, style=3) addParagraph(document,"3、原子公司本年年初至处置日的经营成果","paragraph") df = filterDateFrame("原子公司本年年初至处置日的经营成果-国有企业", path, conditions=("本年初至处置日净利润"), ) # df = pd.read_excel(path, sheet_name="原子公司本年年初至处置日的经营成果-国有企业") dc = df.to_dict("split") if len(dc["data"])==0: addParagraph(document, "不适用", "paragraph") else: titles = [["原子公司名称","处置日","本年初至处置日","nan","nan"],["nan","nan","收入","费用","净利润"]] titleLength = len(titles) rowLength = len(dc["index"]) + titleLength columnLength = len(dc["columns"]) table = createBorderedTable(document,rowLength,columnLength) addCombineTableTitle(table,titles) addContentToCombineTitle(document, dc, table, titleLength, style=3)
def addContent8(document,context,startYear,path): addTitle(document, "(八)本年发生的同一控制下企业合并情况", 2, True) df = filterDateFrame("本年发生的同一控制下企业合并情况-国有企业", path, conditions=("合并日账面净资产",)) # df = pd.read_excel(path, sheet_name="本年发生的同一控制下企业合并情况-国有企业") dc = df.to_dict("split") if len(dc["data"])==0: addParagraph(document, "不适用", "paragraph") else: titles = [["公司名称","合并日","合并日确定依据","合并日账面净资产","交易对价","实际控制人","本年初至合并日的相关情况","nan","nan","nan"],["nan","nan","nan","nan","nan","nan","收入","净利润","现金净增加额","经营活动现金流量净额"]] titleLength = len(titles) rowLength = len(dc["index"]) + titleLength columnLength = len(dc["columns"]) table = createBorderedTable(document,rowLength,columnLength) addCombineTableTitle(table,titles) addContentToCombineTitle(document, dc, table, titleLength, style=3)
def addContent3(document,context,startYear,path): addTitle(document, "(三)母公司直接或通过其他子公司间接拥有被投资单位半数以上表决权但未能对其形成控制的原因", 2, True) df = filterDateFrame("半数以上表决权但未控制-国有企业", path, conditions=("持股比例(%)",)) # df = pd.read_excel(path, sheet_name="半数以上表决权但未控制-国有企业") dc = df.to_dict("split") addTable(document, dc, style=6)
def addContent2(document,context,startYear,path): addTitle(document, "(二)母公司拥有被投资单位表决权不足半数但能对被投资单位形成控制的原因", 2, True) df = filterDateFrame("表决权不足半数但能形成控制-国有企业", path, conditions=("持股比例(%)",)) # df = pd.read_excel(path, sheet_name="表决权不足半数但能形成控制-国有企业") dc = df.to_dict("split") addTable(document, dc, style=6)
def addContent11(document,context,startYear,path): addTitle(document, "(十一)本年发生的吸收合并", 2, True) df = filterDateFrame("本年发生的吸收合并-国有企业", path, conditions=("资产金额",)) # df = pd.read_excel(path, sheet_name="本年发生的吸收合并-国有企业") dc = df.to_dict("split") addTable(document, dc, style=6)
def addContent9(document,context,startYear,path): addTitle(document, "(九)本年发生的非同一控制下企业合并情况", 2, True) df = filterDateFrame("本年发生的非同一控制下企业合并情况-国有企业", path, conditions=("账面净资产",)) # df = pd.read_excel(path, sheet_name="本年发生的非同一控制下企业合并情况-国有企业") dc = df.to_dict("split") addTable(document, dc, style=6)
def addContent7(document,context,startYear,path): addTitle(document, "(七)本年新纳入合并范围的主体", 2, True) df = filterDateFrame("本年新纳入合并范围的主体-国有企业", path, conditions=("年末净资产",)) # df = pd.read_excel(path, sheet_name="本年新纳入合并范围的主体-国有企业") dc = df.to_dict("split") addTable(document, dc, style=6)