LogicHandler.cs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using UAS_LabelMachine.Entity;
  2. namespace UAS_LabelMachine.PublicMethod
  3. {
  4. class LogicHandler
  5. {
  6. public static DataHelper dh = SystemInf.dh;
  7. /// <summary>
  8. /// 特殊业务过滤逻辑,目前只有海创在使用
  9. /// </summary>
  10. /// <param name="iCustCode"></param>
  11. /// <param name="iBrand"></param>
  12. /// <param name="iSpec"></param>
  13. /// <param name="iQty"></param>
  14. /// <param name="iDateCode"></param>
  15. /// <param name="iLotno"></param>
  16. /// <param name="oSpec"></param>
  17. /// <param name="oQty"></param>
  18. /// <param name="oDatecode"></param>
  19. /// <param name="oLotno"></param>
  20. public static void FilterData(string iCustCode, string iBrand, string iSpec, string iQty, string iDateCode, string iLotno, out string oSpec, out string oQty, out string oDatecode, out string oLotno)
  21. {
  22. oSpec = "";
  23. oQty = "";
  24. oDatecode = "";
  25. oLotno = "";
  26. string[] param = new string[] { iCustCode, iBrand, iSpec, iQty, iDateCode, iLotno, oSpec, oQty, oDatecode, oLotno };
  27. dh.CallProcedure("sp_datafilter", ref param);
  28. oSpec = param[6];
  29. oQty = param[7];
  30. oDatecode = param[8];
  31. oLotno = param[9];
  32. }
  33. /// <summary>
  34. /// 通用方法,日期格式转换,转换成指定的年月日
  35. /// </summary>
  36. /// <param name="iDatecode"></param>
  37. /// <param name="iCustcode"></param>
  38. /// <param name="oYear"></param>
  39. /// <param name="oMonth"></param>
  40. /// <param name="oDay"></param>
  41. /// <param name="oDate"></param>
  42. public static void GetTimeFromDatecode(string iDatecode, string iCustcode, out string oYear, out string oMonth, out string oDay, out string oDate)
  43. {
  44. oYear = "0";
  45. oMonth = "0";
  46. oDay = "0";
  47. oDate = "19000101";
  48. string[] param = new string[] { iDatecode, iCustcode, oYear, oMonth, oDay, oDate };
  49. dh.CallProcedure("GETTIMEFROMDATECODE", ref param);
  50. oYear = param[2];
  51. oMonth = param[3];
  52. oDay = param[4];
  53. oDate = param[5];
  54. }
  55. /// <summary>
  56. /// 特殊业务条码处理,目前针对海创长城客户
  57. /// </summary>
  58. /// <param name="iInoutno"></param>
  59. /// <param name="oSQL"></param>
  60. public static void CustBarCode(string iInoutno, out string oSQL)
  61. {
  62. oSQL = "";
  63. string[] param = new string[] { iInoutno, oSQL };
  64. dh.CallProcedure("SP_CUSTBARCODE", ref param);
  65. oSQL = param[1];
  66. }
  67. /// <summary>
  68. /// 获取生成条码的SQL,目前添加用户海创和凯而高,凯而高有特殊定制逻辑
  69. /// </summary>
  70. /// <param name="iPiid"></param>
  71. /// <param name="iCustCode"></param>
  72. /// <param name="oSQL"></param>
  73. public static void GenerateBarCode(string iPiid, string iCustCode, out string oSQL)
  74. {
  75. oSQL = "";
  76. string[] param = new string[] { iPiid, iCustCode, oSQL };
  77. dh.CallProcedure("sp_GenerateBarCode", ref param);
  78. oSQL = param[2];
  79. }
  80. }
  81. }