From 57556b16aafbafebc7f9fc86745ac2ea83e7616d Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 01 七月 2021 14:26:35 +0800
Subject: [PATCH] 流程  请假  销假  待办 已办  我得申请

---
 zhengcaioa/Services/WfNeeddeelService.cs |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/zhengcaioa/Services/WfNeeddeelService.cs b/zhengcaioa/Services/WfNeeddeelService.cs
index 7b01ff3..ee0563f 100644
--- a/zhengcaioa/Services/WfNeeddeelService.cs
+++ b/zhengcaioa/Services/WfNeeddeelService.cs
@@ -2,6 +2,7 @@
 using DTO;
 using DTO.Models;
 using IServices;
+using Microsoft.EntityFrameworkCore;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -117,7 +118,7 @@
                 string[] Applytimes = searchEntity.Applytime.Split("|");
                 DateTime.TryParse(Applytimes[0], out Applytimestart);
                 DateTime.TryParse(Applytimes[1], out Applytimeend);
-                //Applytimeend = Applytimeend.AddDays(1);
+                Applytimeend = Applytimeend.AddDays(1);
             }
 
             ///WfNeeddeels
@@ -141,7 +142,7 @@
                          from fff in fsssss.DefaultIfEmpty()
 
                          join d in _context.WfApplytypes
-                       on k.Applytiye equals d.Id
+                       on k.Applytiye equals d.Applyno
 
                          join b in _context.PltUsers 
                         on k.Creater equals b.Id
@@ -160,7 +161,7 @@
                                && (string.IsNullOrWhiteSpace(searchEntity.RunProcessId) || a.RunProcessId == searchEntity.RunProcessId.Trim())
 
                                 && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || k.Applyno == searchEntity.Applyno.Trim())
-
+                                  && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.DeelUserId == searchEntity.Creater.Trim())
 
                          select new WfNeeddeelDTO
                          {
@@ -192,10 +193,10 @@
                              NeeddeelTypeName = fff.Comments,
                              Contentyijian = a.Content,
                              Sort = a.Sort,
-
+                             Deelurl = a.Deelurl,
                              Creater = a.Creater,
                              Createtime = a.Createtime,
-
+                             Step = a.Step,
                              RecStatus = a.RecStatus,
                              Modifier = a.Modifier,
                              Modifytime = a.Modifytime,
@@ -236,12 +237,37 @@
         /// 鑾峰彇鎵�鏈夋湁鏁堟祦绋嬬被鍨�
         /// </summary>
         /// <returns></returns>
-        public List<WfNeeddeelDTO> GetList()
+        public List<WfNeeddeelDTO> GetList(string RunProcessId = "", string step = "")
+        {
+
+
+            var listRole = _context.WfNeeddeels.AsNoTracking().Where(r => r.RecStatus == "A").ToList();
+
+            if (!string.IsNullOrEmpty(RunProcessId) && !string.IsNullOrEmpty(step))
+            {
+                listRole = listRole.Where(x => x.RunProcessId == RunProcessId && x.Step == step).ToList();
+            }
+
+            var list = _mapper.Map<List<WfNeeddeelDTO>>(listRole);
+            return list;
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈夋湁鏁堟祦绋嬬被鍨�
+        /// </summary>
+        /// <returns></returns>
+        public List<WfNeeddeelDTO> GetListTracking(string RunProcessId = "", string step = "")
         {
 
 
             var listRole = _context.WfNeeddeels.Where(r => r.RecStatus == "A").ToList();
 
+            if (!string.IsNullOrEmpty(RunProcessId) && !string.IsNullOrEmpty(step))
+            {
+                listRole = listRole.Where(x => x.RunProcessId == RunProcessId && x.Step == step).ToList();
+            }
+
             var list = _mapper.Map<List<WfNeeddeelDTO>>(listRole);
             return list;
         }

--
Gitblit v1.9.1