文档
测试

schedule_report_canneng

POST
/huor_dynamic_rate/pro_today_show_Quantity.action

接口描述

请求后端调取设备产能走势图

请求头

参数名
类型
描述
必填
contentType: 'text/json,charset=utf-8'
text/json
文本与JSON格式
必填

请求参数

参数名
类型
描述
必填
huor_dynamic_rate.facno
数字
工厂分号
必填
huor_dynamic_rate.uuid
文本
设备UUID编号
必填
huor_dynamic_rate.id
文本
设备物理ID号
必填
huor_dynamic_rate.date_start
日期
开始查询日期
必填
huor_dynamic_rate.date_end
日期
结束查询日期
必填
huor_dynamic_rate.workcenter_no
数字
部门编号
必填

响应参数

参数名
类型
描述
必填
dataType: "json"
JSON
服务器返回的数据类型
必填

说明 / 示例

$.ajax({ contentType: 'text/json,charset=utf-8', type: "POST",//方法类型 async:false, cache: false, dataType: "json",//预期服务器返回的数据类型 url: url1, data: {}, success: function (data) { json += "["; for ( var i = 0; i < data.rows.length; i++) { //alert(JSON.stringify(data)); // var time_class =data.rows[i].time_class; //var time_arr = parseInt(data.rows[i].uuid); //var class_arr_z = parseFloat(parseFloat(data.rows[i].rate)*100).toFixed(2); today_baiban =parseFloat(parseFloat(data.rows[i].today_baiban)*100).toFixed(2); today_wanban =parseFloat(parseFloat(data.rows[i].today_wanban)*100).toFixed(2); baiban_work_timt =parseFloat(parseFloat(data.rows[i].baiban_work_timt)*1).toFixed(2); baiban_faul_time =parseFloat(parseFloat(data.rows[i].baiban_faul_time)*1).toFixed(2); baiban_wait_timt =parseFloat(parseFloat(data.rows[i].baiban_wait_timt)*1).toFixed(2); wanban_work_timt =parseFloat(parseFloat(data.rows[i].wanban_work_timt)*1).toFixed(2); wanban_faul_time =parseFloat(parseFloat(data.rows[i].wanban_faul_time)*1).toFixed(2); wanban_wait_timt =parseFloat(parseFloat(data.rows[i].wanban_wait_timt)*1).toFixed(2); class_baiban =parseFloat(parseFloat(parseFloat(data.rows[i].class_baiban)*1).toFixed(2)); class_wanban=parseFloat(parseFloat(parseFloat(data.rows[i].class_wanban)*1).toFixed(2)); baiban_num =parseFloat(parseFloat(parseFloat(data.rows[i].baiban_num)*1).toFixed(2)); wanban_num=parseFloat(parseFloat(parseFloat(data.rows[i].wanban_num)*1).toFixed(2)); } class_baiban =parseFloat(parseFloat(class_baiban/60).toFixed(2)); class_wanban=parseFloat(parseFloat(class_wanban/60).toFixed(2)); class_baiban =parseFloat(parseFloat(class_baiban*baiban_num).toFixed(2)); class_wanban=parseFloat(parseFloat(class_wanban*wanban_num).toFixed(2)); //运行时间 var yx_time1 = baiban_work_timt; yx_time1 = parseFloat((yx_time1/60).toFixed(2)); //待机时间 var dj_time1 = baiban_wait_timt; dj_time1 = parseFloat((dj_time1/60).toFixed(2)); //告警时间 var bj_time1 = baiban_faul_time; bj_time1 = parseFloat((bj_time1*3/3600).toFixed(2)); //关机时间 var gj_time1 =parseFloat(class_baiban-yx_time1 -dj_time1 -bj_time1).toFixed(2); gj_time1 = parseFloat((gj_time1*1).toFixed(2)); json += "{\"schedule_name\":\"" + nameList[0] + "\",\"yx_time\":\"" + yx_time1 + "\",\"current_dj_time\":\"" + dj_time1 + "\",\"current_bj_time\":\"" + bj_time1 + "\",\"current_gj_time\":\"" + gj_time1 + "\"},"; //运行时间 var yx_time2 = wanban_work_timt; yx_time2 = parseFloat((yx_time2/60).toFixed(2)); //待机时间 var dj_time2 = wanban_wait_timt; dj_time2 = parseFloat((dj_time2/60).toFixed(2)); //告警时间 var bj_time2 = wanban_faul_time; bj_time2 = parseFloat((bj_time2*3/3600).toFixed(2)); //关机时间 var gj_time2 =parseFloat(class_wanban-yx_time2 -dj_time2 -bj_time2).toFixed(2); gj_time2 = parseFloat((gj_time2*1).toFixed(2)); json += "{\"schedule_name\":\"" + nameList[1] + "\",\"yx_time\":\"" + yx_time2 + "\",\"current_dj_time\":\"" + dj_time2 + "\",\"current_bj_time\":\"" + bj_time2 + "\",\"current_gj_time\":\"" + gj_time2 + "\"}"; json += "]"; machineList = eval("" + json + ""); //alert(json); totall_wait_timt =parseFloat(parseFloat(baiban_wait_timt)+parseFloat(wanban_wait_timt)); totall_work_timt =parseFloat(parseFloat(baiban_work_timt)+parseFloat(wanban_work_timt)); totall_faul_time =parseFloat(parseFloat(baiban_faul_time)+parseFloat(wanban_faul_time)); totall_rate =parseFloat(parseFloat(today_baiban)+parseFloat(today_wanban)); $('#td10').html('白班'); $('#td11').html('晚班'); $('#td20').html(baiban_wait_timt); $('#td21').html(wanban_wait_timt); $('#td30').html(baiban_work_timt); $('#td31').html(wanban_work_timt); $('#td40').html(today_baiban); $('#td41').html(today_wanban); $('#td50').html(baiban_faul_time); $('#td51').html(wanban_faul_time); $('#td13').html(parseFloat(totall_wait_timt).toFixed(2)); $('#td23').html(parseFloat(totall_work_timt).toFixed(2)); $('#td33').html(parseFloat(totall_rate).toFixed(2)); $('#td43').html(parseFloat(totall_faul_time).toFixed(2)); initPie(machineList); } });