| | |
| | | |
| | | |
| | | |
| | | #region ç产å
¥åº æ«ææºåæ¡ç |
| | | #region éè´å
¥åº æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// ç产å
¥åº æ«ææºåæ¡ç |
| | | /// éè´å
¥åº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_PoStockIn_Json")] |
| | |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo); |
| | | WebSoBar = oWebs.get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain,ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker); |
| | | SourceFlag = true; |
| | | SourceFlag = true; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | try |
| | | { |
| | | oCn.BeginTran();//å¼å§äºç© |
| | | |
| | | WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo); |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç" && int.Parse(HBillType) == 1244) |
| | | { |
| | | ds = oCn.RunProcReturn("select HMaterID,HQty,HBatchNo from KF_PonderationBillMain_Temp where HInterID = " + HInterID + "and HBillNo = '" + HBillNo + "'", "KF_PonderationBillMain_Temp"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | for (var i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | for (var j = i + 1; j < ds.Tables[0].Rows.Count; j++) |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HMaterID"]) == DBUtility.ClsPub.isLong(ds.Tables[0].Rows[j]["HMaterID"]) && DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HQty"]) == DBUtility.ClsPub.isLong(ds.Tables[0].Rows[j]["HQty"]) && DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HBatchNo"]) == DBUtility.ClsPub.isLong(ds.Tables[0].Rows[j]["HBatchNo"])) |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åä¸åæ®å·ä¸å·²æ«è¿ä¿¡æ¯ç¸åçæ¡ç "; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | oCn.Commit();//æäº¤äºç© |
| | | |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack();//åæ»äºç© |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | |
| | | /// ç©ææ¡ç ææ¬æ¡ æ«ç è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | //[Route("WEBSController/get_BarCode_MoveStock_PD")] |
| | | //[HttpGet] |
| | | //public Object get_BarCode_MoveStock_PD(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle) |
| | | //{ |
| | | // string sErrMsg = ""; |
| | | // string sJXCode = ""; |
| | | // if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | // { |
| | | // if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | // { |
| | | // sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker); |
| | | // SourceFlag = true; |
| | | // } |
| | | // else |
| | | // { |
| | | // sJXCode = sBarCode; |
| | | // } |
| | | // try |
| | | // { |
| | | // WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo); |
| | | // if (WebSoBar == null) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "æå"; |
| | | // objJsonResult.data = WebSoBar; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | [Route("WEBSController/get_BarCode_MoveStock_PD")] |
| | | [HttpGet] |
| | | public Object get_BarCode_MoveStock_PD(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle) |
| | | { |
| | | string sErrMsg = ""; |
| | | string sJXCode = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker); |
| | | SourceFlag = true; |
| | | } |
| | | else |
| | | { |
| | | sJXCode = sBarCode; |
| | | } |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |