1
wtt
2026-02-06 daa95fd4d96d0bc7ceb0308005c78f4bfd0fd005
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_RepairBillController.cs
@@ -33,7 +33,7 @@
            try
            {
                List<object> columnNameList = new List<object>();
                if (!DBUtility.ClsPub.Security_Log("Gy_Repair", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("Gy_Repair_List", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -52,23 +52,12 @@
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception e)
            {
@@ -339,10 +328,21 @@
                    return objJsonResult;
                }
                // ä»£ç  é™¤åŽ»è‡ªèº«å¤– ä¸èƒ½é‡å¤
                var dsHNumberCheck = oCN.RunProcReturn($@"
                    select top 1 HItemID from Gy_Repair where HStopflag = 0 and HNumber = '{HNumber}' and HItemID != {HItemID}
                ", "Gy_Repair");
                if (dsHNumberCheck.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!代码重复!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //若MAINDI重复则重新获取
                oCN.BeginTran();
                //保存前控制=========================================
                DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Repair_BeforeSaveCtrl " + msg3 + ",'1'", "h_p_Gy_Repair_BeforeSaveCtrl");
@@ -477,7 +477,19 @@
                    return objJsonResult;
                }
                // ä»£ç ä¸èƒ½é‡å¤
                var dsHNumberCheck = oCN.RunProcReturn($@"
                    select top 1 HItemID from Gy_Repair where HStopflag = 0 and HNumber = '{HNumber}'
                ", "Gy_Repair");
                if (dsHNumberCheck.Tables[0].Rows.Count > 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!代码重复!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //若MAINDI重复则重新获取
                oCN.BeginTran();
@@ -991,10 +1003,10 @@
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("维修项目代码"))
                    error += "没有找到【点检项目代码】的标题,";
                    error += "没有找到【维修项目代码】的标题,";
                if (!tb2.Columns.Contains("维修项目名称"))
                    error += "没有找到【点检项目名称】的标题,";
                    error += "没有找到【维修项目名称】的标题,";
                if (error.Length > 0)
                {