libushang 2 недель назад
Родитель
Сommit
1bcaf2e138
3 измененных файлов с 13 добавлено и 46 удалено
  1. 3 0
      routers/api/eventManagement/event.py
  2. 5 39
      routers/api/yst/yhxx.py
  3. 5 7
      utils/sg_auth.py

+ 3 - 0
routers/api/eventManagement/event.py

@@ -53,6 +53,9 @@ async def create_event(
             body['missing'] = None
             body['casualties'] == '0'
 
+        if 'eventId' in body:
+            del body['eventId']
+
         region_code = db_area.get_region_code_by_gps(db, body['longitude'], body['latitude'])
 
         event_base = EventBase(

+ 5 - 39
routers/api/yst/yhxx.py

@@ -127,45 +127,11 @@ def yhxx(
             'zjlx':'居民身份证', 
             'zjhm': sfz_tuomin(sfzh),
             'lxdh': ext_info['mobile']
+        },
+        "qyInfo": {
+            "qymc": '数字广东网络建设有限公司',
+            "qyjb": '规模以上',
+            "qydz": '广州市越秀区东风中路362号'
         }
     }
-    return yst_response(resp)
-    
-
-    req = GetCustCodeListByIdReq()
-    req.custId = sfzh
-    result = requestApi.getCustCodeListById(req)
-    if result is None:
-        return yst_response({
-            "ret": 1,
-            "msg": "提交到应用服务器失败"
-        })
-    
-    if len(result['data']) == 0:
-        resp = {
-            'ret': 1,
-            'msg': '您在梅州中燃没有燃气账户'
-        }
-        return yst_response(resp)
-    
-    redis_key = "ranqi_yhxx_" + uuid_str
-    redis_set_json(redis_key, result['data'])
-
-    return_data = []
-    data = result['data']
-    for n in data:
-        return_data.append({
-            'token': token,
-            'custcode': n['custcode'], 
-            'uuid': uuid_str, 
-            'xm': xm_tuomin(ext_info['name']), 
-            'zjlx':'居民身份证', 
-            'zjhm': sfzh_tuomin(sfzh),
-            'lxdh': ext_info['mobile']
-        })
-    resp = {
-        'ret': 0,
-        'msg': '',
-        'data': return_data
-    }
     return yst_response(resp)

+ 5 - 7
utils/sg_auth.py

@@ -180,23 +180,22 @@ def yst_pass_ext(
     x_tif_uinfo: str = Header(None),
     x_tif_ext: str = Header(None),
 ):
-    '''
     if token == 'fb5d86fa-1cf3-11ef-9b67-00ff257b5fc6':
         return {
             "account": "DGD440782197706290318",
             "account_type": "human",
-            "cid": "440782197706290318",
+            "cid": "440782199706290318",
             "corp": {
                 "account": "50b50b6d",
                 "address": "",
-                "cid": "91440705354627820H",
+                "cid": "91440000MA4X777A89",
                 "ctype": "49",
                 "level": "L2",
                 "link_person_name": "李步尚",
                 "mobile": "13426789046",
-                "name": "江门市新会区尚软网络科技有限公司",
+                "name": "数字广东网络建设有限公司",
                 "role_type": "parent_linked",
-                "social_credit_code": "91440705354627820H",
+                "social_credit_code": "91440000MA4X777A89",
                 "uid": "359a7db835994a7ebd147f09c5b9ae5d"
             },
             "ctype": "10",
@@ -207,11 +206,10 @@ def yst_pass_ext(
             "name": "李步尚",
             "origin": "SG",
             "sex": "1",
-            "tokenid": "f36be617ec901c64d1234484eabd7431",
+            "tokenid": "fb5d86fa-1cf3-11ef-9b67-00ff257b5fc6",
             "uid": "5b8f1a3e774d4ba8b7ccb2b2d51a38cd",
             "uversion": "1.0"
         }
-    '''
 
     logger.info("token: {}", token)