yangle
2022-12-19 cbb4d47b6f79fa8663697862a975ed94acfb76be
WebAPI/Controllers/QC_ManagementController.cs
@@ -29,22 +29,22 @@
        {
            try
            {
                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;
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception e)
            {
@@ -104,20 +104,30 @@
        /// <returns></returns>
        [Route("QC_Management/MES_QC_CheckProjectList_Json")]
        [HttpGet]
        public object MES_QC_CheckProjectList_Json(string sqlWhere)
        public object MES_QC_CheckProjectList_Json(string sWhere,string user)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                //判断权限
                if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Query", 1, false, user))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Gy_QCCheckProjectList where HBillStatus>-1 ", "h_v_Gy_QCCheckProjectList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select  * from h_v_Gy_QCCheckProjectList order by hmainid desc ", "h_v_Gy_QCCheckProjectList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_QCCheckProjectList where HBillStatus>-1 ";
                    string sql = sql1 + sqlWhere;
                    string sql1 = "select * from h_v_Gy_QCCheckProjectList where 1=1";
                    string sql = sql1 + sWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_QCCheckProjectList");
                }
            }
@@ -151,7 +161,7 @@
                }
                else
                {
                    string sql1 = "select * from h_v_QC_POStockInCheckBillList where 1 = 1 ";
                    string sql1 = "select * from h_v_QC_POStockInCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_POStockInCheckBillList");
                }
@@ -174,20 +184,30 @@
        /// <returns></returns>
        [Route("QC_Management/MES_QC_FirstPieceCheckBillList_Json")]
        [HttpGet]
        public object MES_QC_FirstPieceCheckBillList_Json(string sqlWhere)
        public object MES_QC_FirstPieceCheckBillList_Json(string sqlWhere,string user)
        {
            DataSet ds;
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("QC_FirstPieceCheckBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList ", "h_v_QC_FirstPieceCheckBillList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList  where  关闭人='' order by hmainid desc ", "h_v_QC_FirstPieceCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillList");
                }
            }
@@ -209,20 +229,30 @@
        /// <returns></returns>
        [Route("QC_Management/MES_QC_PatrolProcCheckBillList_Json")]
        [HttpGet]
        public object MES_QC_PatrolProcCheckBillList_Json(string sqlWhere)
        public object MES_QC_PatrolProcCheckBillList_Json(string sqlWhere,string user)
        {
            DataSet ds;
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("QC_PatrolProcCheckBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList ", "h_v_QC_PatrolProcCheckBillList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where  关闭人='' order by hmainid desc ", "h_v_QC_PatrolProcCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList");
                }
            }
@@ -435,12 +465,59 @@
        #region 保存/编辑/删除方法
        #region  检验方案编辑时获取表头数据
        [Route("QC_Management/MES_QC_CheckProjectListCheckDetai")]
        [HttpGet]
        public ApiResult<DataSet> MES_QC_CheckProjectListCheckDetai(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCCheckProjectList_NEW  where hmainid= " + HID + " ", "h_v_Gy_QCCheckProjectList_NEW");
            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
                return new ApiResult<DataSet> { code = -1, msg = "不存在生产汇报单号" };
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
        #endregion
        #region 检验方案编辑时获取表体数据
        [Route("QC_Management/MES_QC_CheckProjectListProjectDetai")]
        [HttpGet]
        public object MES_QC_CheckProjectListProjectDetai(string HInterID)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn(string.Format(@"select 次序号 HPrjNo,检验项目ID HQCCheckItemID,检验项目代码 HQCCheckItemNumber,检验项目 HQCCheckItemName,
                                                       检验标准 HQCStd,最大检验标准 HQCStdMax,检验单位 HQCUnit,表体备注 HRemark from h_v_Gy_QCCheckProjectList_NEW
                                                       where hinterid='"+HInterID+"'"), "h_v_Gy_QCCheckProjectList_NEW");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region 检验方案保存
        /// <summary>
        /// 保存检验方案
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveQCCheckProjectList")]
        [Route("QC_Management/SaveQCCheckProjectList")]
        [HttpPost]
        public object SaveQCCheckProjectList([FromBody] JObject msg)
        {
@@ -449,7 +526,17 @@
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();//用户名
            //判断权限
            if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Edit", 1, false, user))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无编辑权限";
                objJsonResult.data = null;
                return objJsonResult;
            }
            string UserName = "";
            ListModels oListModels = new ListModels();
@@ -464,17 +551,17 @@
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;
                    DBUtility.ClsPub.CurUserName = UserName;
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillType = "3302";
                    oItem.HBillSubType = "3302";
                    oItem.HBillType = "3320";
                    oItem.HBillSubType = "3320";
                    oItem.HBillStatus = 0;
                    oItem.HPeriod = 0;
                    oItem.HMaker = "";
                    oItem.HStandard = false;
                    oItem.HMainSourceInterID = oItem.HInterID;
                    oItem.HMaterTypeID = 0;
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
@@ -510,14 +597,13 @@
                    oItemSub.HSourceEntryID =0;
                    oItemSub.HSourceInterID =0;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = Convert.ToDateTime("");
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
                    oItemSub.HRelationQty = 0;
                    oItemSub.HRelationMoney = 0;
                    oItemSub.HCloseMan = "";
                    oItemSub.HRemark = "";
                    oBill.DetailColl.Add(oItemSub);
                }
@@ -526,7 +612,6 @@
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
@@ -561,20 +646,96 @@
            }
        }
        #endregion
        #region  检验方案逻辑删除功能
        /// <summary>
        /// 检验方案逻辑删除功能
        /// </summary>
        /// <returns></returns>
        [Route("DeltetQCCheckProject")]
        [HttpGet]
        public object DeltetQCCheckProject(string HInterID)
        public object DeltetQCCheckProject(string HInterID,string UserName)
        {
            DBUtility.ClsPub.CurUserName = UserName;
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Delete", 1, false, DBUtility.ClsPub.CurUserName))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无删除权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
            if (lngBillKey == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据ID为空!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DAL.ClsGy_QCCheckProjectMain oBill = new DAL.ClsGy_QCCheckProjectMain();
            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
            {
                if (oBill.omodel.HBillStatus > 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据当前处于不能删除状态,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oBill.omodel.HChecker != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已经审核,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                if (IsDete)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据未找到";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
@@ -634,8 +795,9 @@
                return objJsonResult;
            }
        }
        #endregion
        #region 来料检验
        /// <summary>
        /// 保存来料检验单
        /// </summary>
@@ -711,7 +873,7 @@
                    oItemSub.HSourceInterID = 0;
                    oItemSub.HEntryID = i;
                    // DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HEntryCloseDate = Convert.ToDateTime("");
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
@@ -776,7 +938,7 @@
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
@@ -836,7 +998,9 @@
                return objJsonResult;
            }
        }
        #endregion
        #region 首件检验
        /// <summary>
        /// 保存首件检验单
        /// </summary>
@@ -913,7 +1077,7 @@
                    oItemSub.HSourceInterID = 0;
                    oItemSub.HEntryID = i;
                    // DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HEntryCloseDate = Convert.ToDateTime("");
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
@@ -970,21 +1134,21 @@
        /// <returns></returns>
        [Route("DeltetQC_FirstPieceCheck")]
        [HttpGet]
        public object DeltetQC_FirstPieceCheck(string HInterID)
        public object DeltetQC_FirstPieceCheck(string HInterID,string user)
        {
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete";
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "审核失败!无权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (string.IsNullOrWhiteSpace(HInterID))
@@ -996,8 +1160,8 @@
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from QC_POStockInCheckBillMain where HInterID=" + HInterID, "QC_POStockInCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_POStockInCheckBillSub where HInterID=" + HInterID, "QC_POStockInCheckBillSub");
                ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -1018,8 +1182,8 @@
                    return objJsonResult;
                }
                oCN.RunProc("update QC_POStockInCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_POStockInCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
@@ -1037,7 +1201,9 @@
                return objJsonResult;
            }
        }
        #endregion
        #region 巡检
        /// <summary>
        /// 保存巡检单
        /// </summary>
@@ -1052,13 +1218,24 @@
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsQC_PatrolProcCheckBill oBill = new DAL.ClsQC_PatrolProcCheckBill();
                //判断权限
                if (!DBUtility.ClsPub.Security_Log("QC_PatrolProcCheckBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                WebAPI.DLL.ClsQC_PatrolProcCheckBill oBill = new WebAPI.DLL.ClsQC_PatrolProcCheckBill();
                List<Model.ClsQC_PatrolProcCheckBillMain> lsmain = new List<Model.ClsQC_PatrolProcCheckBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
@@ -1070,8 +1247,8 @@
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillType = "7503";
                    oItem.HBillSubType = "7503";
                    oItem.HBillType = "7506";
                    oItem.HBillSubType = "7506";
                    oItem.HBillStatus = 0;
                    oItem.HPeriod = 0;
                    oItem.HMaker = "";
@@ -1113,7 +1290,7 @@
                    oItemSub.HSourceInterID = 0;
                    oItemSub.HEntryID = i;
                    // DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HEntryCloseDate = Convert.ToDateTime("");
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
@@ -1170,21 +1347,21 @@
        /// <returns></returns>
        [Route("DeltetQC_PatrolProcCheck")]
        [HttpGet]
        public object DeltetQC_PatrolProcCheck(string HInterID)
        public object DeltetQC_PatrolProcCheck(string HInterID,string user)
        {
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            string ModRightNameCheck = "QC_PatrolProcCheckBill_Delete";
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "审核失败!无权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "删除失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (string.IsNullOrWhiteSpace(HInterID))
@@ -1196,8 +1373,8 @@
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from QC_POStockInCheckBillMain where HInterID=" + HInterID, "QC_POStockInCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_POStockInCheckBillSub where HInterID=" + HInterID, "QC_POStockInCheckBillSub");
                ds = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillMain where HInterID=" + HInterID, "QC_PatrolProcCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillSub where HInterID=" + HInterID, "QC_PatrolProcCheckBillSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -1218,8 +1395,8 @@
                    return objJsonResult;
                }
                oCN.RunProc("update QC_POStockInCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_POStockInCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_PatrolProcCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_PatrolProcCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
@@ -1237,7 +1414,7 @@
                return objJsonResult;
            }
        }
        #endregion
        #endregion