zgq
2021-05-29 001aa51e3a7f669594bc958424be9b74b44cd7a9
WebAPI/Controllers/QC_ManagementController.cs
@@ -151,7 +151,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");
                }
@@ -182,11 +182,11 @@
                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  关闭人='' ", "h_v_QC_FirstPieceCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 1 = 1 ";
                    string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillList");
                }
@@ -217,11 +217,11 @@
                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  关闭人=''", "h_v_QC_PatrolProcCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 1 = 1 ";
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList");
                }
@@ -1000,8 +1000,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";
@@ -1022,8 +1022,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;
@@ -1064,7 +1064,7 @@
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsQC_PatrolProcCheckBill oBill = new DAL.ClsQC_PatrolProcCheckBill();
                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
@@ -1076,8 +1076,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 = "";
@@ -1202,8 +1202,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";
@@ -1224,8 +1224,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;