|
@@ -258,8 +258,7 @@ class UnicomManageControllerView(View):
|
|
|
"""
|
|
|
sql = 'SELECT '
|
|
|
sql += 'du.username,du.phone,o.UID as uid,o.`status`,udi.serial_no as serialNo,o.orderID,o.`desc`, '
|
|
|
- sql += 'o.price,uo.next_month_activate as nextActivate,uo.iccid,uo.`status` as useStatus, ' \
|
|
|
- 'uo.`flow_total_usage` as flowTotal, '
|
|
|
+ sql += 'o.price,uo.next_month_activate as nextActivate,uo.iccid,uo.`status` as useStatus,uo.`flow_total_usage`,'
|
|
|
sql += 'uo.updated_time as upTime, uo.activation_time as acTime,uo.expire_time as epTime '
|
|
|
sql += 'FROM orders o '
|
|
|
sql += 'LEFT JOIN unicom_combo_order_info uo ON o.orderID = uo.order_id '
|
|
@@ -310,7 +309,8 @@ class UnicomManageControllerView(View):
|
|
|
order_dict = dict(zip(col_names, item))
|
|
|
if order_dict['status'] == 1:
|
|
|
total_flow = UnicomObjeect.current_sim_traffic_usage_details(order_dict['iccid']) # 4G总值
|
|
|
- flow_total_usage = order_dict['flowTotal'] # 激活时当月已用流量
|
|
|
+ total_flow = int(total_flow)
|
|
|
+ flow_total_usage = order_dict['flow_total_usage'] # 激活时当月已用流量
|
|
|
if flow_total_usage == '': # 判断数值是否为空
|
|
|
flow_total_usage = 0
|
|
|
flow_total_usage = float(flow_total_usage)
|