From bffa0486ead476f03298083cab164dfc6ba5c07a Mon Sep 17 00:00:00 2001 From: viewv Date: Sun, 24 Jan 2021 14:02:33 +0800 Subject: [PATCH] format all --- .github/workflows/checkin.yml | 2 +- configexample.yml | 1 - des.py | 143 +++++---- json/model.json | 537 +++++++++++++++++----------------- sduhealth.py | 2 +- 5 files changed, 347 insertions(+), 338 deletions(-) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index ca8e91f..aec4edf 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -7,7 +7,7 @@ on: push: branches: - main - + jobs: checkin: runs-on: ubuntu-latest diff --git a/configexample.yml b/configexample.yml index e011ca5..a6972a5 100644 --- a/configexample.yml +++ b/configexample.yml @@ -11,4 +11,3 @@ jobs: - "填入第一个账号的密码" - "填入第二个账号的密码" - "填入第三个账号的密码" - diff --git a/des.py b/des.py index 3c13082..4c396e9 100644 --- a/des.py +++ b/des.py @@ -9,7 +9,7 @@ # Homepage: http://twhiteman.netfirms.com/des.html # # This is a pure python implementation of the DES encryption algorithm. -# It's pure python to avoid portability issues, since most DES +# It's pure python to avoid portability issues, since most DES # implementations are programmed in C (for performance reasons). # # Triple DES class is also implemented, utilising the DES base. Triple DES @@ -90,8 +90,8 @@ _pythonMajorVersion = sys.version_info[0] # Modes of crypting / cyphering -ECB = 0 -CBC = 1 +ECB = 0 +CBC = 1 # Modes of padding PAD_NORMAL = 1 @@ -104,6 +104,8 @@ # http://www.faqs.org/rfcs/rfc1423.html # The base class shared by des and triple des. + + class _baseDes(object): def __init__(self, mode=ECB, IV=None, pad=None, padmode=PAD_NORMAL): if IV: @@ -115,7 +117,8 @@ def __init__(self, mode=ECB, IV=None, pad=None, padmode=PAD_NORMAL): if pad and padmode == PAD_PKCS5: raise ValueError("Cannot use a pad character with PAD_PKCS5") if IV and len(IV) != self.block_size: - raise ValueError("Invalid Initial Value (IV), must be a multiple of " + str(self.block_size) + " bytes") + raise ValueError( + "Invalid Initial Value (IV), must be a multiple of " + str(self.block_size) + " bytes") # Set the passed in variables self._mode = mode @@ -153,7 +156,7 @@ def setPadding(self, pad): def getPadMode(self): """getPadMode() -> pyDes.PAD_NORMAL or pyDes.PAD_PKCS5""" return self._padmode - + def setPadMode(self, mode): """Sets the type of padding mode, pyDes.PAD_NORMAL or pyDes.PAD_PKCS5""" self._padmode = mode @@ -165,7 +168,8 @@ def getIV(self): def setIV(self, IV): """Will set the Initial Value, used in conjunction with CBC mode""" if not IV or len(IV) != self.block_size: - raise ValueError("Invalid Initial Value (IV), must be a multiple of " + str(self.block_size) + " bytes") + raise ValueError( + "Invalid Initial Value (IV), must be a multiple of " + str(self.block_size) + " bytes") IV = self._guardAgainstUnicode(IV) self._iv = IV @@ -186,9 +190,10 @@ def _padData(self, data, pad, padmode): # Get the default padding. pad = self.getPadding() if not pad: - raise ValueError("Data must be a multiple of " + str(self.block_size) + " bytes in length. Use padmode=PAD_PKCS5 or set the pad character.") + raise ValueError("Data must be a multiple of " + str(self.block_size) + + " bytes in length. Use padmode=PAD_PKCS5 or set the pad character.") data += (self.block_size - (len(data) % self.block_size)) * pad - + elif padmode == PAD_PKCS5: pad_len = 8 - (len(data) % self.block_size) if _pythonMajorVersion < 3: @@ -214,7 +219,7 @@ def _unpadData(self, data, pad, padmode): pad = self.getPadding() if pad: data = data[:-self.block_size] + \ - data[-self.block_size:].rstrip(pad) + data[-self.block_size:].rstrip(pad) elif padmode == PAD_PKCS5: if _pythonMajorVersion < 3: @@ -230,7 +235,8 @@ def _guardAgainstUnicode(self, data): # there is no way to correctly decode the data into bytes. if _pythonMajorVersion < 3: if isinstance(data, unicode): - raise ValueError("pyDes can only work with bytes, not Unicode strings.") + raise ValueError( + "pyDes can only work with bytes, not Unicode strings.") else: if isinstance(data, str): # Only accept ascii unicode values. @@ -238,12 +244,15 @@ def _guardAgainstUnicode(self, data): return data.encode('ascii') except UnicodeEncodeError: pass - raise ValueError("pyDes can only work with encoded strings, not Unicode.") + raise ValueError( + "pyDes can only work with encoded strings, not Unicode.") return data ############################################################################# # DES # ############################################################################# + + class des(_baseDes): """DES encryption/decrytpion class @@ -263,7 +272,6 @@ class des(_baseDes): with this instance. """ - # Permutation and translation tables for DES # __pc1 = [56, 48, 40, 32, 24, 16, 8, # 0, 57, 49, 41, 33, 25, 17, @@ -275,14 +283,14 @@ class des(_baseDes): # 20, 12, 4, 27, 19, 11, 3 # ] __pc1 = [ - 56, 48, 40, 32, 24, 16, 8, 0, - 57, 49, 41, 33, 25, 17, 9, 1, - 58, 50, 42, 34, 26, 18, 10, 2, - 59, 51, 43, 35, 27, 19, 11, 3, - 60, 52, 44, 36, 28, 20, 12, 4, - 61, 53, 45, 37, 29, 21, 13, 5, - 62, 54, 46, 38, 30, 22, 14, 6 - ] + 56, 48, 40, 32, 24, 16, 8, 0, + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 28, 20, 12, 4, + 61, 53, 45, 37, 29, 21, 13, 5, + 62, 54, 46, 38, 30, 22, 14, 6 + ] # number left rotations of pc1 __left_rotations = [ @@ -292,7 +300,7 @@ class des(_baseDes): # permuted choice key (table 2) __pc2 = [ 13, 16, 10, 23, 0, 4, - 2, 27, 14, 5, 20, 9, + 2, 27, 14, 5, 20, 9, 22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1, 40, 51, 30, 36, 46, 54, @@ -303,20 +311,20 @@ class des(_baseDes): # initial permutation IP __ip = [57, 49, 41, 33, 25, 17, 9, 1, - 59, 51, 43, 35, 27, 19, 11, 3, - 61, 53, 45, 37, 29, 21, 13, 5, - 63, 55, 47, 39, 31, 23, 15, 7, - 56, 48, 40, 32, 24, 16, 8, 0, - 58, 50, 42, 34, 26, 18, 10, 2, - 60, 52, 44, 36, 28, 20, 12, 4, - 62, 54, 46, 38, 30, 22, 14, 6 - ] + 59, 51, 43, 35, 27, 19, 11, 3, + 61, 53, 45, 37, 29, 21, 13, 5, + 63, 55, 47, 39, 31, 23, 15, 7, + 56, 48, 40, 32, 24, 16, 8, 0, + 58, 50, 42, 34, 26, 18, 10, 2, + 60, 52, 44, 36, 28, 20, 12, 4, + 62, 54, 46, 38, 30, 22, 14, 6 + ] # Expansion table for turning 32 bit blocks into 48 bits __expansion_table = [ 31, 0, 1, 2, 3, 4, - 3, 4, 5, 6, 7, 8, - 7, 8, 9, 10, 11, 12, + 3, 4, 5, 6, 7, 8, + 7, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15, 16, 15, 16, 17, 18, 19, 20, 19, 20, 21, 22, 23, 24, @@ -375,13 +383,12 @@ class des(_baseDes): 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11], ] - # 32-bit permutation function P used on the output of the S-boxes __p = [ 15, 6, 19, 20, 28, 11, 27, 16, 0, 14, 22, 25, 4, 17, 30, 9, 1, 7, - 23,13, 31, 26, 2, 8, + 23, 13, 31, 26, 2, 8, 18, 12, 29, 5, 21, 10, 3, 24 ] @@ -399,20 +406,21 @@ class des(_baseDes): ] # Type of crypting being done - ENCRYPT = 0x00 - DECRYPT = 0x01 + ENCRYPT = 0x00 + DECRYPT = 0x01 # Initialisation def __init__(self, key, mode=ECB, IV=None, pad=None, padmode=PAD_NORMAL): # Sanity checking of arguments. if len(key) != 8: - raise ValueError("Invalid DES key size. Key must be exactly 8 bytes long.") + raise ValueError( + "Invalid DES key size. Key must be exactly 8 bytes long.") _baseDes.__init__(self, mode, IV, pad, padmode) self.key_size = 8 self.L = [] self.R = [] - self.Kn = [ [0] * 48 ] * 16 # 16 48-bit keys (K1 - K16) + self.Kn = [[0] * 48] * 16 # 16 48-bit keys (K1 - K16) self.final = [] self.setKey(key) @@ -456,19 +464,20 @@ def __BitList_to_String(self, data): pos += 1 if _pythonMajorVersion < 3: - return ''.join([ chr(c) for c in result ]) + return ''.join([chr(c) for c in result]) else: return bytes(result) def __permutate(self, table, block): """Permutate this block with the specified table""" return list(map(lambda x: block[x], table)) - + # Transform the secret key, so that it is ready for data processing # Create the 16 subkeys, K[1] - K[16] def __create_sub_keys(self): """Create the 16 subkeys K[1] to K[16] from the given key""" - key = self.__permutate(des.__pc1, self.__String_to_BitList(self.getKey())) + key = self.__permutate( + des.__pc1, self.__String_to_BitList(self.getKey())) i = 0 # Split into Left and Right sections self.L = key[:28] @@ -516,11 +525,12 @@ def __des_crypt(self, block, crypt_type): # Exclusive or R[i - 1] with K[i], create B[1] to B[8] whilst here self.R = list(map(lambda x, y: x ^ y, self.R, self.Kn[iteration])) - B = [self.R[:6], self.R[6:12], self.R[12:18], self.R[18:24], self.R[24:30], self.R[30:36], self.R[36:42], self.R[42:]] + B = [self.R[:6], self.R[6:12], self.R[12:18], self.R[18:24], + self.R[24:30], self.R[30:36], self.R[36:42], self.R[42:]] # Optimization: Replaced below commented code with above #j = 0 #B = [] - #while j < len(self.R): + # while j < len(self.R): # self.R[j] = self.R[j] ^ self.Kn[iteration][j] # j += 1 # if j % 6 == 0: @@ -554,7 +564,7 @@ def __des_crypt(self, block, crypt_type): self.R = list(map(lambda x, y: x ^ y, self.R, self.L)) # Optimization: This now replaces the below commented code #j = 0 - #while j < len(self.R): + # while j < len(self.R): # self.R[j] = self.R[j] ^ self.L[j] # j += 1 @@ -563,13 +573,13 @@ def __des_crypt(self, block, crypt_type): i += 1 iteration += iteration_adjustment - + # Final permutation of R[16]L[16] self.final = self.__permutate(des.__fp, self.R + self.L) return self.final - # Data to be encrypted/decrypted + def crypt(self, data, crypt_type): """Crypt the data in blocks, running it through des_crypt()""" @@ -577,19 +587,23 @@ def crypt(self, data, crypt_type): if not data: return '' if len(data) % self.block_size != 0: - if crypt_type == des.DECRYPT: # Decryption must work on 8 byte blocks - raise ValueError("Invalid data length, data must be a multiple of " + str(self.block_size) + " bytes\n.") + if crypt_type == des.DECRYPT: # Decryption must work on 8 byte blocks + raise ValueError( + "Invalid data length, data must be a multiple of " + str(self.block_size) + " bytes\n.") if not self.getPadding(): - raise ValueError("Invalid data length, data must be a multiple of " + str(self.block_size) + " bytes\n. Try setting the optional padding character") + raise ValueError("Invalid data length, data must be a multiple of " + str( + self.block_size) + " bytes\n. Try setting the optional padding character") else: - data += (self.block_size - (len(data) % self.block_size)) * self.getPadding() + data += (self.block_size - (len(data) % + self.block_size)) * self.getPadding() # print "Len of data: %f" % (len(data) / self.block_size) if self.getMode() == CBC: if self.getIV(): iv = self.__String_to_BitList(self.getIV()) else: - raise ValueError("For CBC mode, you must supply the Initial Value (IV) for ciphering") + raise ValueError( + "For CBC mode, you must supply the Initial Value (IV) for ciphering") # Split the data into blocks, crypting each one seperately i = 0 @@ -600,13 +614,13 @@ def crypt(self, data, crypt_type): while i < len(data): # Test code for caching encryption results #lines += 1 - #if dict.has_key(data[i:i+8]): - #print "Cached result for: %s" % data[i:i+8] + # if dict.has_key(data[i:i+8]): + # print "Cached result for: %s" % data[i:i+8] # cached += 1 # result.append(dict[data[i:i+8]]) # i += 8 # continue - + block = self.__String_to_BitList(data[i:i+8]) # Xor with IV if using CBC mode @@ -614,16 +628,17 @@ def crypt(self, data, crypt_type): if crypt_type == des.ENCRYPT: block = list(map(lambda x, y: x ^ y, block, iv)) #j = 0 - #while j < len(block): + # while j < len(block): # block[j] = block[j] ^ iv[j] # j += 1 processed_block = self.__des_crypt(block, crypt_type) if crypt_type == des.DECRYPT: - processed_block = list(map(lambda x, y: x ^ y, processed_block, iv)) + processed_block = list( + map(lambda x, y: x ^ y, processed_block, iv)) #j = 0 - #while j < len(processed_block): + # while j < len(processed_block): # processed_block[j] = processed_block[j] ^ iv[j] # j += 1 iv = block @@ -632,10 +647,9 @@ def crypt(self, data, crypt_type): else: processed_block = self.__des_crypt(block, crypt_type) - # Add the resulting crypted block to our list #d = self.__BitList_to_String(processed_block) - #result.append(d) + # result.append(d) result.append(self.__BitList_to_String(processed_block)) #dict[data[i:i+8]] = d i += 8 @@ -689,7 +703,6 @@ def decrypt(self, data, pad=None, padmode=None): return self._unpadData(data, pad, padmode) - ############################################################################# # Triple DES # ############################################################################# @@ -714,6 +727,7 @@ class triple_des(_baseDes): PAD_PKCS5) to use during all encrypt/decrpt operations done with this instance. """ + def __init__(self, key, mode=ECB, IV=None, pad=None, padmode=PAD_NORMAL): _baseDes.__init__(self, mode, IV, pad, padmode) self.setKey(key) @@ -722,10 +736,11 @@ def setKey(self, key): """Will set the crypting key for this object. Either 16 or 24 bytes long.""" self.key_size = 24 # Use DES-EDE3 mode if len(key) != self.key_size: - if len(key) == 16: # Use DES-EDE2 mode + if len(key) == 16: # Use DES-EDE2 mode self.key_size = 16 else: - raise ValueError("Invalid triple DES key size. Key must be either 16 or 24 bytes long") + raise ValueError( + "Invalid triple DES key size. Key must be either 16 or 24 bytes long") if self.getMode() == CBC: if not self.getIV(): # Use the first 8 bytes of the key @@ -733,14 +748,14 @@ def setKey(self, key): if len(self.getIV()) != self.block_size: raise ValueError("Invalid IV, must be 8 bytes in length") self.__key1 = des(key[:8], self._mode, self._iv, - self._padding, self._padmode) + self._padding, self._padmode) self.__key2 = des(key[8:16], self._mode, self._iv, - self._padding, self._padmode) + self._padding, self._padmode) if self.key_size == 16: self.__key3 = self.__key1 else: self.__key3 = des(key[16:], self._mode, self._iv, - self._padding, self._padmode) + self._padding, self._padmode) _baseDes.setKey(self, key) # Override setter methods to work on all 3 keys. diff --git a/json/model.json b/json/model.json index 7ade547..f0ebd7d 100644 --- a/json/model.json +++ b/json/model.json @@ -1,314 +1,309 @@ { "header": { - "code": 0, + "code": 0, "message": { - "title": "", + "title": "", "detail": "" } - }, + }, "body": { "dataStores": { "535b1ef6-bf51-4d4c-9ae4-5a90cdc4": { "rowSet": { - "primary": [ - { - "ZH": "", - "_t": 3, - "XM": "", - "XSXB": "", - "NL": "", - "SZDW": "", - "ZYMC": "", - "XSLX": "", - "ZXSJ": "", - "SBSJ": "", - "FDYXMX": "", - "JJLXRXM": "", - "JJLXRDH": "", - "JJLXRYBRGX": "", - "LXZT": "", - "DQSFJJIA": "", - "sheng_TEXT": "", - "sheng": "", - "shi_TEXT": "", - "shi": "", - "quxian_TEXT": "", - "quxian": "", - "DQJZDZ": "", - "XQSFYQRBL": "否No", - "DRTW": "36.3", - "CLSJ": "", - "BRSFFS": "否No", - "YWZZ": "无症状No symptoms", - "ZZLX": "", - "JJGDZ": "否No", - "JZGDZ": "否No", - "YSGDZ": "否No", - "YWZZGDZ": "无症状No symptoms", - "ZZLXGDZ": "", - "QTZZMS": "", - "ZKGDZ": "", - "SFJJYXGL": "否No", - "JJGLZT": "", - "YXGCX": "否No", - "JZYXGCZT": "", - "SFYSHQZ": "否No", - "QZQK": "", - "SFDGYQSQ": "否No", - "SFJCGYQ": "否No", - "SFJQZYQHZ": "否No", - "JRSFYJCS": "否No", - "EXCASE": "否No", - "EXCASECONTACT": "否No", - "EXFOURTEENFEVER": "否No", - "EXTEST": "否No", - "EXTESTRESULT": "否No", - "sflxs": "否 No", - "sqsfyyq": "否 No", - "FXQKGDZ": "", - "FXLYD": "", - "FXSJ": "", - "LXMDD": "", - "LXSJ": "", - "GRCN": "我承诺以上信息真实准确,并愿意承担相应法律责任。I promise that the above information is true and accurate, and I am willing to bear the corresponding legal responsibility.", - "FYZKGDZ": "", - "JZGC": "", - "JZGLDD": "", - "JJYXGC": "", - "JJYXGCDD": "", - "_o": { - "ZH": null, - "XM": null, - "XSXB": null, - "NL": null, - "SZDW": null, - "ZYMC": null, - "XSLX": null, - "ZXSJ": null, - "SBSJ": null, - "FDYXMX": null, - "JJLXRXM": null, - "JJLXRDH": null, - "JJLXRYBRGX": null, - "LXZT": null, - "DQSFJJIA": null, - "sheng_TEXT": null, - "sheng": null, - "shi_TEXT": null, - "shi": null, - "quxian_TEXT": null, - "quxian": null, - "DQJZDZ": null, - "XQSFYQRBL": null, - "DRTW": null, - "CLSJ": null, - "BRSFFS": null, - "YWZZ": null, - "ZZLX": null, - "JJGDZ": null, - "JZGDZ": null, - "YSGDZ": null, - "YWZZGDZ": null, - "ZZLXGDZ": null, - "QTZZMS": null, - "ZKGDZ": null, - "SFJJYXGL": null, - "JJGLZT": null, - "YXGCX": null, - "JZYXGCZT": null, - "SFYSHQZ": null, - "QZQK": null, - "SFDGYQSQ": null, - "SFJCGYQ": null, - "SFJQZYQHZ": null, - "JRSFYJCS": null, - "EXCASE": null, - "EXCASECONTACT": null, - "EXFOURTEENFEVER": null, - "EXTEST": null, - "EXTESTRESULT": null, - "sflxs": null, - "sqsfyyq": null, - "FXQKGDZ": null, - "FXLYD": null, - "FXSJ": null, - "LXMDD": null, - "LXSJ": null, - "GRCN": null, - "FYZKGDZ": null, - "JZGC": null, - "JZGLDD": null, - "JJYXGC": null, - "JJYXGCDD": null - } + "primary": [{ + "ZH": "", + "_t": 3, + "XM": "", + "XSXB": "", + "NL": "", + "SZDW": "", + "ZYMC": "", + "XSLX": "", + "ZXSJ": "", + "SBSJ": "", + "FDYXMX": "", + "JJLXRXM": "", + "JJLXRDH": "", + "JJLXRYBRGX": "", + "LXZT": "", + "DQSFJJIA": "", + "sheng_TEXT": "", + "sheng": "", + "shi_TEXT": "", + "shi": "", + "quxian_TEXT": "", + "quxian": "", + "DQJZDZ": "", + "XQSFYQRBL": "否No", + "DRTW": "36.3", + "CLSJ": "", + "BRSFFS": "否No", + "YWZZ": "无症状No symptoms", + "ZZLX": "", + "JJGDZ": "否No", + "JZGDZ": "否No", + "YSGDZ": "否No", + "YWZZGDZ": "无症状No symptoms", + "ZZLXGDZ": "", + "QTZZMS": "", + "ZKGDZ": "", + "SFJJYXGL": "否No", + "JJGLZT": "", + "YXGCX": "否No", + "JZYXGCZT": "", + "SFYSHQZ": "否No", + "QZQK": "", + "SFDGYQSQ": "否No", + "SFJCGYQ": "否No", + "SFJQZYQHZ": "否No", + "JRSFYJCS": "否No", + "EXCASE": "否No", + "EXCASECONTACT": "否No", + "EXFOURTEENFEVER": "否No", + "EXTEST": "否No", + "EXTESTRESULT": "否No", + "sflxs": "否 No", + "sqsfyyq": "否 No", + "FXQKGDZ": "", + "FXLYD": "", + "FXSJ": "", + "LXMDD": "", + "LXSJ": "", + "GRCN": "我承诺以上信息真实准确,并愿意承担相应法律责任。I promise that the above information is true and accurate, and I am willing to bear the corresponding legal responsibility.", + "FYZKGDZ": "", + "JZGC": "", + "JZGLDD": "", + "JJYXGC": "", + "JJYXGCDD": "", + "_o": { + "ZH": null, + "XM": null, + "XSXB": null, + "NL": null, + "SZDW": null, + "ZYMC": null, + "XSLX": null, + "ZXSJ": null, + "SBSJ": null, + "FDYXMX": null, + "JJLXRXM": null, + "JJLXRDH": null, + "JJLXRYBRGX": null, + "LXZT": null, + "DQSFJJIA": null, + "sheng_TEXT": null, + "sheng": null, + "shi_TEXT": null, + "shi": null, + "quxian_TEXT": null, + "quxian": null, + "DQJZDZ": null, + "XQSFYQRBL": null, + "DRTW": null, + "CLSJ": null, + "BRSFFS": null, + "YWZZ": null, + "ZZLX": null, + "JJGDZ": null, + "JZGDZ": null, + "YSGDZ": null, + "YWZZGDZ": null, + "ZZLXGDZ": null, + "QTZZMS": null, + "ZKGDZ": null, + "SFJJYXGL": null, + "JJGLZT": null, + "YXGCX": null, + "JZYXGCZT": null, + "SFYSHQZ": null, + "QZQK": null, + "SFDGYQSQ": null, + "SFJCGYQ": null, + "SFJQZYQHZ": null, + "JRSFYJCS": null, + "EXCASE": null, + "EXCASECONTACT": null, + "EXFOURTEENFEVER": null, + "EXTEST": null, + "EXTESTRESULT": null, + "sflxs": null, + "sqsfyyq": null, + "FXQKGDZ": null, + "FXLYD": null, + "FXSJ": null, + "LXMDD": null, + "LXSJ": null, + "GRCN": null, + "FYZKGDZ": null, + "JZGC": null, + "JZGLDD": null, + "JJYXGC": null, + "JJYXGCDD": null } - ], - "filter": [ ], - "delete": [ ] - }, - "name": "535b1ef6-bf51-4d4c-9ae4-5a90cdc4", - "pageNumber": 1, - "pageSize": 2147483647, - "recordCount": 1, - "rowSetName": "3586b9e6-f964-4a3b-a693-bb23da84", + }], + "filter": [], + "delete": [] + }, + "name": "535b1ef6-bf51-4d4c-9ae4-5a90cdc4", + "pageNumber": 1, + "pageSize": 2147483647, + "recordCount": 1, + "rowSetName": "3586b9e6-f964-4a3b-a693-bb23da84", "parameters": { - "relatedcontrols": "body_0", - "primarykey": "pk_id", + "relatedcontrols": "body_0", + "primarykey": "pk_id", "queryds": "535b1ef6-bf51-4d4c-9ae4-5a90cdc4" } - }, + }, "535b1ef6-bf51-4d4c-9ae4-5a90cdc4_record": { "rowSet": { - "primary": [ - { - "ZZLX": "", - "LXZT": "", - "DRTW": "36.3", - "JJGLZT": "", - "GRCN": "我承诺以上信息真实准确,并愿意承担相应法律责任。I promise that the above information is true and accurate, and I am willing to bear the corresponding legal responsibility.", - "ZXSJ": "", - "pk_id": "", - "ZH": "", - "YWZZ": "无症状No symptoms", - "JZGDZ": "否No", - "ZYMC": "", - "LXMDD": "", - "quxian_TEXT": "", - "DQSFJJIA": "", - "SZDW": "", - "FXQKGDZ": "", - "CLSJ": "", - "SFJCGYQ": "否No", - "YWZZGDZ": "无症状No symptoms", - "JZYXGCZT": "", - "SBSJ": "", - "YSGDZ": "否No", - "shi": "", - "BRSFFS": "否No", - "FDYXMX": "", - "EXFOURTEENFEVER": "否No", - "XSXB": "", - "JJYXGCDD": "", - "JJLXRDH": "", - "SFJJYXGL": "否No", - "DQJZDZ": "", - "NL": "", - "LXSJ": "", - "JZGC": "", - "FYZKGDZ": "", - "JRSFYJCS": "否No", - "FXSJ": "", - "JJLXRXM": "", - "XQSFYQRBL": "否No", - "fk_id": "", - "JJLXRYBRGX": "", - "XM": "", - "JJYXGC": "", - "SFJQZYQHZ": "否No", - "SFYSHQZ": "否No", - "sheng": "", - "XSLX": "", - "ZZLXGDZ": "", - "SFDGYQSQ": "否No", - "ZKGDZ": "", - "EXTESTRESULT": "否No", - "EXCASECONTACT": "否No", - "SBSJ_STR": "", - "JZGLDD": "", - "JJGDZ": "否No", - "quxian": "", - "shi_TEXT": "", - "sqsfyyq": "否 No", - "EXTEST": "否No", - "EXCASE": "否No", - "FXLYD": "", - "sflxs": "否 No", - "sheng_TEXT": "", - "YXGCX": "否No", - "QZQK": "", - "CLSJ_STR": "", - "QTZZMS": "" - } - ], - "filter": [ ], - "delete": [ ] - }, - "name": "535b1ef6-bf51-4d4c-9ae4-5a90cdc4_record", - "pageNumber": 1, - "pageSize": 2147483647, - "recordCount": 0, - "rowSetName": "3586b9e6-f964-4a3b-a693-bb23da84", + "primary": [{ + "ZZLX": "", + "LXZT": "", + "DRTW": "36.3", + "JJGLZT": "", + "GRCN": "我承诺以上信息真实准确,并愿意承担相应法律责任。I promise that the above information is true and accurate, and I am willing to bear the corresponding legal responsibility.", + "ZXSJ": "", + "pk_id": "", + "ZH": "", + "YWZZ": "无症状No symptoms", + "JZGDZ": "否No", + "ZYMC": "", + "LXMDD": "", + "quxian_TEXT": "", + "DQSFJJIA": "", + "SZDW": "", + "FXQKGDZ": "", + "CLSJ": "", + "SFJCGYQ": "否No", + "YWZZGDZ": "无症状No symptoms", + "JZYXGCZT": "", + "SBSJ": "", + "YSGDZ": "否No", + "shi": "", + "BRSFFS": "否No", + "FDYXMX": "", + "EXFOURTEENFEVER": "否No", + "XSXB": "", + "JJYXGCDD": "", + "JJLXRDH": "", + "SFJJYXGL": "否No", + "DQJZDZ": "", + "NL": "", + "LXSJ": "", + "JZGC": "", + "FYZKGDZ": "", + "JRSFYJCS": "否No", + "FXSJ": "", + "JJLXRXM": "", + "XQSFYQRBL": "否No", + "fk_id": "", + "JJLXRYBRGX": "", + "XM": "", + "JJYXGC": "", + "SFJQZYQHZ": "否No", + "SFYSHQZ": "否No", + "sheng": "", + "XSLX": "", + "ZZLXGDZ": "", + "SFDGYQSQ": "否No", + "ZKGDZ": "", + "EXTESTRESULT": "否No", + "EXCASECONTACT": "否No", + "SBSJ_STR": "", + "JZGLDD": "", + "JJGDZ": "否No", + "quxian": "", + "shi_TEXT": "", + "sqsfyyq": "否 No", + "EXTEST": "否No", + "EXCASE": "否No", + "FXLYD": "", + "sflxs": "否 No", + "sheng_TEXT": "", + "YXGCX": "否No", + "QZQK": "", + "CLSJ_STR": "", + "QTZZMS": "" + }], + "filter": [], + "delete": [] + }, + "name": "535b1ef6-bf51-4d4c-9ae4-5a90cdc4_record", + "pageNumber": 1, + "pageSize": 2147483647, + "recordCount": 0, + "rowSetName": "3586b9e6-f964-4a3b-a693-bb23da84", "parameters": { - "relatedcontrols": "body_0", - "primarykey": "pk_id", + "relatedcontrols": "body_0", + "primarykey": "pk_id", "queryds": "535b1ef6-bf51-4d4c-9ae4-5a90cdc4" } - }, + }, "variable": { "rowSet": { - "primary": [ - { - "source": "interface", - "name": "SYS_USER", - "value": "", + "primary": [{ + "source": "interface", + "name": "SYS_USER", + "value": "", "type": "string" - }, + }, { - "source": "interface", - "name": "SYS_UNIT", - "value": "", + "source": "interface", + "name": "SYS_UNIT", + "value": "", "type": "string" - }, + }, { - "source": "interface", - "name": "SYS_DATE", - "value": "", + "source": "interface", + "name": "SYS_DATE", + "value": "", "type": "date" - }, + }, { - "name": "1189060d-4465-4b53-89c2-c9f88457.ID_NUMBER", + "name": "1189060d-4465-4b53-89c2-c9f88457.ID_NUMBER", "value": "" - }, + }, { - "name": "1189060d-4465-4b53-89c2-c9f88457.USER_NAME", + "name": "1189060d-4465-4b53-89c2-c9f88457.USER_NAME", "value": "" - }, + }, { - "name": "666d8a60-7108-4681-829d-545841c3.XB", + "name": "666d8a60-7108-4681-829d-545841c3.XB", "value": "" - }, + }, { - "name": "666d8a60-7108-4681-829d-545841c3.SZYX", + "name": "666d8a60-7108-4681-829d-545841c3.SZYX", "value": "" - }, + }, { - "name": "666d8a60-7108-4681-829d-545841c3.ZYMC", + "name": "666d8a60-7108-4681-829d-545841c3.ZYMC", "value": "" - }, + }, { - "name": "1189060d-4465-4b53-89c2-c9f88457.MOBILE", + "name": "1189060d-4465-4b53-89c2-c9f88457.MOBILE", "value": "" } - ], - "filter": [ ], - "delete": [ ] - }, - "name": "variable", - "pageNumber": 1, - "pageSize": 2147483647, - "recordCount": 0, - "parameters": { } + ], + "filter": [], + "delete": [] + }, + "name": "variable", + "pageNumber": 1, + "pageSize": 2147483647, + "recordCount": 0, + "parameters": {} } - }, + }, "parameters": { - "formid": "", - "status": "select", - "privilegeId": "", - "seqId": "", - "service_id": "41d9ad4a-f681-4872-a400-20a3b606d399", - "process": "", - "strUserId": "", - "strUserIdCC": "", + "formid": "", + "status": "select", + "privilegeId": "", + "seqId": "", + "service_id": "41d9ad4a-f681-4872-a400-20a3b606d399", + "process": "", + "strUserId": "", + "strUserIdCC": "", "nextActId": "" } } diff --git a/sduhealth.py b/sduhealth.py index 51ce863..7064508 100644 --- a/sduhealth.py +++ b/sduhealth.py @@ -324,7 +324,7 @@ def main(): if not sdu.whether_signed: print("Checkin Successful") - + sdu.health_logout() print("Logout Successful")