yxj
2026-04-20 3cafa2a575b387a5d20e7c26f442c6029ea6a80a
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -4363,6 +4363,64 @@
        #endregion
        #region å—托加工出库    ä¸Šä¼ ç”Ÿå•
        #region å—托加工出库    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// å—托加工出库校验上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveInceptEntOutBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveInceptEntOutBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICStockBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1213";
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveInceptEntOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "受托加工出库校验失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region ç›´æŽ¥è°ƒæ‹¨    ä¸Šä¼ ç”Ÿå•
        #region ç›´æŽ¥è°ƒæ‹¨    æ–°å¢žæ¨¡å¼
@@ -8084,6 +8142,20 @@
                        sAutoBarCode = "Y";
                    }
                }
                //受托加工入库单
                else if (HBillType == "1212")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //领料出库单
                else if (HBillType == "1204")
                {
@@ -8164,6 +8236,20 @@
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //受托加工出库单
                else if (HBillType == "1213")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
@@ -8699,6 +8785,14 @@
                {
                    sFIFOCtl = "Y";
                }
                //受托加工出库单-先进先出控制
                if (HBillType == "1213"
                    && oSystemParameter.omodel.Kf_InceptEntOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //直接调拨单-先进先出控制
                if (HBillType == "1207"
                    && oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
@@ -8841,6 +8935,15 @@
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //受托加工入库单
                else if (HBillType == "1212")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //领料出库单
                else if (HBillType == "1204")
                {
@@ -8906,6 +9009,17 @@
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl;
                }
                //受托加工出库单
                else if (HBillType == "1213")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl;
                }
                //直接调拨单
                else if (HBillType == "1207")
@@ -9214,6 +9328,15 @@
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //受托加工入库单
                else if (HBillType == "1212")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //领料出库单
                else if (HBillType == "1204")
                {
@@ -9264,6 +9387,15 @@
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //受托加工出库单
                else if (HBillType == "1213")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -14883,8 +15015,8 @@
            {
                string sErrMsg = "";
                oSystemParameter.ShowBill(ref sErrMsg);
                // åŽèˆŸå®¢æˆ·
                if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                // åŽèˆŸå®¢æˆ·   å·¥åºè¿›ç«™æŽ¥æ”¶å•  å·¥åºå§”外接收单 ç”Ÿäº§è®¢å• å·¥åºæµè½¬å¡
                if (oSystemParameter.omodel.WMS_CampanyName == "华舟" && HSourceBillType != 3790 && HSourceBillType != 3793 && HSourceBillType != 3710 && HSourceBillType != 3772)
                {
                    if (!string.IsNullOrWhiteSpace(HBarCode))
                    {
@@ -14938,6 +15070,14 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Columns.Contains("HBack") && DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                {