|
@ -4,7 +4,8 @@ using System; |
|
|
using System.Web; |
|
|
using System.Web; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
|
public class Handler : IHttpHandler { |
|
|
public class Handler : IHttpHandler |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
HttpRequest Request = null; |
|
|
HttpRequest Request = null; |
|
|
HttpResponse Response = null; |
|
|
HttpResponse Response = null; |
|
@ -14,7 +15,6 @@ public class Handler : IHttpHandler { |
|
|
context.Response.ContentType = "text/plain"; |
|
|
context.Response.ContentType = "text/plain"; |
|
|
Request = context.Request; |
|
|
Request = context.Request; |
|
|
Response = context.Response; |
|
|
Response = context.Response; |
|
|
|
|
|
|
|
|
string method = Request.Params["method"]; |
|
|
string method = Request.Params["method"]; |
|
|
switch (method) |
|
|
switch (method) |
|
|
{ |
|
|
{ |
|
@ -111,6 +111,7 @@ public class Handler : IHttpHandler { |
|
|
{ |
|
|
{ |
|
|
html += "<td class='tdGreen'>" + list[i].MaterialName + "</td>"; |
|
|
html += "<td class='tdGreen'>" + list[i].MaterialName + "</td>"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
if (i == 0) |
|
|
if (i == 0) |
|
@ -132,13 +133,89 @@ public class Handler : IHttpHandler { |
|
|
html += "<td class='TableTitle'>" + "加料时间" + "</td>"; |
|
|
html += "<td class='TableTitle'>" + "加料时间" + "</td>"; |
|
|
} |
|
|
} |
|
|
if (i % 2 == 0) |
|
|
if (i % 2 == 0) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(list[i].Time1)) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (list[i].Flag == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
//else |
|
|
|
|
|
//{ |
|
|
|
|
|
// html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
//} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
string lastMaterial = Function.GetLastMaterialCode(list[i].Drum); |
|
|
|
|
|
string currentMaterial = list[i].PartNo; |
|
|
|
|
|
if(lastMaterial!= currentMaterial) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
{ |
|
|
{ |
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(list[i].Time1)) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (list[i].Flag == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200) |
|
|
{ |
|
|
{ |
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
} |
|
|
} |
|
|
|
|
|
//else |
|
|
|
|
|
//{ |
|
|
|
|
|
// html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
//} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
string lastMaterial = Function.GetLastMaterialCode(list[i].Drum); |
|
|
|
|
|
string currentMaterial = list[i].PartNo; |
|
|
|
|
|
if(lastMaterial!= currentMaterial) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -157,6 +234,7 @@ public class Handler : IHttpHandler { |
|
|
List<Model> list = Function.GetData(); |
|
|
List<Model> list = Function.GetData(); |
|
|
if (list.Count >= 5) |
|
|
if (list.Count >= 5) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
for (int j = 0; j <= 5; j++) |
|
|
for (int j = 0; j <= 5; j++) |
|
|
{ |
|
|
{ |
|
|
html += "<tr>"; |
|
|
html += "<tr>"; |
|
@ -219,6 +297,7 @@ public class Handler : IHttpHandler { |
|
|
{ |
|
|
{ |
|
|
html += "<td class='tdGreen'>" + list[i].MaterialName + "</td>"; |
|
|
html += "<td class='tdGreen'>" + list[i].MaterialName + "</td>"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
if (i == 5) |
|
|
if (i == 5) |
|
@ -240,13 +319,88 @@ public class Handler : IHttpHandler { |
|
|
html += "<td class='TableTitle'>" + "加料时间" + "</td>"; |
|
|
html += "<td class='TableTitle'>" + "加料时间" + "</td>"; |
|
|
} |
|
|
} |
|
|
if (i % 2 == 0) |
|
|
if (i % 2 == 0) |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(list[i].Time1)) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (list[i].Flag == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200) |
|
|
{ |
|
|
{ |
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
} |
|
|
} |
|
|
|
|
|
//else |
|
|
|
|
|
//{ |
|
|
|
|
|
// html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
//} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
string lastMaterial = Function.GetLastMaterialCode(list[i].Drum); |
|
|
|
|
|
string currentMaterial = list[i].PartNo; |
|
|
|
|
|
if(lastMaterial!= currentMaterial) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//html += "<td class='tdWhite'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(list[i].Time1)) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if (list[i].Flag == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200) |
|
|
{ |
|
|
{ |
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
} |
|
|
} |
|
|
|
|
|
//else |
|
|
|
|
|
//{ |
|
|
|
|
|
// html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
//} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
string lastMaterial = Function.GetLastMaterialCode(list[i].Drum); |
|
|
|
|
|
string currentMaterial = list[i].PartNo; |
|
|
|
|
|
if(lastMaterial!= currentMaterial) |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdRed'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//html += "<td class='tdGreen'>" + list[i].Time1 + "</td>"; |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -258,6 +412,8 @@ public class Handler : IHttpHandler { |
|
|
Response.Write(html); |
|
|
Response.Write(html); |
|
|
Response.End(); |
|
|
Response.End(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
void GetPlanTable() |
|
|
void GetPlanTable() |
|
|