361ef3c5 by 周伟奇

asp bak

1 parent 9b983b68
...@@ -1114,6 +1114,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list): ...@@ -1114,6 +1114,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list):
1114 asp_list = [] 1114 asp_list = []
1115 gzs_status = consts.GZS_STATUS[1] 1115 gzs_status = consts.GZS_STATUS[1]
1116 gzs_price = '0.00' 1116 gzs_price = '0.00'
1117 # for asp_info in cms_info.get('associatedServices', []):
1117 for asp_info in cms_info.get('associatedServices', {}).get('SubassociatedServices', []): 1118 for asp_info in cms_info.get('associatedServices', {}).get('SubassociatedServices', []):
1118 tmp_asp_name = asp_info.get('associatedServices') 1119 tmp_asp_name = asp_info.get('associatedServices')
1119 if isinstance(tmp_asp_name, str) and len(tmp_asp_name) > 0: 1120 if isinstance(tmp_asp_name, str) and len(tmp_asp_name) > 0:
...@@ -1128,16 +1129,19 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list): ...@@ -1128,16 +1129,19 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list):
1128 ) 1129 )
1129 ) 1130 )
1130 1131
1132 # fin_total = 0
1131 fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00') 1133 fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00')
1132 fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp 1134 fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp
1133 for asp_name, _, asp_fin in asp_list: 1135 for asp_name, _, asp_fin in asp_list:
1134 if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1: 1136 if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1:
1135 gzs_status = consts.GZS_STATUS[0] 1137 gzs_status = consts.GZS_STATUS[0]
1138 # fin_total += float(asp_fin)
1136 asp_list.append( 1139 asp_list.append(
1137 ( 1140 (
1138 consts.ASP_SUM_NAME, 1141 consts.ASP_SUM_NAME,
1139 '', 1142 '',
1140 fin_total, 1143 fin_total,
1144 # format(fin_total, '.2f'),
1141 ) 1145 )
1142 ) 1146 )
1143 afc_contract_input.append((consts.SE_AFC_CON_FIELD[20], asp_list)) 1147 afc_contract_input.append((consts.SE_AFC_CON_FIELD[20], asp_list))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!