diff --git a/AddMaterial/Handler.ashx b/AddMaterial/Handler.ashx
index e3736f9..16cc371 100644
--- a/AddMaterial/Handler.ashx
+++ b/AddMaterial/Handler.ashx
@@ -4,7 +4,8 @@ using System;
using System.Web;
using System.Collections.Generic;
-public class Handler : IHttpHandler {
+public class Handler : IHttpHandler
+{
HttpRequest Request = null;
HttpResponse Response = null;
@@ -14,7 +15,6 @@ public class Handler : IHttpHandler {
context.Response.ContentType = "text/plain";
Request = context.Request;
Response = context.Response;
-
string method = Request.Params["method"];
switch (method)
{
@@ -40,7 +40,7 @@ public class Handler : IHttpHandler {
return false;
}
}
-
+
#region 注塑车间塑料粒子加料目视看板
void GetTable1()
@@ -111,6 +111,7 @@ public class Handler : IHttpHandler {
{
html += "
" + list[i].MaterialName + " | ";
}
+
break;
case 4:
if (i == 0)
@@ -133,11 +134,87 @@ public class Handler : IHttpHandler {
}
if (i % 2 == 0)
{
- html += "" + list[i].Time1 + " | ";
+
+ if (string.IsNullOrEmpty(list[i].Time1))
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ if (list[i].Flag == "0")
+ {
+ if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ //else
+ //{
+ // html += "" + list[i].Time1 + " | ";
+ //}
+ else
+ {
+ string lastMaterial = Function.GetLastMaterialCode(list[i].Drum);
+ string currentMaterial = list[i].PartNo;
+ if(lastMaterial!= currentMaterial)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+
+ }
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ }
+
+ //html += "" + list[i].Time1 + " | ";
}
else
{
- html += "" + list[i].Time1 + " | ";
+ if (string.IsNullOrEmpty(list[i].Time1))
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ if (list[i].Flag == "0")
+ {
+ if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ //else
+ //{
+ // html += "" + list[i].Time1 + " | ";
+ //}
+ else
+ {
+ string lastMaterial = Function.GetLastMaterialCode(list[i].Drum);
+ string currentMaterial = list[i].PartNo;
+ if(lastMaterial!= currentMaterial)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+
+ }
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+
+ }
+
+ //html += "" + list[i].Time1 + " | ";
}
break;
}
@@ -157,6 +234,7 @@ public class Handler : IHttpHandler {
List list = Function.GetData();
if (list.Count >= 5)
{
+
for (int j = 0; j <= 5; j++)
{
html += "";
@@ -219,6 +297,7 @@ public class Handler : IHttpHandler {
{
html += "" + list[i].MaterialName + " | ";
}
+
break;
case 4:
if (i == 5)
@@ -241,11 +320,86 @@ public class Handler : IHttpHandler {
}
if (i % 2 == 0)
{
- html += "" + list[i].Time1 + " | ";
+ if (string.IsNullOrEmpty(list[i].Time1))
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ if (list[i].Flag == "0")
+ {
+ if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ //else
+ //{
+ // html += "" + list[i].Time1 + " | ";
+ //}
+ else
+ {
+ string lastMaterial = Function.GetLastMaterialCode(list[i].Drum);
+ string currentMaterial = list[i].PartNo;
+ if(lastMaterial!= currentMaterial)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+
+ }
+
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ }
+
+ //html += "" + list[i].Time1 + " | ";
}
else
{
- html += "" + list[i].Time1 + " | ";
+ if (string.IsNullOrEmpty(list[i].Time1))
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ if (list[i].Flag == "0")
+ {
+ if (Function.TimeDiff(Convert.ToDateTime(list[i].Time1), DateTime.Now) > 7200)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ //else
+ //{
+ // html += "" + list[i].Time1 + " | ";
+ //}
+ else
+ {
+ string lastMaterial = Function.GetLastMaterialCode(list[i].Drum);
+ string currentMaterial = list[i].PartNo;
+ if(lastMaterial!= currentMaterial)
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+
+ }
+ }
+ else
+ {
+ html += "" + list[i].Time1 + " | ";
+ }
+ }
+
+ //html += "" + list[i].Time1 + " | ";
}
break;
}
@@ -257,7 +411,9 @@ public class Handler : IHttpHandler {
Response.Write(html);
Response.End();
- }
+ }
+
+
#endregion
void GetPlanTable()
diff --git a/PaintingScreen/Handler/Handler.ashx b/PaintingScreen/Handler/Handler.ashx
index 13adf1b..92997da 100644
--- a/PaintingScreen/Handler/Handler.ashx
+++ b/PaintingScreen/Handler/Handler.ashx
@@ -19,10 +19,10 @@ public class Handler : IHttpHandler {
switch (method)
{
- case "GetTable1":
+ case "GetTable1": //PaintingResultScreen1
GetTable1();
break;
- case "GetTableSum":
+ case "GetTableSum": //PaintingResultScreen2 PaintingResultScreen1
GetTableSum();
break;
case "CreateTable":
@@ -31,21 +31,21 @@ public class Handler : IHttpHandler {
case "CreateMiddleTable":
CreateMiddleTable();
break;
- case "GetMiddleTableData":
+ case "GetMiddleTableData": //PaintingResultScreen2
string page = Request.Params["page"];
GetMiddleTableData(page);
break;
case "CreateTablePaoGuang":
CreateTablePaoGuang();
break;
- case "GetTableSumPaoGuang":
+ case "GetTableSumPaoGuang": //PaintingScreenPaoGuang
GetTableSumPaoGuang();
break;
- case "GetMiddleTablePaoGuang":
+ case "GetMiddleTablePaoGuang": //PaintingScreenPaoGuang
string pagePG = Request.Params["page"];
GetMiddleTablePaoGuang(pagePG);
break;
- case "GetSumRateTable":
+ case "GetSumRateTable"://PaintingScreenPaoGuang
GetSumRateTable();
break;
default: