华恒Mes鼎捷代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
6.5 KiB

5 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using ICSSoft.Frame.Data.Entity;
  6. using ICSSoft.Frame.Data.DAL;
  7. using System.Data;
  8. namespace ICSSoft.Frame.Data.BLL
  9. {
  10. public class ICSDataCollectionBLL
  11. {
  12. #region 根据放料轴编码获取放料轴信息
  13. public static DataTable GetInfoByCode(string INVShaftCode, string SubLotNo, string dsconn)
  14. {
  15. try
  16. {
  17. return ICSDataCollectionDAL.GetInfoByCode(INVShaftCode, SubLotNo, dsconn);
  18. }
  19. catch (Exception ex)
  20. {
  21. throw ex;
  22. }
  23. }
  24. #endregion
  25. #region 保存采集上下模日志信息
  26. //public static void MouldLogSave(ICSMouldUpAndDownLog info, string dsconn)
  27. //{
  28. // try
  29. // {
  30. // if (string.IsNullOrWhiteSpace(dsconn))
  31. // {
  32. // throw new Exception("数据库连接字符串错误");
  33. // }
  34. // ICSDataCollectionDAL.MouldLogSave(info, dsconn);
  35. // }
  36. // catch (Exception ex)
  37. // {
  38. // throw ex;
  39. // }
  40. //}
  41. #endregion
  42. //0909 添加至ICSLOTONWIPCheck表里 save2ICSLOTONWIPCheck
  43. public static void save2ICSLOTONWIPCheck(ICSLOTONWIPCheck ICSLOTONWIPCheck, ICSQualityCKDATA QualityCKDATA, string dsconn,FramDataContext db)
  44. {
  45. try
  46. {
  47. ICSDataCollectionDAL.save2ICSLOTONWIPCheck(ICSLOTONWIPCheck, QualityCKDATA,dsconn,db);
  48. }
  49. catch (Exception ex)
  50. {
  51. throw ex;
  52. }
  53. }
  54. #region 工序开工
  55. public static void CollectOPStart(ICSLOTSIMULATION siminfo, ICSLOTONWIP wipinfo, string dsconn)
  56. {
  57. try
  58. {
  59. ICSDataCollectionDAL.CollectOPStart(siminfo, wipinfo, dsconn);
  60. }
  61. catch (Exception ex)
  62. {
  63. throw ex;
  64. }
  65. }
  66. #endregion
  67. #region 工序上料
  68. public static void CollectOPUP(List<ICSLOTONWIPITEM> infoList, string SaveOrReturnType, string dsconn)
  69. {
  70. try
  71. {
  72. ICSDataCollectionDAL.CollectOPUP(infoList, SaveOrReturnType, dsconn);
  73. }
  74. catch (Exception ex)
  75. {
  76. throw ex;
  77. }
  78. }
  79. #endregion
  80. #region 工序完工
  81. //public static void CollectOPEnd(ICSLOTSIMULATION siminfo, ICSLOTONWIP wipinfo, bool issplit, string splitLotNo, string dsconn)
  82. public static void CollectOPEnd(ICSLOTSIMULATION siminfo, ICSLOTONWIP wipinfo, string splitLotNo, string dsconn)
  83. {
  84. try
  85. {
  86. //ICSDataCollectionDAL.CollectOPEnd(siminfo, wipinfo, issplit, splitLotNo, dsconn);
  87. ICSDataCollectionDAL.CollectOPEnd(siminfo, wipinfo, splitLotNo, dsconn);
  88. }
  89. catch (Exception ex)
  90. {
  91. throw ex;
  92. }
  93. }
  94. #endregion
  95. #region 工序结束
  96. public static void CollectOPAllEnd(ICSLOTSIMULATION siminfo, ICSLOTONWIP wipinfo, string dsconn)
  97. {
  98. try
  99. {
  100. ICSDataCollectionDAL.CollectOPAllEnd(siminfo, wipinfo, dsconn);
  101. }
  102. catch (Exception ex)
  103. {
  104. throw ex;
  105. }
  106. }
  107. #endregion
  108. #region 工序暂停
  109. public static void CollectOPPause(ICSLOTONWIP wipinfo, ICSLOTPAUSE ztinfo, string dsconn)
  110. {
  111. try
  112. {
  113. ICSDataCollectionDAL.CollectOPPause(wipinfo, ztinfo, dsconn);
  114. }
  115. catch (Exception ex)
  116. {
  117. throw ex;
  118. }
  119. }
  120. #endregion
  121. #region 取消暂停
  122. public static void CollectOPCancelPause(ICSLOTONWIP wipinfo, ICSLOTPAUSE ztinfo, string dsconn)
  123. {
  124. try
  125. {
  126. ICSDataCollectionDAL.CollectOPCancelPause(wipinfo, ztinfo, dsconn);
  127. }
  128. catch (Exception ex)
  129. {
  130. throw ex;
  131. }
  132. }
  133. #endregion
  134. #region 单件上岗
  135. public static void CollectOPPriceStart(ICSLOTONWIPPriceLog wipinfo, string dsconn)
  136. {
  137. try
  138. {
  139. ICSDataCollectionDAL.CollectOPStartPrice(wipinfo, dsconn);
  140. }
  141. catch (Exception ex)
  142. {
  143. throw ex;
  144. }
  145. }
  146. #endregion
  147. #region 单件上岗
  148. public static void CollectOPPriceEnd(string UserCode, string EQPCode, string dsconn)
  149. {
  150. try
  151. {
  152. ICSDataCollectionDAL.CollectOPStartEnd(UserCode, EQPCode, dsconn);
  153. }
  154. catch (Exception ex)
  155. {
  156. throw ex;
  157. }
  158. }
  159. public static void CollectOPPriceEnd(ICSLOTONWIPPriceLog wipinfo, string dsconn)
  160. {
  161. try
  162. {
  163. ICSDataCollectionDAL.CollectOPStartEnd(wipinfo, dsconn);
  164. }
  165. catch (Exception ex)
  166. {
  167. throw ex;
  168. }
  169. }
  170. #endregion
  171. #region 单件工序完工
  172. public static void CollectOPEndPrice(ICSLOTSIMULATION siminfo, ICSLOTONWIP wipinfo, string splitLotNo, string dsconn)
  173. {
  174. try
  175. {
  176. ICSDataCollectionDAL.CollectOPEndPrice(siminfo, wipinfo, splitLotNo, dsconn);
  177. }
  178. catch (Exception ex)
  179. {
  180. throw ex;
  181. }
  182. }
  183. #endregion
  184. public static FramDataContext AddAndEditList(ICSQualityCKDATA QualityCKDATA, List<ICSOQCCKGROUP2LISTCheckResult> ECCodeList, List<ICSQualityCKDATADetail> InfoList, string Appconstr, bool isIPQC)
  185. {
  186. try
  187. {
  188. return ICSDataCollectionDAL.AddAndEditList(QualityCKDATA,ECCodeList,InfoList, Appconstr, isIPQC);
  189. }
  190. catch (Exception ex)
  191. {
  192. throw ex;
  193. }
  194. }
  195. public static void AddAndEditList(ICSQualityCKDATA QualityCKDATA, List<ICSOQCCKGROUP2LISTCheckResult> ECCodeList, string Appconstr, bool isIPQC)
  196. {
  197. try
  198. {
  199. ICSDataCollectionDAL.AddAndEditList(QualityCKDATA, ECCodeList, Appconstr, isIPQC);
  200. }
  201. catch (Exception ex)
  202. {
  203. throw ex;
  204. }
  205. }
  206. }
  207. }