1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using UAS_LabelMachine.Entity;
- namespace UAS_LabelMachine.PublicMethod
- {
- class LogicHandler
- {
- public static DataHelper dh = SystemInf.dh;
- /// <summary>
- /// 特殊业务过滤逻辑,目前只有海创在使用
- /// </summary>
- /// <param name="iCustCode"></param>
- /// <param name="iBrand"></param>
- /// <param name="iSpec"></param>
- /// <param name="iQty"></param>
- /// <param name="iDateCode"></param>
- /// <param name="iLotno"></param>
- /// <param name="oSpec"></param>
- /// <param name="oQty"></param>
- /// <param name="oDatecode"></param>
- /// <param name="oLotno"></param>
- 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];
- }
- /// <summary>
- /// 通用方法,日期格式转换,转换成指定的年月日
- /// </summary>
- /// <param name="iDatecode"></param>
- /// <param name="iCustcode"></param>
- /// <param name="oYear"></param>
- /// <param name="oMonth"></param>
- /// <param name="oDay"></param>
- /// <param name="oDate"></param>
- 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];
- }
- /// <summary>
- /// 特殊业务条码处理,目前针对海创长城客户
- /// </summary>
- /// <param name="iInoutno"></param>
- /// <param name="oSQL"></param>
- 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];
- }
- /// <summary>
- /// 获取生成条码的SQL,目前添加用户海创和凯而高,凯而高有特殊定制逻辑
- /// </summary>
- /// <param name="iPiid"></param>
- /// <param name="iCustCode"></param>
- /// <param name="oSQL"></param>
- 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];
- }
- }
- }
|