zzr99
2021-09-15 961fa0e1724b2990fed3db3555f32f1d5708bb41
WebAPI/Controllers/MoveStockBillController.cs
@@ -221,7 +221,7 @@
        /// <returns></returns>
        [Route("MoveStockBill/get_InfoByBarCode_Source_Json")]
        [HttpGet]
        public object get_InfoByBarCode_Source_Json(string sCode, Int64 sInterID, string sBillNo, Double sQty, Int64 HWHID, Int64 HSPID, Int64 SCWhID, Int64 SCSPID)
        public object get_InfoByBarCode_Source_Json(string sCode, Int64 sInterID, string sBillNo, Double sQty, Int64 HWHID, Int64 HSPID, Int64 SCWhID, Int64 SCSPID, string HMaker, Int64 HOrgID)
        {
            try
            {
@@ -230,7 +230,7 @@
                dal.GetInfoByNumber_View(sCode);
                if (dal.omodel_View.HBarCodeType != "托盘条码")
                {
                    return get_InfoByBarCode_Source_Json_s(sCode, sInterID, sBillNo, sQty, HWHID, HSPID, SCWhID, SCSPID);
                    return get_InfoByBarCode_Source_Json_s(sCode, sInterID, sBillNo, sQty, HWHID, HSPID, SCWhID, SCSPID, HMaker, HOrgID);
                }
                else
                {
@@ -256,7 +256,7 @@
                        for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                        {
                            sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                            objJsonResult = (JsonResult)get_InfoByBarCode_Source_Json_s(sBarCode_MX, sInterID, sBillNo, sQty, HWHID, HSPID, SCWhID, SCSPID);
                            objJsonResult = (JsonResult)get_InfoByBarCode_Source_Json_s(sBarCode_MX, sInterID, sBillNo, sQty, HWHID, HSPID, SCWhID, SCSPID, HMaker,HOrgID);
                            if (objJsonResult.code == "0")
                            {
                                return objJsonResult;
@@ -277,7 +277,7 @@
            }
        }
        public object get_InfoByBarCode_Source_Json_s(string sCode, Int64 sInterID, string sBillNo, Double sQty, Int64 HWHID, Int64 HSPID, Int64 SCWhID, Int64 SCSPID)
        public object get_InfoByBarCode_Source_Json_s(string sCode, Int64 sInterID, string sBillNo, Double sQty, Int64 HWHID, Int64 HSPID, Int64 SCWhID, Int64 SCSPID, string HMaker,Int64 HOrgID)
        {
            try
            {
@@ -310,7 +310,7 @@
                model.HInterID = DBUtility.ClsPub.isLong(sInterID);
                model.HBillNo = DBUtility.ClsPub.isStrNull(sBillNo);
                model.HBillType = this.HBillType;
                model.HMaker = DBUtility.ClsPub.CurUserName;
                model.HMaker = HMaker;
                //
                model.HMaterID = oView.HMaterID;
                model.HAuxPropID = oView.HAuxPropID;
@@ -335,15 +335,25 @@
                model.HSourceBillType = oView.HSourceBillType;
                model.HRedBlueFlag = false;
                model.HPieceQty = 1;
                //model.HSTOCKORGID = DBUtility.ClsPub.HORGANIZATIONSID;
                //model.HOWNERID = DBUtility.ClsPub.HORGANIZATIONSID;
                model.HSTOCKORGID = HOrgID;
                model.HOWNERID = HOrgID;
                WebS.WebService1 oWebs = new WebS.WebService1();
                //if (webserver.set_SavePonderationBillMain_Temp_Qty(model, sQty, ref DBUtility.ClsPub.sErrInfo))
                bool flag = oWebs.Get_CheckQtyByBarCode_GetWhAndSP(model.HInterID, model.HBillType, model.HBarCode, ref SCWhID, ref SCSPID, sRelQty, ref sRelQty);
                if (flag)
                {
                    sQty = sRelQty;
                    //sQty = sRelQty;
                    model.HSCWHID = SCWhID;
                    model.HOutStockPlaceID = SCSPID;
                    if(SCWhID<=0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "1-仓库无库存!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else if (sRelQty == 0)
                {
@@ -352,10 +362,6 @@
                    objJsonResult.Message = "2-无库存!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    sQty = sRelQty;
                }
                if (oWebs.set_SavePonderationBillMain_Temp_Qty(model, sQty, ref DBUtility.ClsPub.sErrInfo))
@@ -432,7 +438,7 @@
                websLsmain.HStockStyle = "";
                websLsmain.HBillType = "1207";
                websLsmain.HSupID = 0;
                websLsmain.HGroupID = lsmain[0].HGroupID;
                //websLsmain.HGroupID = lsmain[0].HGroupID;
                if (webserver.set_SaveMoveStockBill(websLsmain, "-1", ref DBUtility.ClsPub.sErrInfo))
                {