| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | public new ClsCNSRM oCn = new ClsCNSRM(); |
| | | public new ClsCN oCn = new ClsCN(); |
| | | //获取系统参数 |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public T ScriptDeserialize<T>(string strJson) |
| | |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | oCn.RunProc("exec H_p_SRM_BarCodeBill_PrintQty '" + msg1 + "'"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string WeiShu = ""; //尾数 |
| | | //string sKFDate = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | |
| | | string WeiShu = ""; //尾数 |
| | | //string sKFDate = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | |
| | | string sDay = ""; //日 |
| | | string WeiShu = ""; //尾数 |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | |
| | | TM = "0" + TM; |
| | | } |
| | | //TM = "B" + TM; |
| | | TM = "SRM" + "B" + TM; |
| | | TM = "SRM" + "B" + TM; |
| | | |
| | | if (HSumQty - HMinQty > 0) |
| | | { |
| | |
| | | } |
| | | HMinQty = HSumQty; |
| | | } |
| | | |
| | | if (FCusName.Contains("添康科技")) |
| | | { |
| | | //外箱批次条码规则:SRMB+组织+料号+批次+;+数量 |
| | | TM = "SRMB" + "100" + oItemSub.HMaterNumber + oItemSub.HBatchNo + ";" + HMinQty; |
| | | } |
| | | |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | bar.HBarCode = TM; |
| | | bar.HMaterID = oItemSub.HMaterID; |
| | |
| | | bar.HSupID = oItemSub.HSupID; |
| | | bar.HEndQty = WeiShu; |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | bar.HSupBatchNo = oItemSub.HSupBatchNo; |
| | | bar.HSupMaterNumber = oItemSub.HSupMaterNumber; |
| | | bar.HISKFPERIOD = oItemSub.HISKFPERIOD; |
| | | bar.HMaterNumber = oItemSub.HMaterNumber; |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | |
| | | { |
| | | TM2 = "0" + TM2; |
| | | } |
| | | bar2.HMaterID = oItemSub2.HMaterID; |
| | | bar2.HBarCode = oItemSub2.HBarCode + "-" + TM2; |
| | | |
| | | if (FCusName.Contains("添康科技")) |
| | | { |
| | | //内箱批次条码规则:SRM+组织+料号+批次+;+数量 |
| | | TM2 = "SRM" + "100" + oItemSub2.HMaterNumber + oItemSub2.HBatchNo + ";" + HWXQty; |
| | | bar2.HBarCode = TM2; |
| | | } |
| | | else |
| | | { |
| | | bar2.HBarCode = oItemSub2.HBarCode + "-" + TM2; |
| | | } |
| | | |
| | | bar2.HMaterID = oItemSub2.HMaterID; |
| | | bar2.HUnitID = oItemSub2.HUnitID; |
| | | bar2.HQty = HWXQty; |
| | | bar2.HBatchNo = DBUtility.ClsPub.isStrNull(oItemSub2.HBatchNo); |
| | |
| | | bar2.HSupID = oItemSub2.HSupID; |
| | | bar2.HEndQty = WeiShu1; |
| | | bar2.HMTONO = oItemSub2.HMTONO; |
| | | bar2.HSupBatchNo = DBUtility.ClsPub.isStrNull(oItemSub2.HSupBatchNo); |
| | | bar2.HSupMaterNumber = DBUtility.ClsPub.isStrNull(oItemSub2.HSupMaterNumber); |
| | | bar2.HISKFPERIOD = DBUtility.ClsPub.isInt(oItemSub2.HISKFPERIOD); |
| | | ls3.Add(bar2); |
| | | //LogService.Write("测试加+++" + oItemSub2.HSupID); |
| | | } |
| | |
| | | string HKFDQDate = ""; |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | string HSupBatchNo = ""; |
| | | string HSupMaterNumber = ""; |
| | | Int64 HISKFPERIOD = 0; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | HSupBatchNo = ClsPub.isStrNull(oItemSub.HSupBatchNo); |
| | | HSupMaterNumber = ClsPub.isStrNull(oItemSub.HSupMaterNumber); |
| | | HISKFPERIOD = DBUtility.ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | | HBarCode = $"{oItemSub.HMaterID}"; |
| | | HBarCodeType = "品种码_外箱"; |
| | | } |
| | | |
| | | if (FCusName.Contains("添康科技")) |
| | | { |
| | | //HBarCodeType = "批次条码"; |
| | | } |
| | | |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HSupBatchNo,HSupMaterNumber,HProduceDate,HExpiryDate,HISKFPERIOD " + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" + HSupBatchNo+ "','" + HSupMaterNumber + "','" + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + |
| | | ")"; |
| | | oCn.RunProc(sql); |
| | | //LogService.Write(sql); |
| | | sql = "exec setLSH '" + DateTime.Today + "'"; |
| | |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | HSupBatchNo = ClsPub.isStrNull(oItemSub.HSupBatchNo); |
| | | HSupMaterNumber = ClsPub.isStrNull(oItemSub.HSupMaterNumber); |
| | | HISKFPERIOD = ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | | HBarCode = $"{oItemSub.HMaterID}"; |
| | | HBarCodeType = "品种码"; |
| | | } |
| | | |
| | | if (FCusName.Contains("添康科技")) |
| | | { |
| | | //HBarCodeType = "批次条码"; |
| | | } |
| | | |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO ,HSupBatchNo,HSupMaterNumber,HProduceDate,HExpiryDate,HISKFPERIOD" + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" + |
| | | HSupBatchNo + "','" + HSupMaterNumber + "','" + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | oCn.RunProc(sql); |
| | | //LogService.Write(sql); |
| | | } |
| | |
| | | string sPeriod = ""; //月 |
| | | string sDay = ""; //日 |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | [Route("GetHBarCodeShowBillSub_Merge")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// 条码生成表体(物料,批次相同,合并数量) |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillSub_Merge(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//显示的字段 |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败,送货单内码为空"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | ds = oCn.RunProcReturn("Select * from h_v_SRM_Barcode_MergePOInStock where HInterID = " + HInterID, "h_v_SRM_Barcode_MergePOInStock"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "获取成功"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 条码档案列表 |
| | | /// </summary> |
| | |
| | | public object GetBarCodeShowList([FromBody] JObject msg) |
| | | { |
| | | string HSupNo = msg["HSupNo"].ToString(); string sqlWhere = msg["sqlWhere"].ToString(); |
| | | //添加列名 |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | string sql = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败"; |
| | | objjson.Message = "无相关条码信息!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "获取成功"; |
| | | objjson.data = ds.Tables[0]; |
| | | objjson.list = columnNameList; |
| | | return objjson; |
| | | } |
| | | } |
| | |
| | | string sDay = ""; //日 |
| | | string WeiShu = ""; //尾数 |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | oCn.BeginTran(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | |
| | | bar.HSupID = oItemSub.HSupID; |
| | | bar.HEndQty = WeiShu; |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | bar.HISKFPERIOD = oItemSub.HISKFPERIOD; |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | |
| | | TM2 = "0" + TM2; |
| | | } |
| | | bar2.HMaterID = oItemSub2.HMaterID; |
| | | bar2.HBarCode = oItemSub2.HBarCode.Replace(HBarcodeQty.ToString(), HWXQty.ToString()); |
| | | |
| | | var HBarCode_NX = oItemSub2.HBarCode.Split('@'); //内箱拆分条码编号 |
| | | string HBarMaterNumber_NX = HBarCode_NX[0];//内箱条码_物料代码 |
| | | string HBarMaterName_NX = HBarCode_NX[1];//内箱条码_物料名称 |
| | | string HBarMaterModel_NX = HBarCode_NX[2];//内箱条码_物料规格型号 |
| | | string HBarKFDate_NX = HBarCode_NX[3];//内箱条码_生产日期 |
| | | string HBarQty_NX = HBarCode_NX[4];//内箱条码_数量 |
| | | string HBarKFDQDate_NX = HBarCode_NX[5];//内箱条码_有效期至 |
| | | string HBarBatchNo_NX = HBarCode_NX[6];//内箱条码_批号 |
| | | string HBarSupName_NX = HBarCode_NX[7];//内箱条码_供应商名称 |
| | | string HBarSourceBillNo_NX = HBarCode_NX[8];//内箱条码_源单单号 |
| | | |
| | | HBarQty_NX = HWXQty.ToString(); |
| | | |
| | | string TM_NX = $"{HBarMaterNumber_NX}@{HBarMaterName_NX}@{HBarMaterModel_NX}@{HBarKFDate_NX}@{HBarQty_NX}@{HBarKFDQDate_NX}@{HBarBatchNo_NX.TrimStart().TrimEnd()}@{HBarSupName_NX}@{HBarSourceBillNo_NX}"; |
| | | |
| | | bar2.HBarCode = TM_NX;//oItemSub2.HBarCode.Replace(HBarcodeQty.ToString(), HWXQty.ToString());//问题所在 外箱包装数,替换成内箱包装数 |
| | | bar2.HUnitID = oItemSub2.HUnitID; |
| | | bar2.HQty = HWXQty; |
| | | bar2.HBatchNo = DBUtility.ClsPub.isStrNull(oItemSub2.HBatchNo); |
| | |
| | | bar2.HSupID = oItemSub2.HSupID; |
| | | bar2.HEndQty = WeiShu1; |
| | | bar2.HMTONO = oItemSub2.HMTONO; |
| | | bar2.HISKFPERIOD = oItemSub2.HISKFPERIOD; |
| | | ls3.Add(bar2); |
| | | } |
| | | } |
| | |
| | | string HKFDQDate = ""; |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | Int64 HISKFPERIOD = 0; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | |
| | | HSourceEntryID = ClsPub.isLong(oItemSub.HSourceEntryID); |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HISKFPERIOD = ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | |
| | | } |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HProduceDate,HExpiryDate,HISKFPERIOD" + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "','" + SubModel.Count + "','" + count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" |
| | | + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | LogService.Write("生成外箱条码: " + sql); |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); |
| | | count++; |
| | |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | HISKFPERIOD = ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | | HBarCode = $"{oItemSub.HMaterID}"; |
| | |
| | | } |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HProduceDate,HExpiryDate,HISKFPERIOD" + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "','" + SubModel.Count + "','" + _count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" |
| | | + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | LogService.Write("生成内箱条码: "+ sql); |
| | | oCn.RunProc(sql); |
| | | _count++; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("生成条码发生错误: " + e); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "" + e.Message + DBUtility.ClsPub.sExeReturnInfo; |
| | |
| | | oCN.RunProc($"update Cg_POOrderBillSub set HBarcodeCount -= {dr["HQty"]} where HInterID ={dr["HSourceInterID"]} and HEntryID ={dr["HSourceEntryID"]}"); |
| | | //反写打印数量到委外订单 |
| | | if (dr["HBarCodeType"].ToString() == "箱号内条码" && dr["HSourceBillType"].ToString() == "1601") |
| | | oCN.RunProc($"update WW_EntrustOrderBillSub set HBarcodeCount -= {dr["HQty"]} where HInterID ={dr["HSourceInterID"]} and HEntryID ={dr["HSourceEntryID"]}"); |
| | | //反写打印数量到送货单 (不需要反写 送货单直接是关联查询取的数量 没有在源单上做保存) |
| | | if (dr["HSourceBillType"].ToString() == "1103") |
| | | oCN.RunProc("Delete From Gy_BarCodeBill where HItemID in(" + dr["HItemID"] + ") "); |
| | | //oCN.RunProc($"update WW_EntrustOrderBillSub set HBarcodeCount -= {dr["HQty"]} where HInterID ={dr["HSourceInterID"]} and HEntryID ={dr["HSourceEntryID"]}"); |
| | | oCN.RunProc($"update WW_EntrustOrderBillSub set HBarcodeCount -= {dr["HQty"]} where HInterID ={dr["HSourceInterID"]} and HEntryID ={dr["HSourceEntryID"]}"); |
| | | if (FCusName.Contains("添康科技")) |
| | | { |
| | | _HBarCodeType = "箱号内条码"; |
| | | if (dr["HSourceBillType"].ToString() == "1103" && dr["HBarCodeType"].ToString() == _HBarCodeType) |
| | | oCN.RunProc($"update Cg_POInStockBillSub set HRelationBarCodeQty -= {dr["HQty"]} where HInterID ={dr["HSourceInterID"]} and HEntryID ={dr["HSourceEntryID"]}"); |
| | | } |
| | | else |
| | | { |
| | | //反写打印数量到送货单 (不需要反写 送货单直接是关联查询取的数量 没有在源单上做保存) |
| | | if (dr["HSourceBillType"].ToString() == "1103") |
| | | oCN.RunProc("Delete From Gy_BarCodeBill where HItemID in(" + dr["HItemID"] + ") "); |
| | | //oCN.RunProc($"update WW_EntrustOrderBillSub set HBarcodeCount -= {dr["HQty"]} where HInterID ={dr["HSourceInterID"]} and HEntryID ={dr["HSourceEntryID"]}"); |
| | | } |
| | | } |
| | | } |
| | | oCN.RunProc("Delete From Gy_BarCodeBill where HItemID in(" + HInterID + ") "); |