From 120215455f4fb2e5a1447f3ecda87f36aca1f38f Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 27 二月 2026 08:54:22 +0800
Subject: [PATCH] 1)有到期时间的,到期前3个月变成红色(像人事管理那样);没有到期时间的,从建档时间起算,9个月后变成红色。完成 (2)建档后1个月没有下单,变成血红色。 完成 (3)列表中删除“完结状态”;操作中删除“订单关联” 完成 (4)在“应收款订单”后面增加“未收款金额” 、“逾期收款”完成
---
CY_ECommercePlatform/CY.SQLDAL/OA/OA_WorkPlanDAL.cs | 66 ++++++++++++++++++++++++++++++++-
1 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_WorkPlanDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_WorkPlanDAL.cs
index 9efec7b..9cc3137 100644
--- a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_WorkPlanDAL.cs
+++ b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_WorkPlanDAL.cs
@@ -275,6 +275,41 @@
}
}
+
+ /// <summary>
+ /// 鏍规嵁缂栧彿鑾峰緱淇℃伅
+ /// </summary>
+ /// <param name="Keyid">缂栧彿</param>
+ /// <returns></returns>
+ public OA_WorkPlan GetModelByFukuanshenqid(string PlanComplany, string RewardType)
+ {
+ try
+ {
+ string condi = "";
+ if (!string.IsNullOrEmpty(PlanComplany))
+ {
+ condi = " a.PlanComplany = '"+ PlanComplany + "' ";
+ }
+ else if (!string.IsNullOrEmpty(RewardType))
+ {
+ condi = " a.RewardType = '" + RewardType + "' ";
+ }
+ else
+ {
+ return null;
+ }
+
+ IList<OA_WorkPlan> result = _dataBase.SelectModel<OA_WorkPlan>(" a.* ", " OA_WorkPlan a ", condi) as IList<OA_WorkPlan>;//鎵ц鏌ヨ
+
+ return (null == result || result.Count == 0) ? null : result[0];//杩斿洖缁撴灉
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+ }
+
+
/// <summary>
/// 鍒嗛〉鏌ヨ
/// </summary>
@@ -294,13 +329,23 @@
/// <param name="EvaluationStatus"></param>
/// <param name="RewardType"></param>
/// <returns></returns>
- public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null)
+ public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null, string BaocunStatus = null, Guid? TrueMemberId = null)
{
try
{
string condition = " 1=1 ";
if (MemberId != Guid.Empty)
condition += " and a.MemberId = '" + MemberId + "'";
+
+
+ if (TrueMemberId.HasValue)
+ {
+ if(TrueMemberId!=Guid.Parse("764152EE-1184-44DF-A8B2-316FAFF0D3E4") && TrueMemberId != Guid.Parse("FAAF2DCA-4739-409F-BF5A-6AABDE57AC12") && TrueMemberId != Guid.Parse("AE770137-A3F2-4C73-A4A8-9F1CC2AB5B81") && TrueMemberId != Guid.Parse("88B49967-D590-452C-93C6-0049A75FA5FF"))
+ {
+ condition += " and a.PlanDataType != 20 ";
+ }
+
+ }
if (SentStaffId != Guid.Empty)
condition += " and a.SentStaffId = '" + SentStaffId + "'";
@@ -338,10 +383,17 @@
if (ApprovalStatus >= 0)
{
if (ApprovalStatus == 1)
- condition += " and ( a.ApprovalStatus = '1' or a.ApprovalStatus = '3' )";
+ condition += " and (( a.PlanDataType = 17 and a.ApprovalStatus = '1' ) or ( a.PlanDataType != 17 and (a.ApprovalStatus = '3' or a.ApprovalStatus = '1') ))";
else
condition += " and a.ApprovalStatus = '" + ApprovalStatus + "'";
}
+ if (!string.IsNullOrEmpty(BaocunStatus))
+ {
+ condition += " and a.ApprovalStatus != '" + BaocunStatus + "'";
+ }
+
+
+
if (EvaluationStatus >= 0)
{
if (EvaluationStatus == 5)
@@ -373,6 +425,16 @@
if (EndPlanStartTime.HasValue)
condition += string.Format(" and CAST(a.PlanStartTime AS DATE) <='{0}'", EndPlanStartTime);
+
+ decimal heji1 = 0;
+ var ssss = _dataBase.SelectModel<Model.OA_WorkPlan>(" sum(a.[PlanMoney]) as PlanMoney ", " OA_WorkPlan AS a ", condition);
+ if (ssss.Count > 0)
+ {
+ var aaaaa = ssss.First();
+ heji1 += (aaaaa.PlanMoney.HasValue ? aaaaa.PlanMoney.Value : 0);
+ }
+ pagination.heji1 = heji1;
+
return _dataBase.SelectModelPage<Model.OA_WorkPlan>(pagination, " a.*,b.Name as SentStaffName,c.Name as ReciveStaffName,d.Name as ApprovalStaffName,e.Name as EvaluationStaff,f.Name as PlanDataTypeName ", " OA_WorkPlan AS a LEFT JOIN dbo.EC_MemberBasic AS b ON a.SentStaffId = b.MemberId LEFT JOIN dbo.EC_MemberBasic AS c ON a.ReciveStaffId = c.MemberId LEFT JOIN dbo.EC_MemberBasic AS d ON a.ApprovalStaffId = d.MemberId LEFT JOIN dbo.EC_MemberBasic AS e ON a.EvaluationStaffId = e.MemberId LEFT JOIN dbo.Sys_Dictionary AS f ON a.PlanDataType = f.MeanValue AND f.DicType='宸ヤ綔璁″垝鎬ц川' ", " a.PlanStartTime desc", " PlanStartTime desc ", condition);
}
catch (Exception ex)
--
Gitblit v1.9.1