1
llj
2026-02-25 1b964724352218679cc44862e3e67452e8f6deda
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostItemController.cs
@@ -45,9 +45,9 @@
                    return objJsonResult;
                }
                string sql1 = "SELECT * from h_v_Gy_CostItem_1 where 1 = 1";
                string sql1 = "SELECT * from h_v_Gy_CostItemList where 1 = 1";
                string sql = sql1 + sWhere + " order by æˆæœ¬é¡¹ç›®ä»£ç  ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItem_1");
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItemList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -98,7 +98,7 @@
                }
                
             var ds = oCN.RunProcReturn("select * from Gy_CostItem_1 where HItemID=" + HInterID, "Gy_CostItem_1");
             var ds = oCN.RunProcReturn("select * from Gy_CostItem where HItemID=" + HInterID, "Gy_CostItem");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
@@ -161,7 +161,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    //审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -219,7 +219,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    //反审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -297,7 +297,7 @@
                 }
                 oCN.BeginTran();//开始事务
                 ds = oCN.RunProcReturn("select * from Gy_CostItem_1  where HItemID=" + HItemID, "Gy_CostItem_1 ");
                 ds = oCN.RunProcReturn("select * from Gy_CostItem  where HItemID=" + HItemID, "Gy_CostItem ");
                 if (ds.Tables[0].Rows.Count > 0)
                 {
                     if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
@@ -352,7 +352,7 @@
                 //================================================================================== 
                 oCN.RunProc("delete Gy_CostItem_1  where HItemID=" + HItemID);
                 oCN.RunProc("delete Gy_CostItem  where HItemID=" + HItemID);
                 //删除后控制=========================================      
@@ -423,7 +423,7 @@
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItem_1 where HItemID=" + HInterID, "Gy_CostItem_1");
                var ds = oCN.RunProcReturn("select * from Gy_CostItem where HItemID=" + HInterID, "Gy_CostItem");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
@@ -487,7 +487,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    //禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -545,7 +545,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    //反禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -650,7 +650,7 @@
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_CostItem_1 where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItem_1");
                    ds = oCN.RunProcReturn("select * from  Gy_CostItem where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItem");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
@@ -701,7 +701,7 @@
                    {
                        //已审核不允许修改
                        DataSet dss;
                        dss = oCN.RunProcReturn("select * from Gy_CostItem_1 where HItemID=" + oItem.HItemID, "Gy_CostItem_1");
                        dss = oCN.RunProcReturn("select * from Gy_CostItem where HItemID=" + oItem.HItemID, "Gy_CostItem");
                        //判断是否可编辑
                        if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
@@ -804,8 +804,8 @@
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = $@"select * from h_v_Gy_CostItem_1 where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItem_1");
                string sql1 = $@"select * from h_v_Gy_CostItemList where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItemList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {