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

127 lines
3.0 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 ICSShiftBLL
  11. {
  12. public static void Add(FormICSShiftUIModel shiftInfo, string dsconn)
  13. {
  14. try
  15. {
  16. if (string.IsNullOrWhiteSpace(dsconn))
  17. {
  18. throw new Exception("请输入......");
  19. }
  20. List<FormICSShiftUIModel> shiftInfoList = new List<FormICSShiftUIModel>() { shiftInfo };
  21. ICSShiftDAL.AddAndEdit(shiftInfoList, dsconn);
  22. }
  23. catch (Exception ex)
  24. {
  25. throw ex;
  26. }
  27. }
  28. #region select
  29. public static FormICSShiftUIModel SearchShiftInfoByCode(string SHIFTCODE, string dsconn)
  30. {
  31. try
  32. {
  33. List<FormICSShiftUIModel> returnlist = ICSShiftDAL.SearchShiftInfoByCode(SHIFTCODE, dsconn);
  34. return returnlist[0];
  35. }
  36. catch (Exception ex)
  37. {
  38. throw ex;
  39. }
  40. }
  41. #endregion
  42. #region delete
  43. public static void delete(List<String> guidList)
  44. {
  45. ICSShiftDAL.delete(guidList);
  46. }
  47. #endregion
  48. public static DataTable GetShiftCode()
  49. {
  50. try
  51. {
  52. return ICSShiftDAL.GetShiftCode();
  53. }
  54. catch (Exception ex)
  55. {
  56. throw ex;
  57. }
  58. }
  59. public static DataTable SelectShiftTypeCode()
  60. {
  61. return ICSShiftDAL.SelectShiftTypeCode();
  62. }
  63. public static DataTable SelectShiftTypeId(string str)
  64. {
  65. return ICSShiftDAL.SelectShiftTypeId(str);
  66. }
  67. #region 车间代码是否存在
  68. public static bool IsIncludingShiftCode(string faccode, string dsconn)
  69. {
  70. try
  71. {
  72. return ICSShiftDAL.IsIncludingShiftCode(faccode, dsconn);
  73. }
  74. catch (Exception ex)
  75. {
  76. throw ex;
  77. }
  78. }
  79. #endregion
  80. //#region 班次次序是否存在
  81. //public static bool IsIncludingInShiftSeq(int shiftsqe, string shifttypeid)
  82. //{
  83. // try
  84. // {
  85. // return ICSShiftDAL.IsIncludingInShiftSeq(shiftsqe, shifttypeid);
  86. // }
  87. // catch (Exception ex)
  88. // {
  89. // throw ex;
  90. // }
  91. //}
  92. //#endregion
  93. #region 判断是否在时段中
  94. public static bool isIncludingInICSTP(List<string> idList, string dsconn)
  95. {
  96. try
  97. {
  98. return ICSShiftDAL.isIncludingInICSTP(idList, dsconn);
  99. }
  100. catch (Exception ex)
  101. {
  102. throw ex;
  103. }
  104. }
  105. #endregion
  106. }
  107. }