using UAS_LabelMachine.Entity; namespace UAS_LabelMachine.PublicMethod { class LogicHandler { public static DataHelper dh = SystemInf.dh; /// /// 特殊业务过滤逻辑,目前只有海创在使用 /// /// /// /// /// /// /// /// /// /// /// 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) { oSpec = ""; oQty = ""; oDatecode = ""; oLotno = ""; string[] param = new string[] { iCustCode, iBrand, iSpec, iQty, iDateCode, iLotno, oSpec, oQty, oDatecode, oLotno }; dh.CallProcedure("sp_datafilter", ref param); oSpec = param[6]; oQty = param[7]; oDatecode = param[8]; oLotno = param[9]; } /// /// 通用方法,日期格式转换,转换成指定的年月日 /// /// /// /// /// /// /// public static void GetTimeFromDatecode(string iDatecode, string iCustcode, out string oYear, out string oMonth, out string oDay, out string oDate) { oYear = "0"; oMonth = "0"; oDay = "0"; oDate = "19000101"; string[] param = new string[] { iDatecode, iCustcode, oYear, oMonth, oDay, oDate }; dh.CallProcedure("GETTIMEFROMDATECODE", ref param); oYear = param[2]; oMonth = param[3]; oDay = param[4]; oDate = param[5]; } /// /// 特殊业务条码处理,目前针对海创长城客户 /// /// /// public static void CustBarCode(string iInoutno, out string oSQL) { oSQL = ""; string[] param = new string[] { iInoutno, oSQL }; dh.CallProcedure("SP_CUSTBARCODE", ref param); oSQL = param[1]; } /// /// 获取生成条码的SQL,目前添加用户海创和凯而高,凯而高有特殊定制逻辑 /// /// /// /// public static void GenerateBarCode(string iPiid, string iCustCode, out string oSQL) { oSQL = ""; string[] param = new string[] { iPiid, iCustCode, oSQL }; dh.CallProcedure("sp_GenerateBarCode", ref param); oSQL = param[2]; } } }