86b570cc67678d6f76f0b3e14df71ceb91988fed.svn-base 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. using System;
  2. using System.Data;
  3. using Core.Mes.ServerFrameWork;
  4. using Core.Mes.IBaseInterface;
  5. using System.Collections;
  6. using Core.XgMes.Server.StorageCommon;
  7. namespace Core.XgMes.Server.JGKC.SteelPlateManager
  8. {
  9. /// <summary>
  10. /// 关于库存报表的查询语句服务端的集合
  11. /// </summary>
  12. public class TurnoffReportList:Core.Mes.ServerFrameWork.IComponent
  13. {
  14. public TurnoffReportList()
  15. {
  16. //
  17. // TODO: 在此处添加构造函数逻辑
  18. //
  19. }
  20. #region "成品发运综合查询"
  21. public ReturnObject GetOutStorageData(string where, System.Collections.ArrayList ps, System.Collections.ArrayList pg)
  22. {
  23. try
  24. {
  25. System.Data.DataSet rtndst = new DataSet();
  26. if (ps.Count > 0)
  27. {
  28. for (int i = 0; i < ps.Count; i++)
  29. {
  30. string err = "";
  31. string sql = "";
  32. sql = ps[i].ToString() + where + pg[i].ToString();
  33. System.Data.DataSet tmpdst = this.DBManager.ExecuteQuery(sql, out err);
  34. if (tmpdst != null && tmpdst.Tables.Count == 1 && tmpdst.Tables[0].Rows.Count > 0)
  35. {
  36. tmpdst.Tables[0].TableName = "KCJ_TURNOFFOUTSTORAGE";
  37. rtndst.Merge(tmpdst.Copy());
  38. }
  39. if (err.Length > 0)
  40. {
  41. System.Diagnostics.Debug.WriteLine(err);
  42. err = "";
  43. }
  44. }
  45. if (rtndst.Tables.Count == 1)
  46. {
  47. return new ReturnObject(rtndst);
  48. }
  49. }
  50. return new ReturnObject(null);
  51. }
  52. catch (System.Exception ex)
  53. {
  54. System.Diagnostics.Debug.WriteLine(ex.ToString());
  55. return new ReturnObject(null);
  56. }
  57. }
  58. #endregion
  59. #region "成品库存综合查询"
  60. public ReturnObject GetStorageData(System.Collections.ArrayList Select,System.Collections.ArrayList where,System.Collections.ArrayList Group)
  61. {
  62. try
  63. {
  64. string sql = "";
  65. string err = "";
  66. System.Data.DataSet tmpdst = null;
  67. System.Data.DataSet rtndst = new DataSet();
  68. for(int i=0;i<Select.Count;i++)
  69. {
  70. sql = Select[i].ToString()+where[i].ToString()+Group[i].ToString();
  71. tmpdst = this.DBManager.ExecuteQuery(sql,out err);
  72. if(tmpdst!=null && tmpdst.Tables.Count==1)
  73. {
  74. tmpdst.Tables[0].TableName = "KCH_TURNOFFLIST_VIEW";
  75. rtndst.Merge(tmpdst.Copy());
  76. tmpdst = null;
  77. }
  78. }
  79. if(rtndst.Tables.Count>0)
  80. {
  81. return new ReturnObject(rtndst);
  82. }
  83. else
  84. {
  85. return new ReturnObject(null);
  86. }
  87. }
  88. catch(System.Exception ex)
  89. {
  90. System.Diagnostics.Debug.WriteLine(ex.ToString());
  91. return new ReturnObject(null);
  92. }
  93. }
  94. #endregion
  95. public override int minValue
  96. {
  97. get
  98. {
  99. return 30;
  100. }
  101. }
  102. public override int maxValue
  103. {
  104. get
  105. {
  106. return 120;
  107. }
  108. }
  109. }
  110. }