baoyubo 5 місяців тому
батько
коміт
ed860ef8f0

+ 4 - 1
routers/api/ThreeProofingResponsible/person.py

@@ -160,7 +160,10 @@ async def update_contact(
         old_person_type_list=get_person_type_by_person_id(db,person.id)
         for old_person_type in old_person_type_list:
             old_person_type.del_flag='2'
-        old_person_other_type_list = get_person_other_info_by_person_id(db,person.id)
+        old_person_other_info_list = get_person_other_info_by_person_id(db,person.id)
+        for old_person_other_info in old_person_other_info_list:
+            old_person_other_info.del_flag = '2'
+        old_person_other_type_list = get_person_other_type_by_person_id(db, person.id)
         for old_person_other_type in old_person_other_type_list:
             old_person_other_type.del_flag = '2'
         for type_info in type_list:

+ 4 - 1
routers/api/ThreeProofingResponsible/person_self.py

@@ -160,7 +160,10 @@ async def update_contact(
         old_person_type_list = get_person_type_by_person_id(db, person.id)
         for old_person_type in old_person_type_list:
             old_person_type.del_flag = '2'
-        old_person_other_type_list = get_person_other_info_by_person_id(db, person.id)
+        old_person_other_info_list = get_person_other_info_by_person_id(db, person.id)
+        for old_person_other_info in old_person_other_info_list:
+            old_person_other_info.del_flag = '2'
+        old_person_other_type_list = get_person_other_type_by_person_id(db, person.id)
         for old_person_other_type in old_person_other_type_list:
             old_person_other_type.del_flag = '2'
         for type_info in type_list:

+ 4 - 0
utils/three_proofing_responsible_util.py

@@ -34,6 +34,10 @@ def get_person_other_info_by_person_id(db,person_id):
     query = db.query(ThreeProofingResponsiblePersonOtherInfo)
     query = query.filter_by(person_id = person_id,del_flag = '0')
     return query.all()
+def get_person_other_type_by_person_id(db,person_id):
+    query = db.query(ThreeProofingResponsiblePersonOtherInfo)
+    query = query.filter_by(person_id = person_id,del_flag = '0')
+    return query.all()
 def get_other_type_list_by_type_parent_id(db,type_parent_id):
     query = db.query(ThreeProofingResponsibleOtherType)
     query = query.filter_by(type_parent_id = type_parent_id,del_flag = '0')