OrderStdSic.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using CoreFS.CA06;
  6. using System.Collections;
  7. using System.Windows.Forms;
  8. namespace Core.StlMes.Client.Plan.Order.BaseMethod
  9. {
  10. class OrderStdSic : FrmBase
  11. {
  12. /// <summary>
  13. /// 质量设计
  14. /// </summary>
  15. private string desginKey;
  16. /// <summary>
  17. /// 公差项代码
  18. /// </summary>
  19. private string biasCode;
  20. /// <summary>
  21. /// 是否特殊要求
  22. /// </summary>
  23. private string speclFl;
  24. /// <summary>
  25. /// 标准下限
  26. /// </summary>
  27. private double stdMin;
  28. /// <summary>
  29. /// 标准上限
  30. /// </summary>
  31. private double stdMax;
  32. /// <summary>
  33. /// 外径
  34. /// </summary>
  35. private double outdiameter;
  36. /// <summary>
  37. /// 壁厚
  38. /// </summary>
  39. private double wallthick;
  40. /// <summary>s
  41. /// 控制壁厚
  42. /// </summary>
  43. private double aimWallthick;
  44. public OrderStdSic(OpeBase openBase)
  45. {
  46. desginKey = "";
  47. biasCode = "";
  48. speclFl = "0";
  49. stdMin = 0;
  50. stdMax = 0;
  51. this.ob = openBase;
  52. }
  53. /// <summary>
  54. /// 获取公差上下限
  55. /// </summary>
  56. public void getStdTolerance()
  57. {
  58. ArrayList result = null;
  59. CoreClientParam ccp = new CoreClientParam();
  60. ccp.ServerName = "com.steering.pss.plan.order.baseMethod.CoreOrderStdSic";
  61. ccp.MethodName = "getStdTolerance";
  62. ccp.ServerParams = new object[] { desginKey, biasCode, speclFl, outdiameter, wallthick };
  63. ccp = ob.ExecuteSortResultByQueryToDataTable(ccp, CoreInvokeType.Internal);
  64. if (ccp == null || ccp.ReturnObject == null)
  65. {
  66. MessageBox.Show("服务端处理失败!");
  67. return;
  68. }
  69. result = (ArrayList)ccp.ReturnObject;
  70. stdMax = (double)result[0];
  71. stdMin = (double)result[1];
  72. aimWallthick = ((wallthick - stdMin) + (wallthick + stdMax)) / 2;
  73. }
  74. /// <summary>
  75. /// 质量设计
  76. /// </summary>
  77. public string DesginKey
  78. {
  79. get { return desginKey; }
  80. set { desginKey = value; }
  81. }
  82. /// <summary>
  83. /// 公差项代码
  84. /// </summary>
  85. public string BiasCode
  86. {
  87. get { return biasCode; }
  88. set { biasCode = value; }
  89. }
  90. /// <summary>
  91. /// 是否特殊要求(0:交付标准;1:特殊要求;2:内控标准)
  92. /// </summary>
  93. public string SpeclFl
  94. {
  95. get { return speclFl; }
  96. set { speclFl = value; }
  97. }
  98. /// <summary>
  99. /// 标准下限
  100. /// </summary>
  101. public double StdMin
  102. {
  103. get { return stdMin; }
  104. set { stdMin = value; }
  105. }
  106. /// <summary>
  107. /// 标准上限
  108. /// </summary>
  109. public double StdMax
  110. {
  111. get { return stdMax; }
  112. set { stdMax = value; }
  113. }
  114. /// <summary>
  115. /// 外径
  116. /// </summary>
  117. public double Outdiameter
  118. {
  119. get { return outdiameter; }
  120. set { outdiameter = value; }
  121. }
  122. /// <summary>
  123. /// 壁厚
  124. /// </summary>
  125. public double Wallthick
  126. {
  127. get { return wallthick; }
  128. set { wallthick = value; }
  129. }
  130. /// <summary>
  131. /// 控制壁厚
  132. /// </summary>
  133. public double AimWallthick
  134. {
  135. get { return aimWallthick; }
  136. set { aimWallthick = value; }
  137. }
  138. }
  139. }