diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f579ad0..7f19705 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,9 +1,11 @@ - + + + @@ -426,7 +428,6 @@ - @@ -451,6 +452,7 @@ - \ No newline at end of file diff --git a/Log/log_file.log b/Log/log_file.log index eeade0b..dc4a54e 100644 --- a/Log/log_file.log +++ b/Log/log_file.log @@ -1785541,3 +1785541,906 @@ WARNING:werkzeug: * Debugger is active! INFO:werkzeug: * Debugger PIN: 977-835-729 INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 10:50:48.211719 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 10:50:48.212742 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 10:50:48.212742 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 10:50:48.212742 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 10:50:48.212742 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on http://localhost:5001 +INFO:werkzeug:Press CTRL+C to quit +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 10:51:00.566315 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 10:51:00.566315 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 10:51:00.567333 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 10:51:00.567333 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 10:51:00.567333 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 10:51:47.786817 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:47.788843 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:47.791004 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:47] "POST /myclass/api/get_List_domaine_formation/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:47] "POST /myclass/api/Get_Suggested_Fr_Cities/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:47] "POST /myclass/api/Get_Suggested_Word/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:48.521952 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:48.523949 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:48] "POST /myclass/api/get_all_class/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.533272 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.536728 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.539997 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.545487 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.548775 : La session de connexion n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.552272 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.554483 : La session de connexion n'est pas valide +INFO:root:2023-08-29 10:51:49.555889 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.560881 : La session de connexion n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.566912 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.570225 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.577050 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.579050 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.585237 : La session de connexion n'est pas valide +INFO:root:2023-08-29 10:51:49.587336 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.589355 : La session de connexion n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.597943 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.606085 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.610085 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.612086 : La session de connexion n'est pas valide +INFO:root:2023-08-29 10:51:49.614480 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.621268 : La session de connexion n'est pas valide +INFO:root:2023-08-29 10:51:49.624674 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.627675 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.632157 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.639198 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.643195 : La session de connexion n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.652565 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:49.653559 : La session de connexion n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/getRecodedClassImage_from_front/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:49.663729 : La session de connexion n'est pas valide +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:49] "POST /myclass/api/GetActiveSessionFormation_List/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:54.361610 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:54] "POST /myclass/api/partner_login/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:54.651095 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:54.657855 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:54.664058 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:51:54.672554 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:54] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:54] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:54] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:54.696568 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:54] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:51:54.775200 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:51:54] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:52:00.862995 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:52:00.868705 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:52:00.875235 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:52:00.883889 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:00] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:00] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:00] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:00] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:52:08.238795 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:52:08.244709 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:52:08.255829 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:08] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:08] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:08] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:52:28.651612 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:28] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:52:53.290148 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:52:53] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:05.669741 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:05] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:05.852130 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:05] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:16.315578 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:53:16.322754 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:53:16.329095 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:53:16.337821 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:16] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:16] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:16] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:16] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:27.368811 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:27] "POST /myclass/api/get_partner_class/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:27.469792 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:27] "POST /myclass/api/find_partner_class_like/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:36.914686 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:53:36.919322 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:53:36.926527 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 10:53:36.934137 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:36] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:36] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:36] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:36] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:43.016801 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:43] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 10:53:47.915492 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:53:47] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 10:54:57.391233 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 10:54:57.392234 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 10:54:57.392234 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 10:54:57.392234 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 10:54:57.392234 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 10:56:37.787664 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 10:56:37.787664 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 10:56:37.787664 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 10:56:37.787664 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 10:56:37.787664 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 10:58:03.011161 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 10:58:03.011161 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 10:58:03.011161 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 10:58:03.012181 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 10:58:03.012181 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 10:58:26.807300 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 10:58:26.807300 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 10:58:26.807300 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 10:58:26.807300 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 10:58:26.807300 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 10:58:38.505672 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 10:58:38] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:09:11.276663 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:09:11] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:12:16.268156 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:12:16.268156 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:12:16.269343 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:12:16.269343 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:12:16.269343 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:13:47.350141 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:13:47.350141 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:13:47.351141 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:13:47.351141 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:13:47.351141 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:13:47.392638 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:47.396968 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:47.399538 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:47] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:47] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:47] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:13:56.167545 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:56.170542 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:56.176396 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:13:56.183811 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:13:56.324815 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:56.328729 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:56.331742 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:13:56.337880 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:13:56] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:14:00.333448 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:14:00.337757 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:14:00.343318 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:14:00] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:14:00] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:14:00] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:14:57.114050 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:14:57] "POST /myclass/api/Add_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:14:58.920445 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:14:58] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:16:28.157853 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:16:28.163116 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:16:28.168538 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:16:28.174750 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:16:28] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:16:28] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:16:28] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:16:28] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:42.113415 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:42.121295 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:42.130619 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:42.139698 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:42.419254 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:42.424242 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:42.430183 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:42.445190 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:42] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:50.616337 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:50.620927 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:50.624927 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:50.633290 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:50.815582 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:50.820799 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:50.829275 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:50.836809 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:50] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:18:55.894821 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:55.900170 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:18:55.904566 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:55] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:55] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:18:55] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:19:55.827983 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:19:55] "POST /myclass/api/Add_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:19:57.489765 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:19:57] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:20:44.964125 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:44.967548 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:44.974651 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:44.982249 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:44] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:44] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:45] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:45] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:20:58.418666 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:58.426937 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:20:58.431236 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:58.440891 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:20:58.781459 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:58.790522 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:58.795089 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:20:58.799577 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:20:58] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:21:46.963196 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:21:46.970197 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:21:46.975196 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:21:46] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:21:46] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:21:46] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:21:57.850826 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:21:57] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:22:07.560021 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:22:07] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:23:22.984903 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:22.989054 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:22.993222 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:22] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:23] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:23:23.003242 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:23] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:23:23.172721 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:23.179147 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:23.184851 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:23.187865 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:23] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:23] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:23] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:23] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:23:29.825604 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:29.833145 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:23:29.838662 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:29] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:29] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:29] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:23:37.793846 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:37] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:23:44.430126 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:23:44] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:27:29.908903 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:29.912908 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:29] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:27:29.918748 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:29.926079 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:29] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:29] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:27:30.032865 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:30.038705 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:30.044872 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:30.047899 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:30] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:30] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:30] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:30] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:27:33.368454 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:33.371456 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:27:33.377041 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:33] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:33] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:33] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:27:40.928065 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:40] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:27:47.987569 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:27:48] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:29:06.613153 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:06.617866 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:06.623094 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:29:06.633165 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:29:06.846256 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:06.850058 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:06.855472 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:06.862320 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:06] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:29:16.750895 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:16.757078 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:29:16.762105 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:16] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:16] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:16] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:29:23.527032 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:23] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:29:31.933386 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:29:31] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:30:01.346213 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:30:01.351234 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:30:01.358888 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:30:01.361405 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:01] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:01] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:01] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:01] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:30:05.926508 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:05] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:30:16.217307 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:16] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:30:37.251376 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:37] "POST /myclass/api/Get_Given_Affectation_Ressource_Humaine_Poste/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:30:57.133744 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:30:57] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:32:44.626798 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:32:44.626798 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:32:44.627913 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:32:44.627913 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:32:44.627913 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:32:45.453171 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:32:45] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:36:52.411255 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:36:52.411255 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:36:52.411255 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:36:52.411255 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:36:52.411255 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:37:00.856132 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:37:00] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:41:20.968547 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:41:20.968547 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:41:20.968547 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:41:20.968547 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:41:20.968547 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on http://localhost:5001 +INFO:werkzeug:Press CTRL+C to quit +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:41:31.772498 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:41:31.772498 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:41:31.772498 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:41:31.773006 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:41:31.773006 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:42:07.224058 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:42:07] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:43:54.214498 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:43:54.214498 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:43:54.215950 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:43:54.215950 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:43:54.215950 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:44:38.751335 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:44:38.751335 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:44:38.751335 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:44:38.751335 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:44:38.751335 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:44:40.207363 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:44:40] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:46:05.928982 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:46:05.928982 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:46:05.928982 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:46:05.928982 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:46:05.928982 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:46:41.896425 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:46:41.896425 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:46:41.896425 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:46:41.896425 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:46:41.896425 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:47:07.346040 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:47:07.346040 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:47:07.346040 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:47:07.346040 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:47:07.346040 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:47:31.057324 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:47:31.057324 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:47:31.057324 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:47:31.057324 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:47:31.057324 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:47:52.465362 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:47:52.465362 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:47:52.465362 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:47:52.465362 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:47:52.465362 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:48:20.819832 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:48:20.819832 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:48:20.819832 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:48:20.820833 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:48:20.820833 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:49:36.834046 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:49:36.834046 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:49:36.834046 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:49:36.834046 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:49:36.834046 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:52:46.662531 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:52:46.662531 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:52:46.662531 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:52:46.662531 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:52:46.662531 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on http://localhost:5001 +INFO:werkzeug:Press CTRL+C to quit +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:52:58.001887 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:52:58.001887 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:52:58.001887 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:52:58.001887 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:52:58.001887 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:52:58.046373 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:52:58] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:54:17.423871 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:17.428872 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:17.434871 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:17.439871 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:17] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:17] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:17] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:54:18.428377 : Get_List_Ressource_Humaine_with_filter -'telephone' - Line : 967 +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:18] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:54:46.258593 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:46.264836 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:46.270550 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:54:46.283093 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:54:46.511430 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:46.520552 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:46.524939 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:54:46.532209 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:54:46.550042 : Get_List_Ressource_Humaine_with_filter -'telephone' - Line : 967 +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:54:46] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 11:59:34.838217 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 11:59:34.838217 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 11:59:34.839219 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 11:59:34.839219 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 11:59:34.839219 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 11:59:38.189376 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:59:38.194965 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:59:38.201249 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:59:38.216261 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 11:59:38.432616 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:59:38.438930 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:59:38.444944 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 11:59:38.450420 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 11:59:38] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:26.882841 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:01:26.889869 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:26] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:26.900683 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:01:26.907462 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:26] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:26] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:26] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:34.388649 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:01:34.393643 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:01:34.398173 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:34.407628 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:34.581245 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:01:34.588832 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:34.596142 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:01:34.602507 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:34] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:01:57.352705 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:01:57] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:02:05.329466 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:02:05.338080 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:02:05.346079 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:02:05] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:02:05] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:02:05] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:10:31.957172 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:10:31.957172 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:10:31.957172 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:10:31.957172 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:10:31.957172 : ++ LMS_BAS_URL mysy-training.com/ ++ +INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on http://localhost:5001 +INFO:werkzeug:Press CTRL+C to quit +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:10:43.172521 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:10:43.173524 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:10:43.173524 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:10:43.173524 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:10:43.173524 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 12:11:38.675558 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:11:38.680825 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:11:38.685603 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:11:38.699249 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:11:38.935278 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:11:38.944893 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:11:38.951611 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:11:38.960602 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:38] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:11:54.793701 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:54] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:11:59.409487 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:11:59] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:12:23.961370 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:12:23] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:12:38.496181 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:12:39.653455 : Get_List_Ressource_Humaine_with_filter -local variable 'user' referenced before assignment - Line : 1019 +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:12:39] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:13:39.058970 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:13:39.058970 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:13:39.058970 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:13:39.058970 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:13:39.058970 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 12:13:41.721095 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:13:41] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:13:58.508419 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:13:58] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:14:07.937031 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:07] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:14:24.626662 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:24] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:14:30.894506 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:30] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:14:37.713500 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:37] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:14:50.664598 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:50] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:14:57.275917 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:14:57.283665 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:14:57.293071 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:57] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:57] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:14:57] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_humaines.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:15:55.267790 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:15:55.267790 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:15:55.267790 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:15:55.267790 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:15:55.267790 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:root:2023-08-29 12:18:57.990597 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:18:58] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:21:00.154092 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:21:00.162889 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:21:00.169755 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:21:00] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:21:00.179453 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:21:00] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:21:00] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:21:00] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:25:39.921695 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:25:39.934883 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:25:39.936882 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:25:39] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:25:39.946300 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:25:39] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:25:39] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:25:39] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:25:47.851955 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:25:47] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:25:54.256075 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:25:54] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:26:58.888239 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:58] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:26:58.898512 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:26:58.903699 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:26:58.910012 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:58] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:58] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:26:59.122603 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:26:59.126925 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:26:59.133870 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:26:59.137047 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:59] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:59] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:59] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:26:59] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:27:06.400284 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:27:06.406314 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:27:06] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:27:06.416966 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:27:06] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:27:06] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:30:35.577401 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:30:35.581028 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:30:35.586269 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:30:35.589656 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:35] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:35] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:35] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:35] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:30:37.807045 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:30:37.811197 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:30:37.817199 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:37] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:30:37.825827 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:37] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:37] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:37] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:30:38.749605 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:30:38] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:31:15.644984 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:31:15.650047 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:31:15.658520 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:31:15] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:31:15.667528 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:31:15] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:31:15] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:31:15] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:16.250087 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:16.256180 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:16] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:16.269332 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:16] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:16.279417 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:16] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:16] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:21.716183 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:21.719648 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:21.722646 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/getRecodedImage/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:21.732903 : Connexion du partner recid = dbdd36f3d86a73e2bfac7b3f10f062ce1e7c22f7da37de192a OK. Mise à jour du firstconnexion et/ou lastconnexion : OK +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/get_partner_account/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/LMS_Get_Partner_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:21.900503 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:21.905231 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:21.909752 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:21.913738 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/Get_List_Profil_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/Get_List_Manager_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:21] "POST /myclass/api/Get_Related_Target_Collection_Data/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:46.536807 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:46] "POST /myclass/api/Get_List_Ressource_Humaine_with_filter/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:32:49.644810 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:49.649948 : Security check : IP adresse '127.0.0.1' connected +INFO:root:2023-08-29 12:32:49.656010 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:49] "POST /myclass/api/Get_Given_Ressource_Humaine/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:49] "POST /myclass/api/getRecoded_Employee_Image_from_front/ HTTP/1.1" 200 - +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:32:49] "POST /myclass/api/Get_List_Ressource_Humaine_Affectation/ HTTP/1.1" 200 - +INFO:root:2023-08-29 12:33:01.013399 : Security check : IP adresse '127.0.0.1' connected +INFO:werkzeug:127.0.0.1 - - [29/Aug/2023 12:33:01] "POST /myclass/api/Get_List_Ressource_Humaine_no_filter/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:37:56.623599 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:37:56.623599 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:37:56.623599 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:37:56.624602 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:37:56.624602 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:39:46.057862 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:39:46.057862 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:39:46.057862 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:39:46.057862 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:39:46.057862 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:40:15.401476 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:40:15.401476 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:40:15.401476 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:40:15.401476 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:40:15.401476 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:40:38.026653 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:40:38.027171 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:40:38.027171 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:40:38.027171 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:40:38.027171 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:42:20.394985 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:42:20.394985 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:42:20.394985 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:42:20.394985 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:42:20.394985 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:42:47.713773 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:42:47.713773 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:42:47.713773 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:42:47.713773 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:42:47.713773 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:43:33.065957 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:43:33.065957 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:43:33.065957 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:43:33.065957 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:43:33.066960 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:44:16.595696 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:44:16.595696 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:44:16.595696 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:44:16.595696 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:44:16.595696 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:44:40.430986 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:44:40.432080 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:44:40.432080 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:44:40.432080 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:44:40.432080 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:45:48.455874 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:45:48.456874 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:45:48.456874 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:45:48.456874 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:45:48.456874 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat +INFO:root:2023-08-29 12:46:24.421764 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2023-08-29 12:46:24.421764 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev ++ +INFO:root:2023-08-29 12:46:24.421764 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev') ++ +INFO:root:2023-08-29 12:46:24.421764 : ++ FLASK PORT 5001 ++ +INFO:root:2023-08-29 12:46:24.421764 : ++ LMS_BAS_URL mysy-training.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 977-835-729 +INFO:werkzeug: * Detected change in 'C:\\Users\\billa\\Documents\\myclass.com\\Siteweb\\Production\\Ela_back\\Back_Office\\ressources_materiels.py', reloading +INFO:werkzeug: * Restarting with stat diff --git a/main.py b/main.py index f39bc30..2ca864d 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,6 @@ from datetime import timedelta import Ela_Spacy as ls import user_message_mgt as um import user_session as us - import partners as pa import prj_common as mycommon import ela_index_bdd_classes as ela_index_class @@ -50,6 +49,7 @@ import partner_client as partner_client import Contact as Contact import Activite as Activite import ressources_humaines as ressources_humaines +import ressources_materiels as ressources_materiels app = Flask(__name__) cors = CORS(app, resources={r"/foo": {"origins": "*"}}) @@ -3692,12 +3692,6 @@ def Delete_Ressource_Humaine(): status, retval = ressources_humaines.Delete_Ressource_Humaine(payload) return jsonify(status=status, message=retval) - - - - - - """ API qui recupere la liste des ressources humaines d'un partenaire """ @@ -3925,6 +3919,210 @@ def Get_Related_Target_Collection_Data(): return jsonify(status=status, message=retval) +""" +API qui ajoute une ressource materielles +""" +@app.route('/myclass/api/Add_Ressource_Materielle/', methods=['POST','GET']) +@crossdomain(origin='*') +def Add_Ressource_Materielle(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Add_Ressource_Materielle payload = ",payload) + status, retval = ressources_materiels.Add_Ressource_Materielle(payload) + return jsonify(status=status, message=retval) + + +""" +API qui met a jour une ressource materielle +""" +@app.route('/myclass/api/Update_Ressource_Materielle/', methods=['POST','GET']) +@crossdomain(origin='*') +def Update_Ressource_Materielle(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Update_Ressource_Materielle payload = ",payload) + status, retval = ressources_materiels.Update_Ressource_Materielle(payload) + return jsonify(status=status, message=retval) + + +""" +API de suppression d'un materielle +""" +@app.route('/myclass/api/Delete_Ressource_Materielle/', methods=['POST','GET']) +@crossdomain(origin='*') +def Delete_Ressource_Materielle(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Delete_Ressource_Materielle payload = ",payload) + status, retval = ressources_materiels.Delete_Ressource_Materielle(payload) + return jsonify(status=status, message=retval) + +""" +API qui recupere la liste des ressources materielles d'un partenaire +""" +@app.route('/myclass/api/Get_List_Ressource_Materielle/', methods=['POST','GET']) +@crossdomain(origin='*') +def Get_List_Ressource_Materielle(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Get_List_Ressource_Materielle payload = ",payload) + status, retval = ressources_materiels.Get_List_Ressource_Materielle(payload) + return jsonify(status=status, message=retval) + + +""" +API qui recupere une ressource materielle donnée +""" +@app.route('/myclass/api/Get_Given_Ressource_Materielle/', methods=['POST','GET']) +@crossdomain(origin='*') +def Get_Given_Ressource_Materielle(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Get_Given_Ressource_Materielle payload = ",payload) + status, retval = ressources_materiels.Get_Given_Ressource_Materielle(payload) + return jsonify(status=status, message=retval) + + +""" +API qui retourne la liste des ressources materielles sans aucun filtre +""" + +@app.route('/myclass/api/Get_List_Ressource_Materielle_no_filter/', methods=['POST','GET']) +@crossdomain(origin='*') +def Get_List_Ressource_Materielle_no_filter(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Get_List_Ressource_Materielle_no_filter payload = ",payload) + status, retval = ressources_materiels.Get_List_Ressource_Materielle_no_filter(payload) + return jsonify(status=status, message=retval) + + +""" +API qui enregistre/met à jour l'image d'une ressource materielle +""" +@app.route('/myclass/api/Update_Ressource_Materielle_Image/', methods=['POST','GET']) +@crossdomain(origin='*') +def Update_Ressource_Materielle_Image(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Update_Ressource_Materielle_Image : payload = ",payload) + + if request.method == 'POST': + # Create variable for uploaded file + if ('file_img' in request.files.keys()): + file_img = request.files['file_img'] + else: + file_img = None + return False, "Aucun fichier image à enregistrer" + + localStatus, message = ressources_materiels.Update_Ressource_Materielle_Image(file_img, MYSY_GV.upload_folder, payload) + return jsonify(status=localStatus, message=message) + + +""" +API qui supprime l'image de profil d'une ressource materielle +""" +@app.route('/myclass/api/DeleteImage_Ressource_Materielle/', methods=['POST','GET']) +@crossdomain(origin='*') +def DeleteImage_Ressource_Materielle(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### DeleteImage_Ressource_Materielle payload = ",payload) + status, retval = ressources_materiels.DeleteImage_Ressource_Materielle(payload) + return jsonify(status=status, message=retval) + + +""" +Recuperation de l'image de profil d'un materiel +""" +@app.route('/myclass/api/getRecoded_Materielle_Image_from_front/', methods=['POST','GET']) +@crossdomain(origin='*') +def getRecoded_Materielle_Image_from_front(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### getRecoded_Materielle_Image_from_front payload = ",payload) + status, retval = ressources_materiels.getRecoded_Materielle_Image_from_front(payload) + return jsonify(status=status, message=retval) + + + +""" +Recuperation de la liste des affectatoions d'un materiel +""" +@app.route('/myclass/api/Get_List_Ressource_Materielle_Affectation/', methods=['POST','GET']) +@crossdomain(origin='*') +def Get_List_Ressource_Materielle_Affectation(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Get_List_Ressource_Materielle_Affectation payload = ",payload) + status, retval = ressources_materiels.Get_List_Ressource_Materielle_Affectation(payload) + return jsonify(status=status, message=retval) + + +""" +API pour affecter un materiel a un poste +""" +@app.route('/myclass/api/Add_Affectation_Ressource_Materielle_Poste/', methods=['POST','GET']) +@crossdomain(origin='*') +def Add_Affectation_Ressource_Materielle_Poste(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Add_Affectation_Ressource_Materielle_Poste payload = ",payload) + status, retval = ressources_materiels.Add_Affectation_Ressource_Materielle_Poste(payload) + return jsonify(status=status, message=retval) + +""" +API pour mettre à jour une affectation d'un materielle +""" +@app.route('/myclass/api/Update_Affectation_Ressource_Materielle_Poste/', methods=['POST','GET']) +@crossdomain(origin='*') +def Update_Affectation_Ressource_Materielle_Poste(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Update_Affectation_Ressource_Materielle_Poste payload = ",payload) + status, retval = ressources_materiels.Update_Affectation_Ressource_Materielle_Poste(payload) + return jsonify(status=status, message=retval) + + +""" +API pour supprimer une affectation d'un materiel +""" +@app.route('/myclass/api/Delete_Affectation_Ressource_Materielle_Poste/', methods=['POST','GET']) +@crossdomain(origin='*') +def Delete_Affectation_Ressource_Materielle_Poste(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Delete_Affectation_Ressource_Materielle_Poste payload = ",payload) + status, retval = ressources_materiels.Delete_Affectation_Ressource_Materielle_Poste(payload) + return jsonify(status=status, message=retval) + +""" +API pour recuperer une affectation donnée d'un materiel +""" +@app.route('/myclass/api/Get_Given_Affectation_Ressource_Materielle_Poste/', methods=['POST','GET']) +@crossdomain(origin='*') +def Get_Given_Affectation_Ressource_Materielle_Poste(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Get_Given_Affectation_Ressource_Materielle_Poste payload = ",payload) + status, retval = ressources_materiels.Get_Given_Affectation_Ressource_Materielle_Poste(payload) + return jsonify(status=status, message=retval) + +""" +API pour recuperer la liste des 'related_target_collection_object' avec les 'related_target_collection_id_nom' +et de les formater pour une utilisation simple coté front pour un materiel +""" +@app.route('/myclass/api/Get_Related_Target_Materiel_Collection_Data/', methods=['POST','GET']) +@crossdomain(origin='*') +def Get_Related_Target_Materiel_Collection_Data(): + # On recupere le corps (payload) de la requete + payload = mycommon.strip_dictionary (request.form.to_dict()) + print(" ### Get_Related_Target_Materiel_Collection_Data payload = ",payload) + status, retval = ressources_materiels.Get_Related_Target_Materiel_Collection_Data(payload) + return jsonify(status=status, message=retval) + + + if __name__ == '__main__': diff --git a/ressources_humaines.py b/ressources_humaines.py index 16ec168..460f0ef 100644 --- a/ressources_humaines.py +++ b/ressources_humaines.py @@ -266,11 +266,11 @@ def Add_Ressource_Humaine(diction): inserted_id = MYSY_GV.dbname['ressource_humaine'].insert_one(data).inserted_id if (not inserted_id): mycommon.myprint( - " Impossible de créer le contact ") + " Impossible de créer la ressource ") return False, " Impossible de créer la ressource " - return True, " Le contact a été correctement créé" + return True, " La ressource a été correctement créée" except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() @@ -613,12 +613,12 @@ def Delete_Ressource_Humaine(diction): - return True, " Les données a été correctement mises à jour" + return True, " L'employé a été correctement supprimé " except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) - return False, " Impossible de mettre à jour les données " + return False, " Impossible de supprimer l'employé " @@ -722,7 +722,7 @@ def Get_List_Ressource_Humaine(diction): except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) - return False, " Impossible de recuperer la liste des contact " + return False, " Impossible de recuperer les données des employés " """ Recuperation de la liste des profils de ressources humaines @@ -877,33 +877,35 @@ def Get_List_Ressource_Humaine_with_filter(diction): Recuperation des id des codes session pouvant correspondre a la valeur fournie par le user (regexp bien sur) """ - print(" ### sub_filt_session = ",sub_filt_session) + filt_session = {} Lists_session_id = [] - for Lists_session in MYSY_GV.dbname['session_formation'].find(sub_filt_session, {'_id':1}): - Lists_session_id.append(str(Lists_session['_id'])) + if ("session" in diction.keys()): + for Lists_session in MYSY_GV.dbname['session_formation'].find(sub_filt_session, {'_id':1}): + Lists_session_id.append(str(Lists_session['_id'])) + + if( len(Lists_session_id) > 0): + filt_session = {'related_target_collection_id': {'$in': Lists_session_id, }, + 'related_collection': 'ressource_humaine', + 'related_target_collection': 'session_formation', + } """ Recuperation des id des formation pouvant correspondre a la valeur fournie par le user (regexp bien sur) """ - print(" ### sub_filt_formation = ", sub_filt_formation) filt_formation = {} Lists_formation_id = [] - for Lists_formation in MYSY_GV.dbname['myclass'].find(sub_filt_formation, {'_id': 1}): - Lists_formation_id.append(str(Lists_formation['_id'])) - - if(len(Lists_formation_id) > 0 ): - filt_formation = {'related_target_collection_id': {'$in': Lists_formation_id, }, - 'related_collection':'ressource_humaine', - 'related_target_collection':'myclass', - } + if ("formation" in diction.keys()): + for Lists_formation in MYSY_GV.dbname['myclass'].find(sub_filt_formation, {'_id': 1}): + Lists_formation_id.append(str(Lists_formation['_id'])) - - - print(" #### List formation = ", str(Lists_formation_id)) - + if(len(Lists_formation_id) > 0 ): + filt_formation = {'related_target_collection_id': {'$in': Lists_formation_id, }, + 'related_collection':'ressource_humaine', + 'related_target_collection':'myclass', + } """ @@ -918,7 +920,7 @@ def Get_List_Ressource_Humaine_with_filter(diction): find_qry = {'$and':[{'partner_recid': str(my_partner['recid']), 'valide':'1', 'locked':'0' }, filt_nom, filt_email] } - Je suis ici entrain de traiter les filtres + new_myquery = [{'$match': find_qry}, {"$addFields": {"ressource_humaine_Id": {"$toString": "$_id"}}}, {'$lookup': @@ -926,7 +928,7 @@ def Get_List_Ressource_Humaine_with_filter(diction): 'from': 'ressource_humaine_affectation', 'localField': "ressource_humaine_Id", 'foreignField': 'related_collection_recid', - 'pipeline': [{'$match':{ '$and' : [ {'partner_owner_recid': str(my_partner['recid'])}, {'valide':'1'}] } }, {'$project': {'poste': 1, + 'pipeline': [{'$match':{ '$and' : [ filt_formation, filt_session, {'partner_owner_recid': str(my_partner['recid'])}, {'valide':'1'}] } }, {'$project': {'poste': 1, 'date_du': 1, 'date_au':1, 'related_target_collection':1 @@ -939,16 +941,90 @@ def Get_List_Ressource_Humaine_with_filter(diction): print(" ##### new_myquery aa = ", new_myquery) print(" ##### find_qry aa = ", find_qry) - RetObject = [] - val_tmp = 1 + New_RetObject = [] + New_val_tmp = 1 - for retval in MYSY_GV.dbname['ressource_humaine'].find(find_qry): - user = retval - user['id'] = str(val_tmp) - val_tmp = val_tmp + 1 - RetObject.append(mycommon.JSONEncoder().encode(user)) - return True, RetObject + """" + Si dans la requette on a les champ : 'formation' ou 'session' on utiliser la requete ci-dessous. + Cela veut dire qu'on cherche des ressources qui sont des affectation avec une formation ou une session. + """ + if( "formation" in diction.keys() or "session" in diction.keys()): + for New_retVal in MYSY_GV.dbname['ressource_humaine'].aggregate(new_myquery): + if ('ressource_humaine_affectation_collection' in New_retVal.keys() and len(New_retVal['ressource_humaine_affectation_collection']) > 0): + print(" #### RESULT New_retVal for = ", New_retVal['nom']) + user = {} + user['id'] = str(New_val_tmp) + New_val_tmp = New_val_tmp + 1 + + + user['_id'] = New_retVal['_id'] + user['partner_recid'] = New_retVal['partner_recid'] + user['nom'] = New_retVal['nom'] + user['email'] = New_retVal['email'] + + if ("prenom" in New_retVal.keys()): + user['prenom'] = New_retVal['prenom'] + else: + user['prenom'] = "" + + if ("civilite" in New_retVal.keys()): + user['civilite'] = New_retVal['civilite'] + else: + user['civilite'] = "" + + if( "telephone" in New_retVal.keys()): + user['telephone'] = New_retVal['telephone'] + else: + user['telephone'] = "" + + if ("ismanager" in New_retVal.keys()): + user['ismanager'] = New_retVal['ismanager'] + else: + user['ismanager'] = "" + + if ("superieur_hierarchie_id" in New_retVal.keys()): + user['superieur_hierarchie_id'] = New_retVal['superieur_hierarchie_id'] + else: + user['superieur_hierarchie_id'] = "" + + + if ("telephone_mobile" in New_retVal.keys()): + user['telephone_mobile'] = New_retVal['telephone_mobile'] + else: + user['telephone_mobile'] = "New_retVal['telephone_mobile']" + + + user['affectation'] = [] + for local_affectation in New_retVal['ressource_humaine_affectation_collection']: + affectation = {} + if ("poste" in local_affectation.keys()): + affectation['poste'] = local_affectation['poste'] + else: + affectation['poste'] = "" + + affectation['related_target_collection'] = local_affectation['related_target_collection'] + affectation['date_du'] = local_affectation['date_du'] + affectation['date_au'] = local_affectation['date_au'] + + + print(" ### AFFACTATION local_affectation = ", local_affectation) + + New_RetObject.append(mycommon.JSONEncoder().encode(user)) + + return True, New_RetObject + else: + # Il s'agit d'une recherche sans lien avec des fonctions occupés dans une formation ou une session + RetObject = [] + val_tmp = 1 + + for retval in MYSY_GV.dbname['ressource_humaine'].find(find_qry): + user = retval + user['id'] = str(val_tmp) + val_tmp = val_tmp + 1 + RetObject.append(mycommon.JSONEncoder().encode(user)) + + return True, RetObject except Exception as e: @@ -1037,7 +1113,7 @@ def Get_List_Ressource_Humaine_no_filter(diction): except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) - return False, " Impossible de recuperer la liste des contact " + return False, " Impossible de recuperer la liste des employés " @@ -1149,7 +1225,7 @@ def Get_Given_Ressource_Humaine(diction): return False, " Impossible de recuperer la personne " """ -Cette fonction ajoute une image de profil d'un stagaire +Cette fonction ajoute une image de profil d'un employé """ def Update_Ressource_Humaine_Image(file_img=None, Folder=None, diction=None): try: @@ -2270,7 +2346,7 @@ def Add_Affectation_Ressource_Humaine_Poste(diction): inserted_data = MYSY_GV.dbname['ressource_humaine_affectation'].insert_one(my_data) if( inserted_data is None): - return False," Impossible d'affectuer l'employé au poste (2)" + return False," Impossible d'affecter l'employé au poste (2)" return True, "L'affectation de l'employé a été correctement faite." @@ -2384,7 +2460,7 @@ def Update_Affectation_Ressource_Humaine_Poste(diction): str(inspect.stack()[0][ 3]) + " Le champ 'comment' a plus de 500 caractères ") return False, "Le champ 'comment' a plus de 500 caractères " - update_data['date_du'] = date_du + update_data['comment'] = comment poste = "" @@ -2696,4 +2772,8 @@ def Get_Related_Target_Collection_Data(diction): except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) - return False, " Impossible de recuperer les information des cibles " \ No newline at end of file + return False, " Impossible de recuperer les information des cibles " + + + + diff --git a/ressources_materiels.py b/ressources_materiels.py new file mode 100644 index 0000000..58acfa3 --- /dev/null +++ b/ressources_materiels.py @@ -0,0 +1,1729 @@ +""" +Ce fichier permet de gerer les ressources matériels +Par exemple : +- Les cartes +- Les projecteurs +- Les ordinateurs, imprimantes, scanner, +- Les livres, +- Les sales reunion +- Les empphithéatres +- etc + +En gros toute ressources non humaine + +Une ressource materiel est defini par : +- ref_interne, ref_externe, nom, description, detail, famille, marque, type (à definir), prix_achat (prix d'achat estimé), image, fournisseur, qty_stock (qté en stock), +""" + +import pymongo +from pymongo import MongoClient +import json +from bson import ObjectId +import re +from datetime import datetime +import prj_common as mycommon +import secrets +import inspect +import sys, os +import csv +import pandas as pd +from pymongo import ReturnDocument +import GlobalVariable as MYSY_GV +from math import isnan +import GlobalVariable as MYSY_GV +import ela_index_bdd_classes as eibdd +import email_mgt as email + + +""" +La clé d'une ressource materielle est : +- la ref_interne +""" +def Add_Ressource_Materielle(diction): + + try: + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', "ref_interne", "nom", "description", "detail", "famille",'marque', 'type', + 'prix_achat', 'fournisseur', 'qty_stock',] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + field_list_obligatoire = ['token', "ref_interne", ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Les informations fournies sont incorrectes", + + """ + Verification de l'identité et autorisation de l'entité qui + appelle cette API + """ + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + # Verifier la validité du token + retval = mycommon.check_partner_token_validity("", token) + + if retval is False: + return "Err_Connexion", " La session de connexion n'est pas valide" + + partner_recid = mycommon.get_parnter_recid_from_token(token) + if (partner_recid is False): + mycommon.myprint( + str(inspect.stack()[0][3]) + " - partner_recid est KO. Les données de connexion sont incorrectes ") + return False, " Vous n'etes pas autorisé à utiliser cette API " + + # Recuperation des données du partenaire + local_status, my_partner = mycommon.get_partner_data_from_recid(partner_recid) + if (local_status is False): + mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire") + return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire. " + + + """ + Verification s'il n'existe pas un matereiel avec la meme reference interne + """ + + tmp_count = MYSY_GV.dbname['ressource_materielle'].count_documents({'ref_interne': str(diction['ref_interne']), + 'valide': '1', 'partner_recid': my_partner['recid']}) + if (tmp_count > 0): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Il existe déjà un matereiel avec cette reference interne = " +str(diction['ref_interne'])) + + return False, " - Il existe déjà un matereiel avec cette reference interne " +str(diction['ref_interne'])+" " + + + + """ + Recuperation des données fournies en entrée + """ + data = {} + data['partner_recid'] = my_partner['recid'] + + + ref_interne = "" + if ("ref_interne" in diction.keys()): + if diction['ref_interne']: + ref_interne = diction['ref_interne'] + if (len(str(ref_interne)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'ref_interne' fait plus de 255 caractère ") + + return False, " - Le champ 'ref_interne' fait plus de 255 caractère " + data['ref_interne'] = diction['ref_interne'] + + + nom = "" + if ("nom" in diction.keys()): + if diction['nom']: + nom = diction['nom'] + if (len(str(nom)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'nom' fait plus de 255 caractère ") + + return False, " - Le champ 'nom' fait plus de 255 caractère " + data['nom'] = diction['nom'] + + + description = "" + if ("description" in diction.keys()): + if diction['description']: + description = diction['description'] + if (len(str(description)) > 500): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'description' fait plus de 500 caractère ") + + return False, " - Le champ 'Detail' fait plus de 500 caractère " + data['description'] = diction['description'] + + + detail = "" + if ("detail" in diction.keys()): + if diction['detail']: + detail = diction['detail'] + if(len(str(detail)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'Detail' fait plus de 255 caractère ") + + return False, " - Le champ 'Detail' fait plus de 255 caractère " + + data['detail'] = diction['detail'] + + + + famille = "" + if ("famille" in diction.keys()): + if diction['famille']: + famille = diction['famille'] + data['famille'] = diction['famille'] + + + marque = "" + if ("marque" in diction.keys()): + if diction['marque']: + marque = diction['marque'] + data['marque'] = diction['marque'] + + type = "" + if ("type" in diction.keys()): + if diction['type']: + type = diction['type'] + data['type'] = diction['type'] + + + + prix_achat = "" + if ("prix_achat" in diction.keys()): + if diction['prix_achat']: + prix_achat = diction['prix_achat'] + local_status, local_val = mycommon.IsFloat(prix_achat) + if( local_status is False): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le prix d'achat est invalide ") + + return False, " - Le prix d'achat est invalide " + + data['prix_achat'] = diction['prix_achat'] + + + fournisseur = "" + if ("fournisseur" in diction.keys()): + if diction['fournisseur']: + fournisseur = diction['fournisseur'] + data['fournisseur'] = diction['fournisseur'] + + + qty_stock = "" + if ("qty_stock" in diction.keys()): + if diction['qty_stock']: + qty_stock = diction['qty_stock'] + local_status, local_val = mycommon.IsFloat(qty_stock) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - La quantité en stock est invalide ") + + return False, " - La quantité en stock est invalide " + + data['qty_stock'] = diction['qty_stock'] + + + + + data['valide'] = '1' + data['locked'] = '0' + data['date_update'] = str(datetime.now()) + + # Creation du RecId + data['recid'] = mycommon.create_user_recid() + + + inserted_id = "" + inserted_id = MYSY_GV.dbname['ressource_materielle'].insert_one(data).inserted_id + if (not inserted_id): + mycommon.myprint( + " Impossible de créer le materiel ") + return False, " Impossible de créer le materiel " + + + return True, " Le matereiel a été correctement créé" + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible d'ajouter le materiel " + + + +""" +Mise à jour d'une ressource matereiel en se basant sur sont _id +""" +def Update_Ressource_Materielle(diction): + try: + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', "ref_interne", "nom", "description", "detail", "famille",'marque', 'type', + 'prix_achat', 'fournisseur', 'qty_stock', '_id'] + + + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + field_list_obligatoire = ['token', '_id', 'email'] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Les informations fournies sont incorrectes", + + """ + Verification de l'identité et autorisation de l'entité qui + appelle cette API + """ + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + # Verifier la validité du token + retval = mycommon.check_partner_token_validity("", token) + + if retval is False: + return "Err_Connexion", " La session de connexion n'est pas valide" + + partner_recid = mycommon.get_parnter_recid_from_token(token) + if (partner_recid is False): + mycommon.myprint( + str(inspect.stack()[0][3]) + " - partner_recid est KO. Les données de connexion sont incorrectes ") + return False, " Vous n'etes pas autorisé à utiliser cette API " + + # Recuperation des données du partenaire + local_status, my_partner = mycommon.get_partner_data_from_recid(partner_recid) + if (local_status is False): + mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire") + return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire. " + + """ + Verification si ce materiel n'existe pas deja pour ce partner + """ + + qry_update = {'_id': ObjectId(str(diction['_id'])), 'valide': '1', 'locked': '0', 'partner_recid': str(my_partner['recid']),} + + + + print(" ### qry_update aa = ", qry_update) + + tmp_count = MYSY_GV.dbname['ressource_materielle'].count_documents(qry_update) + if (tmp_count <= 0): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Ce materiel n'existe pas = "+str(diction['nom'])) + + return False, " -Ce materiel n'existe pas " + + + + """ + Recuperation des données fournies en entrée + """ + + data_update = {} + """ + Recuperation des données fournies en entrée + """ + + ref_interne = "" + if ("ref_interne" in diction.keys()): + ref_interne = diction['ref_interne'] + if (len(str(ref_interne)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'ref_interne' fait plus de 255 caractère ") + + return False, " - Le champ 'ref_interne' fait plus de 255 caractère " + data_update['ref_interne'] = diction['ref_interne'] + + nom = "" + if ("nom" in diction.keys()): + nom = diction['nom'] + if (len(str(nom)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'nom' fait plus de 255 caractère ") + + return False, " - Le champ 'nom' fait plus de 255 caractère " + data_update['nom'] = diction['nom'] + + description = "" + if ("description" in diction.keys()): + description = diction['description'] + if (len(str(description)) > 500): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'description' fait plus de 500 caractère ") + + return False, " - Le champ 'Detail' fait plus de 500 caractère " + data_update['description'] = diction['description'] + + detail = "" + if ("detail" in diction.keys()): + detail = diction['detail'] + if (len(str(detail)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le champ 'Detail' fait plus de 255 caractère ") + + return False, " - Le champ 'Detail' fait plus de 255 caractère " + + data_update['detail'] = diction['detail'] + + famille = "" + if ("famille" in diction.keys()): + famille = diction['famille'] + data_update['famille'] = diction['famille'] + + marque = "" + if ("marque" in diction.keys()): + marque = diction['marque'] + data_update['marque'] = diction['marque'] + + type = "" + if ("type" in diction.keys()): + type = diction['type'] + data_update['type'] = diction['type'] + + prix_achat = "" + if ("prix_achat" in diction.keys()): + prix_achat = diction['prix_achat'] + local_status, local_val = mycommon.IsFloat(prix_achat) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - Le prix d'achat est invalide ") + + return False, " - Le prix d'achat est invalide " + + data_update['prix_achat'] = diction['prix_achat'] + + fournisseur = "" + if ("fournisseur" in diction.keys()): + fournisseur = diction['fournisseur'] + data_update['fournisseur'] = diction['fournisseur'] + + qty_stock = "" + if ("qty_stock" in diction.keys()): + qty_stock = diction['qty_stock'] + local_status, local_val = mycommon.IsFloat(qty_stock) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " - La quantité en stock est invalide ") + + return False, " - La quantité en stock est invalide " + + data_update['qty_stock'] = diction['qty_stock'] + + + data_update['valide'] = '1' + data_update['locked'] = '0' + data_update['date_update'] = str(datetime.now()) + + """ + Clés de mise à jour + """ + data_cle = {'_id': ObjectId(str(diction['_id'])), 'valide': '1', 'locked': '0', 'partner_recid': str(my_partner['recid']),} + + + inserted_id = "" + result = MYSY_GV.dbname['ressource_materielle'].find_one_and_update( + data_cle, + {"$set": data_update}, + upsert=False, + return_document=ReturnDocument.AFTER + ) + if (result is None or "_id" not in result.keys()): + mycommon.myprint( + " Impossible de mettre à jour le materiel : email = ") + return False, " Impossible de mettre à jour le materiel " + + return True, " Le materiel a été correctement mis à jour" + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de mettre à jour les données " + +""" +Suppression d'une ressource materiel +""" + +def Delete_Ressource_Materielle(diction): + try: + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', '_id', 'ref_interne', ] + + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + field_list_obligatoire = ['token', '_id',] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Les informations fournies sont incorrectes", + + """ + Verification de l'identité et autorisation de l'entité qui + appelle cette API + """ + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + # Verifier la validité du token + retval = mycommon.check_partner_token_validity("", token) + + if retval is False: + return "Err_Connexion", " La session de connexion n'est pas valide" + + partner_recid = mycommon.get_parnter_recid_from_token(token) + if (partner_recid is False): + mycommon.myprint( + str(inspect.stack()[0][3]) + " - partner_recid est KO. Les données de connexion sont incorrectes ") + return False, " Vous n'etes pas autorisé à utiliser cette API " + + # Recuperation des données du partenaire + local_status, my_partner = mycommon.get_partner_data_from_recid(partner_recid) + if (local_status is False): + mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire") + return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire. " + + + """ + Verification de l'existance de l'employée a supprimer + """ + existe_employee_count = MYSY_GV.dbname['ressource_materielle'].count_documents({'_id': ObjectId(str(diction['_id'])), + 'partner_recid': str(my_partner['recid']),}) + + if( existe_employee_count <= 0 ): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Ce materiel est invalide") + return False, str(inspect.stack()[0][3]) + " -Cet materiel est invalide " + + """ + Suppression des eventuels affectation de ce materiel + """ + MYSY_GV.dbname['ressource_materielle_affectation'].delete_many({'related_collection_recid': (str(diction['_id'])), + 'partner_recid': str(my_partner['recid']), + 'related_collection':'ressource_materielle'}) + + + + + + """ + Suppression du materiel + """ + MYSY_GV.dbname['ressource_materielle'].delete_many({'_id': ObjectId(str(diction['_id'])), + 'partner_recid': str(my_partner['recid']),}) + + + + return True, " Le materiel a été correctement supprimé" + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de supprimer le materiel " + + +""" +Recuperation de la liste des ressources materielle d'une entité en se basant sur +- token (partner_recid) + +""" +def Get_List_Ressource_Materielle(diction): + try: + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', ] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + field_list_obligatoire = ['token', ] + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Les informations fournies sont incorrectes", + + """ + Verification de l'identité et autorisation de l'entité qui + appelle cette API + """ + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + # Verifier la validité du token + retval = mycommon.check_partner_token_validity("", token) + + if retval is False: + return "Err_Connexion", " La session de connexion n'est pas valide" + + # Recuperation des données du partenaire + local_status, my_partner = mycommon.get_partner_data_from_token(token) + if (local_status is False): + mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données de l'utilisateur ") + return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données de l'utilisateur. " + + """ + Clés de mise à jour + """ + data_cle = {} + data_cle['partner_recid'] = str(my_partner['recid']) + + data_cle['locked'] = "0" + data_cle['valide'] = "1" + + RetObject = [] + val_tmp = 1 + + for retval in MYSY_GV.dbname['ressource_materielle'].find(data_cle): + user = retval + user['id'] = str(val_tmp) + val_tmp = val_tmp + 1 + RetObject.append(mycommon.JSONEncoder().encode(user)) + + return True, RetObject + + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recuperer la liste du materiel " + + +""" +Recherche sans filter - no_filter +""" +def Get_List_Ressource_Materielle_no_filter(diction): + try: + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', ] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + field_list_obligatoire = ['token', ] + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Les informations fournies sont incorrectes", + + """ + Verification de l'identité et autorisation de l'entité qui + appelle cette API + """ + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + # Verifier la validité du token + retval = mycommon.check_partner_token_validity("", token) + + if retval is False: + return "Err_Connexion", " La session de connexion n'est pas valide" + + # Recuperation des données du partenaire + local_status, my_partner = mycommon.get_partner_data_from_token(token) + if (local_status is False): + mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données de l'utilisateur ") + return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données de l'utilisateur. " + + + + """ + Clés de mise à jour + """ + data_cle = {} + data_cle['partner_recid'] = str(my_partner['recid']) + + data_cle['locked'] = "0" + data_cle['valide'] = "1" + + find_qry = {'partner_recid': str(my_partner['recid']), 'valide':'1', 'locked':'0' } + + + RetObject = [] + val_tmp = 1 + + for retval in MYSY_GV.dbname['ressource_materielle'].find(find_qry): + user = retval + user['id'] = str(val_tmp) + val_tmp = val_tmp + 1 + RetObject.append(mycommon.JSONEncoder().encode(user)) + + return True, RetObject + + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recuperer la liste des ressources materielles " + +""" +Recuperation d'une ressource materielle donnée en se basant sur on token, _id, +""" +def Get_Given_Ressource_Materielle(diction): + try: + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', '_id'] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + field_list_obligatoire = ['token', '_id'] + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Les informations fournies sont incorrectes", + + """ + Verification de l'identité et autorisation de l'entité qui + appelle cette API + """ + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + # Verifier la validité du token + retval = mycommon.check_partner_token_validity("", token) + + if retval is False: + return "Err_Connexion", " La session de connexion n'est pas valide" + + # Recuperation des données du partenaire + local_status, my_partner = mycommon.get_partner_data_from_token(token) + if (local_status is False): + mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données de l'utilisateur ") + return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données de l'utilisateur. " + + + + """ + Clés de mise à jour + """ + data_cle = {} + data_cle['partner_recid'] = str(my_partner['recid']) + data_cle['_id'] = ObjectId(str(diction['_id'])) + + data_cle['valide'] = "1" + data_cle['locked'] = "0" + + RetObject = [] + val_tmp = 1 + + #print(" ### data_cle = ", data_cle) + for retval in MYSY_GV.dbname['ressource_materielle'].find(data_cle): + user = retval + user['id'] = str(val_tmp) + val_tmp = val_tmp + 1 + + RetObject.append(mycommon.JSONEncoder().encode(user)) + + #print(" ### RetObject = ", RetObject) + return True, RetObject + + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recuperer les données du materiel " + + +""" +Cette fonction ajoute une image de profil d'un materiel +""" +def Update_Ressource_Materielle_Image(file_img=None, Folder=None, diction=None): + try: + + # Dictionnaire des champs utilisables + ''' + # Verification que les champs reçus dans l'API sont bien dans la liste des champs autorisés + # Cela evite le cas ou une entité tierce ajouter les valeurs inconnu dans l'API + # Ici on doit mettre tous les champs possible (obligatoire ou non) de la BDD dans la liste + # field_list. + ''' + field_list = ['token', 'file_img_recid', 'rm_id' ] + + + incom_keys = diction.keys() + + + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str(inspect.stack()[0][3]) + " : Le champ '"+val + "' n'est pas autorisé ") + return False, " Le champ '" + val + "' n'est pas accepté " + + ''' + Une fois qu'on a controlé que toutes les clés mise dans l'API sont correcte. etape precedente, + On controle que les champs obligatoires sont presents dans la liste + ''' + field_list_obligatoire = ['token'] + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint(str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ") + return False, " La valeur '" + val + "' n'est pas presente dans liste " + + # recuperation des paramettre + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner + + + + rm_id = "" + if ("rm_id" in diction.keys()): + if diction['rm_id']: + rm_id = diction['rm_id'] + + + if( file_img ): + recordimage_diction = {} + recordimage_diction['token'] = diction['token'] + recordimage_diction['related_collection'] = "ressource_materielle" + recordimage_diction['type_img'] = "user" + recordimage_diction['related_collection_recid'] = str(rm_id) + recordimage_diction['image_recid'] = diction['file_img_recid'] + + + local_status, local_message = mycommon.recordClassImage_v2(file_img, MYSY_GV.upload_folder, recordimage_diction) + if( local_status is False): + return local_status, local_message + + return True, "L'image a été correctement enregistrée" + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno)) + return False, "Impossible d'enregistrer l'image" + +""" +Suppresion d'un image d'une ressource humaine +""" +def DeleteImage_Ressource_Materielle(diction=None): + try: + + # Dictionnaire des champs utilisables + field_list = ['token', 'image_recid', ] + incom_keys = diction.keys() + + ''' + # Verification que les champs reçus dans l'API sont bien dans la liste des champs autorisés + # Cela evite le cas ou une entité tierce ajouter les valeurs inconnu dans l'API + # Ici on doit mettre tous les champs possible (obligatoire ou non) de la BDD dans la liste + # field_list. + ''' + for val in incom_keys: + if str(val).lower() not in str(field_list).lower(): + mycommon.myprint( + str(inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas accepté dans cette API") + return False, " Impossible de se connecter" + + ''' + Une fois qu'on a controlé que toutes les clés mise dans l'API sont correcte. etape precedente, + On controle que les champs obligatoires sont presents dans la liste + ''' + field_list_obligatoire = ['token', 'image_recid'] + for val in field_list_obligatoire: + if str(val).lower() not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " La valeur '" + val + "' n'est pas presente dans liste des champs") + return False, "Impossible de se connecter" + + mydata = {} + mytoken = "" + + # recuperation des paramettre + if ("token" in diction.keys()): + if diction['token']: + mytoken = diction['token'] + + image_recid = "" + if ("image_recid" in diction.keys()): + if diction['image_recid']: + image_recid = diction['image_recid'] + + local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner + + # " Lecture du fichier " + # print(" Lecture du fichier : " + saved_file + ". le token est :" + str(mytoken)) + nb_line = 0 + coll_name = MYSY_GV.dbname['mysy_images'] + + query_delete = {"recid": image_recid,} + + + ret_val = coll_name.delete_one({"recid": image_recid,}, ) + + + + print(" ### recordClassImage_v2 :L'image a été correctement supprimée ") + return True, "L'image a été correctement supprimée" + + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + print(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno)) + return False, "Impossible de supprimer l'image " + +""" Recuperation de l'image d'un employé + +/!\ important : on prend le 'related_collection_recid' comme le '_id' de la collection inscription +""" +def getRecoded_Materielle_Image_from_front(diction=None): + try: + # Dictionnaire des champs utilisables + field_list = ['token', 'rm_id', ] + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - Le champ '" + val + "' n'existe pas, requete annulée") + return False, " Impossible de recuperer les informations" + + ''' + Une fois qu'on a controlé que toutes les clés mise dans l'API sont correcte. etape precedente, + On controle que les champs obligatoires sont presents dans la liste + ''' + field_list_obligatoire = ['token', 'rm_id',] + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][3]) + " - : La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Impossible de recuperer les informations" + + + local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner + + + qery_images = {'locked': '0', 'valide': '1', 'related_collection': 'ressource_materielle', + 'related_collection_recid': str(diction['rm_id'])} + + print(" ### qery_images = ", qery_images) + + RetObject = [] + employee_images = {} + # Recuperation des image 'logo' et 'cachet' si le partenaire en a + for retVal in MYSY_GV.dbname['mysy_images'].find(qery_images): + if ('type_img' in retVal.keys()): + if (retVal['type_img'] == "user"): + employee_images['logo_img'] = retVal['img'].decode() + employee_images['logo_img_recid'] = retVal['recid'] + + + RetObject.append(mycommon.JSONEncoder().encode(employee_images)) + + + return True, RetObject + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + print(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recupérer l'image de l'employé " + + +"""" +Recuperer les affectations d'un employé +:!\ : Pour le moment une affectation ne peut concerner que +- Une formation (collection : myclass) ou +- Une session de formation (collection session_formation) ou +- rien du tout (cela veut dire que la fonction concene le partenaire, donc l'ecole. +exemple : Directeur des etude, etc) +""" +def Get_List_Ressource_Materielle_Affectation(diction): + try: + field_list_obligatoire = [ 'token', 'rm_id', ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La valeur '" + val + "' n'est pas presente dans liste ") + return False, " La valeur '" + val + "' n'est pas presente dans liste" + + my_token = "" + if ("token" in diction.keys()): + if diction['token']: + my_token = diction['token'] + + + + # Recuperation du recid du partenaire + partner_recid = mycommon.get_parnter_recid_from_token(str(my_token)) + if partner_recid is False: + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible d'imprimer la fiche detaillée") + return False, " Les informations d'identification sont invalides" + + local_status, my_partner_data = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner_data + + + + qry_affectation = {'partner_owner_recid':str(my_partner_data['recid']), + 'related_collection':'ressource_materielle', 'related_collection_recid':str(diction['rm_id']), + 'valide':'1', 'locked':'0'} + + + print(" ### qry_affectation = ",qry_affectation) + + RetObject = [] + val_tmp = 1 + + for retval in MYSY_GV.dbname['ressource_materielle_affectation'].find(qry_affectation): + user = retval + user['id'] = str(val_tmp) + val_tmp = val_tmp + 1 + + related_target_collection_id_nom = "" + related_target_collection_object = "" + + # Si l'affectation a un 'related_target_collection_id', alors cela veut dire qu'il faut aller chercheer + # la cible de cette affection. + if( "related_target_collection_id" in retval.keys() and "related_target_collection" in retval.keys()): + if( retval["related_target_collection_id"] and retval["related_target_collection"]): + + # Si l'affectation concerne une formation + if( retval["related_target_collection"] == "myclass"): + affectation_target_data = MYSY_GV.dbname[retval["related_target_collection"]].find_one({"_id":ObjectId(str( retval["related_target_collection_id"])), + 'partner_owner_recid':str(partner_recid), + 'valide':'1', 'locked':"0"}) + + if(affectation_target_data is not None): + related_target_collection_id_nom = affectation_target_data["title"] + related_target_collection_object = "Formation" + + elif ( retval["related_target_collection"] == "session_formation") : + # Si l'affectation concerne une session + affectation_target_data = MYSY_GV.dbname[retval["related_target_collection"]].find_one( + {"_id": ObjectId(str(retval["related_target_collection_id"])), + 'partner_owner_recid': str(partner_recid), + 'valide': '1'}) + + if (affectation_target_data is not None): + related_target_collection_id_nom = affectation_target_data["code_session"] + related_target_collection_object = "Session Formation" + + + + + user['related_target_collection_id_nom'] = related_target_collection_id_nom + user['related_target_collection_object'] = related_target_collection_object + + RetObject.append(mycommon.JSONEncoder().encode(user)) + + return True, RetObject + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recuperer la liste des affectations de l'employé " + + +""" +Ajout d'une affectation d'une ressource materiel à une formation ou une session +/!\ ou a une employé +""" + +def Add_Affectation_Ressource_Materielle_Poste(diction): + try: + + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', "rm_id", "poste", "date_du", "date_au", "comment", 'related_target_collection', 'related_target_collection_id'] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + + field_list_obligatoire = ['token', 'rm_id', "poste", 'date_du' ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Toutes le information obligatoires n'ont pas été fournies" + + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + + + # Recuperation du recid du partenaire + partner_recid = mycommon.get_parnter_recid_from_token(str(token)) + if partner_recid is False: + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le partner_recid") + return False, " Les informations d'identification sont invalides" + + local_status, my_partner_data = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner_data + + rm_id = "" + if ("rm_id" in diction.keys()): + if diction['rm_id']: + rm_id = diction['rm_id'] + # Verifier que le materiel existe bien + materiel_existe_count = MYSY_GV.dbname['ressource_materielle'].count_documents({'_id':ObjectId(str(rm_id)), 'partner_recid':str(partner_recid), + 'valide':'1', 'locked':'0'}) + + if( materiel_existe_count <= 0 ) : + mycommon.myprint(str(inspect.stack()[0][3]) + " - Materiel invalide ") + return False, " Materiel invalide " + + if (materiel_existe_count > 1): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Materiel incohérent. il a plusieurs materiels avec le meme id ") + return False, " Materiel incohérent. il a plusieurs materiels avec le meme id " + + + date_du = "" + if ("date_du" in diction.keys()): + if diction['date_du']: + date_du = str(diction['date_du'])[0:10] + + # la date_du etant obligatoire, donc normal de faire le controle apres le "IF" + local_status = mycommon.CheckisDate(date_du) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][3]) + " La date de debut d'affectation n'est pas au format 'j'j/mm/aaaa' ") + return False, "La date de debut d'affectation n'est pas au format 'j'j/mm/aaaa'" + + + date_au = "" + if ("date_au" in diction.keys()): + if diction['date_au']: + date_au = str(diction['date_au'])[0:10] + local_status = mycommon.CheckisDate(date_au) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La date de fin d'affectation n'est pas au format 'j'j/mm/aaaa' ") + return False, "La date de fin d'affectation n'est pas au format 'j'j/mm/aaaa'" + + + comment = "" + if ("comment" in diction.keys()): + if diction['comment']: + comment = diction['comment'] + if(len(str(comment)) > 500): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Le champ 'comment' a plus de 500 caractères ") + return False, "Le champ 'comment' a plus de 500 caractères " + + poste = "" + if ("poste" in diction.keys()): + poste = diction['poste'] + if (len(str(poste)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Le champ 'poste' a plus de 255 caractères ") + return False, "Le champ 'poste' a plus de 255 caractères " + + + related_target_collection_id = "" + related_target_collection = "" + if ("related_target_collection_id" in diction.keys() and "related_target_collection" in diction.keys()): + if( diction['related_target_collection_id'] and diction['related_target_collection'] ): + related_target_collection_id = diction['related_target_collection_id'] + related_target_collection = diction['related_target_collection'] + else: + if( diction['related_target_collection_id'] != "" or diction['related_target_collection'] != ""): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Les données related_target_collection_id et related_target_collection sont incohérentes") + return False, "Les données related_target_collection_id et related_target_collection sont incohérentes " + + + + + # Verifier qu'on pas une affectation avec le meme poste qui demarre à la meme date. + if_affectation_exist_count_qry = {'related_collection':'ressource_materielle', 'related_collection_recid':str(diction['rm_id']), + 'partner_owner_recid':str(partner_recid),'valide':'1', 'poste':str(diction['poste']), + 'date_du':str(date_du)} + + if_affectation_exist_count = MYSY_GV.dbname['ressource_materielle_affectation'].count_documents(if_affectation_exist_count_qry) + if(if_affectation_exist_count > 0 ): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Ce materiel est deja affecté à ce poste ") + return False, "Ce materiel est deja affecté à ce poste" + + + my_data = {} + my_data['related_collection'] = 'ressource_materielle' + my_data['related_collection_recid'] = str(diction['rm_id']) + my_data['partner_owner_recid'] = str(partner_recid) + my_data['poste'] = str(poste) + my_data['related_target_collection_id'] = str(related_target_collection_id) + my_data['related_target_collection'] = str(related_target_collection) + my_data['comment'] = str(diction['comment']) + + my_data['date_du'] = str(date_du) + my_data['date_au'] = str(date_au) + my_data['valide'] = "1" + my_data['locked'] = "0" + my_data['date_update'] = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S")) + + + inserted_data = MYSY_GV.dbname['ressource_materielle_affectation'].insert_one(my_data) + if( inserted_data is None): + return False," Impossible d'affecter le materiel(2)" + + + return True, "L'affectation du materiel a été correctement faite." + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible d'affecter le materiel " + + +""" +Mise à jour d'une affectation +""" +def Update_Affectation_Ressource_Materielle_Poste(diction): + try: + + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', "rm_id", "poste", "date_du", "date_au", "comment", "_id", 'related_target_collection', 'related_target_collection_id'] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + + field_list_obligatoire = ['token', '_id', 'date_du', 'poste', "rm_id" ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Toutes le information obligatoires n'ont pas été fournies" + + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + + + # Recuperation du recid du partenaire + partner_recid = mycommon.get_parnter_recid_from_token(str(token)) + if partner_recid is False: + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le partner_recid") + return False, " Les informations d'identification sont invalides" + + local_status, my_partner_data = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner_data + + update_data = {} + + rm_id = "" + if ("rm_id" in diction.keys()): + if diction['rm_id']: + rm_id = diction['rm_id'] + # Verifier que l'employé existe bien + employee_existe_count = MYSY_GV.dbname['ressource_materielle'].count_documents({'_id':ObjectId(str(rm_id)), 'partner_recid':str(partner_recid), + 'valide':'1', 'locked':'0'}) + + if( employee_existe_count <= 0 ) : + mycommon.myprint(str(inspect.stack()[0][3]) + " - Materiel invalide ") + return False, " Materiel invalide " + + if (employee_existe_count > 1): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Materiel incohérent. il a plusieurs Materiels avec le meme id ") + return False, " Materiel incohérent. il a plusieurs Materiels avec le meme id " + + + date_du = "" + if ("date_du" in diction.keys()): + if diction['date_du']: + date_du = str(diction['date_du'])[0:10] + + # la date_du etant obligatoire, donc normal de faire le controle apres le "IF" + local_status = mycommon.CheckisDate(date_du) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][3]) + " La date de debut d'affectation n'est pas au format 'j'j/mm/aaaa' ") + return False, "La date de debut d'affectation n'est pas au format 'j'j/mm/aaaa'" + update_data['date_du'] = date_du + + + date_au = "" + if ("date_fin" in diction.keys()): + date_au = str(diction['date_fin'])[0:10] + local_status = mycommon.CheckisDate(date_au) + if (local_status is False): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La date de fin d'affectation n'est pas au format 'j'j/mm/aaaa' ") + return False, "La date de fin d'affectation n'est pas au format 'j'j/mm/aaaa'" + + update_data['date_du'] = date_du + + comment = "" + if ("comment" in diction.keys()): + comment = diction['comment'] + if(len(str(comment)) > 500): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Le champ 'comment' a plus de 500 caractères ") + return False, "Le champ 'comment' a plus de 500 caractères " + update_data['comment'] = comment + + + poste = "" + if ("poste" in diction.keys()): + poste = diction['poste'] + if (len(str(poste)) > 255): + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Le champ 'poste' a plus de 255 caractères ") + return False, "Le champ 'poste' a plus de 255 caractères " + update_data['poste'] = poste + + + related_target_collection_id = "" + related_target_collection = "" + if ("related_target_collection_id" in diction.keys() and "related_target_collection" in diction.keys()): + if (diction['related_target_collection_id'] and diction['related_target_collection']): + related_target_collection_id = diction['related_target_collection_id'] + related_target_collection = diction['related_target_collection'] + else: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " Les données related_target_collection_id et related_target_collection sont incohérentes") + return False, "Les données related_target_collection_id et related_target_collection sont incohérentes " + + update_data['related_target_collection_id'] = str(related_target_collection_id) + update_data['related_target_collection'] = str(related_target_collection) + + update_data['date_update'] = str(datetime.now().strftime("%d/%m/%Y %H:%M:%S")) + + + # Verifier l'existance de l'affectation + affectation_existe_count_qry = {'_id': ObjectId(str(diction['_id'])), 'valide': "1", "locked":"0", 'partner_owner_recid':str(partner_recid)} + print(" ### affectation_existe_count_qry = ", affectation_existe_count_qry) + affectation_existe_count = MYSY_GV.dbname['ressource_materielle_affectation'].count_documents( affectation_existe_count_qry) + + if( affectation_existe_count != 1 ): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de mettre à jour cette affectation. Données incohérentes ") + return False, " Impossible de mettre à jour cette affectation. Données incohérentes " + + + inserted_data = MYSY_GV.dbname['ressource_materielle_affectation'].find_one_and_update( + {'_id': ObjectId(str(diction['_id'])), 'valide': "1", "locked":"0", 'partner_owner_recid':str(partner_recid)}, + {"$set": update_data}, + return_document=ReturnDocument.AFTER, + upsert=False, + ) + + if( inserted_data is None ): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de mettre à jour cette affectation (3)") + return False, " Impossible de mettre à jour cette affectation (3) " + + + + return True, "L'affectation de l'employé a été correctement mise à jour." + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de mettre à jour cette affectation " + + +""" +Supprimer une affectation +""" +def Delete_Affectation_Ressource_Materielle_Poste(diction): + try: + + diction = mycommon.strip_dictionary(diction) + + """ + Verification des input acceptés + """ + field_list = ['token', "rm_id", "_id"] + + incom_keys = diction.keys() + for val in incom_keys: + if val not in field_list: + mycommon.myprint(str( + inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé") + return False, " Les informations fournies sont incorrectes", + + """ + Verification des champs obligatoires + """ + + field_list_obligatoire = ['token', "rm_id", "_id" ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La valeur '" + val + "' n'est pas presente dans liste ") + return False, " Toutes le information obligatoires n'ont pas été fournies" + + token = "" + if ("token" in diction.keys()): + if diction['token']: + token = diction['token'] + + + + # Recuperation du recid du partenaire + partner_recid = mycommon.get_parnter_recid_from_token(str(token)) + if partner_recid is False: + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le partner_recid") + return False, " Les informations d'identification sont invalides" + + local_status, my_partner_data = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner_data + + update_data = {} + + rm_id = "" + if ("rm_id" in diction.keys()): + if diction['rm_id']: + rm_id = diction['rm_id'] + + # Verifier que le materiel existe bien + employee_existe_count = MYSY_GV.dbname['ressource_materielle'].count_documents({'_id':ObjectId(str(rm_id)), 'partner_recid':str(partner_recid), + 'valide':'1', 'locked':'0'}) + + if( employee_existe_count <= 0 ) : + mycommon.myprint(str(inspect.stack()[0][3]) + " - Materiel invalide ") + return False, " Materiel invalide " + + if (employee_existe_count > 1): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Materiel incohérent. il a plusieurs Materiels avec le meme id ") + return False, " Materiel incohérent. il a plusieurs Materiels avec le meme id " + + + # Verifier l'existance de l'affectation + affectation_existe_count = MYSY_GV.dbname['ressource_materielle_affectation'].count_documents( {'_id': ObjectId(str(diction['_id'])), 'valide': "1", + "locked":"0", 'partner_owner_recid':str(partner_recid)}) + + if( affectation_existe_count != 1 ): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de supprimer cette affectation. Données incohérentes ") + return False, " Impossible de supprimer cette affectation. Données incohérentes " + + + inserted_data = MYSY_GV.dbname['ressource_materielle_affectation'].delete_one( {'_id': ObjectId(str(diction['_id'])), 'valide': "1", "locked":"0", + 'partner_owner_recid':str(partner_recid)}, ) + + if( inserted_data is None ): + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de supprimer à jour cette affectation (3)") + return False, " Impossible de supprimer cette affectation (3) " + + + return True, "L'affectation du materiel a été correctement supprimée." + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de supprimer cette affectation " + + + +def Get_Given_Affectation_Ressource_Materielle_Poste(diction): + try: + field_list_obligatoire = ['token', 'affectation_id', ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La valeur '" + val + "' n'est pas presente dans liste ") + return False, " La valeur '" + val + "' n'est pas presente dans liste " + + my_token = "" + if ("token" in diction.keys()): + if diction['token']: + my_token = diction['token'] + + # Recuperation du recid du partenaire + partner_recid = mycommon.get_parnter_recid_from_token(str(my_token)) + if partner_recid is False: + mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible d'imprimer la fiche detaillée") + return False, " Les informations d'identification sont invalides" + + local_status, my_partner_data = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner_data + + qry_affectation = {'partner_owner_recid': str(my_partner_data['recid']), + '_id': ObjectId(str(diction['affectation_id'])), + 'valide': '1', 'locked': '0'} + + print(" ### qry_affectation = ", qry_affectation) + + RetObject = [] + val_tmp = 1 + + for retval in MYSY_GV.dbname['ressource_materielle_affectation'].find(qry_affectation): + user = retval + user['id'] = str(val_tmp) + val_tmp = val_tmp + 1 + + related_target_collection_id_nom = "" + related_target_collection_object = "" + + # Si l'affectation a un 'related_target_collection_id', alors cela veut dire qu'il faut aller chercheer + # la cible de cette affection. + if ("related_target_collection_id" in retval.keys() and "related_target_collection" in retval.keys()): + if (retval["related_target_collection_id"] and retval["related_target_collection"]): + + # Si l'affectation concerne une formation + if (retval["related_target_collection"] == "myclass"): + affectation_target_data = MYSY_GV.dbname[retval["related_target_collection"]].find_one( + {"_id": ObjectId(str(retval["related_target_collection_id"])), + 'partner_owner_recid': str(partner_recid), + 'valide': '1', 'locked': "0"}) + + if (affectation_target_data is not None): + related_target_collection_id_nom = affectation_target_data["title"] + related_target_collection_object = "Formation" + + # Si l'affectation concerne une session + elif (retval["related_target_collection"] == "session_formation"): + # Si l'affectation concerne une session + affectation_target_data = MYSY_GV.dbname[retval["related_target_collection"]].find_one( + {"_id": ObjectId(str(retval["related_target_collection_id"])), + 'partner_owner_recid': str(partner_recid), + 'valide': '1'}) + + if (affectation_target_data is not None): + related_target_collection_id_nom = affectation_target_data["code_session"] + related_target_collection_object = "Session de formation" + + # Si l'affectation concerne un employé + elif (retval["related_target_collection"] == "ressource_humaine"): + # Si l'affectation concerne un employé + affectation_target_data = MYSY_GV.dbname[retval["related_target_collection"]].find_one( + {"_id": ObjectId(str(retval["related_target_collection_id"])), + 'partner_owner_recid': str(partner_recid), + 'valide': '1'}) + + if (affectation_target_data is not None): + related_target_collection_id_nom = str(affectation_target_data["prenom"]+" "+affectation_target_data["nom"]) + related_target_collection_object = "Employe" + + + user['related_target_collection_id_nom'] = related_target_collection_id_nom + user['related_target_collection_object'] = related_target_collection_object + + RetObject.append(mycommon.JSONEncoder().encode(user)) + + return True, RetObject + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recuperer l'affectation du materiel " + + +""" +Cette API permet de recuperer la liste des 'related_target_collection_object' avec les 'related_target_collection_id_nom' +et de les formater pour une utilisation simple coté front. + +les collections cibles sont : +- les formations et les sessions de formation. + +ex : +{ +{'related_target_collection':'session_formation', + 'related_target_collection_id':'64e797fd168e0c57cefe4fd0' + 'related_target_collection_id_nom' : 'ch_Manual_1' + }, + {'related_target_collection':'myclass', + 'related_target_collection_id':'64e79630ea7b810a3d835ceb' + 'related_target_collection_id_nom' : 'PRATICIEN EN AROMATHERAPIE INTEGRATIVE' + }, + {'related_target_collection':'ressource_humaine', + 'related_target_collection_id':'64e4e9ce347aaa05b2d207b0' + 'related_target_collection_id_nom' : 'prenom_employe3 nom_employe3u' + }, +} + +""" + + +def Get_Related_Target_Materiel_Collection_Data(diction): + try: + field_list_obligatoire = ['token', ] + + for val in field_list_obligatoire: + if val not in diction: + mycommon.myprint( + str(inspect.stack()[0][ + 3]) + " La valeur '" + val + "' n'est pas presente dans liste ") + return False, " La valeur '" + val + "' n'est pas presente dans liste " + + my_token = "" + if ("token" in diction.keys()): + if diction['token']: + my_token = diction['token'] + + # Recuperation du recid du partenaire + partner_recid = mycommon.get_parnter_recid_from_token(str(my_token)) + if partner_recid is False: + mycommon.myprint(str(inspect.stack()[0][3]) + " -Les informations d'identification sont invalides") + return False, " Les informations d'identification sont invalides" + + local_status, my_partner_data = mycommon.Check_Connexion_And_Return_Partner_Data(diction) + if (local_status is not True): + return local_status, my_partner_data + + RetObject = [] + + # Recuperation des données des formations + for retval in MYSY_GV.dbname['myclass'].find({'partner_owner_recid': str(partner_recid), + 'valide': '1', 'locked': '0'}, {'_id': 1, 'title': 1}): + retval_data = {} + retval_data['related_target_collection'] = "myclass" + retval_data['related_target_collection_id'] = str(retval['_id']) + retval_data['related_target_collection_id_nom'] = str(retval['title']) + RetObject.append(mycommon.JSONEncoder().encode(retval_data)) + + # Recuperation des données des sessions + for retval in MYSY_GV.dbname['session_formation'].find({'partner_owner_recid': str(partner_recid), + 'valide': '1'}, {'_id': 1, 'code_session': 1}): + retval_data = {} + retval_data['related_target_collection'] = "session_formation" + retval_data['related_target_collection_id'] = str(retval['_id']) + retval_data['related_target_collection_id_nom'] = str(retval['code_session']) + RetObject.append(mycommon.JSONEncoder().encode(retval_data)) + + # Recuperation des données des employés + for retval in MYSY_GV.dbname['ressource_humaine'].find({'partner_owner_recid': str(partner_recid), + 'valide': '1'}, {'_id': 1, 'prenom': 1, 'nom':1}): + retval_data = {} + retval_data['related_target_collection'] = "session_formation" + retval_data['related_target_collection_id'] = str(retval['_id']) + retval_data['related_target_collection_id_nom'] = str(str(retval['prenom'])+" "+str(retval['nom'])) + + RetObject.append(mycommon.JSONEncoder().encode(retval_data)) + + return True, RetObject + + except Exception as e: + exc_type, exc_obj, exc_tb = sys.exc_info() + mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno)) + return False, " Impossible de recuperer les informations des cibles " + +