|
@@ -67,8 +67,9 @@ var badfailrate=[];
|
|
|
var t=0;
|
|
|
var n=0;
|
|
|
var workID=[];
|
|
|
+var sectorID=[];
|
|
|
function firsttime_load_spots_data() {
|
|
|
- get_data("fcWorkScheduleLoad/list?scheduleId=" + scheduleId, first_success)
|
|
|
+ get_data("fcWorkScheduleLoad/list?scheduleId=" + scheduleId , first_success)
|
|
|
}
|
|
|
function secondtime_load_spots_data() {
|
|
|
get_data("fcBiFlowDaily/list?type=" + num +"&flowId="+flowId, second_success);
|
|
@@ -82,6 +83,11 @@ function chart1_load_spots_data() {
|
|
|
get_data("fcBiWorkerDaily/get?type=4&limit=3", chart1_success);
|
|
|
|
|
|
}
|
|
|
+function addtime_load_spots_data() {
|
|
|
+ num++;
|
|
|
+ get_data("fcBiFlowDaily/list?type=" + num +"&flowId="+flowId, add_success);
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
function first_success(obj, sta) {
|
|
|
var output = first_parse(this, obj);
|
|
@@ -92,31 +98,31 @@ function first_success(obj, sta) {
|
|
|
failnum=0;
|
|
|
var x=0;
|
|
|
var worksum=[];
|
|
|
- workID[0]=output.list[0].userId;
|
|
|
+ sectorID[0]=output.list[0].sectorId;
|
|
|
passNumber[0]=0;
|
|
|
failNumber[0]=0;
|
|
|
stackeverynum[0]=0;
|
|
|
z=0;
|
|
|
for(i=1;i<output.list.length;i++){
|
|
|
- var thisUid = output.list[i].userId;
|
|
|
+ var thisUid = output.list[i].sectorId;
|
|
|
x = 0;
|
|
|
- for(j=0;j<workID.length;j++){
|
|
|
- if(workID[j] === thisUid){
|
|
|
+ for(j=0;j<sectorID.length;j++){
|
|
|
+ if(sectorID[j] === thisUid){
|
|
|
x=1;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(x===0){
|
|
|
- workID.push(thisUid);
|
|
|
+ sectorID.push(thisUid);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
j=0;
|
|
|
- for(k=0;k<workID.length;k++){
|
|
|
- var uid = workID[k];
|
|
|
+ for(k=0;k<sectorID.length;k++){
|
|
|
+ var uid = sectorID[k];
|
|
|
z=0;
|
|
|
for(i=0;i<output.list.length;i++){
|
|
|
- if(uid===output.list[i].userId){
|
|
|
+ if(uid===output.list[i].sectorId){
|
|
|
passNumber[k]=output.list[i].passNum+passNumber[j];
|
|
|
failNumber[k]=output.list[i].failNum+failNumber[j];
|
|
|
stackeverynum[k]=output.list[i].due+stackeverynum[j];
|
|
@@ -130,13 +136,13 @@ function first_success(obj, sta) {
|
|
|
failrate[k] = failNumber[k] / (failNumber[k] + passNumber[k]) * 100;
|
|
|
|
|
|
}
|
|
|
- stackeverynum[k]=stackeverynum[k]/z;
|
|
|
+ /*stackeverynum[k]=stackeverynum[k]/z;*/
|
|
|
|
|
|
///
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- for(i=1;i<5;i++) {
|
|
|
+ addtime_load_spots_data();
|
|
|
+ for(i=2;i<5;i++) {
|
|
|
secondtime_load_spots_data();
|
|
|
}
|
|
|
chart_load_spots_data();
|
|
@@ -215,7 +221,34 @@ function chart1_success(obj, sta) {
|
|
|
|
|
|
|
|
|
}
|
|
|
+function add_success(obj, sta) {
|
|
|
+ var history1 = first_parse(this, obj);
|
|
|
+ var i, j;
|
|
|
+ console.log(" history1 : ");
|
|
|
+ console.log(history1);
|
|
|
+ hispass[t] = 0;
|
|
|
+ hisfail[t] = 0;
|
|
|
+ hisstack[t] = 0;
|
|
|
+ hisrate[t]=0;
|
|
|
+ var lengthnum=history1.length-1;
|
|
|
+ for(i=lengthnum;i<history1.length;i++){
|
|
|
+
|
|
|
|
|
|
+ hispass[t] = history1[i].passNum+hispass[t];
|
|
|
+ hisfail[t] = history1[i].failNum+hisfail[t];
|
|
|
+ hisstack[t] = history1[i].avgDue+hisstack[t];
|
|
|
+ hisrate[t] = history1[i].failRate;
|
|
|
+ hisrate[t]=hisrate[t]/100;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(hispass[t]+hisfail[t]==0){
|
|
|
+ hisrate[t]=0;
|
|
|
+ }
|
|
|
+ t++;
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
function realtime_success(obj, sta) {
|
|
|
var output = first_parse(this, obj);
|
|
@@ -226,31 +259,31 @@ function realtime_success(obj, sta) {
|
|
|
failnum=0;
|
|
|
var x=0;
|
|
|
var worksum=[];
|
|
|
- workID[0]=output.list[0].userId;
|
|
|
+ sectorID[0]=output.list[0].sectorId;
|
|
|
passNumber[0]=0;
|
|
|
failNumber[0]=0;
|
|
|
stackeverynum[0]=0;
|
|
|
z=0;
|
|
|
for(i=1;i<output.list.length;i++){
|
|
|
- var thisUid = output.list[i].userId;
|
|
|
+ var thisUid = output.list[i].sectorId;
|
|
|
x = 0;
|
|
|
- for(j=0;j<workID.length;j++){
|
|
|
- if(workID[j] === thisUid){
|
|
|
+ for(j=0;j<sectorID.length;j++){
|
|
|
+ if(sectorID[j] === thisUid){
|
|
|
x=1;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(x===0){
|
|
|
- workID.push(thisUid);
|
|
|
+ sectorID.push(thisUid);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
j=0;
|
|
|
- for(k=0;k<workID.length;k++){
|
|
|
- var uid = workID[k];
|
|
|
+ for(k=0;k<sectorID.length;k++){
|
|
|
+ var uid = sectorID[k];
|
|
|
z=0;
|
|
|
for(i=0;i<output.list.length;i++){
|
|
|
- if(uid===output.list[i].userId){
|
|
|
+ if(uid===output.list[i].sectorId){
|
|
|
passNumber[k]=output.list[i].passNum+passNumber[j];
|
|
|
failNumber[k]=output.list[i].failNum+failNumber[j];
|
|
|
stackeverynum[k]=output.list[i].due+stackeverynum[j];
|
|
@@ -264,7 +297,7 @@ function realtime_success(obj, sta) {
|
|
|
failrate[k] = failNumber[k] / (failNumber[k] + passNumber[k]) * 100;
|
|
|
|
|
|
}
|
|
|
- stackeverynum[k]=stackeverynum[k]/z;
|
|
|
+ /*stackeverynum[k]=stackeverynum[k]/z;*/
|
|
|
|
|
|
///
|
|
|
|