Exemplo n.º 1
0
 def pdf_dict(self):
     sjhm = getattr(self, "sjhm", '')
     if not sjhm:
         sjhm = ' '
     else:
         sjhm = sjhm
         # if len(sjhm)>=11:
         #     sjhm =  sjhm[0:3]+'-'+sjhm[3:7]+'-'+sjhm[-4:]
         # else:
         #     sjhm = sjhm
     return {
         "tjbh": getattr(self, "tjbh", ''),
         "xm": str2(getattr(self, "xm", '')),
         "xb": str2(getattr(self, "xb", '')),
         "nl": '%s 岁' % str(getattr(self, "nl", '')),
         "xmdw": str2(getattr(self, "xmdw", '')),
         "sfzh": getattr(self, "sfzh", ''),
         "sjhm": sjhm,
         "depart": str2(getattr(self, "depart", '')),
         "dwmc": self.get_dwmc,
         "qdrq": str(getattr(self, "qdrq", ''))[0:10],
         "djrq": str(getattr(self, "djrq", '')),
         'zjys': getattr(self, "zjys"),
         'shys': getattr(self, "shys"),
         'syys': getattr(self, "sygh")
     }
Exemplo n.º 2
0
 def is_done(self):
     return {
         'tmzt': True if getattr(self, "jjsj") else False,
         'sgys': str2(getattr(self, "bz")),
         'tjbh': getattr(self, "tjbh"),
         'tmbh': getattr(self, "mxbh"),
         'xmhz': str2(getattr(self, "jlnr"))
     }
Exemplo n.º 3
0
 def detail(self):
     return {
         'tjbh': getattr(self, "tjbh"),
         'mxbh': getattr(self, "mxbh"),
         'czxm': str2(getattr(self, "czxm")),
         'czqy': str2(getattr(self, "czqy")),
         'czsj': str(getattr(self, "czsj"))[0:23],
         'jlnr': str2(getattr(self, "jlnr"))
     }
Exemplo n.º 4
0
 def to_dict(self):
     return {
         'tjbh': getattr(self, "tjbh"),
         'patient': str2(getattr(self, "patient")),
         'ename': str2(getattr(self, "equip_name")),
         'jcrq': str(getattr(self, "operate_time"))[0:19],
         'jcys': str2(getattr(self, "operator2")),
         'jcqy': str2(getattr(self, "operate_area")),
         'fpath': self.fpath
     }
Exemplo n.º 5
0
 def to_dict(self):
     tmp = {}
     for col_obj in self.__table__.columns:
         values = self.property_dict(col_obj.name)
         if values:
             tmp[col_obj.name] = values.get(
                 str2(getattr(self, col_obj.name, None)), None)
         else:
             tmp[col_obj.name] = str2(getattr(self, col_obj.name, None))
     return tmp
Exemplo n.º 6
0
 def get_bgjl(self):
     return {
         'tjbh': getattr(self, "tjbh"),
         'bgzt': '1',
         'djrq': getattr(self, "djrq"),
         'djgh': getattr(self, "djgh"),
         'djxm': str2(getattr(self, "djxm")),
         'qdrq': getattr(self, "qdrq"),
         'zjrq': getattr(self, "zjrq"),
         'zjgh': getattr(self, "zjys"),
         'zjxm': str2(getattr(self, "zjxm")),
         'shrq': getattr(self, "shrq"),
         'shgh': getattr(self, "shrq"),
         'shxm': str2(getattr(self, "shys"))
     }
Exemplo n.º 7
0
 def item_result2(self):
     return {
         'xmmc': str2(getattr(self, "xmmc", '')),
         'xmbh': getattr(self, "xmbh", ''),
         'state': self.item_state,
         'btn': ''  # 状态修改
     }
Exemplo n.º 8
0
 def item_result(self):
     return {
         'xmmc': str2(getattr(self, "xmmc", '')),
         'xmbh': getattr(self, "xmbh", ''),
         'state': self.item_state,
         'ksbm': getattr(self, "ksbm", ''),
         'btn_dy': '',  # 打印
         'btn_jj': '',  # 拒检
         'btn_hs': ''  # 核实
     }
Exemplo n.º 9
0
 def to_dict(self):
     return {
         'tjbh': getattr(self, "tjbh"),
         'xm': str2(getattr(self, "xm")),
         'xb': str2(getattr(self, "xb")),
         'nl': '%s 岁' % str(getattr(self, "nl")),
         'sfzh': getattr(self, "sfzh"),
         'sjhm': getattr(self, "sjhm"),
         'depart': str2(getattr(self, "depart")),
         'dwmc': str2(getattr(self, "dwmc")),
         'djrq': getattr(self, "djrq"),
         'qdrq': getattr(self, "qdrq"),
         'zjrq': str2(getattr(self, "zjrq"))[0:10],
         'shrq': str2(getattr(self, "shrq"))[0:10],
         'zjys': str2(getattr(self, "zjxm")),
         'shys': str2(getattr(self, "shxm")),
         'yzjys': str2(getattr(self, "yzjxm")),
         'yshys': str2(getattr(self, "yshxm")),
         'tjzt': getattr(self, "tjzt")
     }
Exemplo n.º 10
0
 def get_dwmc(self):
     if str2(getattr(self, "bz")):
         return str2(getattr(self, "bz"))
     else:
         if str2(getattr(self, "depart")):
             return "%s(%s)" % (str2(getattr(
                 self, "dwmc", '')), str2(getattr(self, "depart")))
         else:
             return str2(getattr(self, "dwmc", ''))
Exemplo n.º 11
0
 def get_edit_items(self):
     return {
         'xmbh': getattr(self, "xmbh", ''),
         'xmmc': str2(getattr(self, "xmmc", '')),
         'xmjg': str2(getattr(self, "jg", '')),
         'ycbz': str2(getattr(self, "ycbz", '')),
         'ycts': str2(getattr(self, "ycts", '')),
         'ckfw': str2(getattr(self, "ckfw", '')),
         'xmdw': str2(getattr(self, "xmdw", ''))
     }
Exemplo n.º 12
0
    def to_dict(self):

        return {
            'zt': '√',
            'jllx': str2(getattr(self, "jlmc")),
            'tjbh': getattr(self, "tjbh"),
            'tmbh': getattr(self, "mxbh"),
            'czxm': str2(getattr(self, "czxm")),
            'czqy': str2(getattr(self, "czqy")),
            'czsj': str(getattr(self, "czsj"))[0:19],
            'jlnr': str2(getattr(self, "jlnr")),
            'jjxm': str2(getattr(self, "jjxm")),
            'jjsj': self.jjsj_value,
            'jsxm': str2(getattr(self, "jsxm")),
            'jssj': self.jssj_value,
            'sjfs': str2(getattr(self, "sjfs")),
            'tmxm': str2(getattr(self, "jlnr")),
            'ck': '查看'
        }
Exemplo n.º 13
0
 def to_dict_py(self):
     return {getattr(self, "pyjm", ''): str2(getattr(self, "mc", ''))}
Exemplo n.º 14
0
 def to_dict_bh(self):
     return {getattr(self, "dwbh", ''): str2(getattr(self, "mc", ''))}
Exemplo n.º 15
0
 def to_dict(self):
     return {
         col.name: str2(getattr(self, col.name, None))
         for col in self.__table__.columns
     }
Exemplo n.º 16
0
 def to_dict(self, cols: list):
     return {col: str2(getattr(self, col, None)) for col in cols}