WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -720,10 +720,10 @@
        #region ç”Ÿäº§å…¥åº“    æ‰«ææºå•条码
        #region é‡‡è´­å…¥åº“    æ‰«ææºå•条码
        /// <summary>
        /// ç”Ÿäº§å…¥åº“    æ‰«ææºå•条码
        /// é‡‡è´­å…¥åº“    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_PoStockIn_Json")]
@@ -732,7 +732,7 @@
        {
            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";
@@ -932,7 +932,7 @@
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
                    SourceFlag = true;
                    SourceFlag = true;
                }
                else
                {
@@ -940,7 +940,34 @@
                }
                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";
@@ -956,10 +983,11 @@
                        objJsonResult.Message = "成功";
                        objJsonResult.data = WebSoBar;
                        return objJsonResult;
                    }
                    }
                }
                catch (Exception e)
                {
                    oCn.RollBack();//回滚事物
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "扫描条码失败!" + e.ToString();
@@ -1084,61 +1112,61 @@
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
        /// </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