|
@@ -80,6 +80,7 @@ async def get_inspection_user_list(
|
|
|
}
|
|
|
except Exception as e:
|
|
|
# 处理异常
|
|
|
+ traceback.print_exc()
|
|
|
raise HTTPException(status_code=500, detail=str(e))
|
|
|
|
|
|
|
|
@@ -126,6 +127,7 @@ async def get_inspection_user(
|
|
|
}
|
|
|
except Exception as e:
|
|
|
# 处理异常
|
|
|
+ traceback.print_exc()
|
|
|
if str(e)=='':
|
|
|
e = detail
|
|
|
raise HTTPException(status_code=500, detail=str(e))
|
|
@@ -140,19 +142,20 @@ async def create_inspection_user(
|
|
|
user_id = Depends(valid_access_token)
|
|
|
):
|
|
|
try:
|
|
|
-
|
|
|
+ user_id_1 = body['user_id']
|
|
|
+ area_code = body['area_code']
|
|
|
# 创建新的预案记录
|
|
|
new_user = RiskManagementInspectionUser(
|
|
|
user_id=body['user_id'],
|
|
|
- dept_id = body['dept_id'],
|
|
|
- dept_name = body['dept_name'],
|
|
|
- ancestors_names = body['ancestors_names'],
|
|
|
- user_name = body['user_name'],
|
|
|
- nick_name = body['nick_name'],
|
|
|
- phonenumber = body['phonenumber'],
|
|
|
+ dept_id = '',#body['dept_id'],
|
|
|
+ dept_name = '',#body['dept_name'],
|
|
|
+ ancestors_names = '',#body['ancestors_names'],
|
|
|
+ user_name = '',#body['user_name'],
|
|
|
+ nick_name = '',#body['nick_name'],
|
|
|
+ phonenumber = '',#body['phonenumber'],
|
|
|
area_code = body['area_code'],
|
|
|
- area = body['area'],
|
|
|
- yzy_account = body['yzy_account'],
|
|
|
+ area = '',#body['area'],
|
|
|
+ yzy_account = '',#body['yzy_account'],
|
|
|
create_by = user_id
|
|
|
)
|
|
|
# 添加到数据库会话并提交
|
|
@@ -167,6 +170,7 @@ async def create_inspection_user(
|
|
|
}
|
|
|
except Exception as e:
|
|
|
# 处理异常
|
|
|
+ traceback.print_exc()
|
|
|
raise HTTPException(status_code=500, detail=str(e))
|
|
|
|
|
|
|
|
@@ -221,6 +225,7 @@ async def update_inspection_user(
|
|
|
}
|
|
|
except Exception as e:
|
|
|
# 处理异常
|
|
|
+ traceback.print_exc()
|
|
|
if str(e)=='':
|
|
|
e = detail
|
|
|
raise HTTPException(status_code=500, detail=str(e))
|
|
@@ -255,6 +260,7 @@ async def delete_inspection_users(
|
|
|
}
|
|
|
except Exception as e:
|
|
|
# 处理异常
|
|
|
+ traceback.print_exc()
|
|
|
if str(e) == '':
|
|
|
e = detail
|
|
|
raise HTTPException(status_code=500, detail=str(e))
|
|
@@ -290,6 +296,7 @@ async def delete_inspection_user(
|
|
|
}
|
|
|
except Exception as e:
|
|
|
# 处理异常
|
|
|
+ traceback.print_exc()
|
|
|
if str(e) == '':
|
|
|
e = detail
|
|
|
raise HTTPException(status_code=500, detail=str(e))
|