From 38260f9d8bba59567844f19c5ce60576ce04a923 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期一, 22 十二月 2025 15:01:34 +0800
Subject: [PATCH] 取消巡检不合格后自动生成巡检单逻辑

---
 StandardPda/MES.Service/service/QC/XJService.cs |   96 ++++++++++++++++++++++++------------------------
 1 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/StandardPda/MES.Service/service/QC/XJService.cs b/StandardPda/MES.Service/service/QC/XJService.cs
index d370a2f..6350a1c 100644
--- a/StandardPda/MES.Service/service/QC/XJService.cs
+++ b/StandardPda/MES.Service/service/QC/XJService.cs
@@ -419,63 +419,63 @@
                 SQLHelper.ExecuteNonQuery(sqlUpdate);
             }
 
-            var resu1 = dt.Rows[0]["FCHECK_RESU"]?.ToString();
+        //    var resu1 = dt.Rows[0]["FCHECK_RESU"]?.ToString();
 
-            var fsubmit2 = resu1 == "鍚堟牸" ? 1 : 0;
+        //    var fsubmit2 = resu1 == "鍚堟牸" ? 1 : 0;
 
 
-            if (fsubmit2 == 0)
-            {
-                var db = SqlSugarHelper.GetInstance();
+        //    if (fsubmit2 == 0)
+        //    {
+        //        var db = SqlSugarHelper.GetInstance();
 
-                // ===== 杈撳嚭鍙傛暟 =====
-                var outFlag = new SugarParameter("P_FLAG", null,
-                    DbType.Int32, ParameterDirection.Output, 10);
+        //        // ===== 杈撳嚭鍙傛暟 =====
+        //        var outFlag = new SugarParameter("P_FLAG", null,
+        //            DbType.Int32, ParameterDirection.Output, 10);
 
-                var outText = new SugarParameter("P_TEXT", null,
-                    DbType.String, ParameterDirection.Output, 4000);
+        //        var outText = new SugarParameter("P_TEXT", null,
+        //            DbType.String, ParameterDirection.Output, 4000);
 
-                // ===== 杈撳叆鍙傛暟 =====
-                var parameters = new List<SugarParameter>
-        {
-            new SugarParameter("P_ID", sqlPass2, DbType.Int64, ParameterDirection.Input),
-            new SugarParameter("P_USER", rkjDto.userNo, DbType.String, ParameterDirection.Input),
-            new SugarParameter("P_ISH", 0, DbType.Int64, ParameterDirection.Input),
-            new SugarParameter("P_RELEASE_NO",rkjDto.releaseNo,DbType.String,ParameterDirection.Input),
+        //        // ===== 杈撳叆鍙傛暟 =====
+        //        var parameters = new List<SugarParameter>
+        //{
+        //    new SugarParameter("P_ID", sqlPass2, DbType.Int64, ParameterDirection.Input),
+        //    new SugarParameter("P_USER", rkjDto.userNo, DbType.String, ParameterDirection.Input),
+        //    new SugarParameter("P_ISH", 0, DbType.Int64, ParameterDirection.Input),
+        //    new SugarParameter("P_RELEASE_NO",rkjDto.releaseNo,DbType.String,ParameterDirection.Input),
 
-            // 杈撳嚭鍙傛暟蹇呴』甯︿笂
-            outFlag,
-            outText
-        };
-                // ===== 鎵ц瀛樺偍杩囩▼ =====
-                db.Ado.ExecuteCommand(
-                    "BEGIN PRC_XJ_GENERATE_two(:P_ID, :P_USER, :P_ISH,:P_RELEASE_NO, :P_FLAG, :P_TEXT); END;",
-                    parameters);
+        //    // 杈撳嚭鍙傛暟蹇呴』甯︿笂
+        //    outFlag,
+        //    outText
+        //};
+        //        // ===== 鎵ц瀛樺偍杩囩▼ =====
+        //        db.Ado.ExecuteCommand(
+        //            "BEGIN PRC_XJ_GENERATE_two(:P_ID, :P_USER, :P_ISH,:P_RELEASE_NO, :P_FLAG, :P_TEXT); END;",
+        //            parameters);
 
-                // ===== 璇诲彇杈撳嚭鍙傛暟骞惰浆鎹㈡垚 ResponseResult =====
-                var result = new ResponseResult
-                {
-                    status = outFlag.Value?.ToString() == "1" ? 1 : 0, // 0 琛ㄧず鎴愬姛锛�1 琛ㄧず澶辫触
-                    message = outText.Value?.ToString()
-                };
+        //        // ===== 璇诲彇杈撳嚭鍙傛暟骞惰浆鎹㈡垚 ResponseResult =====
+        //        var result = new ResponseResult
+        //        {
+        //            status = outFlag.Value?.ToString() == "1" ? 1 : 0, // 0 琛ㄧず鎴愬姛锛�1 琛ㄧず澶辫触
+        //            message = outText.Value?.ToString()
+        //        };
 
-                var useTransactionWithOracle1 =
-                SqlSugarHelper.UseTransactionWithOracle(db =>
-                {
-                    return db.Updateable<QsQaItemXj>()
-                        .SetColumns(s => s.Fsubmit == 1)
-                        .SetColumns(s => s.FsubmitBy == rkjDto.userNo)
-                        .SetColumns(s => s.FsubmitDate == DateTime.Now)
-                        .Where(s => s.Id == rkjDto.gid)
-                        .ExecuteCommand();
-                });
-                return new ResponseResult
-                {
-                    status = 0,
-                    message = "鎻愪氦鎴愬姛",
-                    data = useTransactionWithOracle1
-                };
-            }
+        //        var useTransactionWithOracle1 =
+        //        SqlSugarHelper.UseTransactionWithOracle(db =>
+        //        {
+        //            return db.Updateable<QsQaItemXj>()
+        //                .SetColumns(s => s.Fsubmit == 1)
+        //                .SetColumns(s => s.FsubmitBy == rkjDto.userNo)
+        //                .SetColumns(s => s.FsubmitDate == DateTime.Now)
+        //                .Where(s => s.Id == rkjDto.gid)
+        //                .ExecuteCommand();
+        //        });
+        //        return new ResponseResult
+        //        {
+        //            status = 0,
+        //            message = "鎻愪氦鎴愬姛",
+        //            data = useTransactionWithOracle1
+        //        };
+        //    }
 
 
             var useTransactionWithOracle =

--
Gitblit v1.9.3