From eb65436c2312821e3e513ab9ada41dd486d6d7cf Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期二, 09 九月 2025 15:35:41 +0800
Subject: [PATCH] 同步为祈禧的代码

---
 WebApi/Gs.Wom/WorkService/WorkTechniqueController.cs |  122 +++++++++-------------------------------
 1 files changed, 27 insertions(+), 95 deletions(-)

diff --git a/WebApi/Gs.Wom/WorkService/WorkTechniqueController.cs b/WebApi/Gs.Wom/WorkService/WorkTechniqueController.cs
index 0692fbe..a4441ad 100644
--- a/WebApi/Gs.Wom/WorkService/WorkTechniqueController.cs
+++ b/WebApi/Gs.Wom/WorkService/WorkTechniqueController.cs
@@ -35,7 +35,7 @@
         [RequestMethod(RequestMethods.POST)]
         public ReturnDto<ExpandoObject> GetModel([FromBody] dynamic model)
         {
-            string guid = model.guid.ToString();
+            string guid = model.guid.ToString();// --杩欐槸浜у搧鐨刧uid
             dynamic m = new ExpandoObject();
             m.list = new List<dynamic>();
             SqlParameter[] parameters =
@@ -49,8 +49,7 @@
             var dset = new DataSet();
             try
             {
-                //dset = DbHelperSQL.RunProcedure("[work_technique_mx]", parameters, "0");
-                dset = DbHelperSQL.RunProcedure("[mes_prod_gx_mx]", parameters, "0");
+                dset = DbHelperSQL.RunProcedure("[work_technique_mx]", parameters, "0");
                 if (dset != null && dset.Tables.Count > 0 &&
                     dset.Tables[0].Rows.Count > 0)
                 {
@@ -58,8 +57,6 @@
                     m = dr.RowToDynamic();
                     var _tb = dset.Tables[1].TableToDynamicList();
                     m.list = _tb;
-                    var _tb2 = dset.Tables[2].TableToDynamicList();
-                    m.list2 = _tb2;
                 }
             }
             catch (Exception ex)
@@ -81,36 +78,28 @@
         public ReturnDto<ExpandoObject> EditModel([FromBody] dynamic model)
         {
             Guid? guid = model.guid; //浜у搧涓婚敭
-            string orgName = model.orgName;
-            string itemNo = model.itemNo;
+            string fType = model.fType;
+            string fBegDate = model.fBegDate;
+            string fEndDate = model.fEndDate;
+            string fJingDu = model.fJingDu;
+            string fCapacity = model.fCapacity;
+            string fMaxWeight = model.fMaxWeight;
+            string fMinWeight = model.fMinWeight;
+            string fSumPeople = model.fSumPeople;
+            string remark = model.remark;
             var _sb = new StringBuilder();
             var _split = "|";
             foreach (var m in model.list)
             {
-                var _line = m.guid + _split
+                var _line = m.fSeq + _split
                                         + m.processNo + _split
-                                        + m.gxOrder + _split
-                                        + m.signingFlag + _split
-                                        + m.storageFlag + _split
+                                        + m.statStatus + _split
+                                        + m.collectionName + _split
+                                        + m.remark + _split
                                         + m.frontProcessNo;
                 if (_sb.Length > 0)
                     _sb.Append("~");
                 _sb.Append(_line);
-            }
-            var _sb2 = new StringBuilder();
-            var _split2 = "|";
-            foreach (var m in model.list2)
-            {
-                var _line2 = m.guid + _split2
-                                        + m.workers + _split2
-                                        + m.hours + _split2
-                                        + m.capacity + _split2
-                                        + m.sCapacity + _split2
-                                        + m.lineType + _split2
-                                        + m.changeTime;
-                if (_sb2.Length > 0)
-                    _sb2.Append("~");
-                _sb2.Append(_line2);
             }
             dynamic mObj = new ExpandoObject();
             mObj.outMsg = "";
@@ -119,8 +108,7 @@
             mObj.outNo = "";
             using (var conn = new SqlConnection(DbHelperSQL.strConn))
             {
-                //using (var cmd = new SqlCommand("[work_technique_edt]", conn))
-                using (var cmd = new SqlCommand("[mes_prod_gx_edt]", conn))
+                using (var cmd = new SqlCommand("[work_technique_edt]", conn))
                 {
                     try
                     {
@@ -133,11 +121,17 @@
                         new("@outGuid", SqlDbType.UniqueIdentifier),
                         new("@outNo", SqlDbType.NVarChar, 300),
                         new("@inOrderGuid", CheckGuid(guid) ? guid : DBNull.Value),
-                        new("@orgName", orgName),
-                        new("@itemNo", itemNo),
+                        new("@fType", fType),
+                        new("@fBegDate", fBegDate),
+                        new("@fEndDate", fEndDate),
+                        new("@fJingDu", fJingDu),
+                        new("@fCapacity", fCapacity),
+                        new("@fMaxWeight", fMaxWeight),
+                         new("@fMinWeight", fMinWeight),
+                         new("@fSumPeople", fSumPeople),
+                        new("@remark", remark),
                         new("@inEdtUserGuid", _userGuid),
-                        new("@inLineList", _sb.ToString()),
-                        new("@inLineList2", _sb2.ToString())
+                        new("@inLineList", _sb.ToString())
                     };
                         parameters[0].Direction = ParameterDirection.Output;
                         parameters[1].Direction = ParameterDirection.Output;
@@ -245,8 +239,7 @@
             var _outSum = -1;
             using (var conn = new SqlConnection(DbHelperSQL.strConn))
             {
-                //using (var cmd = new SqlCommand("[work_technique_del]", conn))
-                using (var cmd = new SqlCommand("[mes_prod_gx_del]", conn))
+                using (var cmd = new SqlCommand("[work_technique_del]", conn))
                 {
                     try
                     {
@@ -292,67 +285,6 @@
             return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Success, _outMsg);
         }
 
-        /// <summary>
-        ///     鍒犻櫎涓昏〃鎴栦骇鑳芥槑缁�
-        /// </summary>
-        /// <param name="model"></param>
-        /// <returns></returns>
-        [RequestMethod(RequestMethods.POST)]
-        public ReturnDto<int?> DeleteMode2OrMx([FromBody] dynamic model)
-        {
-            int? rtnInt = (int)ReturnCode.Default;
-            Guid? guid = model.guid;
-            string mxGuid2 = model.mxGuid2;
-            var _outMsg = "";
-            var _outSum = -1;
-            using (var conn = new SqlConnection(DbHelperSQL.strConn))
-            {
-                //using (var cmd = new SqlCommand("[work_technique_del]", conn))
-                using (var cmd = new SqlCommand("[mes_prod_gx_del2]", conn))
-                {
-                    try
-                    {
-                        conn.Open();
-                        cmd.CommandType = CommandType.StoredProcedure;
-                        SqlParameter[] parameters =
-                        {
-                        new("@outMsg", SqlDbType.NVarChar, 300),
-                        new("@outSum", SqlDbType.Int),
-                        new("@inOrderGuid",
-                            CheckGuid(guid)
-                                ? guid
-                                : DBNull.Value),
-                        new("@inEdtUserGuid", _userGuid),
-                        new("@inMxGuid", mxGuid2)
-                    };
-                        parameters[0].Direction = ParameterDirection.Output;
-                        parameters[1].Direction = ParameterDirection.Output;
-                        foreach (var parameter in parameters)
-                            cmd.Parameters.Add(parameter);
-
-                        cmd.ExecuteNonQuery();
-                        _outMsg = parameters[0].Value.ToString();
-                        _outSum = int.Parse(parameters[1].Value.ToString());
-                    }
-                    catch (Exception ex)
-                    {
-                        LogHelper.Debug(ToString(),
-                            "work_technique error锛�" + ex.Message);
-                        _outMsg = ex.Message;
-                        _outSum = -1;
-                    }
-                    finally
-                    {
-                        conn.Close();
-                    }
-                }
-            }
-
-            if (_outSum <= 0)
-                return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Exception,
-                    _outMsg);
-            return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Success, _outMsg);
-        }
 
         /// <summary>
         ///  澶嶅埗鐗╂枡椤圭洰

--
Gitblit v1.9.3