1
llj
9 小时以前 ff30b95575c97a67dab7654dde69181b75935ac3
WebAPI/Controllers/ÌõÂë¹ÜÀí/MouldController.cs
@@ -226,7 +226,7 @@
        /// <returns></returns>
        [Route("MouldController/set_DelMouldStockBillMain_Temp_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_BarCode_Json(Int64 HInterID, string HBillType, string HBarCode)
        public object set_DelMouldStockBillMain_Temp_Json(Int64 HInterID, string HBillType, string HBarCode)
        {
            try
            {
@@ -633,7 +633,7 @@
                {
                    for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                    {
                        Model.ClsSc_MouldStockBillSub oSub = new Model.ClsSc_MouldStockBillSub();
                        Model.ClsSc_MouldProdOutBillSub oSub = new Model.ClsSc_MouldProdOutBillSub();
                        //固定赋值========================================
                        oSub.HEntryID = i + 1;
                        oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]);
@@ -684,7 +684,8 @@
                //保存
                bool bResult;
                bResult = BillNew.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                //自动生成工作联系单
                oCn.RunProc("exec h_p_OA_WorkLinkBill_Create " + BillNew.omodel.HInterID + "," + 3802);
                if (bResult)
                {
                    objJsonResult.code = "0";
@@ -792,7 +793,7 @@
                {
                    for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                    {
                        Model.ClsSc_MouldStockBillSub oSub = new Model.ClsSc_MouldStockBillSub();
                        Model.ClsSc_MouldProdBackBillSub oSub = new Model.ClsSc_MouldProdBackBillSub();
                        //固定赋值========================================
                        oSub.HEntryID = i + 1;
                        oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]);
@@ -1993,6 +1994,118 @@
        #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
        #region å™¨å…·é¢†ç”¨å•    æ‰«ææºå•条码
        /// <summary>
        /// å™¨å…·é¢†ç”¨å•    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("MouldController/Get_SourceBarCode_ScrapRequest_Json")]
        [HttpGet]
        public object Get_SourceBarCode_ScrapRequest_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_ScrapRequest " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + 0 + ",'" + HMaker + "'," + 0 + "," + HStockOrgID.ToString(), "h_p_WMS_AddMouldBarCode_ScrapRequest");
                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