ruoxing.wang 2 months ago
parent
commit
fd8067df39
  1. 149
      AddMaterial/App_Code/Function.cs
  2. 5
      AddMaterial/App_Code/Model.cs
  3. 15
      AddMaterial/Default.html
  4. 25
      FiveScreen/FrmCenter.Designer.cs
  5. 16
      FiveScreen/FrmInjection1.Designer.cs
  6. 54
      FiveScreen/FrmPainting1.Designer.cs
  7. 50
      FiveScreen/FrmPainting2.Designer.cs
  8. 54
      FiveScreen/FrmPainting3.Designer.cs
  9. 2
      FiveScreen/Program.cs
  10. BIN
      InjectionPC/bin/Debug/Report/111 - 副本2.grf
  11. 35
      MESClassLibrary/BLL/Mistake247/BoxBLL.cs
  12. 41
      MESClassLibrary/BLL/Mistake247/RecordBLL.cs
  13. 53
      MESClassLibrary/DAL/Mistake247/BoxDAL.cs
  14. 89
      MESClassLibrary/DAL/Mistake247/RecordDAL.cs
  15. 5
      MESClassLibrary/DAL/SqlHelper.cs
  16. 1
      MESClassLibrary/MESClassLibrary.csproj
  17. 1
      PunchAssemble/PunchAndWeld/FrmDoorSill_214_3.cs
  18. 65
      PurchingMistakeNew/Form1.cs
  19. 162
      PurchingMistakeNew/Form3.cs
  20. 31
      PurchingMistakeNew/PurchingMistakeNew.csproj
  21. 125
      PurchingMistakeNew/Report/11.grf
  22. BIN
      PurchingMistakeNew/Report/22.grf
  23. 223
      PurchingMistakeNew/Report/X247 右侧前门板.grf
  24. 221
      PurchingMistakeNew/Report/X247 右侧前门板装箱单.grf
  25. 222
      PurchingMistakeNew/Report/X247 右侧后门板.grf
  26. 225
      PurchingMistakeNew/Report/X247 右侧后门板装箱单.grf
  27. 225
      PurchingMistakeNew/Report/X247 左侧前门板.grf
  28. 241
      PurchingMistakeNew/Report/X247 左侧前门板装箱单.grf
  29. 225
      PurchingMistakeNew/Report/X247 左侧后门板.grf
  30. 241
      PurchingMistakeNew/Report/X247 左侧后门板装箱单.grf
  31. 268
      PurchingMistakeNew/Report/X247后部中间扰流板.grf
  32. 184
      PurchingMistakeNew/Report/X247后部扰流板装箱单.grf
  33. 13
      PurchingMistakeNew/ReportHelper.cs

149
AddMaterial/App_Code/Function.cs

@ -22,7 +22,7 @@ public class Function
try
{
string sql = @"
select a.CylinderNo, d.StationNo, b.BarCode, b.Time1
select a.CylinderNo, d.StationNo, b.BarCode, b.Time1,b.Flag
from tb_Cylinder a
left join tb_CylinderAndRaw b
on a.CylinderID = b.CylinderID and b.Time2 is null
@ -60,6 +60,7 @@ public class Function
model.Station = dt1.Rows[i]["StationNo"].ToString();
model.BatchNo = batchNo;
model.Time1 = dt1.Rows[i]["Time1"].ToString();
model.Flag = dt1.Rows[i]["Flag"].ToString();
if (dt2 != null && dt2.Rows.Count > 0)
{
model.MaterialName = dt2.Rows[0]["ProductName"].ToString();
@ -71,6 +72,7 @@ public class Function
{
model.ProductName = dt_product.Rows[0]["Plan"].ToString();
}
model.PartNo = partNo.Trim();
list.Add(model);
}
@ -86,6 +88,33 @@ public class Function
}
}
public static string GetLastMaterialCode(string drumBarCode)
{
try
{
string sql = @"select top 2 * from tb_CylinderAndRaw where DrumBarCode='" + drumBarCode + "' order by time1 desc";
DataTable res = SqlHelper.GetDataDateTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);
if (res.Rows.Count == 2)
{
string stockNo = "";
string batchNo = "";
string partNo = "";
GetCode(res.Rows[1]["BarCode"].ToString(), out stockNo, out batchNo, out partNo);
return partNo;
}
else
{
return DateTime.Now.ToString();
}
}
catch
{
return DateTime.Now.ToString(); ;
}
}
/// <summary>
/// 根据注塑机查询计划要生产的产品信息
/// </summary>
@ -524,40 +553,40 @@ public class Function
SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 08:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 08:59:59.999')) AND productInfo LIKE '%%') c2,08 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 08:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 08:59:59.999')) AND productInfo LIKE '%%') c2,09 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 08:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 08:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 09:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 09:59:59.999')) AND productInfo LIKE '%%') c2,09 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 09:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 09:59:59.999')) AND productInfo LIKE '%%') c2,10 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 09:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 09:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 10:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 10:59:59.999')) AND productInfo LIKE '%%') c2,10 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 10:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 10:59:59.999')) AND productInfo LIKE '%%') c2,11 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 10:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 10:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 11:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 11:59:59.999')) AND productInfo LIKE '%%' ) c2,11 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 11:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 11:59:59.999')) AND productInfo LIKE '%%' ) c2,12 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 11:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 11:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 12:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 12:59:59.999')) AND productInfo LIKE '%%' ) c2,12 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 12:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 12:59:59.999')) AND productInfo LIKE '%%' ) c2,13 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 12:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 12:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 13:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 13:59:59.999')) AND productInfo LIKE '%%' ) c2,13 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 13:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 13:59:59.999')) AND productInfo LIKE '%%' ) c2,14 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 13:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 13:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 14:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 14:59:59.999')) AND productInfo LIKE '%%') c2,14 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 14:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 14:59:59.999')) AND productInfo LIKE '%%') c2,15 AS h
FROM #a WHERE ([createTime]BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 14:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 14:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 15:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 15:59:59.999')) AND productInfo LIKE '%%') c2,15 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 15:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 15:59:59.999')) AND productInfo LIKE '%%') c2,16 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 15:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 15:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 16:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 16:59:59.999')) AND productInfo LIKE '%%') c2,16 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 16:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 16:59:59.999')) AND productInfo LIKE '%%') c2,17 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 16:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 16:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 17:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 17:59:59.999')) AND productInfo LIKE '%%') c2,17 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 17:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 17:59:59.999')) AND productInfo LIKE '%%') c2,18 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 17:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 17:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 18:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 18:59:59.999')) AND productInfo LIKE '%%' ) c2,18 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 18:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 18:59:59.999')) AND productInfo LIKE '%%' ) c2,19 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 18:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 18:59:59.999')) AND productInfo LIKE '%%'
UNION ALL SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:59:59.999')) AND productInfo LIKE '%%') c2,19 AS h
(SELECT COUNT(*) FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:59:59.999')) AND productInfo LIKE '%%') c2,20 AS h
FROM #a WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 19:59:59.999')) AND productInfo LIKE '%%'
ORDER BY h asc ";
@ -579,40 +608,40 @@ public class Function
SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:59:59.999')) AND productInfo LIKE '%%') c2,20 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:59:59.999')) AND productInfo LIKE '%%') c2,21 AS h
FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:59:59.999')) AND productInfo LIKE '%%') c2,21 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:59:59.999')) AND productInfo LIKE '%%') c2,22 AS h
FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:59:59.999')) AND productInfo LIKE '%%') c2,22 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:59:59.999')) AND productInfo LIKE '%%') c2,23 AS h
FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59.999')) AND productInfo LIKE '%%' ) c2,23 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59.999')) AND productInfo LIKE '%%' ) c2,00 AS h
FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000') AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999'))) AND productInfo LIKE '%%') c2,00 AS h
FROM #b WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000') AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999'))) AND productInfo LIKE '%%'
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999'))) AND productInfo LIKE '%%') c2,01 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:59:59.999'))) AND productInfo LIKE '%%' ) c2,01 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:59:59.999'))) AND productInfo LIKE '%%' ) c2,02 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:59:59.999'))) AND productInfo LIKE '%%' ) c2,02 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:59:59.999'))) AND productInfo LIKE '%%' ) c2,03 AS h
FROM #b WHERE ([createTime]BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:59:59.999'))) AND productInfo LIKE '%%' ) c2,03 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:59:59.999'))) AND productInfo LIKE '%%' ) c2,04 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:59:59.999'))) AND productInfo LIKE '%%' ) c2,04 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:59:59.999'))) AND productInfo LIKE '%%' ) c2,05 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:59:59.999'))) AND productInfo LIKE '%%') c2,05 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:59:59.999'))) AND productInfo LIKE '%%') c2,06 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:59:59.999'))) AND productInfo LIKE '%%' ) c2,06 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:59:59.999'))) AND productInfo LIKE '%%' ) c2,07 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:59:59.999'))) AND productInfo LIKE '%%' ) c2,07 AS h
(SELECT COUNT(*) FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:59:59.999'))) AND productInfo LIKE '%%' ) c2,08 AS h
FROM #b WHERE ([createTime] BETWEEN DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:00:00.000')) AND DATEADD(DAY,1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:59:59.999'))) AND productInfo LIKE '%%'
";
}
@ -631,40 +660,40 @@ public class Function
SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:59:59.999'))) AND productInfo LIKE '%%') c2,20 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:59:59.999'))) AND productInfo LIKE '%%') c2,21 AS h
FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 20:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:59:59.999'))) AND productInfo LIKE '%%') c2,21 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:59:59.999'))) AND productInfo LIKE '%%') c2,22 AS h
FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 21:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:59:59.999'))) AND productInfo LIKE '%%') c2,22 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:59:59.999'))) AND productInfo LIKE '%%') c2,23 AS h
FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 22:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59.999'))) AND productInfo LIKE '%%') c2,23 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59.999'))) AND productInfo LIKE '%%') c2,00 AS h
FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:00:00.000')) AND DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 23:59:59.999'))) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999')) AND productInfo LIKE '%%') c2,00 AS h
FROM #c WHERE ([createTime] BETWEEN DATEADD(DAY,-1,CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000')) AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999')) AND productInfo LIKE '%%'
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999')) AND productInfo LIKE '%%') c2,01 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 00:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:59:59.999')) AND productInfo LIKE '%%') c2,01 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:59:59.999')) AND productInfo LIKE '%%') c2,02 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 01:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:59:59.999')) AND productInfo LIKE '%%') c2,02 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:59:59.999')) AND productInfo LIKE '%%') c2,03 AS h
FROM #c WHERE ([createTime]BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 02:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:59:59.999')) AND productInfo LIKE '%%' ) c2,03 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:59:59.999')) AND productInfo LIKE '%%' ) c2,04 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 03:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:59:59.999')) AND productInfo LIKE '%%') c2,04 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:59:59.999')) AND productInfo LIKE '%%') c2,05 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 04:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:59:59.999')) AND productInfo LIKE '%%') c2,05 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:59:59.999')) AND productInfo LIKE '%%') c2,06 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 05:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:59:59.999')) AND productInfo LIKE '%%') c2,06 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:59:59.999')) AND productInfo LIKE '%%') c2,07 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 06:59:59.999')) AND productInfo LIKE '%%'
UNION all SELECT COUNT(*) AS c1 ,
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:59:59.999')) AND productInfo LIKE '%%') c2,07 AS h
(SELECT COUNT(*) FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:59:59.999')) AND productInfo LIKE '%%') c2,08 AS h
FROM #c WHERE ([createTime] BETWEEN CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:00:00.000') AND CONVERT(DATETIME,SUBSTRING(CONVERT(NVARCHAR(50),GETDATE(),120),1,10)+ ' 07:59:59.999')) AND productInfo LIKE '%%'
";
}
@ -737,4 +766,46 @@ public class Function
return false;
}
}
/// <summary>
/// 计算时间差
/// </summary>
/// <param name="t">时间1</param>
/// <param name="t2">时间2</param>
/// <returns>返回值:时间差(毫秒为单位)</returns>
public static long TimeDiff(DateTime t, DateTime t2)
{
long lReturn = -1;
System.TimeSpan NowValue = new TimeSpan(t.Ticks);
System.TimeSpan TimeValue = new TimeSpan(t2.Ticks);
System.TimeSpan DateDiff = TimeSpan.Zero;
try
{
//计算时间差
//DateDiff = TimeValue.Subtract(NowValue).Duration();
DateDiff = TimeValue.Subtract(NowValue);
int hours = DateDiff.Hours;
int minutes = DateDiff.Minutes;
int seconds = DateDiff.Seconds;
int milliseconds = DateDiff.Milliseconds;
string TimeDiff = hours.ToString() + ":"
+ minutes.ToString() + ":"
+ seconds.ToString() + "."
+ milliseconds.ToString();
//是否比现在的时间小,如果小就设置成第二天再启动,否则当天启动
if (hours <= 0 && minutes <= 0 && seconds <= 0 && milliseconds <= 0)
hours += 24;
lReturn = hours * 3600
+ minutes * 60
+ seconds;
}
catch (Exception ex)
{
LogHelper.WriteErrLogBase(ex.ToString(), MethodBase.GetCurrentMethod().Name);
return 0;
}
return lReturn;
}
}

5
AddMaterial/App_Code/Model.cs

@ -32,6 +32,11 @@ public class Model
/// 加料时间
/// </summary>
public string Time1 { get; set; }
/// <summary>
/// 首次加料还是续料
/// </summary>
public string Flag { get; set; }
public string PartNo { get; set; }
}
public class PlanModel

15
AddMaterial/Default.html

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注塑车间塑料粒子加料目视看板</title>
<script src="jquery-1.8.0.min.js"></script>
<link href="StyleSheet.css" rel="stylesheet" />
<script>
$(function () {
setInterval("GetTime()", 1000);
setInterval("initTable()", 3000);
//initTable();
//setInterval("initTable()", 3000);
initTable();
});
function initTable() {
@ -58,6 +58,15 @@
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
function refreshPage() {
window.location.reload();
}
// 页面加载完成后,设置定时器每15秒刷新页面
window.onload = function () {
setInterval(refreshPage, 15000);
};
</script>
</head>
<body>

25
FiveScreen/FrmCenter.Designer.cs

@ -37,23 +37,24 @@
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 86);
this.webBrowser1.Location = new System.Drawing.Point(0, 129);
this.webBrowser1.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScrollBarsEnabled = false;
this.webBrowser1.Size = new System.Drawing.Size(1904, 978);
this.webBrowser1.Size = new System.Drawing.Size(2856, 1467);
this.webBrowser1.TabIndex = 3;
this.webBrowser1.Tag = "http://10.60.101.10:8005/Manage/PaintingResultScreen2.html";
this.webBrowser1.Url = new System.Uri("http://10.60.101.10:8005/Manage/PaintingResultScreen2.html", System.UriKind.Absolute);
this.webBrowser1.Url = new System.Uri("http://localhost:84/Manage/PaintingResultScreen2.html", System.UriKind.Absolute);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.ForeColor = System.Drawing.Color.Transparent;
this.panel1.Location = new System.Drawing.Point(1231, 2);
this.panel1.Location = new System.Drawing.Point(1846, 3);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(665, 59);
this.panel1.Size = new System.Drawing.Size(998, 88);
this.panel1.TabIndex = 4;
this.panel1.DoubleClick += new System.EventHandler(this.panel1_DoubleClick);
//
@ -65,27 +66,27 @@
this.tableLayoutPanel1.Controls.Add(this.webBrowser1, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 86F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 129F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1904, 1064);
this.tableLayoutPanel1.Size = new System.Drawing.Size(2856, 1596);
this.tableLayoutPanel1.TabIndex = 5;
this.tableLayoutPanel1.DoubleClick += new System.EventHandler(this.tableLayoutPanel1_DoubleClick);
//
// FrmCenter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlText;
this.BackgroundImage = global::FiveScreen.Properties.Resources.;
this.ClientSize = new System.Drawing.Size(1904, 1064);
this.ClientSize = new System.Drawing.Size(3808, 2128);
this.ControlBox = false;
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.panel1);
this.ImeMode = System.Windows.Forms.ImeMode.Off;
this.MinimumSize = new System.Drawing.Size(16, 16);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MinimumSize = new System.Drawing.Size(22, 22);
this.Name = "FrmCenter";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));

16
FiveScreen/FrmInjection1.Designer.cs

@ -49,7 +49,7 @@
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(2856, 1410);
this.panel1.TabIndex = 0;
@ -67,7 +67,8 @@
this.webBrowser4.ScrollBarsEnabled = false;
this.webBrowser4.Size = new System.Drawing.Size(1896, 447);
this.webBrowser4.TabIndex = 5;
this.webBrowser4.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFiveInjection1-4.html", System.UriKind.Absolute);
this.webBrowser4.Tag = "http://10.60.101.10:8005/Manage/HtmlFiveInjection1-4.html";
this.webBrowser4.Url = new System.Uri("http://localhost:84/Manage/HtmlFiveInjection1-4.html", System.UriKind.Absolute);
//
// webBrowser3
//
@ -81,7 +82,8 @@
this.webBrowser3.ScrollBarsEnabled = false;
this.webBrowser3.Size = new System.Drawing.Size(982, 447);
this.webBrowser3.TabIndex = 4;
this.webBrowser3.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFiveInjection1-3.html", System.UriKind.Absolute);
this.webBrowser3.Tag = "http://10.60.101.10:8005/Manage/HtmlFiveInjection1-3.html";
this.webBrowser3.Url = new System.Uri("http://localhost:84/Manage/HtmlFiveInjection1-3.html", System.UriKind.Absolute);
//
// webBrowser2
//
@ -95,7 +97,8 @@
this.webBrowser2.ScrollBarsEnabled = false;
this.webBrowser2.Size = new System.Drawing.Size(1896, 417);
this.webBrowser2.TabIndex = 3;
this.webBrowser2.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFiveInjection1-2.html", System.UriKind.Absolute);
this.webBrowser2.Tag = "http://10.60.101.10:8005/Manage/HtmlFiveInjection1-2.html";
this.webBrowser2.Url = new System.Uri("http://localhost:84/Manage/HtmlFiveInjection1-2.html", System.UriKind.Absolute);
//
// webBrowser1
//
@ -109,7 +112,8 @@
this.webBrowser1.ScrollBarsEnabled = false;
this.webBrowser1.Size = new System.Drawing.Size(982, 417);
this.webBrowser1.TabIndex = 2;
this.webBrowser1.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFiveInjection1-1.html", System.UriKind.Absolute);
this.webBrowser1.Tag = "http://10.60.101.10:8005/Manage/HtmlFiveInjection1-1.html";
this.webBrowser1.Url = new System.Uri("http://localhost:84/Manage/HtmlFiveInjection1-1.html", System.UriKind.Absolute);
//
// label2
//
@ -148,7 +152,7 @@
this.ClientSize = new System.Drawing.Size(2856, 1410);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmInjection1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Tag = "喷涂合格率";

54
FiveScreen/FrmPainting1.Designer.cs

@ -49,8 +49,9 @@
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1904, 1064);
this.panel1.Size = new System.Drawing.Size(2856, 1596);
this.panel1.TabIndex = 0;
this.panel1.DoubleClick += new System.EventHandler(this.panel1_DoubleClick);
//
@ -59,56 +60,60 @@
this.webBrowser4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser4.Location = new System.Drawing.Point(640, 642);
this.webBrowser4.Location = new System.Drawing.Point(960, 963);
this.webBrowser4.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser4.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser4.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser4.Name = "webBrowser4";
this.webBrowser4.ScrollBarsEnabled = false;
this.webBrowser4.Size = new System.Drawing.Size(1264, 422);
this.webBrowser4.Size = new System.Drawing.Size(1896, 633);
this.webBrowser4.TabIndex = 5;
this.webBrowser4.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting1-4.html", System.UriKind.Absolute);
this.webBrowser4.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting1-4.html";
this.webBrowser4.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting1-4.html", System.UriKind.Absolute);
//
// webBrowser3
//
this.webBrowser3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser3.Location = new System.Drawing.Point(1, 642);
this.webBrowser3.Location = new System.Drawing.Point(2, 963);
this.webBrowser3.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser3.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser3.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser3.Name = "webBrowser3";
this.webBrowser3.ScrollBarsEnabled = false;
this.webBrowser3.Size = new System.Drawing.Size(655, 422);
this.webBrowser3.Size = new System.Drawing.Size(982, 633);
this.webBrowser3.TabIndex = 4;
this.webBrowser3.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting1-3.html", System.UriKind.Absolute);
this.webBrowser3.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting1-3.html";
this.webBrowser3.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting1-3.html", System.UriKind.Absolute);
//
// webBrowser2
//
this.webBrowser2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser2.Location = new System.Drawing.Point(641, 156);
this.webBrowser2.Location = new System.Drawing.Point(962, 234);
this.webBrowser2.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser2.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser2.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser2.Name = "webBrowser2";
this.webBrowser2.ScrollBarsEnabled = false;
this.webBrowser2.Size = new System.Drawing.Size(1264, 402);
this.webBrowser2.Size = new System.Drawing.Size(1896, 603);
this.webBrowser2.TabIndex = 3;
this.webBrowser2.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting1-2.html", System.UriKind.Absolute);
this.webBrowser2.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting1-2.html";
this.webBrowser2.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting1-2.html", System.UriKind.Absolute);
//
// webBrowser1
//
this.webBrowser1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser1.Location = new System.Drawing.Point(1, 156);
this.webBrowser1.Location = new System.Drawing.Point(2, 234);
this.webBrowser1.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScrollBarsEnabled = false;
this.webBrowser1.Size = new System.Drawing.Size(655, 402);
this.webBrowser1.Size = new System.Drawing.Size(982, 603);
this.webBrowser1.TabIndex = 2;
this.webBrowser1.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting1-1.html", System.UriKind.Absolute);
this.webBrowser1.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting1-1.html";
this.webBrowser1.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting1-1.html", System.UriKind.Absolute);
//
// label2
//
@ -117,9 +122,10 @@
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("微软雅黑", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(-5, 576);
this.label2.Location = new System.Drawing.Point(-8, 864);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(1899, 46);
this.label2.Size = new System.Drawing.Size(2848, 69);
this.label2.TabIndex = 1;
this.label2.Text = "喷涂总合格率";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -131,20 +137,22 @@
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("微软雅黑", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(-5, 93);
this.label1.Location = new System.Drawing.Point(-8, 140);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1899, 46);
this.label1.Size = new System.Drawing.Size(2848, 69);
this.label1.TabIndex = 0;
this.label1.Text = "喷涂一次合格率";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// FrmPainting1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1904, 1064);
this.ClientSize = new System.Drawing.Size(2856, 1596);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmPainting1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Tag = "喷涂合格率";

50
FiveScreen/FrmPainting2.Designer.cs

@ -49,8 +49,9 @@
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1904, 1064);
this.panel1.Size = new System.Drawing.Size(2856, 1596);
this.panel1.TabIndex = 0;
this.panel1.DoubleClick += new System.EventHandler(this.panel1_DoubleClick);
//
@ -59,60 +60,60 @@
this.webBrowser4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser4.Location = new System.Drawing.Point(640, 642);
this.webBrowser4.Location = new System.Drawing.Point(960, 963);
this.webBrowser4.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser4.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser4.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser4.Name = "webBrowser4";
this.webBrowser4.ScrollBarsEnabled = false;
this.webBrowser4.Size = new System.Drawing.Size(1264, 422);
this.webBrowser4.Size = new System.Drawing.Size(1896, 633);
this.webBrowser4.TabIndex = 5;
this.webBrowser4.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting2-4.html";
this.webBrowser4.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting2-4.html", System.UriKind.Absolute);
this.webBrowser4.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting2-4.html", System.UriKind.Absolute);
//
// webBrowser3
//
this.webBrowser3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser3.Location = new System.Drawing.Point(1, 642);
this.webBrowser3.Location = new System.Drawing.Point(2, 963);
this.webBrowser3.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser3.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser3.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser3.Name = "webBrowser3";
this.webBrowser3.ScrollBarsEnabled = false;
this.webBrowser3.Size = new System.Drawing.Size(655, 422);
this.webBrowser3.Size = new System.Drawing.Size(982, 633);
this.webBrowser3.TabIndex = 4;
this.webBrowser3.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting2-3.html";
this.webBrowser3.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting2-3.html", System.UriKind.Absolute);
this.webBrowser3.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting2-3.html", System.UriKind.Absolute);
//
// webBrowser2
//
this.webBrowser2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser2.Location = new System.Drawing.Point(641, 156);
this.webBrowser2.Location = new System.Drawing.Point(962, 234);
this.webBrowser2.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser2.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser2.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser2.Name = "webBrowser2";
this.webBrowser2.ScrollBarsEnabled = false;
this.webBrowser2.Size = new System.Drawing.Size(1264, 402);
this.webBrowser2.Size = new System.Drawing.Size(1896, 603);
this.webBrowser2.TabIndex = 3;
this.webBrowser2.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting2-2.html";
this.webBrowser2.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting2-2.html", System.UriKind.Absolute);
this.webBrowser2.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting2-2.html", System.UriKind.Absolute);
//
// webBrowser1
//
this.webBrowser1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser1.Location = new System.Drawing.Point(1, 156);
this.webBrowser1.Location = new System.Drawing.Point(2, 234);
this.webBrowser1.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScrollBarsEnabled = false;
this.webBrowser1.Size = new System.Drawing.Size(655, 402);
this.webBrowser1.Size = new System.Drawing.Size(982, 603);
this.webBrowser1.TabIndex = 2;
this.webBrowser1.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting2-1.html";
this.webBrowser1.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting2-1.html", System.UriKind.Absolute);
this.webBrowser1.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting2-1.html", System.UriKind.Absolute);
//
// label2
//
@ -121,9 +122,10 @@
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("微软雅黑", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(-5, 576);
this.label2.Location = new System.Drawing.Point(-8, 864);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(1899, 46);
this.label2.Size = new System.Drawing.Size(2848, 69);
this.label2.TabIndex = 1;
this.label2.Text = "运行滑撬数";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -135,20 +137,22 @@
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("微软雅黑", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(-5, 93);
this.label1.Location = new System.Drawing.Point(-8, 140);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1899, 46);
this.label1.Size = new System.Drawing.Size(2848, 69);
this.label1.TabIndex = 0;
this.label1.Text = "喷涂设备利用率";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// FrmPainting2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1904, 1064);
this.ClientSize = new System.Drawing.Size(2856, 1596);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "FrmPainting2";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Tag = "喷涂合格率";

54
FiveScreen/FrmPainting3.Designer.cs

@ -49,8 +49,9 @@
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1904, 1064);
this.panel1.Size = new System.Drawing.Size(2856, 1596);
this.panel1.TabIndex = 0;
this.panel1.DoubleClick += new System.EventHandler(this.panel1_DoubleClick);
//
@ -59,56 +60,60 @@
this.webBrowser4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser4.Location = new System.Drawing.Point(641, 642);
this.webBrowser4.Location = new System.Drawing.Point(962, 963);
this.webBrowser4.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser4.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser4.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser4.Name = "webBrowser4";
this.webBrowser4.ScrollBarsEnabled = false;
this.webBrowser4.Size = new System.Drawing.Size(1263, 422);
this.webBrowser4.Size = new System.Drawing.Size(1894, 633);
this.webBrowser4.TabIndex = 5;
this.webBrowser4.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting3-4.html", System.UriKind.Absolute);
this.webBrowser4.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting3-4.html";
this.webBrowser4.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting3-4.html", System.UriKind.Absolute);
//
// webBrowser3
//
this.webBrowser3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser3.Location = new System.Drawing.Point(1, 642);
this.webBrowser3.Location = new System.Drawing.Point(2, 963);
this.webBrowser3.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser3.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser3.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser3.Name = "webBrowser3";
this.webBrowser3.ScrollBarsEnabled = false;
this.webBrowser3.Size = new System.Drawing.Size(655, 422);
this.webBrowser3.Size = new System.Drawing.Size(982, 633);
this.webBrowser3.TabIndex = 4;
this.webBrowser3.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting3-3.html", System.UriKind.Absolute);
this.webBrowser3.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting3-3.html";
this.webBrowser3.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting3-3.html", System.UriKind.Absolute);
//
// webBrowser2
//
this.webBrowser2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser2.Location = new System.Drawing.Point(641, 156);
this.webBrowser2.Location = new System.Drawing.Point(962, 234);
this.webBrowser2.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser2.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser2.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser2.Name = "webBrowser2";
this.webBrowser2.ScrollBarsEnabled = false;
this.webBrowser2.Size = new System.Drawing.Size(1264, 402);
this.webBrowser2.Size = new System.Drawing.Size(1896, 603);
this.webBrowser2.TabIndex = 3;
this.webBrowser2.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting3-2.html", System.UriKind.Absolute);
this.webBrowser2.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting3-2.html";
this.webBrowser2.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting3-2.html", System.UriKind.Absolute);
//
// webBrowser1
//
this.webBrowser1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.webBrowser1.Location = new System.Drawing.Point(1, 156);
this.webBrowser1.Location = new System.Drawing.Point(2, 234);
this.webBrowser1.Margin = new System.Windows.Forms.Padding(0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.MinimumSize = new System.Drawing.Size(30, 30);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScrollBarsEnabled = false;
this.webBrowser1.Size = new System.Drawing.Size(655, 402);
this.webBrowser1.Size = new System.Drawing.Size(982, 603);
this.webBrowser1.TabIndex = 2;
this.webBrowser1.Url = new System.Uri("http://10.60.101.10:8005/Manage/HtmlFivePainting3-1.html", System.UriKind.Absolute);
this.webBrowser1.Tag = "http://10.60.101.10:8005/Manage/HtmlFivePainting3-1.html";
this.webBrowser1.Url = new System.Uri("http://localhost:84/Manage/HtmlFivePainting3-1.html", System.UriKind.Absolute);
//
// label2
//
@ -117,9 +122,10 @@
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("微软雅黑", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(-5, 576);
this.label2.Location = new System.Drawing.Point(-8, 864);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(1899, 46);
this.label2.Size = new System.Drawing.Size(2848, 69);
this.label2.TabIndex = 1;
this.label2.Text = "发货数";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -131,20 +137,22 @@
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("微软雅黑", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(-5, 93);
this.label1.Location = new System.Drawing.Point(-8, 140);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1899, 46);
this.label1.Size = new System.Drawing.Size(2848, 69);
this.label1.TabIndex = 0;
this.label1.Text = "喷涂入库套数";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// FrmPainting3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1904, 1064);
this.ClientSize = new System.Drawing.Size(2856, 1596);
this.ControlBox = false;
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmPainting3";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Tag = "喷涂合格率";

2
FiveScreen/Program.cs

@ -16,7 +16,7 @@ namespace FiveScreen
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new FrmInjection2());
//Application.Run(new FrmPainting3());
Application.Run(new FrmCenter());
//Application.Run(new FrmPainting3());
}

BIN
InjectionPC/bin/Debug/Report/111 - 副本2.grf

Binary file not shown.

35
MESClassLibrary/BLL/Mistake247/BoxBLL.cs

@ -13,6 +13,41 @@ namespace MESClassLibrary.BLL.Mistake247
{
public class BoxBLL
{
private BoxDAL _boxDAL = new BoxDAL();
/// <summary>
/// 左前
/// </summary>
/// <returns></returns>
public DataTable GetX247LF()
{
return _boxDAL.GetX247LF();
}
/// <summary>
/// 左后
/// </summary>
/// <returns></returns>
public DataTable GetX247LR()
{
return _boxDAL.GetX247LR();
}
/// <summary>
/// 右前
/// </summary>
/// <returns></returns>
public DataTable GetX247RF()
{
return _boxDAL.GetX247RF();
}
/// <summary>
/// 右后
/// </summary>
/// <returns></returns>
public DataTable GetX247RR()
{
return _boxDAL.GetX247RR();
}
public bool AddInfo(BoxModel md)
{
BoxDAL da = new BoxDAL();

41
MESClassLibrary/BLL/Mistake247/RecordBLL.cs

@ -13,6 +13,47 @@ namespace MESClassLibrary.BLL.Mistake247
{
public class RecordBLL
{
private RecordDAL _recordDAL = new RecordDAL();
public string SearchQLevelFromWms(string stockNo, string partCode)
{
return _recordDAL.SearchQLevel(stockNo, partCode);
}
/// <summary>
/// 左前
/// </summary>
/// <returns></returns>
public DataTable GetX247LF()
{
return _recordDAL.GetX247LF();
}
/// <summary>
/// 左后
/// </summary>
/// <returns></returns>
public DataTable GetX247LR()
{
return _recordDAL.GetX247LR();
}
/// <summary>
/// 右前
/// </summary>
/// <returns></returns>
public DataTable GetX247RF()
{
return _recordDAL.GetX247RF();
}
/// <summary>
/// 右后
/// </summary>
/// <returns></returns>
public DataTable GetX247RR()
{
return _recordDAL.GetX247RR();
}
public DataTable SearchByPartNo1(string PartNo)
{
RecordDAL da = new RecordDAL();

53
MESClassLibrary/DAL/Mistake247/BoxDAL.cs

@ -15,6 +15,59 @@ namespace MESClassLibrary.DAL.Mistake247
{
public static string TableName = "tb_Box_247";
/// <summary>
/// 左前
/// </summary>
/// <returns></returns>
public DataTable GetX247LF()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477204606','A2477204806','A2477205006') AND [PrintTime] IS NULL ORDER BY [CreateTime]";
return GetDoorAssemble(sql);
}
/// <summary>
/// 左后
/// </summary>
/// <returns></returns>
public DataTable GetX247LR()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477305303','A2477305503','A2477305703') AND [PrintTime] IS NULL ORDER BY [CreateTime]";
return GetDoorAssemble(sql);
}
/// <summary>
/// 右前
/// </summary>
/// <returns></returns>
public DataTable GetX247RF()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477204706','A2477204906','A2477205106') AND [PrintTime] IS NULL ORDER BY [CreateTime]";
return GetDoorAssemble(sql);
}
/// <summary>
/// 右后
/// </summary>
/// <returns></returns>
public DataTable GetX247RR()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477305603','A2477305403','A2477305803') AND [PrintTime] IS NULL ORDER BY [CreateTime]";
return GetDoorAssemble(sql);
}
DataTable GetDoorAssemble(string sql)
{
try
{
SqlParameter[] param = new SqlParameter[0];
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool AddInfo(BoxModel md)
{
try

89
MESClassLibrary/DAL/Mistake247/RecordDAL.cs

@ -15,6 +15,95 @@ namespace MESClassLibrary.DAL.Mistake247
public static string TableName = "tb_Record_247";
public static string TableName1 = "tb_Record_243";
public string SearchQLevel(string stockNo,string partCode)
{
try
{
string sql = string.Empty;
SqlParameter[] param = new SqlParameter[1];
if (!string.IsNullOrEmpty(stockNo))
{
sql = $"select QLevel from TA_PART where DrawingNumber=@DrawingNumber";
param[0] = new SqlParameter("@DrawingNumber", SqlDbType.VarChar);
param[0].Value = stockNo;
}
else
{
sql = $"select QLevel from TA_PART where PartCode=@PartCode";
param[0] = new SqlParameter("@PartCode", SqlDbType.VarChar);
param[0].Value = partCode;
}
DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetWmsConnSting(), CommandType.Text, sql, param).Tables[0];
if (dt.Rows.Count > 0)
{
return dt.Rows[0]["QLevel"].ToString();
}
return null;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
/// <summary>
/// 左前
/// </summary>
/// <returns></returns>
public DataTable GetX247LF()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Assembly_247] WHERE substring(PartNo,1,11) in ('A2477203007','A2477203207','A2477205006' )AND PrintTime IS NULL ORDER BY CreateTime";
return GetDoorAssemble(sql);
}
/// <summary>
/// 左后
/// </summary>
/// <returns></returns>
public DataTable GetX247LR()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Assembly_247] WHERE substring(PartNo,1,11 ) in('A2477305303','A2477305503','A2477305703') AND PrintTime IS NULL ORDER BY CreateTime";
return GetDoorAssemble(sql);
}
/// <summary>
/// 右前
/// </summary>
/// <returns></returns>
public DataTable GetX247RF()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Assembly_247] WHERE SUBSTRING(PartNo,1,11) in ('A2477203107','A2477203307','A2477205106' )AND PrintTime IS NULL ORDER BY CreateTime";
return GetDoorAssemble(sql);
}
/// <summary>
/// 右后
/// </summary>
/// <returns></returns>
public DataTable GetX247RR()
{
string sql = "SELECT top 1 * FROM [dbo].[tb_Assembly_247] WHERE SUBSTRING(PartNo,1,11) in('A2477305603','A2477305403','A2477305803') AND PrintTime IS NULL ORDER BY CreateTime";
return GetDoorAssemble(sql);
}
DataTable GetDoorAssemble(string sql)
{
try
{
SqlParameter[] param = new SqlParameter[0];
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
/// <summary>
/// 查找半成品是否已经装配
/// </summary>

5
MESClassLibrary/DAL/SqlHelper.cs

@ -182,7 +182,10 @@ namespace MESClassLibrary.DAL
{
return ConfigurationManager.ConnectionStrings["SqlConnString"].ConnectionString;
}
public static string GetWmsConnSting()
{
return ConfigurationManager.ConnectionStrings["WmsConnString"].ConnectionString;
}
public static string GetConnSting1()
{
return ConfigurationManager.ConnectionStrings["SqlConnString1"].ConnectionString;

1
MESClassLibrary/MESClassLibrary.csproj

@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

1
PunchAssemble/PunchAndWeld/FrmDoorSill_214_3.cs

@ -32,6 +32,7 @@ namespace PunchAndWeld
this.Hide();
ShowParamDialog("","");
this.WindowState = FormWindowState.Maximized;
}

65
PurchingMistakeNew/Form1.cs

@ -22,6 +22,8 @@ namespace PurchingMistakeNew
public partial class Form1 : Form
{
private static string orderNo="";
private RecordBLL _recordBLL = new RecordBLL();
private Func<DataTable> GetHeadTable = null;
public Form1()
{
InitializeComponent();
@ -571,22 +573,28 @@ namespace PurchingMistakeNew
DateTime.Now.ToString("yyyy-MM-dd").Substring(5, 2) +
DateTime.Now.ToString("yyyy-MM-dd").Substring(8, 2);
DataTable headTable = null;
string fileName = string.Empty;
#region 根据半成品零件号判断总成类型、总成条码模板、打印机
if (partNo == "1230002601" || partNo == "1230003122")
{
md.PartType = "X247 左侧前门板";
type = 1;
report.LoadFromFile(@"D:\New\X247 左侧前门板.grf");
fileName = ReportHelper.GetTemplateName("X247门板");
report.LoadFromFile(fileName); // @"D:\New\X247 左侧前门板.grf" ;
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
GetHeadTable = _recordBLL.GetX247LF;
}
if (partNo == "1230002604" || partNo == "1230003130")
{
md.PartType = "X247 左侧后门板";
type = 1;
report.LoadFromFile(@"D:\New\X247 左侧后门板.grf");
fileName = ReportHelper.GetTemplateName("X247门板");
report.LoadFromFile(fileName);
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
GetHeadTable = _recordBLL.GetX247LR;
}
if (partNo == "1230002602" || partNo == "1230003126")
@ -594,25 +602,30 @@ namespace PurchingMistakeNew
md.PartType = "X247 右侧前门板";
type = 2;
report.LoadFromFile(@"D:\New\X247 右侧前门板.grf");
fileName = ReportHelper.GetTemplateName("X247门板");
report.LoadFromFile(fileName);
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
GetHeadTable = _recordBLL.GetX247RF;
}
if (partNo == "1230002605" || partNo == "1230003134")
{
md.PartType = "X247 右侧后门板";
type = 2;
report.LoadFromFile(@"D:\New\X247 右侧后门板.grf");
fileName = ReportHelper.GetTemplateName("X247门板");
report.LoadFromFile(fileName);
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
GetHeadTable = _recordBLL.GetX247RR;
}
if (partNo == "1230002609")
{
md.PartType = "X247 前部左侧轮眉";
type = 3;
report.LoadFromFile(@"D:\New\X247 前部左侧轮眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 前部左侧轮眉"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
@ -621,7 +634,7 @@ namespace PurchingMistakeNew
{
md.PartType = "X247 后部左侧后轮眉";
type = 3;
report.LoadFromFile(@"D:\New\X247 后部左侧后轮眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧后轮眉"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
@ -630,7 +643,7 @@ namespace PurchingMistakeNew
{
md.PartType = "X247 前部右侧轮眉";
type = 4;
report.LoadFromFile(@"D:\New\X247 前部右侧轮眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 前部右侧轮眉"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
@ -640,7 +653,7 @@ namespace PurchingMistakeNew
md.PartType = "X247 右侧后部后轮眉";
type = 4;
report.LoadFromFile(@"D:\New\X247 右侧后部后轮眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 右侧后部后轮眉"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
@ -650,7 +663,7 @@ namespace PurchingMistakeNew
md.PartType = "X247 后部左侧前轮眉";
type = 5;
report.LoadFromFile(@"D:\New\X247 后部左侧轮眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧前轮眉"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
@ -661,7 +674,7 @@ namespace PurchingMistakeNew
type = 5;
report.LoadFromFile(@"D:\New\X247 后部右侧前轮眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧前轮眉"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
@ -672,7 +685,7 @@ namespace PurchingMistakeNew
type = 6;
report.LoadFromFile(@"D:\New\X247 后部左侧扰流板眉.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧扰流板"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
@ -683,7 +696,7 @@ namespace PurchingMistakeNew
type = 7;
report.LoadFromFile(@"D:\New\X247 后部右侧扰流板.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧扰流板"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
@ -703,9 +716,28 @@ namespace PurchingMistakeNew
#region 打印总成条码
if (string.IsNullOrEmpty(fileName))
{
report.Register("");
report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString();
report.Print(false);
}
else
{
headTable = GetHeadTable();
headTable.Columns.Add("QLevel");
foreach(DataRow dr in headTable.Rows)
{
string qlevel = _recordBLL.SearchQLevelFromWms(partNo,"");
dr["QLevel"] = qlevel;
}
ReportHelper report2 = new ReportHelper(fileName, headTable, null, (int)GRPaperOrientation.grpoPortrait, 1, report.Printer.PrinterName);
report2.Report.Printer.PrinterName = report.Printer.PrinterName;
report2.Report.Print(false);
}
abll.UpdateInfo(md);
#endregion
@ -814,28 +846,28 @@ namespace PurchingMistakeNew
if (part == "A2477203007" || part == "A2477203207" || part == "A2477205006")
{
md.PartType = "X247 左侧前门板";
report.LoadFromFile(@"D:\New\X247 左侧前门板.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧前门板"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2477305303" || part == "A2477305503" || part == "A2477305703")
{
md.PartType = "X247 左侧后门板";
report.LoadFromFile(@"D:\New\X247 左侧后门板.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧后门板"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477203107" || part == "A2477203307" || part == "A2477205106")
{
md.PartType = "X247 右侧前门板";
report.LoadFromFile(@"D:\New\X247 右侧前门板.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧前门板"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2477305403" || part == "A2477305603" || part == "A2477305803")
{
md.PartType = "X247 右侧后门板";
report.LoadFromFile(@"D:\New\X247 右侧后门板.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧后门板"));
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
@ -947,5 +979,6 @@ namespace PurchingMistakeNew
return false;
}
}
}

162
PurchingMistakeNew/Form3.cs

@ -20,6 +20,9 @@ namespace PurchingMistakeNew
{
public partial class Form3 : Form
{
private Func<DataTable> GetHeadTable = null;
private BoxBLL _boxBll = new BoxBLL();
private RecordBLL _recordBLL = new RecordBLL();
public Form3()
{
InitializeComponent();
@ -411,7 +414,8 @@ namespace PurchingMistakeNew
{
box = "";
}
DataTable headTable = null;
string fileName = string.Empty;
batch = DateTime.Now.ToString("yyyy-MM-dd").Substring(2, 2) + DateTime.Now.ToString("yyyy-MM-dd").Substring(5, 2) + DateTime.Now.ToString("yyyy-MM-dd").Substring(8, 2);
if (box != "")
{
@ -472,86 +476,114 @@ namespace PurchingMistakeNew
}
bll.AddInfo(md);
#region 打印装箱单
if (part == "A2477209103" || part == "A2477209203" || part == "A2477209305" || part == "A2477203007" || part == "A2477203207" || part == "A2477205006")
{
report.LoadFromFile(@"D:\New\X247 左侧前门板装箱单.grf");
//report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧前门板装箱单"));//@"D:\New\X247 左侧前门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247LF;
}
if (part == "A2477309401" || part == "A2477309501" || part == "A2477300203" || part == "A2477305303" || part == "A2477305503" || part == "A2477305703")
{
report.LoadFromFile(@"D:\New\X247 左侧后门板装箱单.grf");
//report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧后门板装箱单"));//@"D:\New\X247 左侧后门板装箱单.grf"
fileName = ReportHelper.GetTemplateName("X247装箱单");
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
GetHeadTable = _boxBll.GetX247LR;
}
if (part == "A2477209303" || part == "A2477209403" || part == "A2477207505" || part == "A2477203107" || part == "A2477203307" || part == "A2477205106")
{
report.LoadFromFile(@"D:\New\X247 右侧前门板装箱单.grf");
//report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧前门板装箱单"));//@"D:\New\X247 右侧前门板装箱单.grf"
fileName = ReportHelper.GetTemplateName("X247装箱单");
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
GetHeadTable = _boxBll.GetX247RF;
}
if (part == "A2477309601" || part == "A2477309701" || part == "A2477300303" || part == "A2477305403" || part == "A2477305603" || part == "A2477305803")
{
report.LoadFromFile(@"D:\New\X247 右侧后门板装箱单.grf");
//report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧后门板装箱单"));//@"D:\New\X247 右侧后门板装箱单.grf"
fileName = ReportHelper.GetTemplateName("X247装箱单");
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
GetHeadTable = _boxBll.GetX247RR;
}
if (part == "A2478850022")
{
report.LoadFromFile(@"D:\New\X247 前部左侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 前部左侧轮眉装箱单"));//@"D:\New\X247 前部左侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2478850222")
{
report.LoadFromFile(@"D:\New\X247 后部左侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧轮眉装箱单"));//@"D:\New\X247 后部左侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2478850122")
{
report.LoadFromFile(@"D:\New\X247 前部右侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 前部右侧轮眉装箱单"));//@"D:\New\X247 前部右侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2478850322")
{
report.LoadFromFile(@"D:\New\X247 后部右侧后轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧后轮眉装箱单"));//@"D:\New\X247 后部右侧后轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477309400")
{
report.LoadFromFile(@"D:\New\X247 后部左侧前轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧前轮眉装箱单"));//@"D:\New\X247 后部左侧前轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477309600")
{
report.LoadFromFile(@"D:\New\X247 后部右侧前轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧前轮眉装箱单"));//@"D:\New\X247 后部右侧前轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477900788" || part == "A2477901300")
{
report.LoadFromFile(@"D:\New\X247 后部左侧扰流板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧扰流板装箱单"));//@"D:\New\X247 后部左侧扰流板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477900888" || part == "A2477901400")
{
report.LoadFromFile(@"D:\New\X247 后部右侧扰流板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧扰流板装箱单"));//@"D:\New\X247 后部右侧扰流板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
#endregion
if (string.IsNullOrEmpty(fileName))
{
report.Register("");
report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString();
report.Print(false);
}
else
{
headTable = GetHeadTable();
headTable.Columns.Add("QLevel");
foreach (DataRow dr in headTable.Rows)
{
string qlevel = _recordBLL.SearchQLevelFromWms("",part);
dr["QLevel"] = qlevel;
}
ReportHelper report2 = new ReportHelper(fileName, headTable, null, (int)GRPaperOrientation.grpoPortrait, 1, report.Printer.PrinterName);
report2.Report.Printer.PrinterName = report.Printer.PrinterName;
report2.Report.Print(false);
}
bll.UpdateInfo(md);
@ -591,14 +623,18 @@ namespace PurchingMistakeNew
if (part == "A2477209103" || part == "A2477209203" || part == "A2477209305" || part == "A2477203007" || part == "A2477203207" || part == "A2477205006")
{
report.LoadFromFile(@"D:\New\X247 左侧前门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧前门板装箱单"));//@"D:\New\X247 左侧前门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247LF;
}
if (part == "A2477309401" || part == "A2477309501" || part == "A2477300203" || part == "A2477305303" || part == "A2477305503" || part == "A2477305703")
{
report.LoadFromFile(@"D:\New\X247 左侧后门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧后门板装箱单"));//@"D:\New\X247 左侧后门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247LR;
}
//if (part == "A2477209303" || part == "A2477209403" || part == "A2477207505" || part == "A2477203107" || part == "A2477203307" || part == "A2477205106")
@ -609,69 +645,90 @@ namespace PurchingMistakeNew
if (part == "A2477209303" || part == "A2477209403" || part == "A2477207505" || part == "A2477203107" || part == "A2477203307" || part == "A2477205106")
{
report.LoadFromFile(@"D:\New\X247 右侧前门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧前门板装箱单"));//@"D:\New\X247 右侧前门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247RF;
}
if (part == "A2477309601" || part == "A2477309701" || part == "A2477300303" || part == "A2477305403" || part == "A2477305603" || part == "A2477305803")
{
report.LoadFromFile(@"D:\New\X247 右侧后门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧后门板装箱单"));//@"D:\New\X247 右侧后门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247RR;
}
if (part == "A2478850022")
{
report.LoadFromFile(@"D:\X247 前部左侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 前部左侧轮眉装箱单"));//@"D:\X247 前部左侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2478850222")
{
report.LoadFromFile(@"D:\X247 后部左侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部左侧轮眉装箱单"));//@"D:\X247 后部左侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2478850122")
{
report.LoadFromFile(@"D:\X247 前部右侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 前部右侧轮眉装箱单"));//@"D:\X247 前部右侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2478850322")
{
report.LoadFromFile(@"D:\X247 后部右侧后轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部右侧后轮眉装箱单"));//@"D:\X247 后部右侧后轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477309400")
{
report.LoadFromFile(@"D:\X247 后部左侧前轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部左侧前轮眉装箱单"));//@"D:\X247 后部左侧前轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477309600")
{
report.LoadFromFile(@"D:\X247 后部右侧前轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部右侧前轮眉装箱单"));//@"D:\X247 后部右侧前轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477900788" || part == "A2477901300")
{
report.LoadFromFile(@"D:\X247 后部左侧扰流板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部左侧扰流板装箱单"));//@"D:\X247 后部左侧扰流板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477900888" || part == "A2477901400")
{
report.LoadFromFile(@"D:\X247 后部右侧扰流板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部右侧扰流板装箱单"));//@"D:\X247 后部右侧扰流板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
#endregion
if (string.IsNullOrEmpty(fileName))
{
report.Register("");
report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString();
report.Print(false);
}
else
{
headTable = GetHeadTable();
headTable.Columns.Add("QLevel");
foreach (DataRow dr in headTable.Rows)
{
string qlevel = _recordBLL.SearchQLevelFromWms("", part);
dr["QLevel"] = qlevel;
}
ReportHelper report2 = new ReportHelper(fileName, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, report.Printer.PrinterName);
report2.Report.Printer.PrinterName = report.Printer.PrinterName;
report2.Report.Print(false);
}
bll.UpdateInfo(md);
@ -928,86 +985,117 @@ namespace PurchingMistakeNew
#endregion
DataTable headTable = null;
string fileName = string.Empty;
#region 打印装箱单
if (part == "A2477209103" || part == "A2477209203" || part == "A2477209305" || part == "A2477203007" || part == "A2477203207" || part == "A2477205006")
{
report.LoadFromFile(@"D:\New\X247 左侧前门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧前门板装箱单"));//@"D:\New\X247 左侧前门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247LF;
}
if (part == "A2477309401" || part == "A2477309501" || part == "A2477300203" || part == "A2477305303" || part == "A2477305503" || part == "A2477305703")
{
report.LoadFromFile(@"D:\New\X247 左侧后门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247左侧后门板装箱单"));//@"D:\New\X247 左侧后门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247LR;
}
if (part == "A2477209303" || part == "A2477209403" || part == "A2477207505" || part == "A2477203107" || part == "A2477203307" || part == "A2477205106")
{
report.LoadFromFile(@"D:\New\X247 右侧前门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧前门板装箱单"));//@"D:\New\X247 右侧前门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247RF;
}
if (part == "A2477309601" || part == "A2477309701" || part == "A2477300303" || part == "A2477305403" || part == "A2477305603" || part == "A2477305803")
{
report.LoadFromFile(@"D:\New\X247 右侧后门板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateName("X247右侧后门板装箱单"));//@"D:\New\X247 右侧后门板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
fileName = ReportHelper.GetTemplateName("X247装箱单");
GetHeadTable = _boxBll.GetX247RR;
}
if (part == "A2478850022")
{
report.LoadFromFile(@"D:\New\X247 前部左侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 前部左侧轮眉装箱单"));//@"D:\New\X247 前部左侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2478850222")
{
report.LoadFromFile(@"D:\New\X247 后部左侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧轮眉装箱单"));//@"D:\New\X247 后部左侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer1"].ToString();
}
if (part == "A2478850122")
{
report.LoadFromFile(@"D:\New\X247 前部右侧轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 前部右侧轮眉装箱单"));//@"D:\New\X247 前部右侧轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2478850322")
{
report.LoadFromFile(@"D:\X247 后部右侧后轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameD("X247 后部右侧后轮眉装箱单"));//@"D:\X247 后部右侧后轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477309400")
{
report.LoadFromFile(@"D:\New\X247 后部左侧前轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧前轮眉装箱单"));//@"D:\New\X247 后部左侧前轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477309600")
{
report.LoadFromFile(@"D:\New\X247 后部右侧前轮眉装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧前轮眉装箱单"));//@"D:\New\X247 后部右侧前轮眉装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477900788" || part == "A2477901300")
{
report.LoadFromFile(@"D:\New\X247 后部左侧扰流板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部左侧扰流板装箱单"));//@"D:\New\X247 后部左侧扰流板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
if (part == "A2477900888" || part == "A2477901400")
{
report.LoadFromFile(@"D:\New\X247 后部右侧扰流板装箱单.grf");
report.LoadFromFile(ReportHelper.GetTemplateNameDNew("X247 后部右侧扰流板装箱单"));//@"D:\New\X247 后部右侧扰流板装箱单.grf"
report.Printer.PrinterName = ConfigurationManager.AppSettings["Printer2"].ToString();
}
#endregion
if (string.IsNullOrEmpty(fileName))
{
report.Register("");
report.ConnectionString = ConfigurationManager.ConnectionStrings["report"].ToString();
report.Print(false);
}
else
{
headTable = GetHeadTable();
headTable.Columns.Add("QLevel");
foreach (DataRow dr in headTable.Rows)
{
string qlevel = _recordBLL.SearchQLevelFromWms("", part);
dr["QLevel"] = qlevel;
}
ReportHelper report2 = new ReportHelper(fileName, headTable, null, (int)GRPaperOrientation.grpoDefault, 1, report.Printer.PrinterName);
report2.Report.Printer.PrinterName = report.Printer.PrinterName;
report2.Report.Print(false);
}
bll.UpdateInfo(md);
}

31
PurchingMistakeNew/PurchingMistakeNew.csproj

@ -260,6 +260,36 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Report\11.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\22.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247右侧前门板装箱单.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247右侧后门板装箱单.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247后部中间扰流板.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247后部扰流板装箱单.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247左侧前门板装箱单.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247左侧后门板装箱单.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247装箱单.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Report\X247门板.grf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
@ -280,6 +310,7 @@
<ItemGroup>
<Content Include="Stone.Common.dll" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

125
PurchingMistakeNew/Report/11.grf

@ -0,0 +1,125 @@
{
"Version":"6.6.0.2",
"SharePrintSetupOptions":"[PaperOrientation]",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":4,
"Height":3,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"Parameter":[
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
}
],
"ReportHeader":[
{
"Name":"ReportHeader1",
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox1",
"Left":0.211667,
"Width":1.19063,
"Height":0.4,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"规格型号:"
},
{
"Type":"StaticBox",
"Name":"StaticBox2",
"Left":0.211667,
"Top":1.5875,
"Width":0.79375,
"Height":0.608542,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"批次:"
},
{
"Type":"Barcode",
"Name":"Barcode2",
"Left":2.19604,
"Top":1.40229,
"Width":1.21708,
"Height":1.19063,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#{PartNo}#]"
},
{
"Type":"StaticBox",
"Name":"StaticBox3",
"Left":0.21,
"Top":0.4,
"Width":3.5,
"Height":0.61,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"StaticBox3",
"Parameter":"PartNo"
},
{
"Type":"StaticBox",
"Name":"StaticBox4",
"Left":0.21,
"Top":1.01,
"Width":3.6,
"Height":0.58,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"StaticBox4",
"Parameter":"PartName"
},
{
"Type":"StaticBox",
"Name":"StaticBox5",
"Left":0.21,
"Top":2.41,
"Width":0.98,
"Height":0.4,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"StaticBox5",
"Parameter":"BatchNo"
}
]
}
]
}

BIN
PurchingMistakeNew/Report/22.grf

Binary file not shown.

223
PurchingMistakeNew/Report/X247 右侧前门板.grf

@ -0,0 +1,223 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":6,
"Height":7,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Assembly_247] WHERE SUBSTRING(PartNo,1,11) in ('A2477203107','A2477203307','A2477205106' )AND PrintTime IS NULL ORDER BY CreateTime",
"Field":[
{
"Name":"ID"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"Color"
},
{
"Name":"ColorNo"
},
{
"Name":"PartType"
},
{
"Name":"Validity"
},
{
"Name":"ValidityDate"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"TapeBatchNo"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":6.00604,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox1",
"Top":0.343958,
"Width":1.79917,
"Height":0.582083,
"Text":"规格型号:"
},
{
"Type":"FieldBox",
"Name":"FieldBox1",
"Top":0.926042,
"Width":6.00604,
"Height":0.396875,
"Font":{
"Name":"宋体",
"Size":120000,
"Weight":400,
"Charset":134
},
"DataField":"PartNo"
},
{
"Type":"StaticBox",
"Name":"StaticBox2",
"Left":0.211667,
"Top":3.96875,
"Width":0.978958,
"Height":0.608542,
"Text":"批次:"
},
{
"Type":"FieldBox",
"Name":"FieldBox2",
"Left":1.21708,
"Top":3.96875,
"Width":1.79917,
"Height":0.396875,
"DataField":"BatchNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox3",
"Top":1.32292,
"Width":5.60917,
"Height":0.608542,
"DataField":"PartName"
},
{
"Type":"StaticBox",
"Name":"StaticBox3",
"Top":2.30188,
"Width":1.19063,
"Height":0.608542,
"Text":"车型:"
},
{
"Type":"FieldBox",
"Name":"FieldBox4",
"Left":1.24354,
"Top":2.30188,
"Width":4.20688,
"Height":0.608542,
"DataField":"PartType"
},
{
"Type":"StaticBox",
"Name":"StaticBox4",
"Left":0.396875,
"Top":2.77813,
"Width":2.01083,
"Height":0.79375,
"Text":"胶带有效期:"
},
{
"Type":"FieldBox",
"Name":"FieldBox5",
"Left":2.80458,
"Top":2.98979,
"Width":2.98979,
"Height":0.423333,
"DataField":"Validity"
},
{
"Type":"FieldBox",
"Name":"FieldBox6",
"Left":-0.15875,
"Top":3.57188,
"Width":5.90021,
"Height":0.396875,
"DataField":"ValidityDate"
},
{
"Type":"StaticBox",
"Name":"StaticBox5",
"Left":0.211667,
"Top":5.15938,
"Width":0.978958,
"Height":0.608542,
"Text":"颜色:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":1.19063,
"Top":5.15938,
"Width":1.61396,
"Height":0.608542,
"DataField":"Color"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":-0.15875,
"Top":4.57729,
"Width":2.24896,
"Height":0.582083,
"DataField":"ColorNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox9",
"Left":-0.132292,
"Top":1.71979,
"Width":5.18583,
"Height":0.582083,
"DataField":"Des"
},
{
"Type":"Barcode",
"Name":"Barcode1",
"Left":2.8575,
"Top":3.96875,
"Width":2.38125,
"Height":2.01083,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#PartNo#]"
}
]
}
]
}

221
PurchingMistakeNew/Report/X247 右侧前门板装箱单.grf

@ -0,0 +1,221 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":7,
"Height":6,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477204706','A2477204906','A2477205106') AND [PrintTime] IS NULL ORDER BY [CreateTime]",
"Field":[
{
"Name":"ID"
},
{
"Name":"BoxNo"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"BoxCount",
"Type":"Float"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.21229,
"Control":[
{
"Type":"FreeGrid",
"Name":"FreeGrid1",
"Left":0.291042,
"Top":0.238125,
"Border":{
"Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
},
"ColumnCount":4,
"RowCount":6,
"FreeGridColumn":[
{
"index":1,
"Width":1.71979
},
{
"index":2,
"Width":2.30188
},
{
"index":3,
"Width":2.2
},
{
"index":4,
"Width":0
}
],
"FreeGridRow":[
{
"index":1,
"Height":0.79375
},
{
"index":4,
"Height":1.05833
},
{
"index":5,
"Height":0.978958
},
{
"index":6,
"Height":0.767292
}
],
"FreeGridCell":[
{
"row":1,
"col":1,
"Text":"包装单号"
},
{
"row":1,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BoxNo#]",
"ColSpan":3
},
{
"row":2,
"col":1,
"Text":"物料描述",
"RowSpan":2
},
{
"row":2,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartName#]",
"ColSpan":3
},
{
"row":3,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#Des#]",
"ColSpan":2
},
{
"row":4,
"col":1,
"Text":"物料号"
},
{
"row":4,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartNo#]"
},
{
"row":4,
"col":3,
"FreeCell":true,
"Control":[
{
"Type":"Barcode",
"Name":"Barcode1",
"Top":0.211667,
"Width":2.01083,
"Height":2.19604,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#BoxNo#]",
"QRCodeErrorLevel":3
}
],
"ColSpan":2,
"RowSpan":3
},
{
"row":5,
"col":1,
"Text":"批次"
},
{
"row":5,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BatchNo#]"
}
]
}
]
}
]
}

222
PurchingMistakeNew/Report/X247 右侧后门板.grf

@ -0,0 +1,222 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":6,
"Height":7,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Assembly_247] WHERE SUBSTRING(PartNo,1,11) in('A2477305603','A2477305403','A2477305803') AND PrintTime IS NULL ORDER BY CreateTime",
"Field":[
{
"Name":"ID"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"Color"
},
{
"Name":"ColorNo"
},
{
"Name":"PartType"
},
{
"Name":"Validity"
},
{
"Name":"ValidityDate"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"TapeBatchNo"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.79438,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox1",
"Top":0.396875,
"Width":2.01083,
"Height":0.582083,
"Text":"规格型号:"
},
{
"Type":"FieldBox",
"Name":"FieldBox1",
"Top":0.79375,
"Width":6.00604,
"Height":0.396875,
"Font":{
"Name":"宋体",
"Size":120000,
"Weight":400,
"Charset":134
},
"DataField":"PartNo"
},
{
"Type":"StaticBox",
"Name":"StaticBox2",
"Left":0.211667,
"Top":3.81,
"Width":0.978958,
"Height":0.582083,
"Text":"批次:"
},
{
"Type":"FieldBox",
"Name":"FieldBox2",
"Left":1.21708,
"Top":3.81,
"Width":1.79917,
"Height":0.396875,
"DataField":"BatchNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox3",
"Left":-0.15875,
"Top":1.19063,
"Width":5.37104,
"Height":0.582083,
"DataField":"PartName"
},
{
"Type":"StaticBox",
"Name":"StaticBox3",
"Top":2.19604,
"Width":1.00542,
"Height":0.608542,
"Text":"车型:"
},
{
"Type":"FieldBox",
"Name":"FieldBox4",
"Left":1.24354,
"Top":2.19604,
"Width":4.20688,
"Height":0.608542,
"DataField":"PartType"
},
{
"Type":"StaticBox",
"Name":"StaticBox4",
"Top":2.61938,
"Width":2.40771,
"Height":0.79375,
"Text":"胶带有效期:"
},
{
"Type":"FieldBox",
"Name":"FieldBox5",
"Left":2.80458,
"Top":2.80458,
"Width":2.98979,
"Height":0.396875,
"DataField":"Validity"
},
{
"Type":"FieldBox",
"Name":"FieldBox6",
"Left":-0.15875,
"Top":3.41313,
"Width":5.50333,
"Height":0.396875,
"DataField":"ValidityDate"
},
{
"Type":"StaticBox",
"Name":"StaticBox5",
"Top":5.00063,
"Width":1.19063,
"Height":0.608542,
"Text":"颜色:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":1.5875,
"Top":5.00063,
"Width":1.64042,
"Height":0.608542,
"DataField":"Color"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":-0.15875,
"Top":4.41854,
"Width":2.03729,
"Height":0.582083,
"DataField":"ColorNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox9",
"Left":-0.15875,
"Top":1.77271,
"Width":5.00063,
"Height":0.423333,
"DataField":"Des"
},
{
"Type":"Barcode",
"Name":"Barcode1",
"Left":3.41313,
"Top":3.81,
"Width":2.38125,
"Height":2.01083,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#PartNo#]"
}
]
}
]
}

225
PurchingMistakeNew/Report/X247 右侧后门板装箱单.grf

@ -0,0 +1,225 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":7,
"Height":6,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477305603','A2477305403','A2477305803') AND [PrintTime] IS NULL ORDER BY [CreateTime]",
"Field":[
{
"Name":"ID"
},
{
"Name":"BoxNo"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"BoxCount",
"Type":"Float"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.21229,
"Control":[
{
"Type":"FreeGrid",
"Name":"FreeGrid1",
"Left":0.291042,
"Top":0.238125,
"Border":{
"Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
},
"ColumnCount":4,
"RowCount":6,
"FreeGridColumn":[
{
"index":1,
"Width":1.71979
},
{
"index":2,
"Width":2.30188
},
{
"index":3,
"Width":2.2
},
{
"index":4,
"Width":0
}
],
"FreeGridRow":[
{
"index":1,
"Height":0.79375
},
{
"index":2,
"Height":0.635
},
{
"index":4,
"Height":1.05833
},
{
"index":5,
"Height":0.978958
},
{
"index":6,
"Height":0.767292
}
],
"FreeGridCell":[
{
"row":1,
"col":1,
"Text":"包装单号"
},
{
"row":1,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BoxNo#]",
"ColSpan":3
},
{
"row":2,
"col":1,
"Text":"物料描述",
"RowSpan":2
},
{
"row":2,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartName#]",
"ColSpan":3
},
{
"row":3,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#Des#]",
"ColSpan":2
},
{
"row":4,
"col":1,
"Text":"物料号"
},
{
"row":4,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartNo#]"
},
{
"row":4,
"col":3,
"FreeCell":true,
"Control":[
{
"Type":"Barcode",
"Name":"Barcode1",
"Top":0.211667,
"Width":2.01083,
"Height":2.19604,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#BoxNo#]",
"QRCodeErrorLevel":3
}
],
"ColSpan":2,
"RowSpan":3
},
{
"row":5,
"col":1,
"Text":"批次"
},
{
"row":5,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BatchNo#]"
}
]
}
]
}
]
}

225
PurchingMistakeNew/Report/X247 左侧前门板.grf

@ -0,0 +1,225 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":6,
"Height":6,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Assembly_247] WHERE substring(PartNo,1,11) in ('A2477203007','A2477203207','A2477205006' )AND PrintTime IS NULL ORDER BY CreateTime",
"Field":[
{
"Name":"ID"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"Color"
},
{
"Name":"ColorNo"
},
{
"Name":"PartType"
},
{
"Name":"Validity"
},
{
"Name":"ValidityDate"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"TapeBatchNo"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.79438,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox1",
"Left":0.396875,
"Width":1.61396,
"Height":0.608542,
"Text":"规格型号:"
},
{
"Type":"FieldBox",
"Name":"FieldBox1",
"Left":0.211667,
"Top":0.608542,
"Width":5.97958,
"Height":0.396875,
"Font":{
"Name":"宋体",
"Size":120000,
"Weight":400,
"Charset":134
},
"DataField":"PartNo"
},
{
"Type":"StaticBox",
"Name":"StaticBox2",
"Top":3.59833,
"Width":1.19063,
"Height":0.608542,
"Text":"批次:"
},
{
"Type":"FieldBox",
"Name":"FieldBox2",
"Left":1.40229,
"Top":3.59833,
"Width":1.79917,
"Height":0.396875,
"DataField":"BatchNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox3",
"Left":0.211667,
"Top":1.00542,
"Width":5.97958,
"Height":0.396875,
"DataField":"PartName"
},
{
"Type":"StaticBox",
"Name":"StaticBox3",
"Left":0.0264583,
"Top":1.79917,
"Width":1.19063,
"Height":0.608542,
"Text":"车型:"
},
{
"Type":"FieldBox",
"Name":"FieldBox4",
"Left":1.42875,
"Top":1.79917,
"Width":4.20688,
"Height":0.608542,
"DataField":"PartType"
},
{
"Type":"StaticBox",
"Name":"StaticBox4",
"Left":0.0264583,
"Top":2.40771,
"Width":2.16958,
"Height":0.79375,
"Text":"胶带有效期:"
},
{
"Type":"FieldBox",
"Name":"FieldBox5",
"Left":2.80458,
"Top":2.59292,
"Width":2.98979,
"Height":0.396875,
"DataField":"Validity"
},
{
"Type":"FieldBox",
"Name":"FieldBox6",
"Left":0.0264583,
"Top":3.20146,
"Width":5.00063,
"Height":0.396875,
"DataField":"ValidityDate"
},
{
"Type":"StaticBox",
"Name":"StaticBox5",
"Left":-0.0529167,
"Top":4.78896,
"Width":0.899583,
"Height":0.608542,
"Text":"颜色:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":1.21708,
"Top":4.78896,
"Width":2.19604,
"Height":0.608542,
"DataField":"Color"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":0.0264583,
"Top":4.20688,
"Width":2.59292,
"Height":0.582083,
"DataField":"ColorNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox9",
"Left":0.0264583,
"Top":1.40229,
"Width":5.60917,
"Height":0.396875,
"DataField":"Des"
},
{
"Type":"Barcode",
"Name":"Barcode1",
"Left":3.04271,
"Top":3.59833,
"Width":2.38125,
"Height":2.01083,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#PartNo#]"
}
]
}
]
}

241
PurchingMistakeNew/Report/X247 左侧前门板装箱单.grf

@ -0,0 +1,241 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":7,
"Height":6,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477204606','A2477204806','A2477205006') AND [PrintTime] IS NULL ORDER BY [CreateTime]",
"Field":[
{
"Name":"ID"
},
{
"Name":"BoxNo"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"BoxCount",
"Type":"Float"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.21229,
"Control":[
{
"Type":"FreeGrid",
"Name":"FreeGrid1",
"Left":0.291042,
"Top":0.238125,
"Border":{
"Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
},
"ColumnCount":4,
"RowCount":6,
"FreeGridColumn":[
{
"index":1,
"Width":1.71979
},
{
"index":2,
"Width":2.30188
},
{
"index":3,
"Width":2.2
},
{
"index":4,
"Width":0
}
],
"FreeGridRow":[
{
"index":1,
"Height":0.661458
},
{
"index":2,
"Height":0.555625
},
{
"index":4,
"Height":1.05833
},
{
"index":5,
"Height":0.978958
},
{
"index":6,
"Height":0.767292
}
],
"FreeGridCell":[
{
"row":1,
"col":1,
"Text":"包装单号"
},
{
"row":1,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BoxNo#]",
"ColSpan":3
},
{
"row":2,
"col":1,
"Text":"物料描述",
"RowSpan":2
},
{
"row":2,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartName#]",
"ColSpan":3
},
{
"row":3,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#Des#]",
"ColSpan":2
},
{
"row":4,
"col":1,
"Text":"物料号"
},
{
"row":4,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartNo#]"
},
{
"row":4,
"col":3,
"FreeCell":true,
"Control":[
{
"Type":"Barcode",
"Name":"Barcode1",
"Top":0.211667,
"Width":2.01083,
"Height":2.19604,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#BoxNo#]",
"QRCodeErrorLevel":3
}
],
"ColSpan":2,
"RowSpan":3
},
{
"row":5,
"col":1,
"Text":"批次"
},
{
"row":5,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BatchNo#]"
},
{
"row":6,
"col":1,
"Text":"包装数量"
},
{
"row":6,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BoxCount#]"
}
]
}
]
}
]
}

225
PurchingMistakeNew/Report/X247 左侧后门板.grf

@ -0,0 +1,225 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":6,
"Height":7,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Assembly_247] WHERE substring(PartNo,1,11 ) in('A2477305303','A2477305503','A2477305703') AND PrintTime IS NULL ORDER BY CreateTime",
"Field":[
{
"Name":"ID"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"Color"
},
{
"Name":"ColorNo"
},
{
"Name":"PartType"
},
{
"Name":"Validity"
},
{
"Name":"ValidityDate"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"TapeBatchNo"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.79438,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox1",
"Top":0.185208,
"Width":1.5875,
"Height":0.608542,
"Text":"规格型号:"
},
{
"Type":"FieldBox",
"Name":"FieldBox1",
"Left":0.211667,
"Top":0.79375,
"Width":5.58271,
"Height":0.396875,
"Font":{
"Name":"宋体",
"Size":120000,
"Weight":400,
"Charset":134
},
"DataField":"PartNo"
},
{
"Type":"StaticBox",
"Name":"StaticBox2",
"Top":3.70417,
"Width":1.19063,
"Height":0.608542,
"Text":"批次:"
},
{
"Type":"FieldBox",
"Name":"FieldBox2",
"Left":1.40229,
"Top":3.70417,
"Width":1.79917,
"Height":0.396875,
"DataField":"BatchNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox3",
"Left":0.211667,
"Top":1.19063,
"Width":5.97958,
"Height":0.582083,
"DataField":"PartName"
},
{
"Type":"StaticBox",
"Name":"StaticBox3",
"Left":0.0264583,
"Top":2.19604,
"Width":1.19063,
"Height":0.608542,
"Text":"车型:"
},
{
"Type":"FieldBox",
"Name":"FieldBox4",
"Left":1.40229,
"Top":2.19604,
"Width":4.20688,
"Height":0.608542,
"DataField":"PartType"
},
{
"Type":"StaticBox",
"Name":"StaticBox4",
"Left":0.0264583,
"Top":2.51354,
"Width":2.38125,
"Height":0.79375,
"Text":"胶带有效期:"
},
{
"Type":"FieldBox",
"Name":"FieldBox5",
"Left":2.40771,
"Top":2.69875,
"Width":2.98979,
"Height":0.396875,
"DataField":"Validity"
},
{
"Type":"FieldBox",
"Name":"FieldBox6",
"Left":0.0264583,
"Top":3.41313,
"Width":5.00063,
"Height":0.396875,
"DataField":"ValidityDate"
},
{
"Type":"StaticBox",
"Name":"StaticBox5",
"Left":-0.0529167,
"Top":4.89479,
"Width":0.820208,
"Height":0.608542,
"Text":"颜色:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":1.21708,
"Top":4.89479,
"Width":2.19604,
"Height":0.608542,
"DataField":"Color"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":0.0264583,
"Top":4.31271,
"Width":2.59292,
"Height":0.582083,
"DataField":"ColorNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox9",
"Left":0.211667,
"Top":1.5875,
"Width":5.58271,
"Height":0.502708,
"DataField":"Des"
},
{
"Type":"Barcode",
"Name":"Barcode1",
"Left":3.04271,
"Top":3.70417,
"Width":2.38125,
"Height":2.01083,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#PartNo#]"
}
]
}
]
}

241
PurchingMistakeNew/Report/X247 左侧后门板装箱单.grf

@ -0,0 +1,241 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":7,
"Height":6,
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Box_247] WHERE PartNo in('A2477305303','A2477305503','A2477305703') AND [PrintTime] IS NULL ORDER BY [CreateTime]",
"Field":[
{
"Name":"ID"
},
{
"Name":"BoxNo"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"BoxCount",
"Type":"Float"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
},
{
"Name":"Des"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.21229,
"Control":[
{
"Type":"FreeGrid",
"Name":"FreeGrid1",
"Left":0.291042,
"Top":0.238125,
"Border":{
"Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
},
"ColumnCount":4,
"RowCount":6,
"FreeGridColumn":[
{
"index":1,
"Width":1.71979
},
{
"index":2,
"Width":2.30188
},
{
"index":3,
"Width":2.2
},
{
"index":4,
"Width":0
}
],
"FreeGridRow":[
{
"index":1,
"Height":0.714375
},
{
"index":2,
"Height":0.661458
},
{
"index":4,
"Height":1.05833
},
{
"index":5,
"Height":0.978958
},
{
"index":6,
"Height":0.767292
}
],
"FreeGridCell":[
{
"row":1,
"col":1,
"Text":"包装单号"
},
{
"row":1,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BoxNo#]",
"ColSpan":3
},
{
"row":2,
"col":1,
"Text":"物料描述",
"RowSpan":2
},
{
"row":2,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartName#]",
"ColSpan":3
},
{
"row":3,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#Des#]",
"ColSpan":2
},
{
"row":4,
"col":1,
"Text":"物料号"
},
{
"row":4,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#PartNo#]"
},
{
"row":4,
"col":3,
"FreeCell":true,
"Control":[
{
"Type":"Barcode",
"Name":"Barcode1",
"Top":0.211667,
"Width":2.01083,
"Height":2.19604,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#BoxNo#]",
"QRCodeErrorLevel":3
}
],
"ColSpan":2,
"RowSpan":3
},
{
"row":5,
"col":1,
"Text":"批次"
},
{
"row":5,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BatchNo#]"
},
{
"row":6,
"col":1,
"Text":"包装数量"
},
{
"row":6,
"col":2,
"Font":{
"Name":"宋体",
"Size":75000,
"Weight":400,
"Charset":134
},
"Text":"[#BoxCount#]"
}
]
}
]
}
]
}

268
PurchingMistakeNew/Report/X247后部中间扰流板.grf

@ -0,0 +1,268 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":7,
"Height":8,
"Oriention":"Landscape",
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Assembly_247] WHERE PartNo='A2477900588' AND PrintTime IS NULL ORDER BY CreateTime",
"Field":[
{
"Name":"ID"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"Color"
},
{
"Name":"ColorNo"
},
{
"Name":"PartType"
},
{
"Name":"Validity"
},
{
"Name":"ValidityDate"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageHeader":{
"Height":1.2
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":7.01146,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox1",
"Left":0.396875,
"Top":0.396875,
"Width":1.61396,
"Height":0.608542,
"Text":"规格型号:"
},
{
"Type":"FieldBox",
"Name":"FieldBox1",
"Left":2.19604,
"Top":0.396875,
"Width":2.59292,
"Height":0.396875,
"DataField":"PartNo"
},
{
"Type":"StaticBox",
"Name":"StaticBox2",
"Left":0.185208,
"Top":4.07458,
"Width":1.19063,
"Height":0.608542,
"Text":"批次:"
},
{
"Type":"FieldBox",
"Name":"FieldBox2",
"Left":1.5875,
"Top":4.07458,
"Width":1.79917,
"Height":0.396875,
"DataField":"BatchNo"
},
{
"Type":"FieldBox",
"Name":"FieldBox3",
"Left":0.396875,
"Top":1.00542,
"Width":4.81542,
"Height":0.582083,
"DataField":"PartName"
},
{
"Type":"StaticBox",
"Name":"StaticBox3",
"Left":0.396875,
"Top":1.79917,
"Width":1.19063,
"Height":0.608542,
"Text":"车型:"
},
{
"Type":"FieldBox",
"Name":"FieldBox4",
"Left":1.79917,
"Top":1.79917,
"Width":2.98979,
"Height":0.608542,
"DataField":"PartType"
},
{
"Type":"StaticBox",
"Name":"StaticBox4",
"Left":0.211667,
"Top":2.59292,
"Width":1.5875,
"Height":0.820208,
"Text":"有效期:"
},
{
"Type":"FieldBox",
"Name":"FieldBox5",
"Left":1.79917,
"Top":2.80458,
"Width":2.98979,
"Height":0.396875,
"DataField":"Validity"
},
{
"Type":"FieldBox",
"Name":"FieldBox6",
"Left":0.211667,
"Top":3.41313,
"Width":5.00063,
"Height":0.396875,
"DataField":"ValidityDate"
},
{
"Type":"StaticBox",
"Name":"StaticBox5",
"Left":0.132292,
"Top":5.87375,
"Width":1.19063,
"Height":0.608542,
"Text":"颜色:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":1.53458,
"Top":5.87375,
"Width":2.19604,
"Height":0.608542,
"DataField":"Color"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":0.185208,
"Top":4.86833,
"Width":2.59292,
"Height":0.608542,
"DataField":"ColorNo"
},
{
"Type":"FreeGrid",
"Name":"FreeGrid1",
"Left":5.00063,
"Top":0.396875,
"Border":{
"Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
},
"ColumnCount":2,
"FreeGridColumn":[
{
"index":1,
"Width":1.905
},
{
"index":2,
"Width":0.79375
}
],
"FreeGridRow":[
{
"index":1,
"Height":0.608542
},
{
"index":2,
"Height":0.926042
},
{
"index":3,
"Height":1.05833
},
{
"index":4,
"Height":0.899583
},
{
"index":5,
"Height":0.820208
}
],
"FreeGridCell":[
{
"row":1,
"col":1,
"ColSpan":2
},
{
"row":2,
"col":1,
"Text":"半成品准备"
},
{
"row":3,
"col":1,
"Text":"内外板合装"
},
{
"row":4,
"col":1,
"Text":"设备操作"
},
{
"row":5,
"col":1,
"Text":"检验"
}
]
}
]
}
]
}

184
PurchingMistakeNew/Report/X247后部扰流板装箱单.grf

@ -0,0 +1,184 @@
{
"Version":"6.6.2.0",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Size":256,
"Width":7,
"Height":8,
"Oriention":"Landscape",
"LeftMargin":0,
"TopMargin":0,
"RightMargin":0,
"BottomMargin":0
},
"DetailGrid":{
"Recordset":{
"ConnectionString":"Provider=SQLOLEDB.1;Password=a1+;Persist Security Info=True;User ID=sa;Initial Catalog=BBMPT;Data Source=10.60.101.9;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AMW-PC;Use Encryption for Data=False;Tag with column collation when possible=False",
"QuerySQL":"SELECT * FROM [dbo].[tb_Box_247] WHERE PartNo='A2477900588' AND [PrintTime] IS NULL ORDER BY [CreateTime]",
"Field":[
{
"Name":"ID"
},
{
"Name":"BoxNo"
},
{
"Name":"PartNo"
},
{
"Name":"PartName"
},
{
"Name":"BatchNo"
},
{
"Name":"BoxCount",
"Type":"Float"
},
{
"Name":"CreateTime",
"Type":"DateTime"
},
{
"Name":"PrintTime",
"Type":"DateTime"
}
]
},
"ColumnContent":{
"Height":0
},
"ColumnTitle":{
"Height":0
}
},
"PageHeader":{
"Height":1.2
},
"PageFooter":{
"Height":0
},
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":5.21229,
"Control":[
{
"Type":"FreeGrid",
"Name":"FreeGrid1",
"Left":0.608542,
"Top":0.211667,
"Border":{
"Styles":"[DrawLeft|DrawTop|DrawRight|DrawBottom]"
},
"ColumnCount":4,
"FreeGridColumn":[
{
"index":1,
"Width":1.71979
},
{
"index":2,
"Width":2.30188
},
{
"index":4,
"Width":0
}
],
"FreeGridRow":[
{
"index":1,
"Height":0.926042
},
{
"index":2,
"Height":1.05833
},
{
"index":3,
"Height":1.05833
},
{
"index":4,
"Height":0.978958
},
{
"index":5,
"Height":0.926042
}
],
"FreeGridCell":[
{
"row":1,
"col":1,
"Text":"包装单号"
},
{
"row":1,
"col":2,
"Text":"[#BoxNo#]",
"ColSpan":3
},
{
"row":2,
"col":1,
"Text":"物料描述"
},
{
"row":2,
"col":2,
"Text":"[#PartName#]",
"ColSpan":3
},
{
"row":3,
"col":1,
"Text":"物料号"
},
{
"row":3,
"col":2,
"Text":"[#PartNo#]"
},
{
"row":3,
"col":3,
"FreeCell":true,
"Control":[
{
"Type":"Barcode",
"Name":"Barcode1",
"Left":0.211667,
"Width":2.19604,
"Height":2.59292,
"BarcodeType":"QRCode",
"CaptionPosition":"None",
"Text":"[#BoxNo#]",
"QRCodeErrorLevel":3
}
],
"ColSpan":2,
"RowSpan":3
},
{
"row":4,
"col":1,
"Text":"批次"
},
{
"row":4,
"col":2,
"Text":"[#BatchNo#]"
}
]
}
]
}
]
}

13
PurchingMistakeNew/ReportHelper.cs

@ -95,5 +95,18 @@ namespace PurchingMistakeNew
if (ofd.ShowDialog() != DialogResult.OK) return string.Empty;
return ofd.FileName;
}
internal static string GetTemplateName(string fileName)
{
return Application.StartupPath + $@"\Report\{fileName}.grf";
}
internal static string GetTemplateNameDNew(string fileName)
{
return $@"D:\New\{fileName}.grf";
}
internal static string GetTemplateNameD(string fileName)
{
return $@"D:\{fileName}.grf";
}
}
}

Loading…
Cancel
Save