| | |
| | | |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "已存在条码,不允许重复生成!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "已存在条码,不允许重复生成!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (msg2 != string.Empty) |
| | | { |
| | | if (oItemSub.HBQty == 0 || oItemSub.HMinQty == 0) |
| | |
| | | } |
| | | //TM = "B" + TM; |
| | | TM = "SRM" + "B" + TM; |
| | | |
| | | |
| | | if (HSumQty - HMinQty > 0) |
| | | { |
| | | WeiShu = ""; |
| | |
| | | WeiShu = "尾数"; |
| | | HMinQty = HSumQty - (HBQty - 1) * HMinQty; |
| | | } |
| | | TM = $"{oItemSub.HMaterID}#{HMinQty}"; |
| | | //TM = $"{oItemSub.HMaterID}"; |
| | | //TM = $"{oItemSub.HMaterID}#{HMinQty}"; |
| | | TM = $"{oItemSub.HMaterID}"; |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | bar.HBarCode = TM; |
| | | bar.HMaterID = oItemSub.HMaterID; |
| | |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetBarCodeShowList")] |
| | | [HttpGet] |
| | | public object GetBarCodeShowList(string HSupNo, string sqlWhere) |
| | | [HttpPost] |
| | | public object GetBarCodeShowList([FromBody] JObject msg) |
| | | { |
| | | string msg = ""; |
| | | string HSupNo = msg["HSupNo"].ToString(); string sqlWhere = msg["sqlWhere"].ToString(); |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //其他过滤 |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转换特殊字符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | string sql = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 用户=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | |
| | | if (Common.SQLtoChange(sql, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |