ch
2022-02-07 f440eeb72f93587ae29089209710582cda9f384e
WebAPI/Controllers/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/Sc_MESProductReportStepBillController.cs
@@ -18,9 +18,9 @@
        private WebS.WebService1 oWebs = new WebS.WebService1();
        #region  äº§é‡æ±‡æŠ¥åˆ—表
        [Route("Sc_MESProductReportStepBill/Get_Sc_MESProductReportBillList")]
        [Route("Sc_MESProductReportStepBill/Get_Sc_MESProductReportBillListxxxx")]
        [HttpGet]
        public object Get_Sc_MESProductReportBillList(string sWhere)
        public object Get_Sc_MESProductReportBillListxxxx(string sWhere)
        {
            try
            {
@@ -52,6 +52,89 @@
        #endregion
        #region  äº§é‡æ±‡æŠ¥ç¼–辑获取数据
        [Route("Sc_MESProductReportStepBill/Get_Sc_MESProductReportEditBillListxxxx")]
        [HttpGet]
        public object Get_Sc_MESProductReportEditBillListxxxx(string linterid, string HICMOInID, string HICMOEnID)
        {
            try
            {
                //根据选择资源ID获取当前生产工单、责任人
                ds=oCN.RunProcReturn("select * from h_v_IF_ICMOBillProcessWorkQty_Tmp  where HInterID='" + linterid + "' and HICMOInterID='" + HICMOInID + "' and HICMOEntryID='" + HICMOEnID + "'", "h_v_IF_ICMOBillProcessWorkQty_Tmp");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取资源绑定数据成功!";
                    objJsonResult.data = ds;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "暂无资源绑定!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region  äº§é‡æ±‡æŠ¥åˆ—表新
        [Route("Sc_MESProductReportStepBill/Get_Sc_MESProductReportBillList")]
        [HttpGet]
        public object Get_Sc_MESProductReportBillList(string sWhere, string user)
        {
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillWorkQtyStatus_Tmp " + sWhere + "order by å•据号 desc", "h_v_IF_ICMOBillWorkQtyStatus_Tmp");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_ICMOBillWorkQtyStatus_Tmp where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOBillWorkQtyStatus_Tmp");
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "查询数据成功!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  äº§é‡æ±‡æŠ¥ç¼–辑获取数据新
        [Route("Sc_MESProductReportStepBill/Get_Sc_MESProductReportEditBillList")]
        [HttpGet]
        public object Get_Sc_MESProductReportEditBillList(string linterid, string HICMOInID, string HICMOEnID)
@@ -59,7 +142,7 @@
            try
            {
                //根据选择资源ID获取当前生产工单、责任人
                ds=oCN.RunProcReturn("select * from h_v_IF_ICMOBillProcessWorkQty_Tmp  where HInterID='" + linterid + "' and HICMOInterID='" + HICMOInID + "' and HICMOEntryID='" + HICMOEnID + "'", "h_v_IF_ICMOBillProcessWorkQty_Tmp");
                ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillWorkQtyStatus_Tmp  where HInterID='" + linterid + "' and HICMOInterID='" + HICMOInID + "' and HICMOEntryID='" + HICMOEnID + "'", "h_v_IF_ICMOBillWorkQtyStatus_Tmp");
                if (ds.Tables[0].Rows.Count > 0)
                {