import re body=r''' {"id":${BXbiztripinfoID_10},"msg":"1234測試審批${__UUID}","bussJson":"{\"companyId\":${__P(orgId,)},\"createUser\":${__P(userId,)},\"auditState\":2,\"orderNo\":\"${BXorderNo_10}\",\"dtContentDetail\":{\"templateId\":${__P(ReimbursementTemplateID,)},\"dtContent\":\"{\\\\\"companyid\\\\\":0,\\\\\"createtime\\\\\":1526371599000,\\\\\"dtComponentList\\\\\":[{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11015,\\\\\"createtime\\\\\":1540883126000,\\\\\"data\\\\\":\\\\\"[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)}}]\\\\\",\\\\\"id\\\\\":143940,\\\\\"label\\\\\":\\\\\"多人報銷\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請選擇報銷人\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"1\\\\\",\\\\\"type\\\\\":\\\\\"select\\\\\",\\\\\"value\\\\\":\\\\\"[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)}}]\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11001,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"${__P(profitCenterName,)}\\\\\",\\\\\"id\\\\\":15603,\\\\\"label\\\\\":\\\\\"單位名稱\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"placeholder\\\\\":\\\\\"請選擇利潤中心\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"1\\\\\",\\\\\"type\\\\\":\\\\\"select\\\\\",\\\\\"value\\\\\":\\\\\"${__P(profitCenterName,)}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11010,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"${__P(costCenterName,)}\\\\\",\\\\\"id\\\\\":15610,\\\\\"label\\\\\":\\\\\"部門\\\\\",\\\\\"maxlen\\\\\":50,\\\\\"placeholder\\\\\":\\\\\"請選擇部門\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"1\\\\\",\\\\\"type\\\\\":\\\\\"text\\\\\",\\\\\"value\\\\\":\\\\\"${__P(costCenter,)}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11002,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"{\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"成本中心\\\\\\\\\\\\\"}\\\\\",\\\\\"id\\\\\":15604,\\\\\"label\\\\\":\\\\\"成本分配\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"options\\\\\":\\\\\"[{\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"成本中心\\\\\\\\\\\\\",\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"1\\\\\\\\\\\\\"},{\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"WBS\\\\\\\\\\\\\",\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"2\\\\\\\\\\\\\"},{\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"內部訂單號\\\\\\\\\\\\\",\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"3\\\\\\\\\\\\\"},{\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"成本中心\\\\u0026WBS\\\\\\\\\\\\\",\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"4\\\\\\\\\\\\\"},{\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"成本中心\\\\u0026內部訂單號\\\\\\\\\\\\\",\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"5\\\\\\\\\\\\\"}]\\\\\",\\\\\"optionsJsonObject\\\\\":[{\\\\\"label\\\\\":\\\\\"成本中心\\\\\",\\\\\"value\\\\\":\\\\\"1\\\\\"},{\\\\\"label\\\\\":\\\\\"WBS\\\\\",\\\\\"value\\\\\":\\\\\"2\\\\\"},{\\\\\"label\\\\\":\\\\\"內部訂單號\\\\\",\\\\\"value\\\\\":\\\\\"3\\\\\"},{\\\\\"label\\\\\":\\\\\"成本中心\\\\u0026WBS\\\\\",\\\\\"value\\\\\":\\\\\"4\\\\\"},{\\\\\"label\\\\\":\\\\\"成本中心\\\\u0026內部訂單號\\\\\",\\\\\"value\\\\\":\\\\\"5\\\\\"}],\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"childred\\\\\\\\\\\\\":{\\\\\\\\\\\\\"bizAlias\\\\\\\\\\\\\":\\\\\\\\\\\\\"costTypeAddInfo\\\\\\\\\\\\\",\\\\\\\\\\\\\"placeholder\\\\\\\\\\\\\":\\\\\\\\\\\\\"\\\\\\\\\\\\\",\\\\\\\\\\\\\"required\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"text\\\\\\\\\\\\\"}}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請選擇成本分配\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"1\\\\\",\\\\\"type\\\\\":\\\\\"select\\\\\",\\\\\"value\\\\\":\\\\\"{\\\\\\\\\\\\\"value\\\\\\\\\\\\\":\\\\\\\\\\\\\"1\\\\\\\\\\\\\"}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11013,\\\\\"createtime\\\\\":1537521553000,\\\\\"data\\\\\":\\\\\"生產成本\\\\\",\\\\\"id\\\\\":143292,\\\\\"label\\\\\":\\\\\"費用類型\\\\\",\\\\\"maxlen\\\\\":50,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請選擇費用類型\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"1\\\\\",\\\\\"type\\\\\":\\\\\"select\\\\\",\\\\\"value\\\\\":\\\\\"14\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11011,\\\\\"createtime\\\\\":1544508206000,\\\\\"data\\\\\":\\\\\"${__Random(1,99999,)}\\\\\",\\\\\"id\\\\\":144699,\\\\\"label\\\\\":\\\\\"出差天數\\\\\",\\\\\"maxlen\\\\\":3,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"isautocal\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"maxNumber\\\\\\\\\\\\\":3,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請輸入出差天數\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"3\\\\\",\\\\\"type\\\\\":\\\\\"text_number\\\\\",\\\\\"value\\\\\":\\\\\"${__Random(1,99999,)}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11003,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"${__Random(1,99999,)}\\\\\",\\\\\"id\\\\\":15605,\\\\\"label\\\\\":\\\\\"附件張數\\\\\",\\\\\"maxlen\\\\\":3,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"maxNumber\\\\\\\\\\\\\":3,\\\\\\\\\\\\\"settingNumber\\\\\\\\\\\\\":true}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請輸入附件張數\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"3\\\\\",\\\\\"type\\\\\":\\\\\"text_num\\\\\",\\\\\"value\\\\\":\\\\\"${__Random(1,99999,)}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11021,\\\\\"createtime\\\\\":1544584818000,\\\\\"data\\\\\":\\\\\"1234測試報銷事由${__UUID}\\\\\",\\\\\"id\\\\\":144735,\\\\\"label\\\\\":\\\\\"報銷事由\\\\\",\\\\\"maxlen\\\\\":200,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請填寫報銷事由\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"4\\\\\",\\\\\"type\\\\\":\\\\\"text\\\\\",\\\\\"value\\\\\":\\\\\"1234測試報銷事由${__UUID}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11014,\\\\\"createtime\\\\\":1538247854000,\\\\\"data\\\\\":\\\\\"\\\\\",\\\\\"id\\\\\":143543,\\\\\"label\\\\\":\\\\\"上傳圖像\\\\\",\\\\\"maxlen\\\\\":80,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"maxlen\\\\\\\\\\\\\":80,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false,\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":80,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"請選擇需要上傳的圖像\\\\\",\\\\\"required\\\\\":\\\\\"false\\\\\",\\\\\"style\\\\\":\\\\\"1\\\\\",\\\\\"type\\\\\":\\\\\"file\\\\\",\\\\\"value\\\\\":\\\\\"\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11017,\\\\\"createtime\\\\\":1542961359000,\\\\\"data\\\\\":\\\\\"{\\\\\\\\\\\\\"foodFee\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum}}],\\\\\\\\\\\\\"publicFee\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum}}]}\\\\\",\\\\\"id\\\\\":144294,\\\\\"label\\\\\":\\\\\"多人差旅補助\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"showEdit\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"newTemId\\\\\\\\\\\\\":0,\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canEdit\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"approvermodify\\\\\\\\\\\\\":false,\\\\\\\\\\\\\"bizAlias\\\\\\\\\\\\\":\\\\\\\\\\\\\"foodFee\\\\\\\\\\\\\",\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"伙食補助\\\\\\\\\\\\\",\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"text\\\\\\\\\\\\\",\\\\\\\\\\\\\"required\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"parentId\\\\\\\\\\\\\":11017,\\\\\\\\\\\\\"showList\\\\\\\\\\\\\":\\\\\\\\\\\\\"false\\\\\\\\\\\\\",\\\\\\\\\\\\\"showRule\\\\\\\\\\\\\":false,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"placeholder\\\\\\\\\\\\\":\\\\\\\\\\\\\"請輸入伙食補助\\\\\\\\\\\\\"},{\\\\\\\\\\\\\"showEdit\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"newTemId\\\\\\\\\\\\\":1,\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canEdit\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"bizAlias\\\\\\\\\\\\\":\\\\\\\\\\\\\"publicFee\\\\\\\\\\\\\",\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"公雜費\\\\\\\\\\\\\",\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"text_number\\\\\\\\\\\\\",\\\\\\\\\\\\\"required\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"parentId\\\\\\\\\\\\\":11017,\\\\\\\\\\\\\"showList\\\\\\\\\\\\\":\\\\\\\\\\\\\"false\\\\\\\\\\\\\",\\\\\\\\\\\\\"showRule\\\\\\\\\\\\\":false,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false,\\\\\\\\\\\\\"placeholder\\\\\\\\\\\\\":\\\\\\\\\\\\\"請輸入公雜費\\\\\\\\\\\\\"}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"bizAlias\\\\\":\\\\\"foodFee\\\\\",\\\\\"canEdit\\\\\":true,\\\\\"label\\\\\":\\\\\"伙食補助\\\\\",\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"placeholder\\\\\":\\\\\"請輸入伙食補助\\\\\",\\\\\"required\\\\\":true,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false,\\\\\"type\\\\\":\\\\\"text\\\\\"},{\\\\\"bizAlias\\\\\":\\\\\"publicFee\\\\\",\\\\\"canEdit\\\\\":true,\\\\\"label\\\\\":\\\\\"公雜費\\\\\",\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"placeholder\\\\\":\\\\\"請輸入公雜費\\\\\",\\\\\"required\\\\\":true,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false,\\\\\"type\\\\\":\\\\\"text_number\\\\\"}],\\\\\"placeholder\\\\\":\\\\\"\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"5\\\\\",\\\\\"type\\\\\":\\\\\"TableField\\\\\",\\\\\"value\\\\\":\\\\\"{\\\\\\\\\\\\\"foodFee\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum}}],\\\\\\\\\\\\\"publicFee\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum}}]}\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11006,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"\\\\\",\\\\\"id\\\\\":15606,\\\\\"label\\\\\":\\\\\"公司墊付\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"text_number\\\\\\\\\\\\\",\\\\\\\\\\\\\"bizAlias\\\\\\\\\\\\\":\\\\\\\\\\\\\"platformTotalAmount\\\\\\\\\\\\\",\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"墊付合計\\\\\\\\\\\\\",\\\\\\\\\\\\\"placeholder\\\\\\\\\\\\\":\\\\\\\\\\\\\"合計0個,金額0.00\\\\\\\\\\\\\",\\\\\\\\\\\\\"required\\\\\\\\\\\\\":true}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"bizAlias\\\\\":\\\\\"platformTotalAmount\\\\\",\\\\\"canEdit\\\\\":false,\\\\\"label\\\\\":\\\\\"墊付合計\\\\\",\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"placeholder\\\\\":\\\\\"合計0個,金額0.00\\\\\",\\\\\"required\\\\\":true,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false,\\\\\"type\\\\\":\\\\\"text_number\\\\\"}],\\\\\"required\\\\\":\\\\\"false\\\\\",\\\\\"style\\\\\":\\\\\"5\\\\\",\\\\\"type\\\\\":\\\\\"TableField\\\\\",\\\\\"value\\\\\":\\\\\"\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11007,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"\\\\\",\\\\\"id\\\\\":15607,\\\\\"label\\\\\":\\\\\"員工墊付\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"text_number\\\\\\\\\\\\\",\\\\\\\\\\\\\"bizAlias\\\\\\\\\\\\\":\\\\\\\\\\\\\"personTotalAmount\\\\\\\\\\\\\",\\\\\\\\\\\\\"label\\\\\\\\\\\\\":\\\\\\\\\\\\\"自付合計\\\\\\\\\\\\\",\\\\\\\\\\\\\"placeholder\\\\\\\\\\\\\":\\\\\\\\\\\\\"合計0個,金額0.00\\\\\\\\\\\\\",\\\\\\\\\\\\\"required\\\\\\\\\\\\\":true}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"bizAlias\\\\\":\\\\\"personTotalAmount\\\\\",\\\\\"canEdit\\\\\":false,\\\\\"label\\\\\":\\\\\"自付合計\\\\\",\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"placeholder\\\\\":\\\\\"合計0個,金額0.00\\\\\",\\\\\"required\\\\\":true,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false,\\\\\"type\\\\\":\\\\\"text_number\\\\\"}],\\\\\"required\\\\\":\\\\\"false\\\\\",\\\\\"style\\\\\":\\\\\"5\\\\\",\\\\\"type\\\\\":\\\\\"TableField\\\\\",\\\\\"value\\\\\":\\\\\"[{\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum},\\\\\\\\\\\\\"companyId\\\\\\\\\\\\\":${__P(orgId,)},\\\\\\\\\\\\\"createTime\\\\\\\\\\\\\":1544595392000,\\\\\\\\\\\\\"createUser\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"feeDetailName\\\\\\\\\\\\\":\\\\\\\\\\\\\"車船費-火車\\\\\\\\\\\\\",\\\\\\\\\\\\\"feeDetailNo\\\\\\\\\\\\\":\\\\\\\\\\\\\"4\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":\\\\\\\\\\\\\"70947692911f4c60b6210fcd478235b5\\\\\\\\\\\\\",\\\\\\\\\\\\\"ownerUserId\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"ownerUserName\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\"}]\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11018,\\\\\"createtime\\\\\":1541382634000,\\\\\"data\\\\\":\\\\\"[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum}}]\\\\\",\\\\\"id\\\\\":144007,\\\\\"label\\\\\":\\\\\"墊付扣除\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"\\\\\",\\\\\"required\\\\\":\\\\\"false\\\\\",\\\\\"style\\\\\":\\\\\"5\\\\\",\\\\\"type\\\\\":\\\\\"TableField\\\\\",\\\\\"value\\\\\":\\\\\"[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__threadNum}}]\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11016,\\\\\"createtime\\\\\":1540883126000,\\\\\"data\\\\\":\\\\\"[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__BeanShell(${__threadNum}*2/1.00,)}}]\\\\\",\\\\\"id\\\\\":143941,\\\\\"label\\\\\":\\\\\"收款分配\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"otherprop\\\\\":\\\\\"[{\\\\\\\\\\\\\"canBeDelete\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"canDrag\\\\\\\\\\\\\":false}]\\\\\",\\\\\"otherpropJsonObject\\\\\":[{\\\\\"canEdit\\\\\":false,\\\\\"maxchoose\\\\\":0,\\\\\"maxlen\\\\\":0,\\\\\"required\\\\\":false,\\\\\"showList\\\\\":false,\\\\\"strongcontrol\\\\\":false}],\\\\\"placeholder\\\\\":\\\\\"\\\\\",\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"5\\\\\",\\\\\"type\\\\\":\\\\\"TableField\\\\\",\\\\\"value\\\\\":\\\\\"[{\\\\\\\\\\\\\"name\\\\\\\\\\\\\":\\\\\\\\\\\\\"${__P(userName,)}\\\\\\\\\\\\\",\\\\\\\\\\\\\"id\\\\\\\\\\\\\":${__P(userId,)},\\\\\\\\\\\\\"amount\\\\\\\\\\\\\":${__BeanShell(${__threadNum}*2/1.00,)}}]\\\\\"},{\\\\\"companyId\\\\\":0,\\\\\"componentid\\\\\":11008,\\\\\"createtime\\\\\":1526371599000,\\\\\"data\\\\\":\\\\\"${__BeanShell(${__threadNum}*2/1.00,)}\\\\\",\\\\\"id\\\\\":15608,\\\\\"label\\\\\":\\\\\"合計金額\\\\\",\\\\\"maxlen\\\\\":20,\\\\\"required\\\\\":\\\\\"true\\\\\",\\\\\"style\\\\\":\\\\\"6\\\\\",\\\\\"type\\\\\":\\\\\"TableField\\\\\",\\\\\"value\\\\\":\\\\\"${__BeanShell(${__threadNum}*2/1.00,)}\\\\\"}],\\\\\"id\\\\\":${__P(ReimbursementTemplateID,)},\\\\\"name\\\\\":\\\\\"${__P(ReimbursementTemplatename,)}\\\\\"}\"}}"} ''' res_body="" print("body---->",body) #res_body=body.replace('"','\\"') idx=0 #for idx in range(len(body)): while idx<len(body): #print(i) #"變為\" (0個\變成1個) if body[idx]==r'"': res_body+=r'\"' idx+=1 #\"變為\\\\\\" (1個\變成6個) elif body[idx:idx+2]==r'\"': #print("i>>>>",i) res_body+=r'\\\\\\"' idx+=2 #\\\\\"變為\\\\\\\\\\\\\\"(5個\變成14個) elif body[idx:idx+6]==r'\\\\\"': #print(1111111111111) #print(body[idx:idx+6]) #break res_body+=r'\\\\\\\\\\\\\\"' idx+=6 #\\\\\\\\\\\\\"變為\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"(13個\變為30個) elif body[idx:idx+14]==r'\\\\\\\\\\\\\"': #print(body[idx:idx+14]) #break res_body+=r'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"' idx+=14 elif body[idx:idx+3]=='\\u': res_body+=r'\\u' idx+=3 else: #print(5555555555555) #print(body[idx:idx+6]) res_body+=body[idx] idx+=1 print(res_body) with open(r"E:\request_body.txt","w",encoding='UTF-8') as fw: fw.write(res_body)