فهرست منبع

250115-2代码。

baoyubo 4 ماه پیش
والد
کامیت
44749f65f3
2فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 4 1
      routers/api/ThreeProofingResponsible/person.py
  2. 1 1
      utils/three_proofing_responsible_util.py

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

@@ -164,9 +164,10 @@ async def update_contact(
         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)
+        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:
             type_parent_id = type_info['type_parent_id']  # get_type_parent_id_by_type_id(db,type_id)
             for type_id in type_info['children']:
@@ -596,6 +597,8 @@ def import_data(db,file_path,user_id,file_info):
                 db.add_all(new_type_list)
                 data += new_type_list
         d2 = sheet.cell(row, 12).value
+        if d2!='':
+            pass
 
         # 重点部门
         e1 = sheet.cell(row, 13).value

+ 1 - 1
utils/three_proofing_responsible_util.py

@@ -41,7 +41,7 @@ def get_person_other_info_by_person_id(db,person_id):
     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 = db.query(ThreeProofingResponsiblePersonOtherType)
     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):