Exemplo n.º 1
0
    def name(self, data):
        information = {}
        for i in xrange(len(data)):
            singledata = data[i]
            uuid = singledata["moreId"]
            creditor = singledata["more"]
            debtor = singledata["mortgagor"]
            cates = singledata["priClaSecKind"]
            if cates == '1':
                cates = '合同'
            elif cates == '2':
                cates = '其他'

            amount = singledata["priClaSecAm"]
            pefPerForm = singledata["pefPerForm"]
            pefPerForm = change_date_style(pefPerForm)
            pefPerTo = singledata["pefPerTo"]
            pefPerTo = change_date_style(pefPerTo)
            deadline = str(pefPerForm) + '至' + str(pefPerTo)
            period = singledata["guaranperiod"]
            ways = singledata["gaType"]
            information[i] = [
                uuid, creditor, debtor, cates, amount, deadline, period, ways
            ]
        return information
Exemplo n.º 2
0
 def name(self, data):
     information = {}
     for i in xrange(len(data)):
         singledata = data[i]
         uuid = singledata["licId"]
         types = singledata["licName_CN"]
         valto = singledata["valTo"]
         valto = change_date_style(valto)
         information[i] = [uuid, types, valto]
     return information
    def name(self, data):
        information = {}
        for i in xrange(len(data)):
            singledata = data[i]
            uuid = singledata["invId"]
            name = singledata["invName"]
            reg_amount = singledata["liSubConAm"]
            reg_date = singledata["subConDate"]
            reg_date = change_date_style(reg_date)
            reg_way = singledata["subConFormName"]
            ac_amount = singledata["liAcConAm"]
            ac_date = singledata["acConDate"]
            ac_date = change_date_style(ac_date)
            ac_way = singledata["acConForm_CN"]

            information[i] = [
                name, uuid, reg_amount, reg_date, reg_way, ac_amount, ac_date,
                ac_way
            ]
        return information
Exemplo n.º 4
0
 def name(self,data):
     information = {}
     for i in xrange(len(data)):
         single_data = data[i]
         content_before = single_data["altBe"]
         content_after = single_data["altAf"]
         change_date = single_data["altDate"]
         change_date = deal_html_code.change_date_style(change_date)
         item = single_data["altItem_CN"]
         item = deal_lable(item)
         information[i] = [content_before, content_after, change_date, item]
     return information
Exemplo n.º 5
0
 def name(self, data):
     information = {}
     for i in xrange(len(data)):
         singledata = data[i]
         uuid = singledata["sExtSequence"]
         name = singledata["inv"]
         percent_pre = str(singledata["transAmPr"]) + '%'
         percent_after = str(singledata["transAmAft"]) + '%'
         dates = singledata["altDate"]
         dates = change_date_style(dates)
         information[i] = [name, percent_pre, percent_after, dates, uuid]
     return information
Exemplo n.º 6
0
 def deal_detail_content(self, detail_url):
     # print detail_url
     detail_code, status_code = Send_Request().send_requests(detail_url)
     if status_code == 200:
         detail_code = json.loads(detail_code)["data"]
         if len(detail_code[1]) == 0:
             ra_date, ra_ways, true_amount = '0000-00-00', '', ''
             reg_amount, ta_ways, ta_date = '', '', '0000-00-00'
         else:
             if len(detail_code[1]) != 0:
                 content1 = detail_code[1][0]
             elif len(detail_code[0]) != 0:
                 content1 = detail_code[0][0]
             if len(content1) != 0:
                 if "conDate" in content1.keys():
                     ra_date = content1["conDate"]
                     ra_date = change_date_style(ra_date)
                     ta_date = '0000-00-00'
                 else:
                     ta_date = '0000-00-00'
                     ra_date = '0000-00-00'
                 if "conForm_CN" in content1.keys():
                     ra_ways = content1["conForm_CN"]
                     ta_ways = ra_ways
                 else:
                     ta_ways = ''
                     ra_ways = ''
                 if "subConAm" in content1.keys():
                     reg_amount = content1["subConAm"]
                 else:
                     reg_amount = ''
                 if "acConAm" in content1.keys():
                     true_amount = content1["acConAm"]
                 else:
                     true_amount = ''
             else:
                 ra_date, ra_ways, true_amount = '0000-00-00', '', ''
                 reg_amount, ta_ways, ta_date = '', '', ''
     else:
         ra_date, ra_ways, true_amount = '0000-00-00', '', ''
         reg_amount, ta_ways, ta_date = '', '', '0000-00-00'
     return ra_date, ra_ways, true_amount, reg_amount, ta_ways, ta_date