Browse Source

发包脚本上传,空值覆盖问题

master
xueyinfei 4 weeks ago
parent
commit
280a9bb282
  1. 14
      vue-fastapi-backend/module_admin/service/meta_service.py

14
vue-fastapi-backend/module_admin/service/meta_service.py

@ -659,11 +659,11 @@ class MetaService:
suppTableInfo.rec_subm_prsn = row['rec_subm_prsn'] suppTableInfo.rec_subm_prsn = row['rec_subm_prsn']
else: else:
suppTableInfo.tab_crrct_name = row['tab_crrct_name'] if row['tab_crrct_name'] and \ suppTableInfo.tab_crrct_name = row['tab_crrct_name'] if row['tab_crrct_name'] and \
row['tab_crrct_name'].strip() != '' else oldTable.tab_crrct_name if oldTable else None str(row['tab_crrct_name']).strip() != '' else oldTable.tab_crrct_name if oldTable else None
suppTableInfo.tab_desc = row['tab_desc'] if row['tab_desc'] and \ suppTableInfo.tab_desc = row['tab_desc'] if row['tab_desc'] and \
row['tab_desc'].strip() != '' else oldTable.tab_desc if oldTable else None str(row['tab_desc']).strip() != '' else oldTable.tab_desc if oldTable else None
suppTableInfo.rec_subm_prsn = row['rec_subm_prsn'] if row['rec_subm_prsn'] and \ suppTableInfo.rec_subm_prsn = row['rec_subm_prsn'] if row['rec_subm_prsn'] and \
row['rec_subm_prsn'].strip() != '' else oldTable.rec_subm_prsn if oldTable else None str(row['rec_subm_prsn']).strip() != '' else oldTable.rec_subm_prsn if oldTable else None
suppTableInfo.pic = oldTable.pic if oldTable else None suppTableInfo.pic = oldTable.pic if oldTable else None
suppTableInfo.gov_flag = oldTable.gov_flag if oldTable else None suppTableInfo.gov_flag = oldTable.gov_flag if oldTable else None
suppTableInfo.tab_clas = oldTable.tab_clas if oldTable else None suppTableInfo.tab_clas = oldTable.tab_clas if oldTable else None
@ -742,15 +742,15 @@ class MetaService:
suppColumnInfo.data_dict_id = dataDictId if dataDictId != '' else None suppColumnInfo.data_dict_id = dataDictId if dataDictId != '' else None
else: else:
suppColumnInfo.fld_crrct_name = row['fld_crrct_name'] if row['fld_crrct_name'] and \ suppColumnInfo.fld_crrct_name = row['fld_crrct_name'] if row['fld_crrct_name'] and \
row['fld_crrct_name'].strip() != '' else oldColumn.fld_crrct_name if oldColumn else None str(row['fld_crrct_name']).strip() != '' else oldColumn.fld_crrct_name if oldColumn else None
suppColumnInfo.crrct_pk_flag = oldColumn.crrct_pk_flag if row['crrct_pk_flag'] is None \ suppColumnInfo.crrct_pk_flag = oldColumn.crrct_pk_flag if row['crrct_pk_flag'] is None \
else True if row['crrct_pk_flag'] and row['crrct_pk_flag'] == '' else False else True if row['crrct_pk_flag'] and row['crrct_pk_flag'] == '' else False
suppColumnInfo.fld_desc = row['fld_desc'] if row['fld_desc'] and \ suppColumnInfo.fld_desc = row['fld_desc'] if row['fld_desc'] and \
row['fld_desc'].strip() != '' else oldColumn.fld_desc if oldColumn else None str(row['fld_desc']).strip() != '' else oldColumn.fld_desc if oldColumn else None
suppColumnInfo.data_sec_lvl = row['data_sec_lvl'] if row['data_sec_lvl'] and \ suppColumnInfo.data_sec_lvl = row['data_sec_lvl'] if row['data_sec_lvl'] and \
row['data_sec_lvl'].strip() != '' else oldColumn.data_sec_lvl if oldColumn else None str(row['data_sec_lvl'].strip()) != '' else oldColumn.data_sec_lvl if oldColumn else None
suppColumnInfo.rec_subm_prsn = row['rec_subm_prsn'] if row['rec_subm_prsn'] and \ suppColumnInfo.rec_subm_prsn = row['rec_subm_prsn'] if row['rec_subm_prsn'] and \
row['rec_subm_prsn'].strip() != '' else oldColumn.rec_subm_prsn if oldColumn else None str(row['rec_subm_prsn']).strip() != '' else oldColumn.rec_subm_prsn if oldColumn else None
suppColumnInfo.data_dict_id = dataDictId if dataDictId != '' else oldColumn.data_dict_id \ suppColumnInfo.data_dict_id = dataDictId if dataDictId != '' else oldColumn.data_dict_id \
if oldColumn else None if oldColumn else None
suppColumnInfo.pic = oldColumn.pic if oldColumn else None suppColumnInfo.pic = oldColumn.pic if oldColumn else None

Loading…
Cancel
Save