From be3b255bbe328d793ff20011683dca5aee1668a1 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 23 七月 2025 09:05:29 +0800
Subject: [PATCH] 20250722 川印系统客户访问增加长度,增加附件何查看  20250721  川印系统修改 完成

---
 CY_ECommercePlatform/CY.SQLDAL/OA/OA_CorporateClientsDAL.cs |   72 ++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_CorporateClientsDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_CorporateClientsDAL.cs
index 50d5f9f..cc7171c 100644
--- a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_CorporateClientsDAL.cs
+++ b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_CorporateClientsDAL.cs
@@ -1505,5 +1505,77 @@
             }
         }
 
+
+        /// <summary>
+        /// 鏂板
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        public bool Insertattachment(OA_attachment model)
+        {
+            Model.OA_attachment trueModel = model as Model.OA_attachment;
+            if (trueModel == null)
+            {
+                return false;
+            }
+
+
+            IList<SqlParameter> sqlParms = new List<SqlParameter>()
+            {
+                   new SqlParameter("@OA_Id",trueModel.OA_Id),
+                   new SqlParameter("@CreateTime",trueModel.CreateTime),
+                   new SqlParameter("@PlanAttachment",trueModel.PlanAttachment),
+                   new SqlParameter("@AttachmentType",trueModel.AttachmentType),
+                   new SqlParameter("@Operator",string.IsNullOrWhiteSpace(trueModel.Operator)?"":trueModel.Operator),
+                    new SqlParameter("@AttachmentHouzhui",string.IsNullOrWhiteSpace(trueModel.AttachmentHouzhui)?"":trueModel.AttachmentHouzhui),
+                     new SqlParameter("@AttachmentName",string.IsNullOrWhiteSpace(trueModel.AttachmentName)?"":trueModel.AttachmentName ),
+
+
+            };
+            string sql = "Insert Into OA_attachment ( [OA_Id] , [PlanAttachment],[AttachmentType],[CreateTime],[Operator],[AttachmentHouzhui],[AttachmentName] )"
+                                             + " Values (  @OA_Id,  @PlanAttachment,@AttachmentType,@CreateTime,@Operator,@AttachmentHouzhui,@AttachmentName  )";
+            try
+            {
+                _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>());
+            }
+            catch (Exception ex)
+            {
+                throw ex;
+            }
+            return true;
+        }
+
+
+        /// <summary>
+        /// 鏍规嵁鍘傚晢缂栧彿鏌ヨ鍏ㄩ儴澶栧崗鍘傚晢
+        /// </summary>
+        /// <param name="MemberId">缂栧彿</param>
+        /// <returns></returns>
+        public IEnumerable<OA_attachment> GetattachmentlList(string OA_Id)
+        {
+            if (OA_Id == null)
+                return null;//閿欒鏁版嵁杩斾細绌� 
+
+            IList<OA_attachment> result = _dataBase.SelectModel<OA_attachment>("*", "OA_attachment", string.Format(" OA_Id='{0}'   ORDER BY CreateTime DESC", OA_Id)) as IList<OA_attachment>;//鎵ц鏌ヨ
+
+            return result;//杩斿洖缁撴灉
+        }
+
+
+        /// <summary>
+        /// 鍗曚釜鏌ヨ璁块棶
+        /// </summary>
+        /// <param name="Keyid">缂栧彿</param>
+        /// <returns></returns>
+        public OA_CorporateClientsVisit SelectVisitByKeyid(Guid Keyid)
+        {
+            if (Keyid == null)
+                return null;//閿欒鏁版嵁杩斾細绌� 
+
+            IList<OA_CorporateClientsVisit> result = _dataBase.SelectModel<OA_CorporateClientsVisit>(" a.* ", " OA_CorporateClientsVisit a ", string.Format(" a.Keyid='{0}'", Keyid)) as IList<OA_CorporateClientsVisit>;//鎵ц鏌ヨ
+
+            return (null == result || result.Count == 0) ? null : result[0];//杩斿洖缁撴灉
+        }
+
     }
 }

--
Gitblit v1.9.1