WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -770,6 +770,88 @@
        #endregion
        #region ç­ç»„资料
        /// <summary>
        /// æ‰«ç è¿”回班组信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetGroup_Json")]
        [HttpGet]
        public object GetGroup_Json(string HBarCode, Int64 HStockOrgID)
        {
            try
            {
                Int64 HGroupID = 0;
                HGroupID = DBUtility.ClsPub.isLong(HBarCode);
                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Group with(nolock) where HStopflag=0 and HItemID=" + HGroupID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Group");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录,请确认所扫班组条码是否属于该组织,且为非禁用状态!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "返回班组信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// èŽ·å–ç­ç»„åˆ—è¡¨ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetGroupList_Json")]
        [HttpGet]
        public object GetGroupList_Json(string Group, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Group with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Group + "%' or HName like '%" + Group + "%')", "Gy_Group");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何班组记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "返回班组信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
@@ -1278,6 +1360,80 @@
        #region æäº¤ç”Ÿå•处理方法
        #region ç”Ÿäº§æ±‡æŠ¥    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§æ±‡æŠ¥    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§æ±‡æŠ¥æ–°å¢žä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveICMOReportBill_Json")]
        [HttpPost]
        public object set_SaveICMOReportBill_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsSc_ICMOReportBillMain> lsmain = new List<Model.ClsSc_ICMOReportBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICMOReportBillMainByJson(msg1);
                WebS.ClsSc_ICMOReportBillMain websLsmain = new WebS.ClsSc_ICMOReportBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HGroupID = lsmain[0].HGroupID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HCheckType = lsmain[0].HCheckType;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                if (lsmain[0].HMainSourceBillType == "3710")
                {
                    websLsmain.HMainSourceBillType = "生产订单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HPRDORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveICMOReportBill_New(websLsmain, sSourceType, 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 ç”Ÿäº§å…¥åº“    ä¸Šä¼ ç”Ÿå•
@@ -2291,6 +2447,48 @@
        #region æºå•条码处理方法
        #region ç”Ÿäº§æ±‡æŠ¥    æ‰«ææºå•条码
        /// <summary>
        /// ç”Ÿäº§æ±‡æŠ¥    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_ICMOReport_Json")]
        [HttpGet]
        public object get_SourceBarCode_ICMOReport_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_ICMOReport(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, 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;
            }
        }
        #endregion
        #region ç”Ÿäº§å…¥åº“    æ‰«ææºå•条码
        /// <summary>
@@ -2375,6 +2573,48 @@
        #endregion
        #region å§”外入库    æ‰«ææºå•条码
        /// <summary>
        /// å§”外入库    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_EntrustIn_Json")]
        [HttpGet]
        public object get_SourceBarCode_EntrustIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_EntrustIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, 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;
            }
        }
        #endregion
        #region å…¶ä»–入库    æ‰«ææºå•条码
        /// <summary>
@@ -2416,9 +2656,6 @@
        }
        #endregion
        #region ç”Ÿäº§é¢†æ–™    æ‰«ææºå•条码