1
chenhaozhe
2025-12-26 a5e44a59d7128a7c6303fd781804cab7a6fe9d29
WebAPI/Controllers/ÌõÂë¹ÜÀí/MouldController.cs
@@ -1993,6 +1993,63 @@
        #endregion
        #region æºå•条码处理方式
        #region å™¨å…·é¢†ç”¨å•    æ‰«ææºå•条码
        /// <summary>
        /// å™¨å…·é¢†ç”¨å•    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("MouldController/Get_SourceBarCode_ProdOut_Json")]
        [HttpGet]
        public object get_SourceBarCode_ProdOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                //将源单信息存入条码出入库临时表
                DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode_ProdOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + 0 + ",'" + HMaker + "'," + 0 + "," + HStockOrgID.ToString(), "h_p_WMS_AddMouldBarCode_ProdOut");
                if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功";
                        objJsonResult.data = ds1.Tables[0];
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                        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