Explorar el Código

添加专案处理模块

luocaiyang hace 3 años
padre
commit
c51a28f709

+ 77 - 36
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -1049,65 +1049,71 @@ namespace wispro.sp.api.Controllers
             return response;
         }
 
-        public ApiSaveResponse AddProjectPerformance(ProjectPointRecord pointRecord)
+        public ApiSaveResponse AddProjectContents(ProjectContents projectContents)
         {
             ApiSaveResponse retResponse = new ApiSaveResponse();
             retResponse.Success = true;
 
-            if (pointRecord != null && pointRecord.ProjectDoItemPoints != null && pointRecord.ProjectDoItemPoints.Count > 0)
+            if (projectContents != null && projectContents.ProjectWorkContents != null && projectContents.ProjectWorkContents.Count > 0)
             {
                 using (var t = Context.Database.BeginTransaction())
                 {
                     try
                     {
-                        CalMonth calMonth = Context.CalMonths.FirstOrDefault<CalMonth>(c=>c.Status ==0);
-                        if(calMonth == null)
+                        CalMonth calMonth = Context.CalMonths.FirstOrDefault<CalMonth>(c => c.Status == 0);
+
+                        if (calMonth == null)
                         {
                             retResponse.Success = false;
                             retResponse.ErrorMessage = "不存在正在处理的绩效月度!";
                             return retResponse;
                         }
+                        else
+                        {
+                            projectContents.ProjectContentRecord.CalMonthId = calMonth.Id;
+                            projectContents.ProjectContentRecord.CalMonth = null;
+
+                            var staff = Context.Staffs.FirstOrDefault(s=>s.Name == User.Identity.Name);
+
+                            projectContents.ProjectContentRecord.StaffId = staff.Id;
+                            projectContents.ProjectContentRecord.State = 0;
+                        }
+
+                        var project = Context.ProjectInfos.FirstOrDefault(p => p.CaseNo == projectContents.ProjectContentRecord.ProjectNo && p.CaseState ==0);
 
-                        foreach (var doItem in pointRecord.ProjectDoItemPoints)
+                        if (project != null)
                         {
-                            PerformanceItem item = new PerformanceItem();
-                            item.CaseNo = pointRecord.CaseNo;
-                            item.CaseName = pointRecord.CaseName;
-                            item.CaseMemo = pointRecord.Reason;
-                            item.DoItem = doItem.DoItem;
-                            item.CaseCoefficient = doItem.DoItemCoefficient;
-                            item.Type = "专案";
-                            item.CalMonthId = calMonth.Id;
-                            Context.PerformanceItems.Add(item);
-                            Context.SaveChanges();
+                            var pRecord = Context.ProjectContentRecords.FirstOrDefault(p=>p.ProjectNo == projectContents.ProjectContentRecord.ProjectNo
+                                && p.StaffId == projectContents.ProjectContentRecord.StaffId
+                                && p.CalMonthId == projectContents.ProjectContentRecord.CalMonthId);
 
-                            item.ItemStaffs = new List<ItemStaff>();
 
-                            foreach (var p in doItem.PersonPoints)
+                            if(pRecord != null)
                             {
-                                ItemStaff itemStaff = new ItemStaff();
-                                itemStaff.PerformancePoint = p.Point;
+                                retResponse.Success = false;
+                                retResponse.ErrorMessage = $"您已提交专案【{projectContents.ProjectContentRecord.ProjectNo}】{pRecord.CalMonth.Year}年{pRecord.CalMonth.Month}月的工作内容!";
+                                return retResponse;
+                            }
 
-                                var staff = Context.Staffs.FirstOrDefault<Staff>(s => s.Name == p.Person);
-                                if (staff != null)
-                                {
-                                    itemStaff.DoPersonId = staff.Id;
-                                    itemStaff.ItemId = item.Id;
-                                    Context.ItemStaffs.Add(itemStaff);
-                                    Context.SaveChanges();
-                                }
-                                else
-                                {
-                                    retResponse.Success = false;
-                                    retResponse.ErrorMessage = $"用户【{p.Person}】不存在!";
-                                    t.Rollback();
-                                    return retResponse;
-                                }
+                            Context.ProjectContentRecords.Add(projectContents.ProjectContentRecord);
+
+                            foreach (var doItem in projectContents.ProjectWorkContents)
+                            {
+                                doItem.ContentRecordId = projectContents.ProjectContentRecord.Id;
+                                Context.ProjectWorkContents.Add(doItem);
                             }
+
+                            t.Commit();
+                        }
+                        else
+                        {
+                            retResponse.Success = false;
+                            retResponse.ErrorMessage = "专案不存在或专案已完成!";
+                            return retResponse;
                         }
-                        t.Commit();
+                        
                     }
-                    catch(Exception ex)
+                    catch (Exception ex)
                     {
                         retResponse.Success = false;
                         retResponse.ErrorMessage = ex.Message;
@@ -1157,5 +1163,40 @@ namespace wispro.sp.api.Controllers
 
             return retObj;
         }
+
+        public bool MovePerformance2ProjectInfo()
+        {
+            var response = Context.PerformanceItems.Include(p=>p.ItemStaffs)
+                .Where<PerformanceItem>(p => p.CaseNo.StartsWith("S") && p.CalMonth.Status == 0);
+
+            
+            var pList = response.ToList<PerformanceItem>();
+
+            foreach(var p in pList)
+            {
+                ProjectInfo project = new ProjectInfo();
+                project.CaseNo = p.CaseNo;
+                project.CaseName = p.CaseName;
+                project.CaseState = 0;
+                project.CaseType = p.CaseType;
+                project.CustomerId = p.CustomerId;
+                project.ReviewerId = p.ReviewerId;
+
+                Context.ProjectInfos.Add(project);
+
+                
+                foreach(ItemStaff iStaff in p.ItemStaffs)
+                {
+                    Context.ItemStaffs.Remove(iStaff);
+                }
+
+                Context.PerformanceItems.Remove(p);
+
+                Context.SaveChanges();
+                
+            }
+
+            return true;
+        }
     }
 }

+ 123 - 0
wispro.sp.api/Controllers/ProjectController.cs

@@ -0,0 +1,123 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+using wispro.sp.share;
+
+namespace wispro.sp.api.Controllers
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    public class ProjectController : ControllerBase
+    {
+        spDbContext Context;
+        
+        public ProjectController(spDbContext context)
+        {
+            Context = context;
+            
+
+        }
+        public List<ProjectInfo> GetProjects(int state)
+        {
+            return Context.ProjectInfos
+                .Include(p => p.Customer)
+                .Include(p=>p.Reviewer)
+                .Include(p => p.WorkflowUser)
+                .Where(s => s.CaseState == state).ToList();
+        }
+
+        public List<ProjectInfo> GetAll()
+        {
+            var retList = Context.ProjectInfos
+                .Include(p => p.Customer)
+                .Include(p => p.Reviewer)
+                .Include(p => p.WorkflowUser)
+                .ToList();
+
+            return retList;
+        }
+
+        
+
+        public bool SetFinished(string caseNo)
+        {
+            var obj = Context.ProjectInfos.FirstOrDefault(s=>s.CaseNo == caseNo );
+
+            if(obj != null)
+            {
+                try
+                {
+                    obj.CaseState = 4;
+                    Context.SaveChanges();
+                    return true;
+                }
+                catch(Exception ex)
+                {
+                    return false;
+                }
+            }
+            else
+            {
+                return false;
+            }
+        }
+
+        public List<ProjectContentRecord> GetMyProjects()
+        {
+            return Context.ProjectContentRecords
+                .Include(p=>p.CalMonth)
+                .Include(p => p.Reviewer)
+                .Include(p => p.Project)
+                .Include(p=>p.ProjectWorkContents)
+                .Where(p => p.Staff.Name == User.Identity.Name).ToList();
+        }
+
+        public ProjectContents getProjectWorkContent(int Id)
+        {
+            var retObj = Context.ProjectContentRecords
+                .Include(p => p.CalMonth)
+                .Include(p => p.Reviewer)
+                .Include(p => p.Project)
+                .Include(p => p.ProjectWorkContents)
+                .FirstOrDefault(p=>p.Id == Id);
+
+            if(retObj != null)
+            {
+                ProjectContents ret = new ProjectContents();
+
+                ret.ProjectContentRecord = retObj;
+
+                ret.ProjectWorkContents = new List<ViewProjectWorkContent>();
+                foreach(var wContent in retObj.ProjectWorkContents)
+                {
+                    ViewProjectWorkContent tem = new ViewProjectWorkContent();
+                    tem.modifyState = ModifyState.UnChanged;
+                    tem.Content = wContent.Content;
+                    tem.ActualPerformance = wContent.ActualPerformance;
+                    tem.ContentRecordId = wContent.ContentRecordId;
+                    tem.FinalPerformance  = wContent.FinalPerformance;
+                    tem.TakeTime = wContent.TakeTime;
+                    tem.TimeSpan = wContent.TimeSpan;
+                    tem.WorkDate = wContent.WorkDate;
+
+                    ret.ProjectWorkContents.Add(tem);
+                }
+
+                return ret;
+            }
+
+            return null;
+
+        }
+
+        public ApiSaveResponse SaveProjectWorkContent(ProjectContents saveObj)
+        {
+            return null;
+        }
+    }
+}

+ 83 - 4
wispro.sp.api/spDbContext.cs

@@ -78,7 +78,14 @@ namespace wispro.sp.api
         public virtual DbSet<InputValue> InputValues { get; set; }
 
         public virtual DbSet<StepInstance> StepInstances { get; set; }
-        
+
+        #endregion
+
+        #region 专案数据库
+        public virtual DbSet<ProjectInfo> ProjectInfos { get; set; }
+
+        public virtual DbSet<ProjectContentRecord> ProjectContentRecords { get; set; }
+        public virtual DbSet<ProjectWorkContent> ProjectWorkContents { get; set; }
         #endregion
 
         public virtual DbSet<DepartmentPosition> DepartmentPositions { get; set; }
@@ -167,7 +174,7 @@ namespace wispro.sp.api
             {
                 entity.ToTable("PerformanceItem");
 
-                entity.Property(e => e.ApplicationName).HasMaxLength(200);
+                entity.Property(e => e.ApplicationName).HasMaxLength(500);
 
                 entity.Property(e => e.ApplicationType).HasMaxLength(50);
 
@@ -205,7 +212,7 @@ namespace wispro.sp.api
 
                 entity.Property(e => e.InternalDate).HasColumnType("date");
 
-                entity.Property(e => e.OverDueMemo).HasMaxLength(100);
+                entity.Property(e => e.OverDueMemo).HasMaxLength(2000);
 
                 entity.Property(e => e.PreOastaffId).HasColumnName("PreOAStaffId");
 
@@ -227,12 +234,83 @@ namespace wispro.sp.api
                     .HasForeignKey(d => d.ReviewerId)
                     .HasConstraintName("FK_PerformanceItem_Reviewer");
 
+                entity.HasOne(d => d.WorkflowUser)
+                    .WithMany()
+                    .HasForeignKey(d => d.WorkflowUserId)
+                    .HasConstraintName("FK_PerformanceItem_WorkflowUser");
+
                 entity.HasOne(d => d.CalMonth)
                     .WithMany(p => p.PerformanceItems)
                     .HasForeignKey(d => d.CalMonthId)
                     .HasConstraintName("FK_PerformanceItem_CalMonth");
             });
 
+            #region 专案
+            modelBuilder.Entity<ProjectInfo>(entity =>
+            {
+                entity.ToTable("ProjectInfo");
+
+                entity.HasKey(entity=>entity.CaseNo);
+
+                entity.HasOne(d => d.Customer)
+                    .WithMany()
+                    .HasForeignKey(d => d.CustomerId)
+                    .HasConstraintName("FK_ProjectInfo_Customer");
+
+                entity.HasOne(d => d.WorkflowUser)
+                    .WithMany()
+                    .HasForeignKey(d => d.WorkflowUserId)
+                    .HasConstraintName("FK_ProjectInfo_Staff");
+
+                entity.HasOne(d => d.Reviewer)
+                    .WithMany()
+                    .HasForeignKey(d => d.ReviewerId)
+                    .HasConstraintName("FK_ProjectInfo_Reviewer");
+
+                
+            });
+
+            modelBuilder.Entity<ProjectContentRecord>(entity =>
+            {
+                entity.ToTable("ProjectContentRecord");
+
+                
+                entity.HasOne(d => d.CalMonth)
+                    .WithMany()
+                    .HasForeignKey(d => d.CalMonthId)
+                    .HasConstraintName("FK_ProjectContentRecord_CalMonth");
+
+                entity.HasOne(d => d.Project)
+                    .WithMany()
+                    .HasForeignKey(d => d.ProjectNo)
+                    .HasConstraintName("FK_ProjectContentRecord_ProjectInfo");
+
+                entity.HasOne(d => d.Staff)
+                    .WithMany()
+                    .HasForeignKey(d => d.StaffId)
+                    .HasConstraintName("FK_Staff_ProjectContentRecord");
+
+                entity.HasOne(d => d.Reviewer)
+                    .WithMany()
+                    .HasForeignKey(d => d.ReviewerId)
+                    .HasConstraintName("FK_Reviewer_ProjectContentRecord");
+
+
+            });
+
+            modelBuilder.Entity<ProjectWorkContent>(entity =>
+            {
+                entity.ToTable("ProjectWorkContent");
+
+                entity.HasOne(d => d.ContentRecord)
+                    .WithMany(d=>d.ProjectWorkContents)
+                    .HasForeignKey(d=>d.ContentRecordId)
+                    .HasConstraintName("FK_ProjectRecord_WorkflowContent");
+
+                
+            });
+            #endregion
+
             modelBuilder.Entity<StaffGrade>(entity =>
             {
                 entity.ToTable("StaffGrade");
@@ -331,7 +409,6 @@ namespace wispro.sp.api
                     .HasConstraintName("FK_From_Staff");
 
             });
-            
 
             modelBuilder.Entity<MessageReadRecord>(entity =>
             {
@@ -788,6 +865,8 @@ namespace wispro.sp.api
 
             #endregion
 
+            
+
             OnModelCreatingPartial(modelBuilder);
         }
 

+ 12 - 17
wispro.sp.share/ProjectPointRecord.cs

@@ -3,33 +3,28 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using wispro.sp.entity;
 
 namespace wispro.sp.share
 {
-    public class ProjectPointRecord
+    public class ProjectContents
     {
-        public string CaseNo { get; set; }
+        public ProjectContentRecord ProjectContentRecord { get; set; }
 
-        public string CaseName { get; set; }
-
-        public string Reason { get; set; }
-
-        public List<ProjectDoItemPoint> ProjectDoItemPoints { get; set; }
+        public List<ViewProjectWorkContent> ProjectWorkContents { get; set; }
     }
 
-    public class ProjectDoItemPoint
+    public class ViewProjectWorkContent : ProjectWorkContent
     {
-        public string DoItem { get; set; }
-        public string DoItemCoefficient { get; set; }
-
-        public List<PersonPoint> PersonPoints { get; set; }
+        public ModifyState modifyState { get; set; }
     }
 
-    public class PersonPoint
+    public enum ModifyState
     {
-        public string Id { get; set; }
-        public string Person { get; set; }
-
-        public double Point { get; set; }
+        UnChanged,
+        Modified,
+        New,
+        Deleted
     }
+    
 }

+ 1 - 1
wispro.sp.web/Components/FlowChart.razor.cs

@@ -131,7 +131,7 @@ namespace wispro.sp.web.Components
         {
             SelectedObject = node.NodeObject;
             flowChartUtility.SelectedShape = node;
-            Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(node.NodeObject));
+            //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(node.NodeObject));
             
             if (node.NodeObject is entity.workflowDefine.Step)
             {

+ 4 - 4
wispro.sp.web/Components/InputValueSetting.razor.cs

@@ -36,8 +36,8 @@ namespace wispro.sp.web.Components
         void AddNew(entity.workflowDefine.InputValueSetting setting)
         {
             JsonSerializerOptions options = new() { IgnoreNullValues = true };
-            Console.WriteLine($"AddNew Begin:{System.Text.Json.JsonSerializer.Serialize(EditAction,options)}");
-            Console.WriteLine($"setting:{System.Text.Json.JsonSerializer.Serialize(setting, options)}");
+            //Console.WriteLine($"AddNew Begin:{System.Text.Json.JsonSerializer.Serialize(EditAction,options)}");
+            //Console.WriteLine($"setting:{System.Text.Json.JsonSerializer.Serialize(setting, options)}");
 
             var newObj = new entity.workflowDefine.InputValueSetting()
             {
@@ -48,8 +48,8 @@ namespace wispro.sp.web.Components
             };
             EditObj = newObj;
 
-            Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(EditObj,options));
-            Console.WriteLine($"newObj:{System.Text.Json.JsonSerializer.Serialize(newObj, options)}");
+            //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(EditObj,options));
+            //Console.WriteLine($"newObj:{System.Text.Json.JsonSerializer.Serialize(newObj, options)}");
 
             if (setting != null)
             {

+ 33 - 3
wispro.sp.web/Layouts/BasicLayout.razor

@@ -57,26 +57,56 @@
         new MenuDataItem
         {
             Name="绩效管理",
-            Key="appManager",
+            Key="PerformanceManager",
             Icon ="line-chart",
             Children= new MenuDataItem[]
             {
                 new MenuDataItem
                 {
                     Name="我的绩效",
-                    Key="appManager",
+                    Key="MyPerformance",
                     Path="/MyCaselist",
                     Icon ="user",
                 },
                 new MenuDataItem
                 {
                     Name="绩效查询",
-                    Key="appManager",
+                    Key="performanceSearch",
                     Path="/CaseManager",
                     Icon ="search",
                 },
             }
         },
+        new MenuDataItem
+        {
+            Name="专案管理",
+            Key="ProjectManager",
+            Icon ="line-chart",
+            Children= new MenuDataItem[]
+            {
+                new MenuDataItem
+                {
+                    Name="我的专案",
+                    Key="myProject",
+                    Path="/Project/MyProjects",
+                    Icon ="user",
+                },
+                new MenuDataItem
+                {
+                    Name="专案工作内容",
+                    Key="ProjectWorkContent",
+                    Path="/Project/WorkContent",
+                    Icon ="search",
+                },
+                new MenuDataItem
+                {
+                    Name="专案查询",
+                    Key="ProjectSearch",
+                    Path="/Project/ProjectSearch",
+                    Icon ="search",
+                },
+            }
+        },
 
         new MenuDataItem
         {

+ 101 - 124
wispro.sp.web/Pages/Project/AssignPoint.razor

@@ -1,4 +1,4 @@
-@page "/Project/AssignPoint"
+@page "/Project/WorkContent/{Id:int?}"
 
 <PageContainer>
     <Breadcrumb>
@@ -7,7 +7,7 @@
                 <a href="/Home"><Icon Type="home"></Icon></a>
             </BreadcrumbItem>
             <BreadcrumbItem>
-                <span>分配项目点数</span>
+                <span>专案工作内容提报</span>
             </BreadcrumbItem>
         </Breadcrumb>
     </Breadcrumb>
@@ -17,77 +17,117 @@
             <Card>
                 <Form Model="task">
                     <FormItem Label="我方文号">
-                        <Input @bind-Value="@context.CaseNo" />
-                        <Button Icon="refresh" @onclick="()=>GetProjectInfo()" Loading="@loading">获取专案信息</Button>
+                        <Select DataSource="@ProjectInfos"
+                                @bind-Value="@task.ProjectContentRecord.ProjectNo"
+                                LabelName="@nameof(wispro.sp.entity.ProjectInfo.CaseNo)"
+                                ValueName="@nameof(wispro.sp.entity.ProjectInfo.CaseNo)"
+                                Style="width: 200px"
+                                Placeholder="请选择"
+                                IgnoreItemChanges="false"
+                                EnableSearch="true"
+                                AllowClear
+                                OnSelectedItemChanged="OnSelectedItemChangedHandler"
+                                OnSearch="OnSearch"
+                                DefaultActiveFirstOption
+                                >
+                        </Select>
                     </FormItem>
-                    <FormItem Label="案件名称">
-                        <Input @bind-Value="@context.CaseName" />
-                    </FormItem>
-                    <FormItem Label="分配说明">
-                        <TextArea @bind-Value="@context.Reason" Rows="4" />
-                    </FormItem>
-                    @if (Item != null)
+
+                    @if (task.ProjectContentRecord.Project != null)
                     {
+                        <FormItem Label="案件名称">
+                            <span>@task.ProjectContentRecord.Project.CaseName</span>
+                        </FormItem>
                         <Collapse DefaultActiveKey="@(new[]{"1"})">
                             <Panel Header="项目详情" Key="1">
-                                <FormItem Label="客户">
-                                    <span>@Item.Customer.Name</span>
+                                <FormItem Label="业务类型">
+                                    <span>@task.ProjectContentRecord.Project.BusinessType</span>
                                 </FormItem>
-                                <FormItem Label="案件状态">
-                                    <span>@Item.CaseState</span>
-                                </FormItem>
-                                <FormItem Label="案件备注">
-                                    <span>@Item.CaseMemo</span>
+                                <FormItem Label="客户">
+                                    <span>@task.ProjectContentRecord.Project.Customer.Name</span>
                                 </FormItem>
                             </Panel>
                         </Collapse>
                     }
                 </Form>
             </Card>
-            <Card>
-                <Button OnClick="AddNew">添加人员绩效</Button>
-                @if (task.ProjectDoItemPoints != null)
-                {
-                <AntDesign.Table TItem="wispro.sp.share.ProjectDoItemPoint"
-                                 DataSource="task.ProjectDoItemPoints"
-                                 Bordered=@true
-                                 Size=@TableSize.Small>
-                    <RowTemplate Context="pp">
-                        <AntDesign.Column Title="处理事项"  @bind-Field="@pp.DoItem" />
-                        <AntDesign.Column Title="难度系数"  @bind-Field="@pp.DoItemCoefficient"/>
-                        <ActionColumn>
-                            <Space>
-                                <SpaceItem><Button  OnClick="() => EditDoItem(pp.DoItem)" Type="@ButtonType.Text">修改</Button></SpaceItem>
-                                <SpaceItem><Button Danger OnClick="() => DeleteDoItem(pp.DoItem)" Type="@ButtonType.Text">删除</Button></SpaceItem>
-                            </Space>
-                        </ActionColumn>
-                    </RowTemplate>
-                    <ExpandTemplate Context="rowData">
-                        <Table DataSource="rowData.Data.PersonPoints">
-                            <AntDesign.Column Title="处理人" @bind-Field="@context.Person" Sortable Filterable />
-                            <AntDesign.Column Title="分配点数" @bind-Field="@context.Point" TData="double">
-                                @if (editId == context.Id && _visible== false)
-                                {
-                                    <AntDesign.InputNumber Type="text" @bind-Value="context.Point" OnBlur="stopEdit" AutoFocus />
-                                }
-                                else
-                                {
-                                    <div class="editable-cell-value-wrap" style="padding-right:10px" @onclick="() => startEdit(context.Id)">
-                                        @context.Point
-                                    </div>
-                                }
-                            </AntDesign.Column>
-                            <ActionColumn>
-                                <Space>
-                                    <SpaceItem><Button Danger OnClick="() => Delete(rowData.Data.DoItem, context.Id)" Type="@ButtonType.Text">删除</Button></SpaceItem>
-                                </Space>
-                            </ActionColumn>
-                        </Table>
-                    </ExpandTemplate>
-                    
+            <Card Title="工作内容清单">
+                <Extra>
+                    <Button OnClick="AddNew" Type="@ButtonType.Primary">添加</Button>
+                </Extra>
+                <Body>
+                    @if (task.ProjectWorkContents != null)
+                    {
+                        <AntDesign.Table TItem="wispro.sp.entity.ProjectWorkContent"
+                                         DataSource="task.ProjectWorkContents"
+                                         Bordered=@true
+                                         Size=@TableSize.Small>
+                            <RowTemplate Context="pp">
+                                <AntDesign.Column Title="工作内容" TData="string">
+                                    @if (addDoItem == pp)
+                                    {
+                                        <TextArea Rows="2" @bind-Value="@pp.Content" />
+                                    }
+                                    else
+                                    {
+                                        <span>@pp.Content</span>
+                                    }
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="工作日期" TData="string">
+                                    @if (addDoItem == pp)
+                                    {
+                                        <DatePicker TValue="DateTime" Picker="@DatePickerType.Date" @bind-Value="pp.WorkDate" />
+
+                                    }
+                                    else
+                                    {
+                                        <span>@pp.WorkDate.ToString("yyyy-MM-dd")</span>
+                                    }
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="时间跨度" TData="string">
+                                    @if (addDoItem == pp)
+                                    {
+                                        <AntDesign.InputNumber @bind-Value="pp.TimeSpan" Min="1" Max="10" DefaultValue="1"></AntDesign.InputNumber>
+                                        <span>天</span>
+
+                                    }
+                                    else
+                                    {
+                                        <span>@(pp.TimeSpan)天</span>
+                                    }
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="耗时" TData="string">
+                                    @if (addDoItem == pp)
+                                    {
+                                        <AntDesign.InputNumber Step="0.1" Min="-1" Max="160" @bind-Value="pp.TakeTime" /><span>小时</span>
+                                    }
+                                    else
+                                    {
+                                        <span>@(pp.TakeTime)小时</span>
+                                    }
+                                </AntDesign.Column>
+                                <ActionColumn>
+                                    @if (addDoItem == pp)
+                                    {
+                                        <Space>
+                                            <SpaceItem><Button OnClick="() => stopEdit()" Type="@ButtonType.Text">保存</Button></SpaceItem>
+                                            <SpaceItem><Button Danger OnClick="() => DeleteDoItem(pp)" Type="@ButtonType.Text">取消</Button></SpaceItem>
+                                        </Space>
+                                    }
+                                    else
+                                    {
+                                        <Space>
+                                            <SpaceItem><Button OnClick="() => EditDoItem(pp)" Type="@ButtonType.Text">修改</Button></SpaceItem>
+                                            <SpaceItem><Button Danger OnClick="() => DeleteDoItem(pp)" Type="@ButtonType.Text">删除</Button></SpaceItem>
+                                        </Space>
+                                    }
 
-            </AntDesign.Table>
-                }
+                                </ActionColumn>
+                            </RowTemplate>
+
+                        </AntDesign.Table>
+                    }
+                </Body>
             </Card>
             
             <Card>
@@ -102,66 +142,3 @@
 </PageContainer>
 
 
-<Modal  Title="分配点数"
-       Visible="@_visible"
-       OnOk="@HandleOk"
-       OnCancel="@HandleCancel" 
-       MaskClosable="false"
-       DestroyOnClose="true"
-       @ref="model">
-    <Form Model="addDoItem" LabelColSpan="6"
-          WrapperColSpan="16">
-        <FormItem Label="处理事项">
-            <Input @bind-Value="@context.DoItem" />
-        </FormItem>
-        <FormItem Label="难度系数">
-            <Input @bind-Value="@context.DoItemCoefficient" />
-        </FormItem>
-        <Button OnClick="addRow" Type="primary" Style="margin-bottom:16px">添加</Button>
-        <AntDesign.Table TItem="wispro.sp.share.PersonPoint"
-                         DataSource="addDoItem.PersonPoints"
-                         Bordered=@true
-                         Size=@TableSize.Small>
-            <ChildContent Context="pp">
-                <AntDesign.Column Title="处理人" TData="string" Sortable Filterable>
-                    @if (editId == pp.Id)
-                    {
-                        
-                        <Input Type="text" @bind-Value="pp.Person" />
-                    }
-                    else
-                    {
-                        <div class="editable-cell-value-wrap" style="padding-right:10px">
-                            @pp.Person
-                        </div>
-                    }
-                </AntDesign.Column>
-                <AntDesign.Column Width="30%" Title="分配点数" TData="double">
-                    @if (editId == pp.Id)
-                    {
-                        <AntDesign.InputNumber Type="text" @bind-Value="pp.Point" />
-                    }
-                    else
-                    {
-                        <div class="editable-cell-value-wrap" style="padding-right:10px">
-                            @pp.Point
-                        </div>
-                    }
-                </AntDesign.Column>
-                <ActionColumn Title="Action">
-                    @if (editId != pp.Id)
-                    {
-                        <a @onclick="() => startEdit(pp.Id)">修改</a>
-                        <a @onclick="() => deletePersonPoint(pp.Id)">删除</a>
-                    }
-                    else
-                    {
-                        <a @onclick="() => stopEdit()" class="save">保存</a>
-                    }
-                </ActionColumn>
-            </ChildContent>
-
-        </AntDesign.Table>
-    </Form>
-</Modal>
-

+ 70 - 120
wispro.sp.web/Pages/Project/AssignPoint.razor.cs

@@ -17,185 +17,135 @@ namespace wispro.sp.web.Pages.Project
     {
         [Inject] public MessageService MsgSvr { get; set; }
 
-         [Inject] protected PerformanceItemServices _itemService { get; set; }
+        [Inject] protected PerformanceItemServices _itemService { get; set; }
         [Inject] NavigationManager _NavigationManager { get; set; }
 
+        ProjectContents task = new() {
+            ProjectContentRecord = new ProjectContentRecord(),
+            ProjectWorkContents = new List<ViewProjectWorkContent>()
+        };
 
-        private AntDesign.Modal model;
+        List<ViewProjectWorkContent> _ShowWorkContent;
+
+        List<ProjectInfo> ProjectInfos;
+        List<ProjectInfo> ShowProjectInfos;
+
+        ViewProjectWorkContent addDoItem;
+
+        [Parameter]
+        public int? Id { get; set; }
 
-        ProjectPointRecord task = new()
-        {
-            
-            //CaseNo = "S2112394",
-            //CaseName = "美的-洗碗机专利调查",
-                
-            // ProjectDoItemPoints = new List<ProjectDoItemPoint>()
-            // {
-            //    new ProjectDoItemPoint(){ DoItem="检索策略评估",  DoItemCoefficient="B", 
-            //        PersonPoints=new List<PersonPoint>{
-            //            new PersonPoint(){Id="1", Person ="李申", Point=1.0 },
-            //            new PersonPoint(){Id="2", Person ="张三", Point=1.0 },
-            //            new PersonPoint(){Id="3", Person ="李四", Point=1.0 },
-            //        }},
-            //    new ProjectDoItemPoint(){ DoItem="专利分类",  DoItemCoefficient="A", 
-            //        PersonPoints=new List<PersonPoint>{
-            //            new PersonPoint(){Id="1",  Person ="李申", Point=2.0 },
-            //            new PersonPoint(){Id="2",  Person ="张三", Point=1.50 },
-            //            new PersonPoint(){Id="3",  Person ="李四", Point=2.5 },
-            //        }},
-            // }
-        };
 
-        ProjectDoItemPoint addDoItem;
-        bool isAdd = false;
-        private bool _visible = false;
         private void AddNew()
         {
-            addDoItem = new ProjectDoItemPoint();
-            isAdd = true;
-            _visible = true;
+            addDoItem = new ViewProjectWorkContent();
+            addDoItem.modifyState = ModifyState.New;
+
+            task.ProjectWorkContents.Add(addDoItem);
+            _ShowWorkContent = task.ProjectWorkContents.Where(p => p.modifyState != ModifyState.Deleted).ToList();
         }
 
-        private void HandleOk(MouseEventArgs e)
+        protected async override Task OnInitializedAsync()
         {
-            if (isAdd)
+            ProjectInfos =await _itemService.GetProjectInfos(0);
+            ShowProjectInfos = ProjectInfos;
+
+            if (Id.HasValue)
             {
-                if (!string.IsNullOrEmpty(addDoItem.DoItem))
-                {
-                    task.ProjectDoItemPoints.Add(addDoItem);
-                }
+                task = await _itemService.getProjectWorkContent(Id.Value);
             }
-            
-            _visible = false;
-            model.Dispose();
-        }
 
-        private void HandleCancel(MouseEventArgs e)
-        {
-            _visible = false;
-            model.Dispose();
+            await base.OnInitializedAsync();
         }
 
-        string editId = null;
-        void startEdit(string id)
+        private void OnSelectedItemChangedHandler(ProjectInfo value)
         {
-            editId = id;
-            MsgSvr.Info($"开始编辑{editId}");
+            task.ProjectContentRecord.ProjectNo   = value.CaseNo;
+            task.ProjectContentRecord.Project = value;
         }
 
-        void deletePersonPoint(string id)
+        private void OnSearch(string value)
         {
-            var delObj = addDoItem.PersonPoints.FirstOrDefault<PersonPoint>(f => f.Id == id);
-            addDoItem.PersonPoints.Remove(delObj);
+            if (ProjectInfos != null)
+            {
+                ShowProjectInfos = ProjectInfos.Where<ProjectInfo>(p => p.CaseNo.Contains(value)).ToList();
+            }
+            StateHasChanged();
         }
 
-        void stopEdit()
+        void startEdit(ViewProjectWorkContent pw)
         {
-            //var editedData = addDoItem.AddprojectPoints.FirstOrDefault(x => x.person == editId);
-            editId = null;
+            addDoItem = pw;
+            
         }
 
-        void Delete(string doItem, string person)
+        void deletePersonPoint(ViewProjectWorkContent pw)
         {
-            if (_visible)
+            if (pw.modifyState != ModifyState.New)
             {
-                var editedData = addDoItem.PersonPoints.FirstOrDefault(x => x.Person  == person);
-                addDoItem.PersonPoints.Remove(editedData);
+                pw.modifyState = ModifyState.Deleted;
             }
             else
             {
-                
-                var editedData = task.ProjectDoItemPoints .FirstOrDefault(x => x.DoItem  == doItem);
-                var personPoint = editedData.PersonPoints.FirstOrDefault(x => x.Id  == person);
-                editedData.PersonPoints.Remove(personPoint);
-                
+                task.ProjectWorkContents.Remove(pw);
             }
-
-            StateHasChanged();
         }
 
-        void DeleteDoItem(string doItem)
+        void stopEdit()
         {
-            var delData = task.ProjectDoItemPoints.FirstOrDefault(x => x.DoItem == doItem);
-            task.ProjectDoItemPoints.Remove(delData);
+            addDoItem = null;
         }
 
-        void EditDoItem(string doItem)
+        void DeleteDoItem(ProjectWorkContent pp)
         {
-            isAdd = false;
-            addDoItem = task.ProjectDoItemPoints.FirstOrDefault(x => x.DoItem == doItem);
-            _visible = true; 
+            task.ProjectWorkContents.Remove(pp);
         }
 
-        private string GetId(List<PersonPoint> personPoints)
+        void EditDoItem(ProjectWorkContent pp)
         {
-            int i = personPoints.Count;
-
-            begin:
-            foreach(var pp in personPoints)
-            {
-                if(pp.Id == i.ToString())
-                {
-                    i++;
-                    goto begin;
-                }
-            }
-
-            return i.ToString();
-
+            addDoItem = pp;
         }
+
+        
         void addRow()
         {
-            if(addDoItem.PersonPoints == null)
+            if (task.ProjectWorkContents == null)
             {
-                addDoItem.PersonPoints = new List<PersonPoint>();
-            }
+                task.ProjectWorkContents = new List<ProjectWorkContent>();
 
-            string strId = GetId(addDoItem.PersonPoints);
+            }
 
-            addDoItem.PersonPoints.Add(
-                new PersonPoint() { Id = strId, Person ="修改处理人姓名", Point = 0}
-                ) ;
-            editId = strId;
+            addDoItem = new ProjectWorkContent();
+            task.ProjectWorkContents.Add(addDoItem);
+            
             StateHasChanged();
         }
 
         async Task OnSave()
         {
             //添加保存代码
-            var response = await _itemService.AddProjectPerformanctItem(task);
+            //var response = await _itemService.AddProjectPerformanctItem(task);
 
-            if (response.Success)
-            {
-                await MsgSvr.Info("项目绩效保存成功!");
-                _NavigationManager.NavigateTo("/MyCaseList");
-            }
-            else
-            {
-                await MsgSvr.Error(response.ErrorMessage);
-            }
+            //if (response.Success)
+            //{
+            //    await MsgSvr.Info("项目绩效保存成功!");
+            //    _NavigationManager.NavigateTo("/MyCaseList");
+            //}
+            //else
+            //{
+            //    await MsgSvr.Error(response.ErrorMessage);
+            //}
+
+            _NavigationManager.NavigateTo("/Project/MyProjects");
 
         }
 
         void OnCancel()
         {
-            _NavigationManager.NavigateTo("/MyCaseList");
+            _NavigationManager.NavigateTo("/Project/MyProjects");
         }
 
-        private PerformanceItem Item;
-        private bool loading = false;
-        async Task GetProjectInfo()
-        {
-            loading = true;
-            Item = await _itemService.GetProjectInfo(task.CaseNo);
-
-            if(Item != null)
-            {
-                task.CaseName = Item.CaseName;
-                task.CaseNo = Item.CaseNo;
-            }
-            loading = false;
-        }
+        
     }
 
     

+ 113 - 0
wispro.sp.web/Pages/Project/MyProject.razor

@@ -0,0 +1,113 @@
+@page "/Project/MyProjects"
+
+<PageContainer>
+    <Breadcrumb>
+        <Breadcrumb>
+            <BreadcrumbItem>
+                <a href="/Home"><Icon Type="home"></Icon></a>
+            </BreadcrumbItem>
+            <BreadcrumbItem>
+                <span>我的专案</span>
+            </BreadcrumbItem>
+        </Breadcrumb>
+    </Breadcrumb>
+    <Content>
+        <Button Type="primary" Icon="plus" OnClick="AddNew" Style="float:right">添加工作内容</Button>
+    </Content>
+    <ChildContent>
+        @if (ProjectInfos == null)
+        {
+            <center><Spin /></center>
+
+        }
+        else
+        {
+
+    <AntDesign.Table @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
+                     Total="@_total"
+                     TItem="ProjectContentRecord"
+                     Loading="_loading"
+                     DataSource="@ProjectInfos"
+                     Bordered=@true
+                     Size=@TableSize.Middle>
+        <RowTemplate>
+            @*<Selection Key="@(context.ProjectNo)" />*@
+            <AntDesign.Column Title="序号" TData="int" Width="60">
+                @serialNumber(_pageIndex, _pageSize, context)
+            </AntDesign.Column>
+            <AntDesign.Column Title="我方文号" @bind-Field="@context.ProjectNo" Sortable Filterable />
+            <AntDesign.Column Title="案件名称" DataIndex="Project.CaseName" TData="string" Sortable Filterable />
+            <AntDesign.Column Title="案件类型" DataIndex="Project.CaseType" TData="string" Sortable Filterable />
+            <AntDesign.Column Title="业务类型" DataIndex="Project.BusinessType" TData="string" Sortable Filterable />
+            <AntDesign.Column Title="客户" DataIndex="Project.Customer.Name" TData="string" Sortable Filterable />
+            <AntDesign.Column Title="绩效月份" TData="string" Sortable Filterable>
+                @($"{context.CalMonth.Year}年{context.CalMonth.Month}月")
+            </AntDesign.Column>
+            <AntDesign.Column Title="最终绩效" TData="string">
+                @($"{context.Point}{context.CaseCoefficient}")
+            </AntDesign.Column>
+            <ActionColumn>
+                <Space>
+                    @if (context.State == 0)
+                    {
+                        <SpaceItem><Button Danger OnClick="() => Edit(context)">修改</Button></SpaceItem>
+                        <SpaceItem><Button Danger OnClick="() => Submit(context)">提交审核</Button></SpaceItem>
+                    }
+                </Space>
+            </ActionColumn>
+        </RowTemplate>
+        <ExpandTemplate>
+            <Table DataSource="context.Data.ProjectWorkContents" Context="pp">
+                <ChildContent>
+
+                    <AntDesign.Column Title="工作内容" TData="string">
+                        @pp.Content
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="工作日期" TData="string">
+                        @pp.WorkDate.ToString("yyyy-MM-dd")
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="时间跨度" TData="string">
+                        @pp.TimeSpan 天
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="耗时" TData="string">
+                        @pp.TakeTime 小时
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="工作难度系数" TData="string">
+                        @pp.DifficultFactor
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="实际绩效" TData="string">
+                        @pp.ActualPerformance
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="最终绩效" TData="string">
+                        @pp.FinalPerformance
+                    </AntDesign.Column>
+
+                </ChildContent>
+            </Table>
+        </ExpandTemplate>
+        <PaginationTemplate>
+            <div style="display: flex; align-items: center">
+                <Pagination Class="my-custom-pagination"
+                            Total="@_total"
+                            PageSize="@_pageSize"
+                            Current="@_pageIndex"
+                            ShowSizeChanger="@true"
+                            OnChange="HandlePageChange" />
+            </div>
+        </PaginationTemplate>
+    </AntDesign.Table>
+
+        }
+
+    </ChildContent>
+</PageContainer>
+<style>
+    .my-custom-pagination {
+        margin: 15px 0;
+    }
+
+        .my-custom-pagination .ant-pagination-item,
+        .my-custom-pagination .ant-pagination-item-link {
+            border-radius: 100%;
+        }
+</style>

+ 78 - 0
wispro.sp.web/Pages/Project/MyProject.razor.cs

@@ -0,0 +1,78 @@
+using AntDesign;
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+using wispro.sp.web.Services;
+
+namespace wispro.sp.web.Pages.Project
+{
+    public partial class MyProject
+    {
+        List<ProjectContentRecord> ProjectInfos;
+        int _pageIndex = 1;
+        int _pageSize = 10;
+        int _total = 0;
+        bool _loading = false;
+
+        [Inject] protected PerformanceItemServices _itemService { get; set; }
+        [Inject] public MessageService MsgSvr { get; set; }
+        [Inject] NavigationManager _NavigationManager { get; set; }
+
+        
+
+        protected async override Task OnInitializedAsync()
+        {
+            ProjectInfos = await _itemService.GetMyProjects();
+            _total = ProjectInfos.Count;
+            await base.OnInitializedAsync();
+        }
+
+        public int serialNumber(int pageIndex, int pageSize, ProjectContentRecord pr)
+        {
+            int iIndex = ProjectInfos.IndexOf(pr);
+
+            return iIndex + 1;
+        }
+
+        public async Task SetFinished(string CaseNo)
+        {
+            var result = await _itemService.SetProjectFinish(CaseNo);
+
+            if (!result)
+            {
+               await MsgSvr.Error($"设定专案[{CaseNo}]为已完成时出错,请稍后再试!");
+            }
+        }
+
+        private void HandlePageChange(PaginationEventArgs args)
+        {
+            if (_pageIndex != args.Page)
+            {
+                _pageIndex = args.Page;
+            }
+
+            if (_pageSize != args.PageSize)
+            {
+                _pageSize = args.PageSize;
+            }
+        }
+
+        public void AddNew()
+        {
+            _NavigationManager.NavigateTo("/Project/WorkContent");
+        }
+
+        public void Edit(ProjectContentRecord projectContent)
+        {
+            _NavigationManager.NavigateTo($"/Project/WorkContent/{projectContent.Id}");
+        }
+
+        public void Submit(ProjectContentRecord projectContent)
+        {
+
+        }
+    }
+}

+ 80 - 0
wispro.sp.web/Pages/Project/ProjectSearch.razor

@@ -0,0 +1,80 @@
+@page "/Project/ProjectSearch"
+
+<PageContainer>
+    <Breadcrumb>
+        <Breadcrumb>
+            <BreadcrumbItem>
+                <a href="/Home"><Icon Type="home"></Icon></a>
+            </BreadcrumbItem>
+            <BreadcrumbItem>
+                <span>我的专案</span>
+            </BreadcrumbItem>
+        </Breadcrumb>
+    </Breadcrumb>
+    <Content></Content>
+    <ChildContent>
+        @if (ProjectInfos == null)
+        {
+            <center><Spin /></center>
+
+        }
+        else
+        {
+
+            <AntDesign.Table @ref="table"  @bind-PageIndex="@_pageIndex" @bind-PageSize="@_pageSize" Total="@_total"
+                             TItem="ProjectInfo"
+                             Loading="_loading"
+                             DataSource="@ProjectInfos"
+                             Bordered=@true
+                             Size=@TableSize.Middle
+                             >
+                <ChildContent>
+                    @*<Selection Key="@(context.CaseNo)" />*@
+                    <AntDesign.Column Title="序号" TData="int" Width="70">
+                        @serialNumber(_pageIndex, _pageSize, context.CaseNo)
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Sortable Filterable />
+                    <AntDesign.Column Title="案件名称" @bind-Field="@context.CaseName" Format="yyyy-MM-dd" Sortable Filterable />
+                    <AntDesign.Column Title="案件类型" Field="@context.CaseType" Sortable Filterable />
+                    <AntDesign.Column Title="业务类型" @bind-Field="@context.BusinessType" Sortable Filterable />
+                    <AntDesign.Column Title="客户" TData="string" DataIndex=@("Customer.Name") Sortable Filterable />
+                    <AntDesign.Column Title="案件状态" TData="string"  Sortable Filterable>
+                        <Template>
+                            <span>@(context.CaseState==0?"处理中":"已完成")</span>
+                        </Template>
+                    </AntDesign.Column>
+                    <ActionColumn>
+                        <Space>
+                            @if (context.CaseState == 0)
+                            {
+                                <SpaceItem><Button Danger OnClick="() => SetFinished(context.CaseNo)">设为已完成</Button></SpaceItem>
+                            }
+                        </Space>
+                    </ActionColumn>
+                </ChildContent>
+                <PaginationTemplate>
+                    <div style="display: flex; align-items: center">
+                        <Pagination Class="my-custom-pagination"
+                                    Total="@_total"
+                                    PageSize="@_pageSize"
+                                    Current="@_pageIndex"
+                                    ShowSizeChanger="@true" 
+                                    OnChange="HandlePageChange" />
+                    </div>
+                </PaginationTemplate>
+            </AntDesign.Table>
+
+        }
+
+    </ChildContent>
+</PageContainer>
+<style>
+    .my-custom-pagination {
+        margin: 15px 0;
+    }
+
+        .my-custom-pagination .ant-pagination-item,
+        .my-custom-pagination .ant-pagination-item-link {
+            border-radius: 100%;
+        }
+</style>

+ 79 - 0
wispro.sp.web/Pages/Project/ProjectSearch.razor.cs

@@ -0,0 +1,79 @@
+using AntDesign;
+using AntDesign.TableModels;
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+using wispro.sp.web.Services;
+
+namespace wispro.sp.web.Pages.Project
+{
+    public partial class ProjectSearch
+    {
+        List<ProjectInfo> ProjectInfos;
+        int _pageIndex = 1;
+        int _pageSize = 10;
+        int _total = 0;
+        bool _loading = false;
+        ITable table;
+
+        [Inject] protected PerformanceItemServices _itemService { get; set; }
+        [Inject] public MessageService MsgSvr { get; set; }
+
+        protected async override Task OnInitializedAsync()
+        {
+            ProjectInfos = await _itemService.GetAllProjects();
+            _total = ProjectInfos.Count;
+            await base.OnInitializedAsync();
+        }
+
+        public int serialNumber(int pageIndex, int pageSize, string name)
+        {
+            int iIndex = 0;
+            
+            foreach (ProjectInfo sf in ProjectInfos)
+            {
+                iIndex++;
+
+                if (sf.CaseNo == name)
+                {
+                    break;
+                }
+            }
+
+            return iIndex;
+        }
+
+        public async Task SetFinished(string CaseNo)
+        {
+            var result = await _itemService.SetProjectFinish(CaseNo);
+
+            if (!result)
+            {
+                await MsgSvr.Error($"设定专案[{CaseNo}]为已完成时出错,请稍后再试!");
+            }
+        }
+
+        public async Task OnChange(QueryModel<ProjectInfo> queryModel)
+        {
+            Console.WriteLine(JsonSerializer.Serialize(queryModel));
+        }
+
+        private void HandlePageChange(PaginationEventArgs args)
+        {
+            if (_pageIndex != args.Page)
+            {
+                _pageIndex = args.Page;
+            }
+
+            if (_pageSize != args.PageSize)
+            {
+                _pageSize = args.PageSize;
+            }
+        }
+    }
+}
+

+ 1 - 1
wispro.sp.web/Pages/Welcome.razor.cs

@@ -84,7 +84,7 @@ namespace wispro.sp.web.Pages
             var templateOptions = new Models.ReviewerAppealModel();
             await templateOptions.Init(_atService, appealRecord.Id);
 
-            Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(templateOptions));
+            //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(templateOptions));
 
             var modalConfig = new ModalOptions();
             modalConfig.Title = $"{appealRecord.Type.Name}审核" ;

+ 8 - 8
wispro.sp.web/Pages/Workflow/WorkflowDetail.razor.cs

@@ -91,9 +91,9 @@ namespace wispro.sp.web.Pages.Workflow
             EditStep = new share.NewStepObject() { Step = step, isLastStep = b };
             try
             {
-                Console.WriteLine(step.defaultResponseSetting);
+                //Console.WriteLine(step.defaultResponseSetting);
                 userField = System.Text.Json.JsonSerializer.Deserialize<UserField>(step.defaultResponseSetting);
-                Console.WriteLine($"Deserialize Result:{System.Text.Json.JsonSerializer.Serialize(userField)}" );
+                //Console.WriteLine($"Deserialize Result:{System.Text.Json.JsonSerializer.Serialize(userField)}" );
             }
             catch {
                 userField = new UserField();
@@ -114,7 +114,7 @@ namespace wispro.sp.web.Pages.Workflow
             }
             else
             {
-                Console.WriteLine($"BeginEditAction-Begin:{System.Text.Json.JsonSerializer.Serialize(action)}");
+                //Console.WriteLine($"BeginEditAction-Begin:{System.Text.Json.JsonSerializer.Serialize(action)}");
                 if (EditStep.actions != null)
                 {
                     EditAction = EditStep.actions.FirstOrDefault(a => a.Action.Id == action.Id);
@@ -130,7 +130,7 @@ namespace wispro.sp.web.Pages.Workflow
                 }
                 ActionModalShow = true;
             }
-            Console.WriteLine($"BeginEditAction-End:{System.Text.Json.JsonSerializer.Serialize(EditAction)}");
+            //Console.WriteLine($"BeginEditAction-End:{System.Text.Json.JsonSerializer.Serialize(EditAction)}");
             //StateHasChanged();
         }
 
@@ -182,7 +182,7 @@ namespace wispro.sp.web.Pages.Workflow
         {
             EditAction = EditStep.actions.FirstOrDefault(a => a.Action.Id == Id);
 
-            Console.WriteLine($"BeginEditAction-Begin:{System.Text.Json.JsonSerializer.Serialize(EditAction)}");
+            //Console.WriteLine($"BeginEditAction-Begin:{System.Text.Json.JsonSerializer.Serialize(EditAction)}");
             if (EditAction != null)
             {
                 if ( EditAction.Action.Id >0)
@@ -191,7 +191,7 @@ namespace wispro.sp.web.Pages.Workflow
                 }
                 ActionModalShow = true;
             }
-            Console.WriteLine($"BeginEditAction-End:{System.Text.Json.JsonSerializer.Serialize(EditAction)}");
+            //Console.WriteLine($"BeginEditAction-End:{System.Text.Json.JsonSerializer.Serialize(EditAction)}");
         }
 
         async void DeleteAction(int Id)
@@ -234,8 +234,8 @@ namespace wispro.sp.web.Pages.Workflow
         {
             JsonSerializerOptions options = new() { IgnoreNullValues = true };
             EditStep.Step.defaultResponseSetting = System.Text.Json.JsonSerializer.Serialize(userField,options);
-            Console.WriteLine($"UsrValue={userField.UserValue},UserConditionType={userField.UserConditionType},UserType={userField.UserType}"); 
-            Console.WriteLine(EditStep.Step.defaultResponseSetting);
+            //Console.WriteLine($"UsrValue={userField.UserValue},UserConditionType={userField.UserConditionType},UserType={userField.UserType}"); 
+            //Console.WriteLine(EditStep.Step.defaultResponseSetting);
 
             var ret = await _wfService.SaveStep(EditStep);
             if (ret.Success)

+ 29 - 4
wispro.sp.web/Services/PerformanceItemServices.cs

@@ -17,6 +17,8 @@ namespace wispro.sp.web.Services
         private readonly IHttpService _httpClient;
         private readonly JwtAuthenticationStateProvider _jwt;
 
+        
+
         public PerformanceItemServices(IHttpService httpClient, AuthenticationStateProvider jwt)
         {
             _httpClient = httpClient;
@@ -48,6 +50,8 @@ namespace wispro.sp.web.Services
             return data;
         }
 
+        
+
         public async Task<FileProcessTask> ExportData(int userid, jxType jxType)
         {
             QueryFilter query = new QueryFilter();
@@ -296,18 +300,39 @@ namespace wispro.sp.web.Services
 
         
 
-        public async  Task<PerformanceItem> GetProjectInfo(string caseNo)
+        public async  Task<List<ProjectInfo>> GetProjectInfos(int State)
         {
-            var data = await _httpClient.Get<PerformanceItem>($"PerformanctItem/GetCaseInfo?CaseNo={caseNo}");
+            var data = await _httpClient.Get<List<ProjectInfo>>($"Project/GetProjects?state={State}");
             return data;
         }
 
-        
+        public async Task<List<ProjectInfo>> GetAllProjects()
+        {
+            var data = await _httpClient.Get<List<ProjectInfo>>($"Project/GetAll");
+            return data;
+        }
+        public async Task<List<ProjectContentRecord>> GetMyProjects()
+        {
+            var data = await _httpClient.Get<List<ProjectContentRecord>>($"Project/GetMyProjects");
+            return data;
+        }
+
+        public async Task<bool> SetProjectFinish(string caseNo)
+        {
+            var data = await _httpClient.Get<bool>($"Project/SetFinished?CaseNo={caseNo}");
+            return data;
+        }
 
-        public async Task<ApiSaveResponse> AddProjectPerformanctItem(ProjectPointRecord projectPoint)
+        public async Task<ApiSaveResponse> AddProjectPerformanctItem(ProjectContents projectPoint)
         {
             var data = await _httpClient.Post<ApiSaveResponse>($"PerformanceItem/AddProjectPerformance",projectPoint);
             return data;
         }
+
+        public async Task<ProjectContents> getProjectWorkContent(int value)
+        {
+            var data = await _httpClient.Get<ProjectContents>($"PerformanceItem/getProjectWorkContent?Id={value}");
+            return data;
+        }
     }
 }

+ 1 - 1
wispro.sp.web/Utils/JwtPaser.cs

@@ -49,7 +49,7 @@ namespace wispro.sp.web.Utils
                 case 2: base64 += "=="; break;
                 case 3: base64 += "="; break;
             }
-            Console.WriteLine(base64);
+            //Console.WriteLine(base64);
             return Convert.FromBase64String(base64);
         }
     }

+ 10 - 0
wospro.sp.entity/PerformanceItem.cs

@@ -199,6 +199,16 @@ namespace wispro.sp.entity
         [Description("核稿人")]
         public virtual Staff Reviewer { get; set; }
 
+        /// <summary>
+        /// 流程负责人Id
+        /// </summary>
+        public int? WorkflowUserId { get; set; }
+
+        /// <summary>
+        /// 流程负责人
+        /// </summary>
+        public virtual Staff WorkflowUser { get; set; }
+
         public virtual CalMonth CalMonth { get; set; }
 
         public int CalMonthId { get; set; }

+ 69 - 0
wospro.sp.entity/ProjectContentRecord.cs

@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    public class ProjectContentRecord
+    {
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 专案
+        /// </summary>
+        public ProjectInfo Project { get; set; }
+
+        /// <summary>
+        /// 专案文号
+        /// </summary>
+        public string ProjectNo { get; set; }
+
+        /// <summary>
+        /// 绩效人
+        /// </summary>
+        public Staff Staff { get; set; }
+
+        public int StaffId { get; set; }
+
+        /// <summary>
+        /// 审核人
+        /// </summary>
+        public Staff Reviewer { get; set; }
+
+        public int ReviewerId { get; set; }
+
+        /// <summary>
+        /// 绩效月份
+        /// </summary>
+        public CalMonth CalMonth { get; set; }
+
+        public int CalMonthId { get; set; }
+
+        /// <summary>
+        /// 提交实际
+        /// </summary>
+        public DateTime SubmitTime { get; set; } = DateTime.Now;
+
+        /// <summary>
+        /// 最终点数
+        /// </summary>
+        public double Point { get; set; }
+
+        /// <summary>
+        /// 难度系数
+        /// </summary>
+        public string CaseCoefficient { get; set; }
+
+        /// <summary>
+        /// 申诉状态
+        /// 0:未提报
+        /// 1:已提报,待审核
+        /// 2:审核完成
+        /// </summary>
+        public int State { get; set; }
+
+        public virtual List<ProjectWorkContent> ProjectWorkContents { get; set; }
+    }
+}

+ 49 - 0
wospro.sp.entity/ProjectInfo.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    public class ProjectInfo
+    {
+        public string CaseNo { get; set; }
+
+        public string CaseName { get; set; }
+
+        public string ApplicationNo { get; set; }
+
+        public DateTime ApplicationDate { get; set; }
+
+        public string CaseType { get; set; }
+
+        /// <summary>
+        /// 业务类型
+        /// </summary>
+        public string BusinessType { get; set; }
+
+        public virtual Customer Customer { get; set; }
+
+        public int? CustomerId { get; set; }
+
+        public virtual  Staff Reviewer { get; set; }
+
+        public int? ReviewerId { get; set; }
+
+        public virtual Staff WorkflowUser { get; set; }
+
+        public int? WorkflowUserId { get; set; }
+
+        /// <summary>
+        /// 0:处理中
+        /// 1:已完成
+        /// </summary>
+        public int CaseState { get; set; }
+
+
+
+
+
+    }
+}

+ 32 - 0
wospro.sp.entity/ProjectWorkContent.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.entity
+{
+    public class ProjectWorkContent
+    {
+        public int Id { get; set; }
+
+        public ProjectContentRecord ContentRecord { get; set; }
+
+        public int ContentRecordId { get; set; }
+
+        public string Content { get; set; }
+
+        public DateTime WorkDate { get; set; }
+
+        public int TimeSpan { get; set; }
+
+        public double TakeTime { get; set; }
+
+        public string DifficultFactor { get; set; }
+
+        public string ActualPerformance { get; set; }
+
+        public string FinalPerformance { get; set; }
+        
+    }
+}