锐腾搅拌上料功能
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.

174 lines
4.8 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 ICSTSBLL
  11. {
  12. public static void Add(FormICSTSERRORCAUSEUIModel errorcause, FormICSTSERRORCODE2LOCUIModel erCode2loc, FormICSTSERRORCAUSE2LOCUIModel erCause2loc, FormICSTSERRORCAUSE2EPARTUIModel erCause2epart, string dsconn)
  13. {
  14. try
  15. {
  16. if (string.IsNullOrWhiteSpace(dsconn))
  17. {
  18. throw new Exception("请输入......");
  19. }
  20. List<FormICSTSERRORCAUSEUIModel> errorcauseList = new List<FormICSTSERRORCAUSEUIModel>() { errorcause };
  21. List<FormICSTSERRORCODE2LOCUIModel> erCode2locList = new List<FormICSTSERRORCODE2LOCUIModel>() { erCode2loc };
  22. List<FormICSTSERRORCAUSE2LOCUIModel> erCause2locList = new List<FormICSTSERRORCAUSE2LOCUIModel>() { erCause2loc };
  23. List<FormICSTSERRORCAUSE2EPARTUIModel> erCause2epartList = new List<FormICSTSERRORCAUSE2EPARTUIModel>() { erCause2epart };
  24. ICSTSDAL.AddAndEdit(errorcauseList, erCode2locList, erCause2locList, erCause2epartList, dsconn);
  25. }
  26. catch (Exception ex)
  27. {
  28. throw ex;
  29. }
  30. }
  31. #region select
  32. public static ICSTS SearchTSInfoByRcard(string RCARD, string dsconn)
  33. {
  34. try
  35. {
  36. ICSTS returnlist = ICSTSDAL.SearchTSInfoByRcard(RCARD, dsconn);
  37. return returnlist;
  38. }
  39. catch (Exception ex)
  40. {
  41. throw ex;
  42. }
  43. }
  44. #endregion
  45. #region delete
  46. public static void delete(List<String> guidList)
  47. {
  48. ICSShiftDAL.delete(guidList);
  49. }
  50. #endregion
  51. public static void AddECode(ICSTSERRORCODE errorCodeInfo, string dsconn)
  52. {
  53. try
  54. {
  55. ICSTSDAL.AddECode(errorCodeInfo, dsconn);
  56. }
  57. catch (Exception ex)
  58. {
  59. throw ex;
  60. }
  61. }
  62. public static DataTable GetShiftCode()
  63. {
  64. try
  65. {
  66. return ICSShiftDAL.GetShiftCode();
  67. }
  68. catch (Exception ex)
  69. {
  70. throw ex;
  71. }
  72. }
  73. public static DataTable SelectShiftTypeCode()
  74. {
  75. return ICSShiftDAL.SelectShiftTypeCode();
  76. }
  77. public static DataTable SelectShiftTypeId(string str)
  78. {
  79. return ICSShiftDAL.SelectShiftTypeId(str);
  80. }
  81. #region 车间代码是否存在
  82. public static bool IsIncludingShiftCode(string faccode, string dsconn)
  83. {
  84. try
  85. {
  86. return ICSShiftDAL.IsIncludingShiftCode(faccode, dsconn);
  87. }
  88. catch (Exception ex)
  89. {
  90. throw ex;
  91. }
  92. }
  93. #endregion
  94. #region 产品序列号是否存在并且需要维修
  95. public static bool IsIncludingInICSTS(string rcard)
  96. {
  97. try
  98. {
  99. return ICSTSDAL.IsIncludingInICSTS(rcard);
  100. }
  101. catch (Exception ex)
  102. {
  103. throw ex;
  104. }
  105. }
  106. #endregion
  107. #region 判断是否在时段中
  108. public static bool isIncludingInICSTP(List<string> idList, string dsconn)
  109. {
  110. try
  111. {
  112. return ICSShiftDAL.isIncludingInICSTP(idList, dsconn);
  113. }
  114. catch (Exception ex)
  115. {
  116. throw ex;
  117. }
  118. }
  119. #endregion
  120. #region 通过ID更新维修状态
  121. public static void UpdateTSSTATUSByID(string id, string TSSTATUS, string dsconn)
  122. {
  123. try
  124. {
  125. if (string.IsNullOrWhiteSpace(dsconn))
  126. {
  127. throw new Exception("数据库连接字符串错误");
  128. }
  129. ICSTSDAL.UpdateTSSTATUSByID(id, TSSTATUS, dsconn);
  130. }
  131. catch (Exception ex)
  132. {
  133. throw ex;
  134. }
  135. }
  136. #endregion
  137. #region 通过产品序列号更新维修状态
  138. public static void UpdateTSSTATUSByRcard(string rcard, string dsconn)
  139. {
  140. try
  141. {
  142. if (string.IsNullOrWhiteSpace(dsconn))
  143. {
  144. throw new Exception("数据库连接字符串错误");
  145. }
  146. ICSTSDAL.UpdateTSSTATUSByRcard(rcard, dsconn);
  147. }
  148. catch (Exception ex)
  149. {
  150. throw ex;
  151. }
  152. }
  153. #endregion
  154. }
  155. }