From a7e05ebe00fdcb649c012e5afc4a42a8d631e824 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 02 四月 2025 08:38:24 +0800
Subject: [PATCH] 删除客户管理查询条件中的“客户编号” 完成  新增订单---黑白印件  的后道工序最右边增加一个“口 竖式”,同前面套号、压痕一样,默认不勾选,是竖式的业务经理自己下单时勾选  完成提交外协付款申请时,增加上传审批证明的上传图片功能,可以添加多张图片;查询列表中增加“付款状态:全部、已付款、未付款”查询条件,默认全部;“完工状态”改为默认未完工   完成请示批复----付款申请  中也要向上面的需求一样,增加上传审批证明的上传图片功能,可以添加多张图片   完成在“请示批复”中进行“批复”操作的时候要能查看上传的审批图片  完成包装要求”要显示在打印的订单中 完成包装要求”要显示在打印的订单中 完成收据联单的新增订单中,纸张选无碳纸时,不显示“品牌”、“克重”,在联数的后面增加颜色选择:“颜色:上白下红”(匹配联数)订单管理中的“订单状态”删除,删除后新增两个状态:“完工状态:全部、未完工、已完工”和“送货状态:全部、已送货、未送货”  完成请示批复中默认“未批复”   完成请示批复中默认“未批复”   完成

---
 CY_ECommercePlatform/CY.BLL/OA/OA_CorporateClientsBLL.cs |  147 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 144 insertions(+), 3 deletions(-)

diff --git a/CY_ECommercePlatform/CY.BLL/OA/OA_CorporateClientsBLL.cs b/CY_ECommercePlatform/CY.BLL/OA/OA_CorporateClientsBLL.cs
index f9d15c8..8231c31 100644
--- a/CY_ECommercePlatform/CY.BLL/OA/OA_CorporateClientsBLL.cs
+++ b/CY_ECommercePlatform/CY.BLL/OA/OA_CorporateClientsBLL.cs
@@ -139,17 +139,32 @@
         }
 
         /// <summary>
-        /// 鏌ヨ鍚堜綔瀹㈡埛鍒嗛〉鍒楄〃
+        /// 鏌ヨ鍚堜綔瀹㈡埛鍒嗛〉鍒楄〃  鎵�鏈夐潪蹇呰鍙傛暟璁剧疆榛樿鍊�
+        /// //寤� 鏂板鍔犳槸鍚﹂渶瑕佷緥琛岀淮鎶わ紝鏄惁闇�瑕佽妭鍋囨棩缁存姢涓や釜瀛楁鏌ヨ  20210913
         /// </summary>
         /// <param name="pa"></param>
         /// <returns></returns>
-        public IEnumerable<OA_CorporateClients> GetModelPageList(Pagination pa, Guid FirmId, string UserName, DateTime? beginTime,
-DateTime? endTime, string AccountManagerId, string BusinessManagerId, string CustomerIndustriesId, string CustomerTypeId, string DegreeImportanId,string LastOrderTime, string selOrderCount, string selOrderMoney, string SourcesInfoId, string TurnoverIntentionId, string OrderCount, string OrderMoney, string UserNum, string selLastOrderTime, string Province, string City, string County, bool IsStaff, Guid StaffMemberId,int? StaffId,string Shifouwanjie=null)
+        public IEnumerable<OA_CorporateClients> GetModelPageListEx(Pagination pa, Guid FirmId, string UserName = "", DateTime? beginTime = null,
+DateTime? endTime = null, string AccountManagerId = "", string BusinessManagerId = "", string CustomerIndustriesId = "", string CustomerTypeId = "", string DegreeImportanId = "", string LastOrderTime = "", string selOrderCount = "", string selOrderMoney = "", string SourcesInfoId = "", string TurnoverIntentionId = "",
+string OrderCount = "", string OrderMoney = "", string UserNum = "", string selLastOrderTime = "", string Province = "", string City = "", string County = "", bool IsStaff = true, Guid? StaffMemberId = null, int? StaffId = null, string Shifouwanjie = null,
+bool? NeedWeifu = null, bool? NeedJiejiaRiWeiFu = null)
         {
             string Condition = " and a.FirmId ='" + FirmId + "'";
 
             if (!string.IsNullOrEmpty(UserNum))
                 Condition += " and  CustomerId = " + UserNum;
+
+            //寤� 鏂板鍔犳槸鍚﹂渶瑕佷緥琛岀淮鎶わ紝鏄惁闇�瑕佽妭鍋囨棩缁存姢涓や釜瀛楁鏌ヨ 20210913
+            if (NeedWeifu != null)
+
+                Condition += string.Format(" and NeedWiHu='{0}'", NeedWeifu);
+
+            if (NeedJiejiaRiWeiFu != null)
+
+                Condition += string.Format(" and JieJiaRiWiHu='{0}'", NeedJiejiaRiWeiFu);
+
+
+
 
             if (!string.IsNullOrEmpty(UserName))
                 Condition += " and  CompanyName like '%" + UserName + "%'";
@@ -220,6 +235,125 @@
             IList<Criterion> criterias = new List<Criterion>()
             {
                 new Criterion("", Condition),
+
+                new Criterion("orderBy"," CustomerId DESC ")
+            };
+            query.Criteria = criterias;
+            return _IOA_CorporateClientsDal.SelectModelPage(query, pa);
+        }
+
+
+        /// <summary>
+        /// 鏌ヨ鍚堜綔瀹㈡埛鍒嗛〉鍒楄〃
+        /// //寤� 鏂板鍔犳槸鍚﹂渶瑕佷緥琛岀淮鎶わ紝鏄惁闇�瑕佽妭鍋囨棩缁存姢涓や釜瀛楁鏌ヨ  20210913
+        /// </summary>
+        /// <param name="pa"></param>
+        /// <returns></returns>
+        public IEnumerable<OA_CorporateClients> GetModelPageList(Pagination pa, Guid FirmId, string UserName, DateTime? beginTime,
+DateTime? endTime, string AccountManagerId, string BusinessManagerId, string CustomerIndustriesId, string CustomerTypeId, string DegreeImportanId,string LastOrderTime, string selOrderCount, string selOrderMoney, string SourcesInfoId, string TurnoverIntentionId,
+string OrderCount, string OrderMoney, string UserNum, string selLastOrderTime, string Province, string City, string County, bool IsStaff, Guid StaffMemberId,int? StaffId,string Shifouwanjie=null,
+bool? NeedWeifu=null,bool?NeedJiejiaRiWeiFu=null, string selHetongshangchuan = null)
+        {
+            string Condition = " and a.FirmId ='" + FirmId + "'";
+
+            if (!string.IsNullOrEmpty(UserNum))
+                Condition += " and  CustomerId = " + UserNum;
+
+            //寤� 鏂板鍔犳槸鍚﹂渶瑕佷緥琛岀淮鎶わ紝鏄惁闇�瑕佽妭鍋囨棩缁存姢涓や釜瀛楁鏌ヨ 20210913
+            if (NeedWeifu!=null)
+               
+            Condition += string.Format(" and NeedWiHu='{0}'", NeedWeifu);
+
+            if (NeedJiejiaRiWeiFu != null)
+
+                Condition += string.Format(" and JieJiaRiWiHu='{0}'", NeedJiejiaRiWeiFu);
+
+
+
+
+            if (!string.IsNullOrEmpty(UserName))
+                Condition += " and  CompanyName like '%" + UserName + "%'";
+
+            if (beginTime.HasValue)
+                Condition += string.Format(" and CAST(CreateTime AS DATE) >='{0}'", beginTime);
+
+            if (endTime.HasValue)
+                Condition += string.Format(" and CAST(CreateTime AS DATE) <='{0}'", endTime);
+
+            if (!string.IsNullOrEmpty(SourcesInfoId))
+                Condition += string.Format(" and SourcesInfoId='{0}'", SourcesInfoId);
+
+            if (!string.IsNullOrEmpty(CustomerIndustriesId))
+                Condition += string.Format(" and CustomerIndustriesId='{0}'", CustomerIndustriesId);
+
+            if (!string.IsNullOrEmpty(AccountManagerId))
+                Condition += string.Format(" and AccountManagerId='{0}'", AccountManagerId);
+
+            if (!string.IsNullOrEmpty(Shifouwanjie))
+                Condition += string.Format(" and Shifouwanjie='{0}'", Shifouwanjie);
+
+            if (!string.IsNullOrEmpty(BusinessManagerId))
+                Condition += string.Format(" and BusinessManagerId='{0}'", BusinessManagerId);
+
+            if (!string.IsNullOrEmpty(CustomerTypeId))
+                Condition += string.Format(" and CustomerTypeId='{0}'", CustomerTypeId);
+
+            if (!string.IsNullOrEmpty(TurnoverIntentionId))
+                Condition += string.Format(" and CreditId='{0}'", TurnoverIntentionId);
+
+            if (!string.IsNullOrEmpty(DegreeImportanId))
+                Condition += string.Format(" and DegreeImportanId='{0}'", DegreeImportanId);
+
+            if (!string.IsNullOrEmpty(selOrderCount) && !string.IsNullOrEmpty(OrderCount))
+                Condition += string.Format(" and OrderCount{0}'{1}'", selOrderCount, OrderCount);
+
+            if (!string.IsNullOrEmpty(selOrderMoney) && !string.IsNullOrEmpty(OrderMoney))
+                Condition += string.Format(" and OrderMoney{0}'{1}'", selOrderMoney, OrderMoney);
+
+            if (!string.IsNullOrEmpty(selHetongshangchuan))
+            {
+                if (selHetongshangchuan == "1")
+                {
+                    Condition += string.Format(" and a.Keyid in   ( select  CorporateClientsid  from [dbo].[OA_CorporateClientContract]  ) ");
+                }
+                else
+                {
+                    Condition += string.Format(" and a.Keyid not in   ( select  CorporateClientsid  from [dbo].[OA_CorporateClientContract]   ) ");
+                }
+            }
+               
+            
+
+            if (!string.IsNullOrEmpty(selLastOrderTime) && !string.IsNullOrEmpty(LastOrderTime))
+                Condition += string.Format(" and CAST(LastOrderTime AS DATE) {0} CAST(getdate()-{1} AS date)", LastOrderTime, selLastOrderTime);
+
+            if (IsStaff)
+            {
+                if (!string.IsNullOrEmpty(Province) && !string.IsNullOrEmpty(City) && !string.IsNullOrEmpty(County))
+                    Condition += string.Format(" and Province='{0}' and City='{1}' and County='{2}'", Province, City, County);
+                else if (!string.IsNullOrEmpty(Province) && !string.IsNullOrEmpty(City))
+                    Condition += string.Format(" and Province='{0}' and City='{1}' and (( ((SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=County AND CityId = (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=City )) IN  (SELECT value FROM dbo.SplitString(CAST((SELECT ISNULL(ManageCountry,'') FROM dbo.OA_Staff WHERE MemberId='{2}') AS VARCHAR(MAX)),',',1)) OR (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=County AND CityId = (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=City )) IN  (SELECT value FROM dbo.SplitString(CAST((SELECT ISNULL(ManageCountry1,'') FROM dbo.OA_Staff WHERE MemberId='{2}') AS VARCHAR(MAX)),',',1))) ) or AccountManagerId='{3}' or BusinessManagerId='{3}' )", Province, City, StaffMemberId, StaffId);
+                else if (!string.IsNullOrEmpty(Province))
+                    Condition += string.Format(" and Province='{0}'  and ((  City IN (SELECT Name FROM dbo.Sys_CitySite WHERE Keyid IN (SELECT value FROM dbo.SplitString(CAST((SELECT ManageCity FROM dbo.OA_Staff WHERE MemberId='{1}') AS VARCHAR(MAX)),',',1)))  and ((SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=County AND CityId = (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=City )) IN  (SELECT value FROM dbo.SplitString(CAST((SELECT ISNULL(ManageCountry,'') FROM dbo.OA_Staff WHERE MemberId='{0}') AS VARCHAR(MAX)),',',1)) OR (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=County AND CityId = (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=City )) IN  (SELECT value FROM dbo.SplitString(CAST((SELECT ISNULL(ManageCountry1,'') FROM dbo.OA_Staff WHERE MemberId='{1}') AS VARCHAR(MAX)),',',1))) ) or AccountManagerId='{2}' or BusinessManagerId='{2}' )", Province, StaffMemberId, StaffId);
+                else
+                    Condition += string.Format(" and (( Province IN (SELECT Name FROM dbo.Sys_CitySite WHERE Keyid IN (SELECT value FROM dbo.SplitString(CAST((SELECT ManageProvince FROM dbo.OA_Staff WHERE MemberId='{0}') AS VARCHAR(MAX)),',',1))) and City IN (SELECT Name FROM dbo.Sys_CitySite WHERE Keyid IN (SELECT value FROM dbo.SplitString(CAST((SELECT ManageCity FROM dbo.OA_Staff WHERE MemberId='{0}') AS VARCHAR(MAX)),',',1)))  and ((SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=County AND CityId = (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=City )) IN  (SELECT value FROM dbo.SplitString(CAST((SELECT ISNULL(ManageCountry,'') FROM dbo.OA_Staff WHERE MemberId='{0}') AS VARCHAR(MAX)),',',1)) OR (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=County AND CityId = (SELECT TOP(1) Keyid FROM dbo.Sys_CitySite WHERE Name=City )) IN  (SELECT value FROM dbo.SplitString(CAST((SELECT ISNULL(ManageCountry1,'') FROM dbo.OA_Staff WHERE MemberId='{0}') AS VARCHAR(MAX)),',',1))) ) or AccountManagerId='{1}' or BusinessManagerId='{1}' ) ", StaffMemberId, StaffId);
+            }
+            else
+            {
+                if (!string.IsNullOrEmpty(Province))
+                    Condition += string.Format(" and Province='{0}'", Province);
+
+                if (!string.IsNullOrEmpty(City))
+                    Condition += string.Format(" and City='{0}'", City);
+
+                if (!string.IsNullOrEmpty(County))
+                    Condition += string.Format(" and County='{0}'", County);
+            }
+
+            Query query = new Query();
+            IList<Criterion> criterias = new List<Criterion>()
+            {
+                new Criterion("", Condition),
                
                 new Criterion("orderBy"," CustomerId DESC ")
             };
@@ -227,6 +361,13 @@
             return _IOA_CorporateClientsDal.SelectModelPage(query, pa);
         }
 
+        
+
+
+
+
+
+
         /// <summary>
         /// 鏌ヨ瀹㈡埛棰勪粯娆惧垪琛�
         /// </summary>

--
Gitblit v1.9.1