Exemple #1
0
 def work(self):
     n = UNsr(self.uid)
     succ,data = n.getlogs()
     if succ:
         return succ,'',data
     else:
         return succ,data,None
Exemple #2
0
 def work(self):
     nsrs = self.get_argument('nsrs')
     #print nsrs
     infos = json.loads(nsrs)
     infos = json.loads(infos)
     cols_str = 'ygznsrlxDm|hsfsDm|wjcyrs|djrq|whsyjsfjfxxdjbz|bsrdzxx|djzclxDm|cwfzrsfzjhm|gdghlxDm|fddbrdzxx|zcdz|nsrztDm|zzjglxDm|nsrzgswjgxxList|zgswjmc|shxydm|scjydlxdh|scjyqxq|fddbrxm|jyfw|scjyqxz|bsrsfzjhm|zzlxDm|cwfzrsfzjzlDm|wztzbl|zcdzxzqhszDm|djxh|zcdzxzqhszmc|bsrsfzjzlDm|swdlrmc|zczb|fddbryddh|hymc|fddbrsfzjlxmc|fddbrgddh|kjzdzzDm|hjszd|scjydz|fddbrsfzjhm|swdlrlxdh|jdxzDm|wz|gykglxDm|pzsljgDm|scjydyzbm|bzfsDm|kqccsztdjbz|zgswjg|cwfzrdzxx|tzze|hyDm|zfjglxDm|fddbrsfzjlxDm|dwlsgxDm|djjgDm|zzhm|gdgrs|gytzbl|lrrq|pzsljglxDm|lsswdjyxqz|wcjyhdssglzmbh|cyrs|lsswdjyxqq|zzjgDm|bsryddh|ggrs|cwfzrgddh|swdlrnsrsbh|bsrxm|kzztdjlxmc|jdxzmc|ssdabh|nsrmc|pzsljgmc|scjydzxzqhszmc|zrrtzbl|scjydzxzqhszDm|zzsqylxDm|hhrs|lrrDm|zgswskfjDm|bsrgddh|kyslrq|kzztdjlxDm|zcdyzbm|zgswskfjmc|nsrfyhyxxList|ssglyDm|nsrbm|pzzmhwjh|zgswjDm|zsxmcxbzDm|cwfzryddh|swdjblbz|djzclxmc|nsrztmc|zzsjylb|yhsjnfsDm|gdslxDm|ssglymc|zcdlxdh|fjmqybz|swdlrdzxx|gjhdqszDm|cwfzrxm|logtime|nsrsbh'
     cols = cols_str.split('|')
     for j in infos:
         for c in cols:
             if not j.has_key(c):
                 j[c]=""                       
     n = UNsr(self.uid)
     n.savemany(infos)
     return True,'',''
Exemple #3
0
 def work(self):
     nsrmc=self.get_argument('name')
     if len(nsrmc) == 0:
         return False,'缺少关键参数!',None
     page = self.get_argument('page',1)
     size = self.get_argument('pagesize', 200)
     p={}
     p['name']=nsrmc
     p['page']=page
     p['pagesize']=size
     n = UNsr(self.uid)
     succ,data = n.getmany(p)
     if succ:
         return succ,'',data
     else:
         return succ,data,None
 def _on_success(self, response):
     if response.body:
         from gt.gtcore.nsr import UNsr
         from gt.gtcore.env import Gtenv
         env = Gtenv("")
         uid = env.uid
         #print uid
         if uid:
             nsr = UNsr(uid)
             info = nsr.getxxfromquery(response.body)
             nsr.savetrace(info)
             nsr.save(info)