From 8de9a465342385e0ebee7dc430abadd69a2b67dd Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 28 六月 2021 12:42:46 +0800
Subject: [PATCH] 工资修改

---
 zhengcaioa/DTO/AreaDTO.cs                                                    |    2 
 zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml                       |   20 
 zhengcaioa/DTO/ProjectDTO.cs                                                 |   11 
 zhengcaioa/Services/CusFangwenjiluService.cs                                 |  114 +++
 zhengcaioa/zhengcaioa/Views/Signin/Index.cshtml                              |    2 
 zhengcaioa/Model/Project.cs                                                  |    2 
 zhengcaioa/Model/CusFangwenjilu.cs                                           |   20 
 zhengcaioa/zhengcaioa/Startup.cs                                             |    4 
 zhengcaioa/zhengcaioa/Controllers/UserController.cs                          |   23 
 zhengcaioa/zhengcaioa/zhengcaioa.csproj.user                                 |    2 
 zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs          |   28 
 zhengcaioa/Services/HrJixiaotichengService.cs                                |    1 
 zhengcaioa/Model/zhengcaioaContext.cs                                        |  117 +++
 zhengcaioa/zhengcaioa/Views/Project/Add.cshtml                               |   50 
 zhengcaioa/DTO/ResultEntity.cs                                               |   15 
 zhengcaioa/zhengcaioa/Controllers/Expert/ZhuanjiahuidaController.cs          |  292 +++++++
 zhengcaioa/IServices/IIntentionCustomerService.cs                            |    4 
 zhengcaioa/zhengcaioa/Controllers/ProjectController.cs                       |    8 
 zhengcaioa/zhengcaioa/Controllers/settings/AreaController.cs                 |   51 +
 zhengcaioa/DTO/CusFangwenjiluDTO.cs                                          |   19 
 zhengcaioa/Services/ProjectService.cs                                        |   41 
 zhengcaioa/IServices/IIntentionVisitService.cs                               |    2 
 zhengcaioa/DTO/ProjectzhongbiaoDTO.cs                                        |   17 
 zhengcaioa/zhengcaioa/Controllers/AdmManagement/DailyManagementController.cs |    2 
 zhengcaioa/zhengcaioa/Views/Project/Select.cshtml                            |   23 
 zhengcaioa/Services/LZhuanjiahuidumService.cs                                |  169 ++++
 表修改.sql                                                                      |  191 +++++
 zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs                              |    8 
 zhengcaioa/IServices/ICusFangwenjiluService.cs                               |   21 
 zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs       |   26 
 zhengcaioa/IServices/ILZhuanjiahuidumService.cs                              |   21 
 zhengcaioa/Services/IntentionVisitService.cs                                 |   17 
 zhengcaioa/Model/LZhuanjiahuidum.cs                                          |   22 
 zhengcaioa/Services/PltRoleService.cs                                        |   46 +
 zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml                       |   97 ++
 zhengcaioa/zhengcaioa/appsettings.Development.json                           |    3 
 zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Edit.cshtml                        |  263 ++++++
 zhengcaioa/IServices/IPltRoleService.cs                                      |    5 
 zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs            |    2 
 zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs                        |  352 ++++++++
 zhengcaioa/Services/IntentionCustomerService.cs                              |   35 
 zhengcaioa/Model/Projectzhongbiao.cs                                         |    1 
 zhengcaioa/DTO/LZhuanjiahuidumDTO.cs                                         |   33 
 zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs    |   47 
 zhengcaioa/zhengcaioa/appsettings.json                                       |    3 
 45 files changed, 2,122 insertions(+), 110 deletions(-)

diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index d5a8f36..83fd413 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -196,7 +196,13 @@
 
             CreateMap<HrSalary, HrSalaryDTO>();
             CreateMap<HrSalaryDTO, HrSalary>();
-            
+
+            CreateMap<CusFangwenjilu, CusFangwenjiluDTO>();
+            CreateMap<CusFangwenjiluDTO, CusFangwenjilu>();
+
+            CreateMap<LZhuanjiahuidum, LZhuanjiahuidumDTO>();
+            CreateMap<LZhuanjiahuidumDTO, LZhuanjiahuidum>();
+
         }
     }
 }
diff --git a/zhengcaioa/DTO/AreaDTO.cs b/zhengcaioa/DTO/AreaDTO.cs
index 68853b9..0992e4e 100644
--- a/zhengcaioa/DTO/AreaDTO.cs
+++ b/zhengcaioa/DTO/AreaDTO.cs
@@ -10,6 +10,8 @@
         public string Name { get; set; }
         public string ParentId { get; set; }
         public string ParentName { get; set; }
+
+        public List<AreaDTO> Children { get; set; }
     }
 
     public class AreaDTOSearch : SearchEntity
diff --git a/zhengcaioa/DTO/CusFangwenjiluDTO.cs b/zhengcaioa/DTO/CusFangwenjiluDTO.cs
new file mode 100644
index 0000000..e8621f4
--- /dev/null
+++ b/zhengcaioa/DTO/CusFangwenjiluDTO.cs
@@ -0,0 +1,19 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace DTO
+{
+    public class CusFangwenjiluDTO
+    {
+        public string Id { get; set; }
+        public string Fasongfangshi { get; set; }
+        public string Fasongneirong { get; set; }
+        public string Jieshouren { get; set; }
+        public string RecStatus { get; set; }
+        public string Creater { get; set; }
+        public DateTime Createtime { get; set; }
+        public string Modifier { get; set; }
+        public DateTime Modifytime { get; set; }
+    }
+}
diff --git a/zhengcaioa/DTO/LZhuanjiahuidumDTO.cs b/zhengcaioa/DTO/LZhuanjiahuidumDTO.cs
new file mode 100644
index 0000000..289e854
--- /dev/null
+++ b/zhengcaioa/DTO/LZhuanjiahuidumDTO.cs
@@ -0,0 +1,33 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace DTO
+{
+    public class LZhuanjiahuidumDTO
+    {
+        public string Id { get; set; }
+        public string Userid { get; set; }
+        public string Username { get; set; }
+        public string Anwser { get; set; }
+        public string Question { get; set; }
+        public string RecStatus { get; set; }
+        public string Creater { get; set; }
+        public DateTime Createtime { get; set; }
+        public string Modifier { get; set; }
+        public DateTime Modifytime { get; set; }
+        public string HuidaStatus { get; set; }
+    }
+
+
+    public class LZhuanjiahuidumDTOSearch : SearchEntity
+    {
+        public string Username { get; set; }
+        public string Question { get; set; }
+
+        public string Userid { get; set; }
+
+        public string HuidaStatus { get; set; }
+
+    }
+}
diff --git a/zhengcaioa/DTO/ProjectDTO.cs b/zhengcaioa/DTO/ProjectDTO.cs
index ca5a709..b2bec69 100644
--- a/zhengcaioa/DTO/ProjectDTO.cs
+++ b/zhengcaioa/DTO/ProjectDTO.cs
@@ -19,6 +19,10 @@
         public string Drhx { get; set; }
         public string Drcunzai { get; set; }
         public string DrhxPrice { get; set; }
+        public decimal? DrhxDefen { get; set; }
+        public string DrhxDefenName { get; set; }
+        public decimal? DshxDefen { get; set; }
+        public string DshxDefenName { get; set; }
         public string Dshx { get; set; }
         public string Dscunzai { get; set; }
         public string DshxPrice { get; set; }
@@ -47,7 +51,8 @@
         public string[] ZhongbiaoId { get; set; }
         public string[] Names { get; set; }
         public string[] Price { get; set; }
-
+        public decimal?[] Defen { get; set; }
+        
         public string NamesZhongbiao { get; set; }
 
         public string Fblx { get; set; }
@@ -64,7 +69,7 @@
 
         public List<Projectyouxiao> Projectyouxiaos { get; set; }
 
-        public List<Projectzhongbiao> Projectzhongbiaos { get; set; }
+        public List<ProjectzhongbiaoDTO> Projectzhongbiaos { get; set; }
 
         public string[] ZhuanjiaList { get; set; }
     }
@@ -101,5 +106,7 @@
 
         public string ShiFouyReasonname { get; set; }
 
+        public string Fencha { get; set; }
+
     }
 }
diff --git a/zhengcaioa/DTO/ProjectzhongbiaoDTO.cs b/zhengcaioa/DTO/ProjectzhongbiaoDTO.cs
new file mode 100644
index 0000000..26b45f9
--- /dev/null
+++ b/zhengcaioa/DTO/ProjectzhongbiaoDTO.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using zhengcaioa.Models;
+
+namespace DTO
+{
+    public class ProjectzhongbiaoDTO
+    {
+        public string ZhongbiaoId { get; set; }
+        public string ProjectId { get; set; }
+        public string Names { get; set; }
+        public string Price { get; set; }
+        public decimal? Defen { get; set; }
+        public string DefenName { get; set; }
+    }
+}
diff --git a/zhengcaioa/DTO/ResultEntity.cs b/zhengcaioa/DTO/ResultEntity.cs
index 29f9fdf..fb62a32 100644
--- a/zhengcaioa/DTO/ResultEntity.cs
+++ b/zhengcaioa/DTO/ResultEntity.cs
@@ -48,4 +48,19 @@
         public List<T> DataList { get; set; }
         public T DataInfo { get; set; }
     }
+
+
+    public class ReturnMsg<T>
+    {
+        
+        /// <summary>
+        /// 鎿嶄綔鏄惁鎴愬姛
+        /// </summary>
+        public int code { get; set; }
+        public string error { get; set; }
+        public T returnObj { get; set; }
+
+        public int count { get; set; }
+        
+    }
 }
diff --git a/zhengcaioa/IServices/ICusFangwenjiluService.cs b/zhengcaioa/IServices/ICusFangwenjiluService.cs
new file mode 100644
index 0000000..f49e30c
--- /dev/null
+++ b/zhengcaioa/IServices/ICusFangwenjiluService.cs
@@ -0,0 +1,21 @@
+锘縰sing DTO;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+namespace IServices
+{
+    public interface ICusFangwenjiluService
+    {
+        ResultEntity save(CusFangwenjiluDTO dto);
+
+        CusFangwenjiluDTO Get(string id);
+
+        //ResultDataEntity<CusFangwenjiluDTO> SearchByPaging(CusFangwenjiluDTOSearch searchEntity);
+
+        ResultEntity ModifyStatus(string id, string userid);
+
+        List<CusFangwenjiluDTO> GetList();
+    }
+}
diff --git a/zhengcaioa/IServices/IIntentionCustomerService.cs b/zhengcaioa/IServices/IIntentionCustomerService.cs
index fa1fbaf..157ea7f 100644
--- a/zhengcaioa/IServices/IIntentionCustomerService.cs
+++ b/zhengcaioa/IServices/IIntentionCustomerService.cs
@@ -29,6 +29,8 @@
         /// </summary>
         /// <returns></returns>
         List<IntentionCustomerDTO> GetList(string[] id);
-         
+
+        List<IntentionCustomerDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax);
+
     }
 }
diff --git a/zhengcaioa/IServices/IIntentionVisitService.cs b/zhengcaioa/IServices/IIntentionVisitService.cs
index b0dec71..ff9d598 100644
--- a/zhengcaioa/IServices/IIntentionVisitService.cs
+++ b/zhengcaioa/IServices/IIntentionVisitService.cs
@@ -19,5 +19,7 @@
         ResultEntity ModifyStatus(string id, string userid);
 
         List<IntentionCustomerDTO> GetList(string[] id);
+
+        List<IntentionVisitDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax);
     }
 }
diff --git a/zhengcaioa/IServices/ILZhuanjiahuidumService.cs b/zhengcaioa/IServices/ILZhuanjiahuidumService.cs
new file mode 100644
index 0000000..d1c9cfa
--- /dev/null
+++ b/zhengcaioa/IServices/ILZhuanjiahuidumService.cs
@@ -0,0 +1,21 @@
+锘縰sing DTO;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+
+namespace IServices
+{
+    public interface ILZhuanjiahuidumService
+    {
+        ResultEntity save(LZhuanjiahuidumDTO dto);
+
+        LZhuanjiahuidumDTO Get(string id);
+
+        ResultDataEntity<LZhuanjiahuidumDTO> SearchByPaging(LZhuanjiahuidumDTOSearch searchEntity);
+
+        ResultEntity ModifyStatus(string id, string userid);
+
+        List<LZhuanjiahuidumDTO> GetList(string Userid = "" ,string question = "");
+    }
+}
diff --git a/zhengcaioa/IServices/IPltRoleService.cs b/zhengcaioa/IServices/IPltRoleService.cs
index 9646059..85f8dea 100644
--- a/zhengcaioa/IServices/IPltRoleService.cs
+++ b/zhengcaioa/IServices/IPltRoleService.cs
@@ -23,6 +23,9 @@
 
         ResultEntity SaveMoreEntity(string roleid = "", string userids = "", string User_id = "");
 
-        
+
+        ResultEntity SaveUserRole(string roleid, string userid, string User_id);
+
+
     }
 }
diff --git a/zhengcaioa/Model/CusFangwenjilu.cs b/zhengcaioa/Model/CusFangwenjilu.cs
new file mode 100644
index 0000000..d3e7836
--- /dev/null
+++ b/zhengcaioa/Model/CusFangwenjilu.cs
@@ -0,0 +1,20 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace zhengcaioa.Models
+{
+    public partial class CusFangwenjilu
+    {
+        public string Id { get; set; }
+        public string Fasongfangshi { get; set; }
+        public string Fasongneirong { get; set; }
+        public string Jieshouren { get; set; }
+        public string RecStatus { get; set; }
+        public string Creater { get; set; }
+        public DateTime Createtime { get; set; }
+        public string Modifier { get; set; }
+        public DateTime Modifytime { get; set; }
+    }
+}
diff --git a/zhengcaioa/Model/LZhuanjiahuidum.cs b/zhengcaioa/Model/LZhuanjiahuidum.cs
new file mode 100644
index 0000000..5e520b5
--- /dev/null
+++ b/zhengcaioa/Model/LZhuanjiahuidum.cs
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace zhengcaioa.Models
+{
+    public partial class LZhuanjiahuidum
+    {
+        public string Id { get; set; }
+        public string Userid { get; set; }
+        public string Username { get; set; }
+        public string Anwser { get; set; }
+        public string Question { get; set; }
+        public string RecStatus { get; set; }
+        public string Creater { get; set; }
+        public DateTime Createtime { get; set; }
+        public string Modifier { get; set; }
+        public DateTime Modifytime { get; set; }
+        public string HuidaStatus { get; set; }
+    }
+}
diff --git a/zhengcaioa/Model/Project.cs b/zhengcaioa/Model/Project.cs
index 9b7ef05..b888998 100644
--- a/zhengcaioa/Model/Project.cs
+++ b/zhengcaioa/Model/Project.cs
@@ -17,8 +17,10 @@
         public string Name { get; set; }
         public string Drhx { get; set; }
         public string DrhxPrice { get; set; }
+        public decimal? DrhxDefen { get; set; }
         public string Dshx { get; set; }
         public string DshxPrice { get; set; }
+        public decimal? DshxDefen { get; set; }
         public string Zhuanjia { get; set; }
         public string Remark { get; set; }
         public string RecStatus { get; set; }
diff --git a/zhengcaioa/Model/Projectzhongbiao.cs b/zhengcaioa/Model/Projectzhongbiao.cs
index 5a3f74c..b7d142b 100644
--- a/zhengcaioa/Model/Projectzhongbiao.cs
+++ b/zhengcaioa/Model/Projectzhongbiao.cs
@@ -11,5 +11,6 @@
         public string ProjectId { get; set; }
         public string Names { get; set; }
         public string Price { get; set; }
+        public decimal? Defen { get; set; }
     }
 }
diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index d12c6ec..61265c2 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/zhengcaioa/Model/zhengcaioaContext.cs
@@ -44,6 +44,7 @@
         public virtual DbSet<CooperOrder> CooperOrders { get; set; }
         public virtual DbSet<CooperVisit> CooperVisits { get; set; }
         public virtual DbSet<CooperatecustomCustomer> CooperatecustomCustomers { get; set; }
+        public virtual DbSet<CusFangwenjilu> CusFangwenjilus { get; set; }
         public virtual DbSet<FiAccount> FiAccounts { get; set; }
         public virtual DbSet<FiAccountRecord> FiAccountRecords { get; set; }
         public virtual DbSet<FiOrderrecievemoney> FiOrderrecievemoneys { get; set; }
@@ -65,6 +66,7 @@
         public virtual DbSet<IntentionOrder> IntentionOrders { get; set; }
         public virtual DbSet<IntentionVisit> IntentionVisits { get; set; }
         public virtual DbSet<Liaotian> Liaotians { get; set; }
+        public virtual DbSet<LZhuanjiahuidum> LZhuanjiahuida { get; set; }
         public virtual DbSet<Oayouhui> Oayouhuis { get; set; }
         public virtual DbSet<PltAuth> PltAuths { get; set; }
         public virtual DbSet<PltPage> PltPages { get; set; }
@@ -1726,6 +1728,53 @@
                     .HasComment("涓氬姟缁忕悊");
             });
 
+            modelBuilder.Entity<CusFangwenjilu>(entity =>
+            {
+                entity.ToTable("cus_fangwenjilu");
+
+                entity.Property(e => e.Id).HasMaxLength(50);
+
+                entity.Property(e => e.Creater)
+                    .IsRequired()
+                    .HasMaxLength(50)
+                    .HasColumnName("creater")
+                    .HasDefaultValueSql("('1')");
+
+                entity.Property(e => e.Createtime)
+                    .HasColumnType("datetime")
+                    .HasColumnName("createtime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.Fasongfangshi)
+                    .HasMaxLength(50)
+                    .HasColumnName("fasongfangshi");
+
+                entity.Property(e => e.Fasongneirong)
+                    .HasMaxLength(4000)
+                    .HasColumnName("fasongneirong");
+
+                entity.Property(e => e.Jieshouren)
+                    .HasMaxLength(2000)
+                    .HasColumnName("jieshouren");
+
+                entity.Property(e => e.Modifier)
+                    .IsRequired()
+                    .HasMaxLength(50)
+                    .HasColumnName("modifier")
+                    .HasDefaultValueSql("('1')");
+
+                entity.Property(e => e.Modifytime)
+                    .HasColumnType("datetime")
+                    .HasColumnName("modifytime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.RecStatus)
+                    .IsRequired()
+                    .HasMaxLength(1)
+                    .HasColumnName("rec_status")
+                    .HasDefaultValueSql("('A')");
+            });
+
             modelBuilder.Entity<FiAccount>(entity =>
             {
                 entity.ToTable("fi_account");
@@ -3220,6 +3269,63 @@
                     .HasColumnName("shiyongfatiao");
             });
 
+            modelBuilder.Entity<LZhuanjiahuidum>(entity =>
+            {
+                entity.ToTable("l_zhuanjiahuida");
+
+                entity.Property(e => e.Id).HasMaxLength(50);
+
+                entity.Property(e => e.Anwser)
+                    .HasMaxLength(4000)
+                    .HasColumnName("anwser");
+
+                entity.Property(e => e.Creater)
+                    .IsRequired()
+                    .HasMaxLength(50)
+                    .HasColumnName("creater")
+                    .HasDefaultValueSql("('1')");
+
+                entity.Property(e => e.Createtime)
+                    .HasColumnType("datetime")
+                    .HasColumnName("createtime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.Modifier)
+                    .IsRequired()
+                    .HasMaxLength(50)
+                    .HasColumnName("modifier")
+                    .HasDefaultValueSql("('1')");
+
+                entity.Property(e => e.Modifytime)
+                    .HasColumnType("datetime")
+                    .HasColumnName("modifytime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.Question)
+                    .HasMaxLength(500)
+                    .HasColumnName("question");
+
+                entity.Property(e => e.RecStatus)
+                    .IsRequired()
+                    .HasMaxLength(1)
+                    .HasColumnName("rec_status")
+                    .HasDefaultValueSql("('A')");
+
+                entity.Property(e => e.HuidaStatus)
+                   .IsRequired()
+                   .HasMaxLength(1)
+                   .HasColumnName("huida_status")
+                   .HasDefaultValueSql("('D')");
+
+                entity.Property(e => e.Userid)
+                    .HasMaxLength(50)
+                    .HasColumnName("userid");
+
+                entity.Property(e => e.Username)
+                    .HasMaxLength(100)
+                    .HasColumnName("username");
+            });
+
             modelBuilder.Entity<Oayouhui>(entity =>
             {
                 entity.ToTable("Oayouhui");
@@ -3959,6 +4065,14 @@
                     .HasMaxLength(500)
                     .HasColumnName("drhx_price");
 
+                entity.Property(e => e.DrhxDefen)
+                    .HasColumnType("money")
+                    .HasColumnName("drhx_defen");
+
+                entity.Property(e => e.DshxDefen)
+                   .HasColumnType("money")
+                   .HasColumnName("dshx_defen");
+
                 entity.Property(e => e.Dshx)
                     .HasMaxLength(500)
                     .HasColumnName("dshx");
@@ -4102,6 +4216,9 @@
                 entity.Property(e => e.ProjectId)
                     .IsRequired()
                     .HasMaxLength(50);
+
+                entity.Property(e => e.Defen).HasColumnType("money")
+                    .HasColumnName("defen"); ;
             });
 
             modelBuilder.Entity<SysAttachment>(entity =>
diff --git a/zhengcaioa/Services/CusFangwenjiluService.cs b/zhengcaioa/Services/CusFangwenjiluService.cs
new file mode 100644
index 0000000..cdf636d
--- /dev/null
+++ b/zhengcaioa/Services/CusFangwenjiluService.cs
@@ -0,0 +1,114 @@
+锘縰sing AutoMapper;
+using DTO;
+using IServices;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using zhengcaioa.Models;
+
+
+namespace Services
+{
+    public class CusFangwenjiluService : ICusFangwenjiluService
+    {
+
+        private readonly zhengcaioaContext _context;
+        private readonly IMapper _mapper;
+        public CusFangwenjiluService(zhengcaioaContext context, IMapper mapper)
+        {
+            _context = context;
+            _mapper = mapper;
+        }
+
+        public ResultEntity save(CusFangwenjiluDTO dto)
+        {
+            ResultEntity resultEntity = new ResultEntity();
+            try
+            {
+                var model = _mapper.Map<CusFangwenjilu>(dto);
+                if (String.IsNullOrEmpty(model.Id))
+                {
+                    model.Id = Guid.NewGuid().ToString();
+
+
+                    _context.CusFangwenjilus.Add(model);
+                }
+                else
+                {
+                    var updatepltRole = _context.CusFangwenjilus.Find(model.Id);
+                    updatepltRole.Fasongfangshi = model.Fasongfangshi;
+                    updatepltRole.Fasongneirong = model.Fasongneirong;
+                    updatepltRole.Jieshouren = model.Jieshouren;
+                  
+
+                    updatepltRole.RecStatus = model.RecStatus;
+                    // updatepltRole.Creater = pltRole.Creater;
+                    //updatepltRole.Createtime = pltRole.Createtime;
+                    updatepltRole.Modifier = model.Modifier;
+                    updatepltRole.Modifytime = model.Modifytime;
+
+                }
+
+                _context.SaveChanges();
+                resultEntity.ReturnID = model.Id;
+                resultEntity.Result = true;
+            }
+            catch (Exception ex)
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+
+            }
+            return resultEntity;
+        }
+
+        public CusFangwenjiluDTO Get(string id)
+        {
+            var entity = _context.CusFangwenjilus.Find(id);
+
+            if (entity.RecStatus != "A")
+            {
+                entity = new CusFangwenjilu();
+            }
+            var CusFangwenjiluDTO = _mapper.Map<CusFangwenjiluDTO>(entity);
+            return CusFangwenjiluDTO;
+        }
+
+        
+
+        public ResultEntity ModifyStatus(string id, string userid)
+        {
+
+            ResultEntity result = new ResultEntity();
+            result.Result = true;
+
+            var model = _context.CusFangwenjilus.Find(id);
+            if (model != null)
+            {
+                model.RecStatus = "D";
+                model.Modifier = userid;
+                model.Modifytime = DateTime.Now;
+                _context.SaveChanges();
+            }
+
+            return result;
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈夋湁鏁堣鑹�
+        /// </summary>
+        /// <returns></returns>
+        public List<CusFangwenjiluDTO> GetList()
+        {
+
+
+            var listPosition = _context.CusFangwenjilus.Where(r => r.RecStatus == "A").ToList();
+
+            var list = _mapper.Map<List<CusFangwenjiluDTO>>(listPosition);
+            return list;
+        }
+    }
+}
diff --git a/zhengcaioa/Services/HrJixiaotichengService.cs b/zhengcaioa/Services/HrJixiaotichengService.cs
index e549023..fcbecc9 100644
--- a/zhengcaioa/Services/HrJixiaotichengService.cs
+++ b/zhengcaioa/Services/HrJixiaotichengService.cs
@@ -125,6 +125,7 @@
 
                          where a.RecStatus == "A"
                           && (string.IsNullOrWhiteSpace(searchEntity.PostId) || a.PostId == searchEntity.PostId.Trim())
+                           && (string.IsNullOrWhiteSpace(searchEntity.PiecerateId) || a.PiecerateId == searchEntity.PiecerateId.Trim())
                          select new HrJixiaotichengDTO
                          {
                              Id = a.Id,
diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs
index e287578..d935679 100644
--- a/zhengcaioa/Services/IntentionCustomerService.cs
+++ b/zhengcaioa/Services/IntentionCustomerService.cs
@@ -26,15 +26,24 @@
         ResultEntity resultEntity = new ResultEntity();
         try
         {
-            var checkUserSn = _context.IntentionCustomers.Where(x => x.Name == intentionCustomerDTO.Name && x.RecStatus == "A" && x.Id != intentionCustomerDTO.Id).FirstOrDefault();
-            if (checkUserSn != null && (string.IsNullOrWhiteSpace(intentionCustomerDTO.Id) || (!string.IsNullOrWhiteSpace(intentionCustomerDTO.Id) && checkUserSn.Id != intentionCustomerDTO.Id)))
-            {
-                resultEntity.Result = false;
-                resultEntity.Message = "瀹㈡埛鍗曚綅閲嶅";
-                return resultEntity;
-            }
+                var checkUserSn = _context.IntentionCustomers.Where(x => x.Name == intentionCustomerDTO.Name && x.RecStatus == "A" && x.Id != intentionCustomerDTO.Id).FirstOrDefault();
+                if (checkUserSn != null && (string.IsNullOrWhiteSpace(intentionCustomerDTO.Id) || (!string.IsNullOrWhiteSpace(intentionCustomerDTO.Id) && checkUserSn.Id != intentionCustomerDTO.Id)))
+                {
+                    resultEntity.Result = false;
+                    resultEntity.Message = "瀹㈡埛鍗曚綅閲嶅";
+                    return resultEntity;
+                }
 
-            var intentionCustomer = _mapper.Map<IntentionCustomer>(intentionCustomerDTO);
+                var checkcooper = _context.CooperatecustomCustomers.Where(x => x.Name == intentionCustomerDTO.Name && x.RecStatus == "A" ).FirstOrDefault();
+                if (checkcooper != null )
+                {
+                    resultEntity.Result = false;
+                    resultEntity.Message = "宸插瓨鍦ㄥ悎浣滃鎴�";
+                    return resultEntity;
+                }
+
+
+                var intentionCustomer = _mapper.Map<IntentionCustomer>(intentionCustomerDTO);
 
 
             if (String.IsNullOrEmpty(intentionCustomer.Id))
@@ -313,5 +322,15 @@
 
             return result;
         }
+
+        public List<IntentionCustomerDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax)
+        {
+
+
+            var listPosition = _context.IntentionCustomers.Where(r => r.RecStatus == "A" && r.Creater == userid && r.Createtime >= datemin && r.Createtime < datemax).ToList();
+
+            var list = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
+            return list;
+        }
     }
 }
diff --git a/zhengcaioa/Services/IntentionVisitService.cs b/zhengcaioa/Services/IntentionVisitService.cs
index fd4fa4e..f893879 100644
--- a/zhengcaioa/Services/IntentionVisitService.cs
+++ b/zhengcaioa/Services/IntentionVisitService.cs
@@ -251,5 +251,22 @@
              
             return result;
         }
+
+        public List<IntentionVisitDTO> GetListsalary(string userid, DateTime datemin, DateTime datemax)
+        {
+
+
+            // var listCooperVisits = _context.CooperVisits.Where(r => id.Contains(r.Id) && r.RecStatus == "A").Select(x => x.Viscustomer).ToList();
+
+            var listCooperatecustomCustomers = _context.IntentionVisits.Where(r => r.RecStatus == "A" && r.Creater == userid && r.Vistime >= datemin && r.Vistime < datemax).ToList();
+
+            var result = _mapper.Map<List<IntentionVisitDTO>>(listCooperatecustomCustomers);
+
+
+
+
+
+            return result;
+        }
     }
 }
diff --git a/zhengcaioa/Services/LZhuanjiahuidumService.cs b/zhengcaioa/Services/LZhuanjiahuidumService.cs
new file mode 100644
index 0000000..43c2834
--- /dev/null
+++ b/zhengcaioa/Services/LZhuanjiahuidumService.cs
@@ -0,0 +1,169 @@
+锘縰sing AutoMapper;
+using DTO;
+using IServices;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using zhengcaioa.Models;
+
+
+namespace Services
+{
+    public class LZhuanjiahuidumService : ILZhuanjiahuidumService
+    {
+        private readonly zhengcaioaContext _context;
+        private readonly IMapper _mapper;
+        public LZhuanjiahuidumService(zhengcaioaContext context, IMapper mapper)
+        {
+            _context = context;
+            _mapper = mapper;
+        }
+
+        public ResultEntity save(LZhuanjiahuidumDTO dto)
+        {
+            ResultEntity resultEntity = new ResultEntity();
+            try
+            {
+                var model = _mapper.Map<LZhuanjiahuidum>(dto);
+                if (String.IsNullOrEmpty(model.Id))
+                {
+                    model.Id = Guid.NewGuid().ToString();
+
+
+                    _context.LZhuanjiahuida.Add(model);
+                }
+                else
+                {
+                    var updatepltRole = _context.LZhuanjiahuida.Find(model.Id);
+                    updatepltRole.Userid = model.Userid;
+                    updatepltRole.Username = model.Username;
+                    updatepltRole.Anwser = model.Anwser;
+                    updatepltRole.Question = model.Question;
+                    updatepltRole.HuidaStatus = model.HuidaStatus;
+
+                    updatepltRole.RecStatus = model.RecStatus;
+                    // updatepltRole.Creater = pltRole.Creater;
+                    //updatepltRole.Createtime = pltRole.Createtime;
+                    updatepltRole.Modifier = model.Modifier;
+                    updatepltRole.Modifytime = model.Modifytime;
+
+                }
+
+                _context.SaveChanges();
+                resultEntity.ReturnID = model.Id;
+                resultEntity.Result = true;
+            }
+            catch (Exception ex)
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+
+            }
+            return resultEntity;
+        }
+
+        public LZhuanjiahuidumDTO Get(string id)
+        {
+            var entity = _context.LZhuanjiahuida.Find(id);
+
+            if (entity.RecStatus != "A")
+            {
+                entity = new LZhuanjiahuidum();
+            }
+            var LZhuanjiahuidumDTO = _mapper.Map<LZhuanjiahuidumDTO>(entity);
+            return LZhuanjiahuidumDTO;
+        }
+
+        public ResultDataEntity<LZhuanjiahuidumDTO> SearchByPaging(LZhuanjiahuidumDTOSearch searchEntity)
+        {
+            ResultDataEntity<LZhuanjiahuidumDTO> data = new ResultDataEntity<LZhuanjiahuidumDTO>();
+
+            
+
+            var query = (from a in _context.LZhuanjiahuida//.Where(x => x.RecStatus == "A")
+                         
+
+                        
+                         where a.RecStatus == "A"
+                          && (string.IsNullOrWhiteSpace(searchEntity.Username) || a.Username.Contains(searchEntity.Username.Trim()))
+                           && (string.IsNullOrWhiteSpace(searchEntity.Question) || a.Question.Contains(searchEntity.Question.Trim()))
+                            && (string.IsNullOrWhiteSpace(searchEntity.Userid) || a.Userid == searchEntity.Userid.Trim())
+                             && (string.IsNullOrWhiteSpace(searchEntity.HuidaStatus) || a.HuidaStatus == searchEntity.HuidaStatus.Trim())
+                         select new LZhuanjiahuidumDTO
+                         {
+                             Id = a.Id,
+                             Userid = a.Userid,
+                             Username = a.Username,
+                             Anwser = a.Anwser,
+                             Question = a.Question,
+                              HuidaStatus = a.HuidaStatus,
+
+
+
+
+                             RecStatus = a.RecStatus,
+                             Creater = a.Creater,
+                             Createtime = a.Createtime,
+                             Modifier = a.Modifier,
+                             Modifytime = a.Modifytime,
+
+                         }).OrderByDescending(x => x.Modifytime).ToList();
+
+
+
+
+
+
+
+            if (searchEntity.totalrows == 0)
+                searchEntity.totalrows = query.Count();
+            var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
+
+            data.LoadData(searchEntity, rolelist);
+            return data;
+        }
+
+        public ResultEntity ModifyStatus(string id, string userid)
+        {
+
+            ResultEntity result = new ResultEntity();
+            result.Result = true;
+
+            var model = _context.LZhuanjiahuida.Find(id);
+            if (model != null)
+            {
+                model.RecStatus = "D";
+                model.Modifier = userid;
+                model.Modifytime = DateTime.Now;
+                _context.SaveChanges();
+            }
+
+            return result;
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈夋湁鏁堣鑹�
+        /// </summary>
+        /// <returns></returns>
+        public List<LZhuanjiahuidumDTO> GetList(string Userid = "", string question = "")
+        {
+
+
+            var listPosition = _context.LZhuanjiahuida.Where(r => r.RecStatus == "A").ToList();
+            if (!string.IsNullOrEmpty(Userid))
+            {
+                listPosition = listPosition.Where(x=>x.Userid== Userid).ToList();
+            }
+            if (!string.IsNullOrEmpty(question))
+            {
+                listPosition = listPosition.Where(x => x.Question == question).ToList();
+            }
+
+            var list = _mapper.Map<List<LZhuanjiahuidumDTO>>(listPosition);
+            return list;
+        }
+    }
+}
diff --git a/zhengcaioa/Services/PltRoleService.cs b/zhengcaioa/Services/PltRoleService.cs
index 576288b..8e58bd4 100644
--- a/zhengcaioa/Services/PltRoleService.cs
+++ b/zhengcaioa/Services/PltRoleService.cs
@@ -248,5 +248,51 @@
 
             return result;
         }
+
+
+        public ResultEntity SaveUserRole(string roleid, string userid, string User_id)
+        {
+            var result = new ResultEntity();
+            result.Result = true;
+            #region 鍒犻櫎瑙掕壊鍘熸潵璁剧疆鐨勪汉鍛�
+            try
+            {
+
+                
+                #region 璁剧疆瑙掕壊鏂伴厤缃殑浜哄憳
+              
+                        _context.PltUserRoles.Add(new PltUserRole()
+                        {
+                            Id = Guid.NewGuid().ToString(),
+                            UserId = userid,
+                            RoleId = roleid,
+                            RecStatus = "A",
+                            Creater = User_id,
+                            Createtime = DateTime.Now,
+                            Modifier = User_id,
+                            Modifytime = DateTime.Now
+                        });
+                    
+              
+
+                #endregion
+                _context.SaveChanges();
+            }
+
+
+            catch (Exception ex)
+            {
+                result.Result = false;
+                result.Message = ex.Message;
+            }
+
+            #endregion
+
+
+            return result;
+        }
+
+
+        
     }
 }
diff --git a/zhengcaioa/Services/ProjectService.cs b/zhengcaioa/Services/ProjectService.cs
index 4097033..e837793 100644
--- a/zhengcaioa/Services/ProjectService.cs
+++ b/zhengcaioa/Services/ProjectService.cs
@@ -64,6 +64,9 @@
                     updateproject.Name = project.Name;
                     updateproject.Drhx = project.Drhx;
                     updateproject.DrhxPrice = project.DrhxPrice;
+                    updateproject.DrhxDefen = project.DrhxDefen;
+                    updateproject.DshxDefen = project.DshxDefen;
+                    updateproject.Dshx = project.Dshx;
                     updateproject.Dshx = project.Dshx;
                     updateproject.DshxPrice = project.DshxPrice;
                     updateproject.Zhuanjia = project.Zhuanjia;
@@ -188,6 +191,7 @@
                             }
                             projectzhongbiao.Names = projectDTO.Names[i];
                             projectzhongbiao.Price = projectDTO.Price[i];
+                            projectzhongbiao.Defen = projectDTO.Defen[i];
                             projectzhongbiao.ProjectId = project.Id;
                             _context.Projectzhongbiaos.Add(projectzhongbiao);
                         }
@@ -227,7 +231,9 @@
 
 
             var projectDTO = _mapper.Map<ProjectDTO>(entity);
-            if(projectreasons!=null && projectreasons.Count>0)
+            projectDTO.DrhxDefenName = projectDTO.DrhxDefen.HasValue ? projectDTO.DrhxDefen.Value.ToString("F2") : "";
+            projectDTO.DshxDefenName = projectDTO.DshxDefen.HasValue ? projectDTO.DshxDefen.Value.ToString("F2") : "";
+            if (projectreasons!=null && projectreasons.Count>0)
             {
                 projectDTO.projectreasons = projectreasons;
             }
@@ -251,12 +257,26 @@
 
             if (Projectzhongbiaos != null && Projectzhongbiaos.Count > 0)
             {
-                projectDTO.Projectzhongbiaos = Projectzhongbiaos;
+                List<ProjectzhongbiaoDTO> projectzhongbiaoDTOs = new List<ProjectzhongbiaoDTO>();
+                foreach(var projectzhongbiao in Projectzhongbiaos)
+                {
+                    ProjectzhongbiaoDTO projectzhongbiaoDTO = new ProjectzhongbiaoDTO();
+                    projectzhongbiaoDTO.DefenName = projectzhongbiao.Defen.HasValue ? projectzhongbiao.Defen.Value.ToString("F2") : "";
+
+                    projectzhongbiaoDTO.ZhongbiaoId = projectzhongbiao.ZhongbiaoId;
+                    projectzhongbiaoDTO.ProjectId = projectzhongbiao.ProjectId;
+                    projectzhongbiaoDTO.Names = projectzhongbiao.Names;
+                    projectzhongbiaoDTO.Price = projectzhongbiao.Price;
+                    projectzhongbiaoDTO.Defen = projectzhongbiao.Defen;
+
+                     projectzhongbiaoDTOs.Add(projectzhongbiaoDTO);
+                }
+                projectDTO.Projectzhongbiaos = projectzhongbiaoDTOs;
             }
             else
             {
-                var Projectzhongbiaoslist = new List<Projectzhongbiao>();
-                Projectzhongbiaoslist.Add(new Projectzhongbiao());
+                var Projectzhongbiaoslist = new List<ProjectzhongbiaoDTO>();
+                Projectzhongbiaoslist.Add(new ProjectzhongbiaoDTO());
                 projectDTO.Projectzhongbiaos = Projectzhongbiaoslist;
             }
 
@@ -272,7 +292,7 @@
             List<ProjectDTO> list = new List<ProjectDTO>();
             //绛涢��
             StringBuilder sql = new StringBuilder();
-            sql.Append("SELECT distinct a.[Id],a.[start_time] ,b.[name] +'-'+c.[name]+'-'+d.[name]  Sheng ,a.city  ,a.[area_id],a.cgfs, a.[name] ,a.[number],a.creater,a.createtime,a.modifier,a.modifytime       ,a.[drhx],a.[drhx_price],a.[dshx],a.[dshx_price],a.[remark],a.[rec_status] ,a.[question] ,a.[zhongbiaocishu],a.[feibiaocishu],a.[zhongbiaojine],a.[Fblx],a.[Fbyy] , a.[zhuanjia]  , a.[caigourenname], a.[caigourenaddress], a.[caigourencontact], a.[dailiname], a.[dailiaddress], a.[dailicontact] ,toubiaocishu = stuff((select '銆�'+ f.[names] from  [Projectzhongbiao] f where  f.[ProjectId] = a.[Id]  for xml path('')), 1,1, '')   "); //zhuanjia = stuff((select ','+name from [Zhuanjia] f where  CHARINDEX(f.id,a.[zhuanjia]) >0 for xml path('')), 1,1, '') 
+            sql.Append("SELECT distinct a.[Id],a.[start_time],a.[drhx_defen],a.[dshx_defen] ,b.[name] +'-'+c.[name]+'-'+d.[name]  Sheng ,a.city  ,a.[area_id],a.cgfs, a.[name] ,a.[number],a.creater,a.createtime,a.modifier,a.modifytime       ,a.[drhx],a.[drhx_price],a.[dshx],a.[dshx_price],a.[remark],a.[rec_status] ,a.[question] ,a.[zhongbiaocishu],a.[feibiaocishu],a.[zhongbiaojine],a.[Fblx],a.[Fbyy] , a.[zhuanjia]  , a.[caigourenname], a.[caigourenaddress], a.[caigourencontact], a.[dailiname], a.[dailiaddress], a.[dailicontact] ,toubiaocishu = stuff((select '銆�'+ f.[names] from  [Projectzhongbiao] f where  f.[ProjectId] = a.[Id]  for xml path('')), 1,1, '')   "); //zhuanjia = stuff((select ','+name from [Zhuanjia] f where  CHARINDEX(f.id,a.[zhuanjia]) >0 for xml path('')), 1,1, '') 
             sql.Append("FROM [Project] a ");
             sql.Append("left join  [Area] b  on a.[sheng]  = b.[codeID] ");
             sql.Append("left join  [Area] c  on a.[city]  = c.[codeID] ");
@@ -301,8 +321,17 @@
                 sql.Append(" )");
 
             }
+            if (!string.IsNullOrWhiteSpace(searchEntity.Fencha))
+            {
+                decimal aaaa = 0;
+                decimal.TryParse(searchEntity.Fencha, out aaaa);
+                if (aaaa > 0)
+                {
+                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (b.[defen]-a.[drhx_defen])  <= " + aaaa + " ) ");
+                }
+            }
 
-            if (!string.IsNullOrWhiteSpace(searchEntity.Reasonname))
+                if (!string.IsNullOrWhiteSpace(searchEntity.Reasonname))
             {
                 sql.Append(" and  exists (select b.[ProjectId] from [Projectreason] b  where  a.[Id]=b.[ProjectId] and   b.[reasonname] like '%" + searchEntity.Reasonname + "%') ");
 
diff --git a/zhengcaioa/zhengcaioa/Controllers/AdmManagement/DailyManagementController.cs b/zhengcaioa/zhengcaioa/Controllers/AdmManagement/DailyManagementController.cs
index 7753309..040c740 100644
--- a/zhengcaioa/zhengcaioa/Controllers/AdmManagement/DailyManagementController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/AdmManagement/DailyManagementController.cs
@@ -189,7 +189,7 @@
             AdmMemoBookDTO admMemoBookDTO = _DailyManageService.GetMemoBook(id);
             if (!admMemoBookDTO.Time.HasValue)
             {
-                admMemoBookDTO.TimeName = "";
+                admMemoBookDTO.TimeName = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
                 Rtype = string.IsNullOrEmpty(admMemoBookDTO.Rtype)? Rtype : admMemoBookDTO.Rtype;
             }
             else
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
index f223d0c..e7fd1b8 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs
@@ -30,9 +30,11 @@
         private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
         private readonly IUserService _userService;
         private readonly ICooperVisitService _cooperVisitService;
+        private readonly ICusFangwenjiluService _cusFangwenjiluService; 
 
 
-        public CooperVisitController(ILogger<CooperVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, ICooperVisitService cooperVisitService)
+        public CooperVisitController(ILogger<CooperVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, ICooperVisitService cooperVisitService
+            , ICusFangwenjiluService cusFangwenjiluService)
         {
             _logger = logger;
             _projectService = projectService;
@@ -40,6 +42,7 @@
             _cooperatecustomCustomerService = cooperatecustomCustomerService;
             _userService = userService;
             _cooperVisitService = cooperVisitService;
+            _cusFangwenjiluService = cusFangwenjiluService;
         }
 
         public IActionResult Index()
@@ -213,8 +216,18 @@
             {
                 resultEntity.Result = false;
                 resultEntity.Message = "鐭俊鍙戦�佸け璐�";
-
+                return new JsonResult(resultEntity);
             }
+            CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
+            dto.Fasongfangshi = "01";
+            dto.Fasongneirong = neirong;
+            dto.Jieshouren = baifangid;
+            dto.RecStatus = "A";
+            dto.Creater = curentuser.Id;
+            dto.Modifytime = DateTime.Now;
+            dto.Modifier = curentuser.Id;
+            dto.Createtime = dto.Modifytime;
+            resultEntity = _cusFangwenjiluService.save(dto);
             _logger.LogInformation(curentuser.UserName + "鍙戦�佺煭淇$粰瀹㈡埛" + customename);
             return new JsonResult(resultEntity);
         }
@@ -284,7 +297,16 @@
             {
                 return new JsonResult(resultEntity);
             }
-
+            CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
+            dto.Fasongfangshi = "02";
+            dto.Fasongneirong = neirong;
+            dto.Jieshouren = baifangid;
+            dto.RecStatus = "A";
+            dto.Creater = curentuser.Id;
+            dto.Modifytime = DateTime.Now;
+            dto.Modifier = curentuser.Id;
+            dto.Createtime = dto.Modifytime;
+            resultEntity = _cusFangwenjiluService.save(dto);
             _logger.LogInformation(curentuser.UserName + "鍙戦�侀偖浠剁粰瀹㈡埛" + customename);
 
             return new JsonResult(resultEntity);
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
index d7b9f68..bab207c 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
@@ -15,6 +15,7 @@
 using System.Threading.Tasks;
 using zhengcaioa.Models;
 using zhengcaioa.IService;
+using System.Transactions;
 
 namespace zhengcaioa.Controllers.Customer
 {
@@ -274,31 +275,39 @@
                 resultEntity.Result = false;
                 resultEntity.Message = "娌℃湁鎵惧埌瀹㈡埛!";
             }
-          
-         
-            if (result != null && result.Count > 0)
+             using(TransactionScope scope = new TransactionScope())
             {
-                for (int i = 0; i < result.Count; i++)
+                if (result != null && result.Count > 0)
                 {
-                    var dto = _mapper.Map<CooperatecustomCustomerDTO>(result[i]);
-                    dto.Id = "";
-                    dto.Creater = curentuser.Id;
-                    dto.Modifier = curentuser.Id;
-                    dto.Createtime = DateTime.Now;
-                    dto.Modifytime = dto.Createtime;
-                    dto.zhuanyi = true;
-                    resultEntity =  _cooperatecustomCustomerService.save(dto);
-                    if (!resultEntity.Result)
+                    for (int i = 0; i < result.Count; i++)
                     {
-                        return new JsonResult(resultEntity);
+
+                        resultEntity = _intentionCustomerService.ModifyStatus(result[i].Id, curentuser.Id);
+                        if (!resultEntity.Result)
+                        {
+                            return new JsonResult(resultEntity);
+                        }
+
+                        var dto = _mapper.Map<CooperatecustomCustomerDTO>(result[i]);
+                        dto.Id = "";
+                        dto.Creater = curentuser.Id;
+                        dto.Modifier = curentuser.Id;
+                        dto.Createtime = DateTime.Now;
+                        dto.Modifytime = dto.Createtime;
+                        dto.zhuanyi = true;
+                        resultEntity = _cooperatecustomCustomerService.save(dto);
+                        if (!resultEntity.Result)
+                        {
+                            return new JsonResult(resultEntity);
+                        }
                     }
                 }
+                
+
+                scope.Complete();
             }
-            else
-            {
-                resultEntity.Result = false;
-                resultEntity.Message = "鏃犺仈绯讳汉鍙风爜";
-            }
+         
+            
 
             
 
diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
index e54fb98..007b957 100644
--- a/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
@@ -30,9 +30,11 @@
         private readonly IIntentionCustomerService _intentionCustomerService;
         private readonly IUserService _userService;
         private readonly IIntentionVisitService _intentionVisitService;
+        private readonly ICusFangwenjiluService _cusFangwenjiluService;
 
 
-        public IntentionVisitController(ILogger<IntentionVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, IIntentionCustomerService intentionCustomerService, IUserService userService, IIntentionVisitService intentionVisitService)
+        public IntentionVisitController(ILogger<IntentionVisitController> logger, IProjectService projectService, ILiaotianService liaotianService, IIntentionCustomerService intentionCustomerService, IUserService userService, IIntentionVisitService intentionVisitService
+             , ICusFangwenjiluService cusFangwenjiluService)
         {
             _logger = logger;
             _projectService = projectService;
@@ -40,6 +42,7 @@
             _intentionCustomerService = intentionCustomerService;
             _userService = userService;
             _intentionVisitService = intentionVisitService;
+            _cusFangwenjiluService = cusFangwenjiluService;
         }
 
 
@@ -221,6 +224,16 @@
                 resultEntity.Message = "鐭俊鍙戦�佸け璐�";
 
             }
+            CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
+            dto.Fasongfangshi = "01";
+            dto.Fasongneirong = neirong;
+            dto.Jieshouren = baifangid;
+            dto.RecStatus = "A";
+            dto.Creater = curentuser.Id;
+            dto.Modifytime = DateTime.Now;
+            dto.Modifier = curentuser.Id;
+            dto.Createtime = dto.Modifytime;
+            resultEntity = _cusFangwenjiluService.save(dto);
             _logger.LogInformation(curentuser.UserName + "鍙戦�佺煭淇$粰瀹㈡埛" + customename);
             return new JsonResult(resultEntity);
         }
@@ -290,7 +303,16 @@
             {
                 return new JsonResult(resultEntity);
             }
-
+            CusFangwenjiluDTO dto = new CusFangwenjiluDTO();
+            dto.Fasongfangshi = "02";
+            dto.Fasongneirong = neirong;
+            dto.Jieshouren = baifangid;
+            dto.RecStatus = "A";
+            dto.Creater = curentuser.Id;
+            dto.Modifytime = DateTime.Now;
+            dto.Modifier = curentuser.Id;
+            dto.Createtime = dto.Modifytime;
+            resultEntity = _cusFangwenjiluService.save(dto);
             _logger.LogInformation(curentuser.UserName +"鍙戦�侀偖浠剁粰瀹㈡埛"+ customename);
 
             return new JsonResult(resultEntity);
diff --git a/zhengcaioa/zhengcaioa/Controllers/Expert/ZhuanjiahuidaController.cs b/zhengcaioa/zhengcaioa/Controllers/Expert/ZhuanjiahuidaController.cs
new file mode 100644
index 0000000..3904acf
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Controllers/Expert/ZhuanjiahuidaController.cs
@@ -0,0 +1,292 @@
+锘縰sing DTO;
+using IServices;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Logging;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IdentityModel.Tokens.Jwt;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Threading.Tasks;
+using zhengcaioa.IService;
+using zhengcaioa.Models;
+
+namespace zhengcaioa.Controllers.Expert
+{
+    public class ZhuanjiahuidaController : Controller
+    {
+        private readonly ILogger<ZhuanjiahuidaController> _logger;
+        private readonly ILZhuanjiahuidumService _lZhuanjiahuidumService;
+        private readonly ILiaotianService _liaotianService;
+        private readonly IConfiguration _configuration;
+
+
+
+
+        public ZhuanjiahuidaController(ILogger<ZhuanjiahuidaController> logger, ILZhuanjiahuidumService lZhuanjiahuidumService, ILiaotianService liaotianService)
+        {
+            _logger = logger;
+            _lZhuanjiahuidumService = lZhuanjiahuidumService;
+            _liaotianService = liaotianService;
+        }
+        [CheckLogin]
+        public IActionResult Index()
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            List<ActionEntity> actionlist = new List<ActionEntity>();
+            ActionEntity actionEntity = new ActionEntity();
+            actionEntity.OpenType = 0;
+            actionEntity.ActionUrl = "";
+            actionEntity.ActionFun = "Search";
+            actionEntity.PageIco = "fa fa-search";
+            actionEntity.ActionName = "鏌ヨ";
+            actionlist.Add(actionEntity);
+            //ActionEntity actionEntity1 = new ActionEntity();
+            //actionEntity1.OpenType = 0;
+            //actionEntity1.ActionUrl = "";
+            //actionEntity1.ActionFun = "Add";
+            //actionEntity1.PageIco = "fa fa-plus";
+            //actionEntity1.ActionName = "鏂板";
+            //actionlist.Add(actionEntity1);
+            ViewData["ActionInfo"] = actionlist;
+
+            ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+            return View();
+        }
+
+        [CheckLogin]
+        public IActionResult GetList(LZhuanjiahuidumDTOSearch search)
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
+            return new JsonResult(_lZhuanjiahuidumService.SearchByPaging(search));
+        }
+
+
+        #region 缂栬緫
+        [CheckLogin]
+        public ActionResult Edit(string id = null)
+        {
+
+
+
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+
+            LZhuanjiahuidumDTO dto = new LZhuanjiahuidumDTO();
+            if (!String.IsNullOrEmpty(id))
+            {
+                dto = _lZhuanjiahuidumService.Get(id);
+
+            }
+     
+
+
+
+
+            ViewData.Model = dto;
+            return View();
+        }
+
+
+
+
+
+
+
+
+
+
+        /// <summary>
+        /// 淇濆瓨
+        /// </summary>
+        /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param>
+        /// <returns></returns>
+        [HttpPost]
+        [CheckLogin]
+        public IActionResult Save(LZhuanjiahuidumDTO data)
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            data.RecStatus = "A";
+            if (String.IsNullOrEmpty(data.Id))
+            {
+                data.Creater = curentuser.Id;
+                data.Createtime = DateTime.Now;
+            }
+            else
+            {
+                data.HuidaStatus = "A";
+            }
+            data.Modifier = curentuser.Id;
+            data.Modifytime = DateTime.Now;
+
+            ResultEntity resultEntity = _lZhuanjiahuidumService.save(data);
+
+            return new JsonResult(resultEntity);
+        }
+        #endregion
+
+        /// <summary>
+        /// 鍒犻櫎涓讳俊鎭�
+        /// </summary>
+        /// <param name="info">瀹炰綋</param>
+        /// <returns></returns>
+        /// 
+        [CheckLogin]
+        public IActionResult Nullify(string Id = "")
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            return new JsonResult(_lZhuanjiahuidumService.ModifyStatus(Id, curentuser.Id));
+        }
+
+
+
+        //鎻愰棶
+        public IActionResult Wenti([FromBody]LZhuanjiahuidumDTO data)
+        {
+            ReturnMsg<LZhuanjiahuidumDTO> returnMsg = new ReturnMsg<LZhuanjiahuidumDTO>();
+            returnMsg.code = 2;
+            try
+            {
+                var headers = Request.Headers;
+                if (headers != null)
+                {
+                    //string SecurityKey = _configuration.GetSection("SecurityKey").Value;
+                    var keyId = headers["Authorization"].FirstOrDefault();
+                    if (string.IsNullOrEmpty("keyId"))
+                    {
+                        returnMsg.code = 2;
+                        returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                        returnMsg.count = 0;
+
+                        return new JsonResult(returnMsg);
+                    }
+
+
+                    JwtSecurityToken jwt = null;
+                    var handler = new JwtSecurityTokenHandler();
+                    var key1 = keyId.Replace("Bearer", "").Trim();
+                    jwt = handler.ReadJwtToken(key1);
+                    System.Security.Claims.Claim sss = jwt.Claims.Where(x => x.Type == "id").FirstOrDefault();
+                    data.Userid = sss.Value;
+
+                }
+
+               var lZhuanjiahuidumDTOs = _lZhuanjiahuidumService.GetList(data.Userid, data.Question);
+
+                if(lZhuanjiahuidumDTOs!=null&& lZhuanjiahuidumDTOs.Count > 0)
+                {
+                    returnMsg.code = 3;
+                    returnMsg.error = "杩欎釜闂宸茬粡鎻愰棶杩囦簡";
+                    returnMsg.count = 0;
+
+                    return new JsonResult(returnMsg);
+                }
+
+                data.RecStatus = "A";
+                if (String.IsNullOrEmpty(data.Id))
+                {
+                    data.Creater = "1";
+                    data.Createtime = DateTime.Now;
+                }
+                data.Modifier = "1"; ;
+                data.Modifytime = DateTime.Now;
+
+                ResultEntity resultEntity = _lZhuanjiahuidumService.save(data);
+                if (resultEntity.Result)
+                {
+                    returnMsg.code = 1;
+                }
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+                
+            }
+
+           
+
+            return new JsonResult(returnMsg);
+        }
+
+
+
+
+        //鎻愰棶
+        public IActionResult Huida()
+        {
+            ReturnMsg<List<LZhuanjiahuidumDTO>> returnMsg = new ReturnMsg<List<LZhuanjiahuidumDTO>> ();
+            returnMsg.code = 2;
+            try
+            {
+                string userid = "";
+                var headers = Request.Headers;
+                if (headers != null)
+                {
+                    //string SecurityKey = _configuration.GetSection("SecurityKey").Value;
+                    var keyId = headers["Authorization"].FirstOrDefault();
+                    if (string.IsNullOrEmpty("keyId"))
+                    {
+                        returnMsg.code = 2;
+                        returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                        returnMsg.count = 0;
+
+                        return new JsonResult(returnMsg);
+                    }
+
+
+                    JwtSecurityToken jwt = null;
+                    var handler = new JwtSecurityTokenHandler();
+                    var key1 = keyId.Replace("Bearer", "").Trim();
+                    jwt = handler.ReadJwtToken(key1);
+                    System.Security.Claims.Claim sss = jwt.Claims.Where(x => x.Type == "id").FirstOrDefault();
+                    userid = sss.Value;
+
+                }
+                LZhuanjiahuidumDTOSearch searchEntity = new LZhuanjiahuidumDTOSearch();
+                searchEntity.Userid = userid;
+                //searchEntity.HuidaStatus = "A";
+                searchEntity.page = 1;
+                searchEntity.rows = 1000;
+
+                ResultDataEntity<LZhuanjiahuidumDTO> resultDataEntity = _lZhuanjiahuidumService.SearchByPaging(searchEntity);
+                returnMsg.code = 1;
+                returnMsg.returnObj = resultDataEntity.DataList;
+                returnMsg.count = resultDataEntity.DataList.Count;
+
+
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+
+            }
+           
+
+             
+
+            
+
+            return new JsonResult(returnMsg);
+        }
+
+    
+
+}
+
+
+
+
+
+}
diff --git a/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs b/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs
index 524f6cc..2624935 100644
--- a/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs
@@ -35,7 +35,7 @@
         }
 
         public IActionResult Index()
-        {
+        {           
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
             List<ActionEntity> actionlist = new List<ActionEntity>();
diff --git a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
index a0f7ae5..084e8a4 100644
--- a/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
@@ -140,8 +140,8 @@
                 Projectyouxiaolist.Add(new Projectyouxiao());
                 projectDTO.Projectyouxiaos = Projectyouxiaolist;
 
-                var Projectzhongbiaoslist = new List<Projectzhongbiao>();
-                Projectzhongbiaoslist.Add(new Projectzhongbiao());
+                var Projectzhongbiaoslist = new List<ProjectzhongbiaoDTO>();
+                Projectzhongbiaoslist.Add(new ProjectzhongbiaoDTO());
                 projectDTO.Projectzhongbiaos = Projectzhongbiaoslist;
                 projectDTO.StartTime = DateTime.Now;
             }
@@ -329,7 +329,7 @@
                         }
                         else if (select != null && select.TextContent.IndexOf("涓爣锛堟垚浜わ級淇℃伅") >= 0)
                         {
-                            projectDTO.Projectzhongbiaos = new List<Projectzhongbiao>();
+                            projectDTO.Projectzhongbiaos = new List<ProjectzhongbiaoDTO>();
                             
                             if (table[i + 1] != null)
                             {
@@ -342,7 +342,7 @@
                                         var surpliernames = surpliername.Split(',');
                                         for(int j = 0;j< surpliernames.Length; j++)
                                         {
-                                            var projectzhongbiao = new Projectzhongbiao();
+                                            var projectzhongbiao = new ProjectzhongbiaoDTO();
                                             projectzhongbiao.Names = surpliernames[j].Trim();
                                             //if (table[i + 2] != null)
                                             //{
diff --git a/zhengcaioa/zhengcaioa/Controllers/UserController.cs b/zhengcaioa/zhengcaioa/Controllers/UserController.cs
index 74de376..2f1cabc 100644
--- a/zhengcaioa/zhengcaioa/Controllers/UserController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/UserController.cs
@@ -24,9 +24,11 @@
         private readonly ILiaotianService _liaotianService;
         private readonly IPltJiatingchengyuanService _pltJiatingchengyuanService;
         private readonly ISysAttachmentService _sysAttachmentService;
+        private readonly IPltRoleService _pltRoleService;
 
 
-        public UserController(ILogger<UserController> logger, IUserService userService, IHrDeptService hrDeptService, IHrPositionService hrPositionService, ILiaotianService liaotianService, IPltJiatingchengyuanService pltJiatingchengyuanService, ISysAttachmentService sysAttachmentService)
+        public UserController(ILogger<UserController> logger, IUserService userService, IHrDeptService hrDeptService, IHrPositionService hrPositionService, ILiaotianService liaotianService, IPltJiatingchengyuanService pltJiatingchengyuanService, ISysAttachmentService sysAttachmentService
+            , IPltRoleService pltRoleService)
         {
             _logger = logger;
             _userService = userService;
@@ -35,6 +37,7 @@
             _liaotianService = liaotianService;
             _pltJiatingchengyuanService = pltJiatingchengyuanService;
             _sysAttachmentService = sysAttachmentService;
+            _pltRoleService = pltRoleService;
         } 
  
  
@@ -263,12 +266,13 @@
             {
                 using (TransactionScope scope = new TransactionScope())
                 {
-
+                    bool charujues = false;
                     userdata.RecStatus = "A";
                     if (String.IsNullOrEmpty(userdata.Id))
                     {
                         userdata.Creater = curentuser.Id;
                         userdata.Createtime = DateTime.Now;
+                        charujues = true;
                     }
                     userdata.Modifier = curentuser.Id;
                     userdata.Modifytime = DateTime.Now;
@@ -278,6 +282,21 @@
                     {
                         return JsonConvert.SerializeObject(resultEntity);
                     }
+                    if (charujues)
+                    {
+                       var  pltRoleDTO = _pltRoleService.listRole().Where(x => x.RoleName == "鍛樺伐").FirstOrDefault();
+
+                        if (pltRoleDTO != null)
+                        {
+                            resultEntity = _pltRoleService.SaveUserRole(pltRoleDTO.Id,userdata.Id, curentuser.Id);
+                            if (resultEntity.Result == false)
+                            {
+                                return JsonConvert.SerializeObject(resultEntity);
+                            }
+                        }
+                       
+                    }
+
                     string[] JiatingchengyuanId = userdata.JiatingchengyuanId;
                     string[] Name = userdata.Name;
                     string[] Guanxi = userdata.Guanxi;
diff --git a/zhengcaioa/zhengcaioa/Controllers/settings/AreaController.cs b/zhengcaioa/zhengcaioa/Controllers/settings/AreaController.cs
index 67a6dff..c19d832 100644
--- a/zhengcaioa/zhengcaioa/Controllers/settings/AreaController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/settings/AreaController.cs
@@ -13,7 +13,7 @@
 
 namespace zhengcaioa.Controllers.settings
 {
-    [CheckLogin]
+   
     public class AreaController : Controller
     {
         private readonly ILogger<AreaController> _logger;
@@ -21,13 +21,13 @@
 
 
 
-
+        [CheckLogin]
         public AreaController(ILogger<AreaController> logger, IAreaService areaService)
         {
             _logger = logger;
             _areaService = areaService;
         }
-
+        [CheckLogin]
         public IActionResult Index()
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
@@ -51,7 +51,7 @@
             return View();
         }
 
-
+        [CheckLogin]
         public string GetList(AreaDTOSearch search)
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
@@ -62,7 +62,7 @@
 
 
         #region 缂栬緫
-
+        [CheckLogin]
         public ActionResult Edit()
         {
 
@@ -94,7 +94,7 @@
 
 
 
-
+        [CheckLogin]
         public IActionResult Get(string id = null)
         {
             AreaDTO AreaDTO = new AreaDTO();
@@ -114,7 +114,7 @@
         /// <param name="data">宀椾綅瀹炰綋绫诲璞�</param>
         /// <returns></returns>
         [HttpPost]
-
+        [CheckLogin]
         public IActionResult Save(AreaDTO data)
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
@@ -133,12 +133,47 @@
         /// <param name="info">瀹炰綋</param>
         /// <returns></returns>
         /// 
-
+        [CheckLogin]
         public IActionResult Nullify(string Id = "")
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
             return new JsonResult(_areaService.ModifyStatus(Id, curentuser.Id));
         }
+
+
+
+         
+        public IActionResult GetListArea()
+        {
+            ReturnMsg<List<AreaDTO>> returnMsg = new ReturnMsg<List<AreaDTO>>();
+            returnMsg.code = 1;
+            returnMsg.error = "";
+
+
+            List <AreaDTO> areaDTOs = _areaService.GetList();
+
+            List<AreaDTO> areaDTOshengs = areaDTOs.Where(x => x.ParentId == "0     ").ToList();
+
+
+            foreach(var areaDTOsheng in areaDTOshengs)
+            {
+                var childs = areaDTOs.Where(x => x.ParentId == areaDTOsheng.CodeId).ToList();
+                foreach(var child in childs)
+                {
+                    child.Children = areaDTOs.Where(x => x.ParentId == child.CodeId).ToList();
+                }
+                areaDTOsheng.Children = childs;
+            }
+
+
+
+
+
+            returnMsg.returnObj = areaDTOshengs;
+            returnMsg.count = areaDTOs.Count;
+
+            return new JsonResult(returnMsg);
+        }
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Startup.cs b/zhengcaioa/zhengcaioa/Startup.cs
index 369466f..a24264a 100644
--- a/zhengcaioa/zhengcaioa/Startup.cs
+++ b/zhengcaioa/zhengcaioa/Startup.cs
@@ -128,6 +128,10 @@
 
             services.AddScoped(typeof(IHrSalaryService), typeof(HrSalaryService));
 
+            services.AddScoped(typeof(ICusFangwenjiluService), typeof(CusFangwenjiluService));
+
+            services.AddScoped(typeof(ILZhuanjiahuidumService), typeof(LZhuanjiahuidumService)); 
+
             //定时执行
             services.AddHostedService<TimedBackgroundService>();
 
diff --git a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs
index 0865bfa..fcac78b 100644
--- a/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs
+++ b/zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs
@@ -35,6 +35,8 @@
         private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
         private readonly IGroupTopicService _groupTopicService;
         private readonly ICooperVisitService _cooperVisitService;
+        private readonly IIntentionCustomerService _intentionCustomerService;
+        private readonly IIntentionVisitService _intentionVisitService;
 
         private readonly decimal jiabangongzibiaozhun = new decimal(21.5);
         public TimedBackgroundService(ILogger<TimedBackgroundService> logger, IServiceScopeFactory factory)
@@ -57,6 +59,8 @@
             _cooperatecustomCustomerService = factory.CreateScope().ServiceProvider.GetRequiredService<ICooperatecustomCustomerService>();
             _groupTopicService = factory.CreateScope().ServiceProvider.GetRequiredService<IGroupTopicService>();
             _cooperVisitService = factory.CreateScope().ServiceProvider.GetRequiredService<ICooperVisitService>();
+            _intentionCustomerService = factory.CreateScope().ServiceProvider.GetRequiredService<IIntentionCustomerService>();
+            _intentionVisitService = factory.CreateScope().ServiceProvider.GetRequiredService<IIntentionVisitService>();
         }
         protected override async Task ExecuteAsync(CancellationToken stoppingToken)
         {
@@ -64,15 +68,19 @@
 
             //stoppingToken.Register(() => File.Create($"E:\\dotnetCore\\Practice\\Practice\\{DateTime.Now.Millisecond}.txt"));
 
+            DateTime datenow = DateTime.Now.Date;
             while (!stoppingToken.IsCancellationRequested)
             {
                 _logger.LogInformation("MyServiceA 寮�濮嬫墽琛�");
+                _logger.LogInformation(datenow.ToString("yyyy-MM-dd HH:mm:ss"));
                 //姣忓ぉ鐨�0鐐瑰紑濮嬭绠�
-                if (DateTime.Now.Hour == 0)
+                if (datenow <= DateTime.Now.Date && DateTime.Now.Hour == 0)
                 //if (true)
                 {
+
                     try
                     {
+                        _logger.LogInformation("鍒ゆ柇鏄惁鏄浜斾釜宸ヤ綔鏃ョ粨鏉�");
                         DateTime diwutian = this.diwugongzuori();
                         //绗簲涓伐浣滄棩缁撴潫鍚庡紑濮嬭绠�
                         if (DateTime.Now.Date == diwutian.AddDays(1))
@@ -80,9 +88,10 @@
                         {
                             try
                             {
+                                _logger.LogInformation("璁$畻鑰冨嫟宸ヨ祫");
                                 //using (TransactionScope scope = new TransactionScope())
                                 //{
-                                    this.jisuankaoqin();
+                                this.jisuankaoqin();
                                     this.jisuangongzi();
                                     //scope.Complete();
                                 //}
@@ -93,17 +102,25 @@
                                 _logger.LogInformation(ex.ToString());
                             }
                         }
+
+
+                        _logger.LogInformation("鍒ゆ柇鏄惁璁$畻宸ラ緞宸ヨ祫");
+                        if (DateTime.Now.Date.Month==1 && DateTime.Now.Date.Day == 31)
+                        //if (true)
+                        {
+                            jisuangonglinggongzi();
+                        }
                     }
                     catch (Exception ex)
                     {
                         _logger.LogInformation(ex.ToString());
                     }
-                   
 
+                    datenow = DateTime.Now.Date.AddDays(1);
                 }
 
 
-                await Task.Delay(TimeSpan.FromMinutes(59), stoppingToken);
+                await Task.Delay(TimeSpan.FromMinutes(10), stoppingToken);
 
                 _logger.LogInformation("缁х画鎵ц");
             }
@@ -714,14 +731,236 @@
                     }
                     else
                     {
+
+                        //鍒ゆ柇鑰冨嫟鏃堕棿鐨勮繛缁��
+
+                        //鍒ゆ柇鏃╀笂鏄惁杩熷埌,鍒ゆ柇鏃╀笂鏄惁鏃╅��锛屾棭閫�鐭垮伐澶勭悊
+                        DateTime? starttime = null;
+                        DateTime? endttime = null;
+                        bool kuanggong = false;
+                        List<DateBiJiaoDTO> dateBiJiaoDTOs = new List<DateBiJiaoDTO>();
+                        if (admSignInDTO != null && admSignInDTO.MorningIn.HasValue && admSignInDTO.MorningOut.HasValue)
+                        {
+                            DateBiJiaoDTO dateBiJiaoDTO = new DateBiJiaoDTO();
+                            dateBiJiaoDTO.StartTime = admSignInDTO.MorningIn;
+                            dateBiJiaoDTO.EndTime = admSignInDTO.MorningOut;
+                            dateBiJiaoDTOs.Add(dateBiJiaoDTO);
+                        }
+                        var jiabanbuka = admAskLeaveOffDTOMin.Where(x => x.Lavetype == "3").ToList();
+                        foreach (var admAskLeaveOff in jiabanbuka)
+                        {
+                            if (admAskLeaveOff.StratTime < StratTimeWorkingEnd)
+                            {
+                                DateBiJiaoDTO dateBiJiaoDTO = new DateBiJiaoDTO();
+                                dateBiJiaoDTO.StartTime = admAskLeaveOff.StratTime;
+                                dateBiJiaoDTO.EndTime = admAskLeaveOff.EndTime;
+                                dateBiJiaoDTOs.Add(dateBiJiaoDTO);
+                            }
+
+                        }
+
+
+                        dateBiJiaoDTOs = dateBiJiaoDTOs.OrderBy(x => x.StartTime).ToList();
+                        if (dateBiJiaoDTOs.Count == 0)
+                        {
+                            Kuanggongtianshu += new decimal(0.5);
+                        }
+                        else
+                        {
+                            //鍒ゆ柇涓婂崍鑰冨嫟鏃堕棿鏄惁鍏ㄨ鐩�
+                            for (int i = 0; i < dateBiJiaoDTOs.Count; i++)
+                            {
+                                if (i == 0)
+                                {
+                                    starttime = dateBiJiaoDTOs[i].StartTime;
+                                    endttime = dateBiJiaoDTOs[i].EndTime;
+                                }
+                                else
+                                {
+                                    if (dateBiJiaoDTOs[i].StartTime > dateBiJiaoDTOs[i - 1].EndTime)
+                                    {
+                                        kuanggong = true;
+                                        break;
+                                    }
+                                    else if (dateBiJiaoDTOs[i].EndTime > dateBiJiaoDTOs[i - 1].EndTime)
+                                    {
+                                        endttime = dateBiJiaoDTOs[i].EndTime;
+                                    }
+                                }
+                            }
+                            if (kuanggong)
+                            {
+                                Kuanggongtianshu += new decimal(0.5);
+                            }
+                            else
+                            {
+                                decimal shangwukuanggong = 0;
+                                if (starttime > StratTimeWorkingStart)
+                                {
+                                    TimeSpan chidao = starttime.Value.Subtract(StratTimeWorkingStart);
+                                    if (chidao.Days > 0 || (chidao.Hours * 60 + chidao.Minutes) > admAttendanceRuleDTO.Absenteeism)
+                                    {
+                                        if (shangwukuanggong == 0)
+                                        {
+                                            Kuanggongtianshu += new decimal(0.5);
+                                        }
+
+                                    }
+                                    else
+                                    {
+                                        Chidao += 1;
+                                        Shangwuchidaofenzhong = chidao.Hours * 60 + chidao.Minutes;
+                                    }
+                                }
+                                if (shangwukuanggong == 0 && endttime < StratTimeWorkingEnd)
+                                {
+                                    TimeSpan zaotui = StratTimeWorkingEnd.Subtract(endttime.Value);
+                                    if (zaotui.Days > 0 || (zaotui.Hours * 60 + zaotui.Minutes) > admAttendanceRuleDTO.Absenteeism)
+                                    {
+                                        if (shangwukuanggong == 0)
+                                        {
+                                            Kuanggongtianshu += new decimal(0.5);
+                                        }
+
+                                    }
+                                    else
+                                    {
+                                        Zaotui += 1;
+                                        Shangwuzaotuifenzhong = zaotui.Hours * 60 + zaotui.Minutes;
+                                    }
+
+                                }
+                                Kuanggongtianshu += shangwukuanggong;
+                            }
+                        }
+
+
+
+                        //鍒ゆ柇涓嬪崍鏄惁杩熷埌,鍒ゆ柇涓嬪崍鏄惁鏃╅��锛屾棭閫�鐭垮伐澶勭悊
+
+
+                        starttime = null;
+                        endttime = null;
+                        kuanggong = false;
+                        dateBiJiaoDTOs = new List<DateBiJiaoDTO>();
+                        if (admSignInDTO != null && admSignInDTO.AfternoonIn.HasValue && admSignInDTO.AfternoonOut.HasValue)
+                        {
+                            DateBiJiaoDTO dateBiJiaoDTO = new DateBiJiaoDTO();
+                            dateBiJiaoDTO.StartTime = admSignInDTO.AfternoonIn;
+                            dateBiJiaoDTO.EndTime = admSignInDTO.AfternoonOut;
+                            dateBiJiaoDTOs.Add(dateBiJiaoDTO);
+                        }
+                        var jiabanbukaxiawu = admAskLeaveOffDTOMin.Where(x => x.Lavetype == "3").ToList();
+                        foreach (var admAskLeaveOff in jiabanbukaxiawu)
+                        {
+                            if (admAskLeaveOff.EndTime > StratTimeOffworkStart)
+                            {
+                                DateBiJiaoDTO dateBiJiaoDTO = new DateBiJiaoDTO();
+                                dateBiJiaoDTO.StartTime = admAskLeaveOff.StratTime;
+                                dateBiJiaoDTO.EndTime = admAskLeaveOff.EndTime;
+                                dateBiJiaoDTOs.Add(dateBiJiaoDTO);
+                            }
+
+                        }
+
+                        dateBiJiaoDTOs = dateBiJiaoDTOs.OrderBy(x => x.StartTime).ToList();
+                        if (dateBiJiaoDTOs.Count == 0)
+                        {
+                            //Kuanggong += new decimal(0.5);
+                            Kuanggongtianshu += new decimal(0.5);
+                        }
+                        else
+                        {
+                            //鍒ゆ柇涓婂崍鑰冨嫟鏃堕棿鏄惁鍏ㄨ鐩�
+                            for (int i = 0; i < dateBiJiaoDTOs.Count; i++)
+                            {
+                                if (i == 0)
+                                {
+                                    starttime = dateBiJiaoDTOs[i].StartTime;
+                                    endttime = dateBiJiaoDTOs[i].EndTime;
+                                }
+                                else
+                                {
+                                    if (dateBiJiaoDTOs[i].StartTime > dateBiJiaoDTOs[i - 1].EndTime)
+                                    {
+                                        kuanggong = true;
+                                        break;
+                                    }
+                                    else if (dateBiJiaoDTOs[i].EndTime > dateBiJiaoDTOs[i - 1].EndTime)
+                                    {
+                                        endttime = dateBiJiaoDTOs[i].EndTime;
+                                    }
+                                }
+                            }
+                            if (kuanggong)
+                            {
+                                //Kuanggong += new decimal(0.5);
+                                Kuanggongtianshu += new decimal(0.5);
+                            }
+                            else
+                            {
+                                decimal xiawuwukuanggong = 0;
+                                if (starttime > StratTimeOffworkStart)
+                                {
+                                    TimeSpan chidao = starttime.Value.Subtract(StratTimeOffworkStart);
+                                    if (chidao.Days > 0 || (chidao.Hours * 60 + chidao.Minutes) > admAttendanceRuleDTO.Absenteeism)
+                                    {
+                                        if (xiawuwukuanggong == 0)
+                                        {
+                                            xiawuwukuanggong += new decimal(0.5);
+                                            //Kuanggong += new decimal(0.5);
+                                        }
+
+                                    }
+                                    else
+                                    {
+                                        Chidao += 1;
+                                        Xiawuchidaofenzhong = chidao.Hours * 60 + chidao.Minutes;
+                                    }
+                                }
+                                if (xiawuwukuanggong == 0 && endttime < StratTimeOffworkEnd)
+                                {
+                                    TimeSpan zaotui = StratTimeOffworkEnd.Subtract(endttime.Value);
+                                    if (zaotui.Days > 0 || (zaotui.Hours * 60 + zaotui.Minutes) > admAttendanceRuleDTO.Absenteeism)
+                                    {
+                                        if (xiawuwukuanggong == 0)
+                                        {
+                                            xiawuwukuanggong += new decimal(0.5);
+                                            //Kuanggong += new decimal(0.5);
+                                        }
+
+                                    }
+                                    else
+                                    {
+                                        Zaotui += 1;
+                                        Xiawuzaotuifenzhong = zaotui.Hours * 60 + zaotui.Minutes;
+                                    }
+
+                                }
+                                Kuanggongtianshu += xiawuwukuanggong;
+                            }
+                        }
+
+                        //璁$畻褰撳ぉ鍔犵彮澶╂暟
+                        Jiaban += (1 - Kuanggongtianshu );
+
+                        Kuanggongtianshu = 0;
+
                         //鍔犵彮
                         //璁$畻鍔犵彮鏃堕棿
                         if (admSignInDTO != null && admSignInDTO.OvertimeIn.HasValue && admSignInDTO.OvertimeOut.HasValue)
                         {
-                            TimeSpan jiaban = admSignInDTO.OvertimeOut.Value.Subtract(admSignInDTO.OvertimeIn.Value);
+                            DateTime overdate = admSignInDTO.OvertimeIn.Value;
+                            if (admSignInDTO.OvertimeIn.Value < StratTimeOffworkEnd)
+                            {
+                                overdate = StratTimeOffworkEnd;
+                            }
+                            TimeSpan jiaban = admSignInDTO.OvertimeOut.Value.Subtract(overdate);
 
-                            Jiaban += Math.Round((decimal)(jiaban.Hours * 60+ jiaban.Minutes) / (decimal)shangbanshijian, 2);
+                            Jiaban += Math.Round((decimal)(jiaban.Hours * 60) / (decimal)shangbanshijian, 2);
                         }
+
+                        
                     }
 
 
@@ -1323,7 +1562,7 @@
                     }
                 }
 
-                //hrSalaryDTO.Jiucuo
+                hrSalaryDTO.Jiucuo = 0;
 
                 //璁$畻缁╂晥鎻愭垚
                 hrSalaryDTO.Jixiaoticheng = 0;
@@ -1338,7 +1577,8 @@
                     #region 涓婇棬鎷滆瀹㈡埛
 
                     var cooperVisitDTOs = _cooperVisitService.GetListsalary(userList[i].Id, dateminkaoqin, datemaxkaoqin);
-                    if (cooperVisitDTOs != null && cooperVisitDTOs.Count > 0)
+                    var intentionVisitDTOs = _intentionVisitService.GetListsalary(userList[i].Id, dateminkaoqin, datemaxkaoqin); 
+                    if (  cooperVisitDTOs.Count > 0 || intentionVisitDTOs.Count > 0)
                     {
                         var jijianidddd = fiPiecerateDTOs.Where(x => x.Standard == "D" && x.Project == "涓婇棬鎷滆瀹㈡埛").FirstOrDefault();
                         if (jijianidddd != null)
@@ -1351,7 +1591,7 @@
                                     decimal renwujishu = admAttendanceDTO.Yingchuqin * jixiaotichengfangan.Renwu.Value;
                                     if (jixiaotichengfangan.Tichengstandard == "01")
                                     {
-                                        decimal youxiaojijian = cooperVisitDTOs.Count - renwujishu;
+                                        decimal youxiaojijian = intentionVisitDTOs.Count + cooperVisitDTOs.Count - renwujishu;
                                         if (youxiaojijian > 0)
                                         {
                                             hrSalaryDTO.Jixiaoticheng += Math.Round(jixiaotichengfangan.Ticheng.Value * youxiaojijian, 2);
@@ -1365,7 +1605,7 @@
                                     decimal renwujishu = jixiaotichengfangan.Renwu.Value;
                                     if (jixiaotichengfangan.Tichengstandard == "01")
                                     {
-                                        decimal youxiaojijian = cooperVisitDTOs.Count - renwujishu;
+                                        decimal youxiaojijian = intentionVisitDTOs.Count + cooperVisitDTOs.Count - renwujishu;
                                         if (youxiaojijian > 0)
                                         {
                                             hrSalaryDTO.Jixiaoticheng += Math.Round(jixiaotichengfangan.Ticheng.Value * youxiaojijian, 2);
@@ -1425,7 +1665,8 @@
 
                     #region 瀹㈡埛璧勬枡褰曞叆
                     var cooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetListsalary(userList[i].Id, dateminkaoqin, datemaxkaoqin);
-                    if (cooperatecustomCustomerDTOs != null && cooperatecustomCustomerDTOs.Count > 0)
+                    var _intentionCustomerDTOs = _intentionCustomerService.GetListsalary(userList[i].Id, dateminkaoqin, datemaxkaoqin);
+                    if ( cooperatecustomCustomerDTOs.Count > 0 || _intentionCustomerDTOs.Count > 0)
                     {
                         var jijianidddd = fiPiecerateDTOs.Where(x => x.Standard == "D" && x.Project == "瀹㈡埛璧勬枡褰曞叆").FirstOrDefault();
                         if (jijianidddd != null)
@@ -1438,7 +1679,7 @@
                                     decimal renwujishu = admAttendanceDTO.Yingchuqin * jixiaotichengfangan.Renwu.Value;
                                     if (jixiaotichengfangan.Tichengstandard == "01")
                                     {
-                                        decimal youxiaojijian = cooperatecustomCustomerDTOs.Count - renwujishu;
+                                        decimal youxiaojijian = _intentionCustomerDTOs.Count + cooperatecustomCustomerDTOs.Count - renwujishu;
                                         if (youxiaojijian > 0)
                                         {
                                             hrSalaryDTO.Jixiaoticheng += Math.Round(jixiaotichengfangan.Ticheng.Value * youxiaojijian, 2);
@@ -1452,7 +1693,7 @@
                                     decimal renwujishu = jixiaotichengfangan.Renwu.Value;
                                     if (jixiaotichengfangan.Tichengstandard == "01")
                                     {
-                                        decimal youxiaojijian = cooperatecustomCustomerDTOs.Count - renwujishu;
+                                        decimal youxiaojijian = _intentionCustomerDTOs.Count +  cooperatecustomCustomerDTOs.Count - renwujishu;
                                         if (youxiaojijian > 0)
                                         {
                                             hrSalaryDTO.Jixiaoticheng += Math.Round(jixiaotichengfangan.Ticheng.Value * youxiaojijian, 2);
@@ -1463,11 +1704,14 @@
                             }
                         }     
                     }
+                   
+                     
+                    
                     #endregion
 
 
                     #region 褰曞叆瀹㈡埛绛惧崟
-                    
+
                    var cooperatecustomCustomers = _cooperatecustomCustomerService.GetListsalaryqiandan(userList[i].Id, dateminkaoqin, datemaxkaoqin);
                     if (cooperatecustomCustomers != null && cooperatecustomCustomers.Count > 0)
                     {
@@ -2300,7 +2544,59 @@
                 decimal peichang = hrSalaryDTO.Peichang.HasValue ? hrSalaryDTO.Peichang.Value : 0;
                 decimal jiucuo = hrSalaryDTO.Jiucuo.HasValue ? hrSalaryDTO.Jiucuo.Value : 0;
 
-                yingnashuie = jibengongzi + baomifei + gongzuobutie + jiabangongzi + shebao + dianhuabutie + quanqinjiang + jiaotngbutie + jixiaoticheng + jiangjin + bufagongzi - shebaokou  - dianhuafei - queqin - fakuan - peichang + jiucuo - geshuiqizheng;
+                //璁$畻淇濆簳骞磋柂
+                if (userList[i].Indate.HasValue && userList[i].miniyearsalary.HasValue)
+                {
+                    DateTime jixinue = userList[i].Indate.Value;
+                    if (userList[i].Indate.Value.Day != 1)
+                    {
+                        jixinue = new DateTime(userList[i].Indate.Value.AddMonths(1).Year, userList[i].Indate.Value.AddMonths(1).Month, 1);
+                    }
+                    int months = ((datemaxkaoqin.Year - jixinue.Year) * 12) + datemaxkaoqin.Month - jixinue.Month;
+
+                    if(months % 12>=1 && months % 12 == 0)
+                    {
+                        decimal baodinianxin = 0;
+                        //鏌ヨ杩囧幓12涓湀鐨勫伐璧�
+                        for(int z = 1; z <= 12; z++)
+                        {
+                            var hrSalaryDTO1 = _hrSalaryService.GetListByUser(userList[i].Id, dateminkaoqin.AddMonths(-z).Year, dateminkaoqin.AddMonths(-z).Month);
+                            if (hrSalaryDTO1 != null)
+                            {
+                                decimal jibengongzi1 = hrSalaryDTO1.Jibengongzi.HasValue ? hrSalaryDTO1.Jibengongzi.Value : 0;
+                                decimal baomifei1 = hrSalaryDTO1.Baomifei.HasValue ? hrSalaryDTO1.Baomifei.Value : 0;
+                                decimal gongzuobutie1 = hrSalaryDTO1.Gongzuobutie.HasValue ? hrSalaryDTO1.Gongzuobutie.Value : 0;
+                                decimal jiabangongzi1 = hrSalaryDTO1.Jiabangongzi.HasValue ? hrSalaryDTO1.Jiabangongzi.Value : 0;
+                                decimal shebao1 = hrSalaryDTO1.Shebao.HasValue ? hrSalaryDTO1.Shebao.Value : 0;
+                                decimal dianhuabutie1 = hrSalaryDTO1.Dianhuabutie.HasValue ? hrSalaryDTO1.Dianhuabutie.Value : 0;
+                                decimal quanqinjiang1 = hrSalaryDTO1.Quanqinjiang.HasValue ? hrSalaryDTO1.Quanqinjiang.Value : 0;
+                                decimal jiaotngbutie1 = hrSalaryDTO1.Jiaotngbutie.HasValue ? hrSalaryDTO1.Jiaotngbutie.Value : 0;
+                                decimal jixiaoticheng1 = hrSalaryDTO1.Jixiaoticheng.HasValue ? hrSalaryDTO1.Jixiaoticheng.Value : 0;
+                                decimal jiangjin1 = hrSalaryDTO1.Jiangjin.HasValue ? hrSalaryDTO1.Jiangjin.Value : 0;
+                                decimal bufagongzi1 = hrSalaryDTO1.Bufagongzi.HasValue ? hrSalaryDTO1.Bufagongzi.Value : 0;
+                                decimal shebaokou1 = hrSalaryDTO1.Shebaokou.HasValue ? hrSalaryDTO1.Shebaokou.Value : 0;
+
+                                decimal dianhuafei1 = hrSalaryDTO1.Dianhuafei.HasValue ? hrSalaryDTO1.Dianhuafei.Value : 0;
+                                decimal queqin1 = hrSalaryDTO1.Queqin.HasValue ? hrSalaryDTO1.Queqin.Value : 0;
+                                decimal fakuan1 = hrSalaryDTO1.Fakuan.HasValue ? hrSalaryDTO1.Fakuan.Value : 0;
+                                decimal peichang1 = hrSalaryDTO1.Peichang.HasValue ? hrSalaryDTO1.Peichang.Value : 0;
+                                decimal jiucuo1 = hrSalaryDTO1.Jiucuo.HasValue ? hrSalaryDTO1.Jiucuo.Value : 0;
+
+                                baodinianxin += jibengongzi1 + baomifei1 + gongzuobutie1 + jiabangongzi1 + shebao1 + quanqinjiang1 + jiaotngbutie1 + jixiaoticheng1 + jiangjin1 + bufagongzi1 + jiucuo1;
+                            }
+                        }
+                        baodinianxin += jibengongzi + baomifei + gongzuobutie + jiabangongzi + shebao + quanqinjiang + jiaotngbutie + jixiaoticheng + jiangjin + bufagongzi + jiucuo;
+                        if(baodinianxin < userList[i].miniyearsalary.Value)
+                        {
+                            jiucuo = userList[i].miniyearsalary.Value - baodinianxin;
+                        }
+                    }    
+                }
+
+
+
+
+                yingnashuie = jibengongzi + baomifei + gongzuobutie + jiabangongzi + shebao  + quanqinjiang + jiaotngbutie + jixiaoticheng + jiangjin + bufagongzi - shebaokou + ( (dianhuabutie - dianhuafei)<=0? (dianhuabutie - dianhuafei) : 0) - queqin - fakuan - peichang + jiucuo - geshuiqizheng;
 
 
                 hrSalaryDTO.Geshui = 0;
@@ -2389,7 +2685,7 @@
                 }
                 decimal geshui = hrSalaryDTO.Geshui.HasValue ? hrSalaryDTO.Geshui.Value : 0;
 
-                hrSalaryDTO.Daozhanggongzi += jibengongzi + baomifei + gongzuobutie + jiabangongzi + shebao + dianhuabutie + quanqinjiang + jiaotngbutie + jixiaoticheng + jiangjin + bufagongzi - shebaokou - geshui - dianhuafei - queqin - fakuan - peichang + jiucuo;
+                hrSalaryDTO.Daozhanggongzi += jibengongzi + baomifei + gongzuobutie + jiabangongzi + shebao  + quanqinjiang + jiaotngbutie + jixiaoticheng + jiangjin + bufagongzi - shebaokou - geshui + ((dianhuabutie - dianhuafei) <= 0 ? (dianhuabutie - dianhuafei) : 0) - queqin - fakuan - peichang + jiucuo;
 
 
 
@@ -2418,6 +2714,30 @@
 
 
 
+        //璁$畻鏄惁娑ㄥ伐榫勫伐璧�
+        public void jisuangonglinggongzi()
+        {
+            _logger.LogInformation("璁$畻鏄惁娑ㄥ伐榫勫伐璧�");
+            List<PltUserDTO> userList = _userService.GetList();//.Where(x => x.UserSn == "yang").ToList();
+            foreach(var userDTO in userList)
+            {
+                if (userDTO.senioritywages.HasValue && userDTO.Indate.HasValue)
+                {
+                    int year =  DateTime.Now.Year - (userDTO.Indate.Value.Year+1);
+                    if (userDTO.Indate.Value.Month==1 && userDTO.Indate.Value.Day == 1)
+                    {
+                          year =  DateTime.Now.Year - userDTO.Indate.Value.Year ;
+                    }
+                    if ( year >= 1)
+                    {
+                        userDTO.BasicPrice += userDTO.senioritywages.Value;
+                        _userService.savePltUser(userDTO);
+                        _logger.LogInformation(userDTO.Name +"娑ㄥ伐榫勫伐璧�"+ userDTO.senioritywages.HasValue +" 涔嬪悗鏈堣柂" + userDTO.BasicPrice);
+                    }
+                }
+            }
+        }
+
         public AdmAskLeaveDTO jisianChecktime(DateTime StratTime, DateTime EndTime)
         {
             //string dateDiff = null;
diff --git a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
index 4be68de..8349980 100644
--- a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
@@ -271,9 +271,13 @@
         };
 
 
+        
 
+        var id = '@Model.Id';
 
-         var id = '@Model.Id';
+        if (id == null || id == '') {
+            $("#GoodsStatus").val("A"); 
+        }
 
         var delPosition = function () {
             if (id == null || id == '') {
@@ -360,15 +364,15 @@
                         if (data.Result) {
                             //  parent._afterSave(true);
                             parent.layer.msg('鎴愬姛淇濆瓨', { icon: 6 });
-                            //window.location = "/Project/add?id=" + data.ReturnID;
+                            window.location = "/AdmGoodsManage/Edit";
 
 
-                            try {
-                                _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
-                            }
-                            catch (err) {
-                                parent._CloseTab1("/AdmGoodsManage/Edit/");
-                            }
+                            //try {
+                            //    _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
+                            //}
+                            //catch (err) {
+                            //    parent._CloseTab1("/AdmGoodsManage/Edit/");
+                            //}
 
                         }
                         else {
diff --git a/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml b/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
index 467da1e..79fcb8d 100644
--- a/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Project/Add.cshtml
@@ -15,7 +15,7 @@
 
     List<Projectyouxiao> Projectyouxiaos = Model.Projectyouxiaos;
 
-    List<Projectzhongbiao> Projectzhongbiaos = Model.Projectzhongbiaos;
+    List<ProjectzhongbiaoDTO> Projectzhongbiaos = Model.Projectzhongbiaos;
 
 
     //string[] arrJobLevel = (Model.Zhuanjia ?? "").Split(',');
@@ -236,7 +236,7 @@
 
                                     <div class="clearfix layer-area" style="padding-bottom:15px;">
                                         <label class="text-right col-sm-1 col-md-1 control-label">涓爣锛堟垚浜わ級渚涘簲鍟�</label>
-                                        <div class="col-sm-6 col-md-6">
+                                        <div class="col-sm-4 col-md-4">
                                             <input class="form-control" label="涓爣锛堟垚浜わ級渚涘簲鍟�" name="Names" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Projectzhongbiaos[i].Names">
                                         </div>
                                         <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">鎶ヤ环</label>
@@ -244,10 +244,14 @@
                                             <input class="form-control" label="鎶ヤ环" name="Price" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Projectzhongbiaos[i].Price">
                                             <input type="hidden" name="ZhongbiaoId" value="@Projectzhongbiaos[i].ZhongbiaoId" />
                                         </div>
+                                        <label class="text-right col-sm-1 col-md-1 control-label" style="width:60px;">璇勫寰楀垎</label>
+                                        <div class="col-sm-2 col-md-2" style="width:10%;">
+                                            <input class="form-control" label="璇勫寰楀垎" name="Defen" id="Defen" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Projectzhongbiaos[i].DefenName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+                                        </div>
                                         <div class="col-sm-1 col-md-1" style="width:100px;">
                                             @if (Projectzhongbiaos[i].ProjectId != null && Projectzhongbiaos[i].ProjectId == "yes")
                                             {
-                                                <button type="button"  data-type="1" >娣诲姞渚涘簲鍟�</button>
+                                                <button type="button" data-type="1">娣诲姞渚涘簲鍟�</button>
                                             }
                                             else
                                             {
@@ -271,12 +275,16 @@
 
                                 <div class="clearfix layer-area" style="padding-bottom:15px;">
                                     <label class="text-right col-sm-1 col-md-1 control-label">绗簩鍊欓�変緵搴斿晢</label>
-                                    <div class="col-sm-6 col-md-6">
+                                    <div class="col-sm-4 col-md-4">
                                         <input class="form-control" label="鍏憡鏃堕棿" name="Drhx" id="Drhx" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Drhx">
                                     </div>
                                     <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">鎶ヤ环</label>
-                                    <div class="col-sm-2 col-md-2"  style="width:10%;">
+                                    <div class="col-sm-2 col-md-2" style="width:10%;">
                                         <input class="form-control" label="鍏憡鏃堕棿" name="DrhxPrice" id="DrhxPrice" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.DrhxPrice">
+                                    </div>
+                                    <label class="text-right col-sm-1 col-md-1 control-label" style="width:60px;">璇勫寰楀垎</label>
+                                    <div class="col-sm-2 col-md-2" style="width:10%;">
+                                        <input class="form-control" label="璇勫寰楀垎" name="DrhxDefen" id="DrhxDefen" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.DrhxDefenName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                     </div>
                                     <div class="col-sm-1 col-md-1" style="width:100px;">
                                         @if (Model.Drcunzai != null && Model.Drcunzai == "yes")
@@ -285,7 +293,7 @@
                                         }
                                         else
                                         {
-                                            <button type="button" onclick="_pageAdd('@Model.Drhx')" data-type="1"   style="color:red;">娣诲姞渚涘簲鍟�</button>
+                                            <button type="button" onclick="_pageAdd('@Model.Drhx')" data-type="1" style="color:red;">娣诲姞渚涘簲鍟�</button>
                                         }
 
 
@@ -294,17 +302,21 @@
                                 </div>
                                 <div class="clearfix layer-area" style="padding-bottom:15px;">
                                     <label class="text-right col-sm-1 col-md-1 control-label">绗笁鍊欓�変緵搴斿晢</label>
-                                    <div class="col-sm-6 col-md-6">
+                                    <div class="col-sm-4 col-md-4">
                                         <input class="form-control" label="鍏憡鏃堕棿" name="Dshx" id="Dshx" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Dshx">
                                     </div>
                                     <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">鎶ヤ环</label>
-                                    <div class="col-sm-2 col-md-2"  style="width:10%;">
+                                    <div class="col-sm-2 col-md-2" style="width:10%;">
                                         <input class="form-control" label="鍏憡鏃堕棿" name="DshxPrice" id="DshxPrice" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.DshxPrice">
+                                    </div>
+                                    <label class="text-right col-sm-1 col-md-1 control-label" style="width:60px;">璇勫寰楀垎</label>
+                                    <div class="col-sm-2 col-md-2" style="width:10%;">
+                                        <input class="form-control" label="璇勫寰楀垎" name="DshxDefen" id="DshxDefen" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.DshxDefenName" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                     </div>
                                     <div class="col-sm-1 col-md-1" style="width:100px;">
                                         @if (Model.Dscunzai != null && Model.Dscunzai == "yes")
                                         {
-                                            <button type="button" data-type="1" >娣诲姞渚涘簲鍟�</button>
+                                            <button type="button" data-type="1">娣诲姞渚涘簲鍟�</button>
                                         }
                                         else
                                         {
@@ -574,7 +586,7 @@
             if (num == 1) {
                 $('#addlist_1').append(oTr);
                 $(oTr).html(` <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label">涓爣锛堟垚浜わ級渚涘簲鍟�</label>
-                                                        <div class="col-sm-6 col-md-6">
+                                                        <div class="col-sm-4 col-md-4">
                                                             <input class="form-control" label="鍏憡鏃堕棿" name="Names" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="">
                                                         </div>
                                                         <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">鎶ヤ环</label>
@@ -582,6 +594,10 @@
                                                             <input class="form-control" label="鍏憡鏃堕棿" name="Price" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="">
                                                              <input type="hidden" name="ZhongbiaoId" value="" />
                                                              </div>
+ <label class="text-right col-sm-1 col-md-1 control-label" style="width:60px;">璇勫寰楀垎</label>
+                                        <div class="col-sm-2 col-md-2" style="width:10%;">
+                                            <input class="form-control" label="璇勫寰楀垎" name="Defen" id="Defen" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" >
+                                        </div>
 
                                                          </div>`);
             } else if (num == 2) {
@@ -608,7 +624,7 @@
                                                             </div>
                                                             <label class="text-right col-sm-1 col-md-1 control-label" style="width:30px;">鍘熷洜</label>
                                                             <div class="col-sm-2 col-md-2"  style="width:10%;">
-                                                              
+
  <input class="form-control" label="鍘熷洜" name="reasonremark"  labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="">
                                                                 <input type="hidden" name="ReasonId" value="" />
                                                             </div>
@@ -695,7 +711,7 @@
                 return;
             }
 
-         
+
             //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
             $.ajax({
                 type: "POST",
@@ -704,7 +720,7 @@
                 global: false,
                 data: $('form').serializeArray(),
                 success: function (data) {
-                  
+
 
 
                         if (data.Result) {
@@ -746,7 +762,7 @@
                 global: false,
                 data: "",
                 success: function (data) {
-                   
+
                     var city = $("#City");
                     city.find('option').remove();
                     var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>';
@@ -778,7 +794,7 @@
                 global: false,
                 data: "",
                 success: function (data) {
-                  
+
                     var quxian = $("#AreaId");
                     quxian.find('option').remove();
                     var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>';
@@ -814,7 +830,7 @@
                 global: false,
                 data: "",
                 success: function (data) {
-                  
+
                     var starttime = $("#StartTime");
                     starttime.val(data.StartTimestr);
                     var Number = $("#Number");
@@ -841,7 +857,7 @@
 
                     var Names = $("input[name='Names']");
                     var Price = $("input[name='Price']")
-                  
+
                     if (Names != null && Names.length > 0) {
                         if (data.Projectzhongbiaos != null && data.Projectzhongbiaos.length > 0) {
                             Names[0].value=data.Projectzhongbiaos[0].Names;
diff --git a/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml b/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml
index 3174031..7df2289 100644
--- a/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Project/Select.cshtml
@@ -92,19 +92,20 @@
             { label: '椤圭洰鍚嶇О', name: 'Name', labtype: 'txt', hidden: false },
             { label: '璇勫涓撳', name: 'Zhuanjia', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */},
             { label: '鐪�', name: 'Sheng', labtype: 'combox', hidden: false, data: JSON.parse(shengDropDown), cwidth: '5%', cccwidth: '10%' },
-            { label: '甯�', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '10%'  },
+            { label: '甯�', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '10%' },
             { label: '鍖哄幙', name: 'AreaId', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2.5%', cccwidth: '10%' },
             { label: '閲囪喘鏂瑰紡', name: 'Cgfs', labtype: 'combox', hidden: false, data: JSON.parse(projectDropDown) },
+            { label: '鏄惁搴熸爣', name: 'fblx', labtype: 'combox', hidden: false, data: JSON.parse(flbx)/*, cwidth: '5%', cccwidth: '8%' */ },
             { label: '涓爣渚涘簲鍟�', name: 'Names', labtype: 'txt', hidden: false },
             { label: '鎶曟爣渚涘簲鍟�', name: 'NamesToubiao', labtype: 'txt', hidden: false },
             { label: '鏄惁鏈夋棤鏁堜緵搴斿晢', name: 'ShiFouyReasonname', labtype: 'combox', hidden: false, data: JSON.parse(ShiFouyReasonname), cwidth: '8%', cccwidth: '12%'},
             { label: '鏃犳晥渚涘簲鍟�', name: 'Reasonname', labtype: 'txt', hidden: false },
-
-
-
-            { label: '鏄惁搴熸爣', name: 'fblx', labtype: 'combox', hidden: false, data: JSON.parse(flbx)/*, cwidth: '5%', cccwidth: '8%' */ },
+          
             { label: '褰曞叆鏃堕棿', name: 'Createtime', labtype: 'datearea', hidden: false },
             { label: '褰曞叆浜�', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(Creater)/*, cwidth: '5%', cccwidth: '8%'*/ },
+            
+            { label: '鍒嗗樊灏忎簬', name: 'Fencha', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
+            
 
         ];
         var _pageAdd = function () {
@@ -226,8 +227,18 @@
 
         sendCity();
 
-       
+      
 
+        $(function () {
+
+
+            $("#PBSfblx").parent().prev().prev().remove();
+            $("#PBSfblx").parent().after("<br>");
+            $("#PBSShiFouyReasonname").parent().next().remove();
+            $("#PBSReasonname").parent().after("<br>");
+            $("#PBSFencha").parent().next().remove();
+            
+        }); 
         
     </script>
 }
diff --git a/zhengcaioa/zhengcaioa/Views/Signin/Index.cshtml b/zhengcaioa/zhengcaioa/Views/Signin/Index.cshtml
index 8d77903..5b432e7 100644
--- a/zhengcaioa/zhengcaioa/Views/Signin/Index.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Signin/Index.cshtml
@@ -125,7 +125,7 @@
                             <div class="clearfix layer-area" style="padding-bottom:15px;">
                                 <label class="text-right col-sm-1 col-md-1 control-label">涓婂崍</label>
 
-                                <a class="btn btn-success" href="javascript:void(0)" onclick="networkInfo()" style="margin-left:4px; border-radius:4px;">
+                                <a class="btn btn-success" href="javascript:void(0)" onclick="saveSignin(10);" style="margin-left:4px; border-radius:4px;">
                                     <span class="bold">涓婄彮鎵撳崱</span>
                                 </a>
                                 @*saveSignin(10);*@
diff --git a/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Edit.cshtml
new file mode 100644
index 0000000..74a2ccc
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Edit.cshtml
@@ -0,0 +1,263 @@
+锘緻model DTO.LZhuanjiahuidumDTO
+@using DTO;
+@using zhengcaioa.Models;
+@{
+
+
+  
+
+}
+@{
+    Layout = null;
+}
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <meta name="description" content="">
+    <meta name="author" content="ThemeBucket">
+    <title>@(SiteConfig.SiteName)</title>
+    <link href="~/css/bootstrap.min.css" rel="stylesheet">
+    <link href="~/css/font-awesome.min.css" rel="stylesheet">
+    <link href="~/css/animate.min.css" rel="stylesheet">
+
+    @*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
+    <link href="~/css/style.min.css" rel="stylesheet">
+    <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
+    @*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
+    @*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
+    <link href="~/css/style.min.css" rel="stylesheet">
+    <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
+    <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
+
+    <style type="text/css">
+        .webuploader-pick {
+            position: relative;
+            display: inline-block;
+            cursor: pointer;
+            background: #00b7ee;
+            padding: 8px 14px 7px 14px;
+            color: #fff;
+            text-align: center;
+            border-radius: 3px;
+            overflow: hidden;
+        }
+
+        div.clearfix > label {
+            padding-top: 8px;
+        }
+
+        .chosen-container {
+            border-radius: 1px;
+            border: 1px solid #e5e6e7;
+        }
+
+        .col-md-1.control-label {
+            padding-right: 0px;
+            font-weight: 400;
+        }
+    </style>
+
+    <!-- jqgrid-->
+    @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
+    <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
+    <script src="~/js/bootstrap.min.js"></script>
+    @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
+
+    <!--瀹瑰櫒-->
+    @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
+    @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
+    @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
+    <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
+    @*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
+    <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
+    @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
+    @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
+    <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
+    <script src="~/js/plugins/webuploader/webuploader.min.js"></script>
+
+    <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
+    <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
+    @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
+    @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
+    <script src="~/js/TUJS.js"></script>
+</head>
+<body class="gray-bg" style="overflow:auto">
+    <form id="formtest">
+        <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="ibox float-e-margins">
+                        <div class="ibox-title">
+                            <h5>                            <i class="fa fa-list"></i>&nbsp;鍩烘湰淇℃伅</h5>
+                        </div>
+                        <div id="div_content" class="ibox-content" style="background-color:white;">
+                            <div class="row">
+                                @*<div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鎻愰棶浜�</label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <label class="text-right col-sm-12 col-md-12 control-label">@Model.Username</label>
+                                      
+                                        <input type="hidden" id="Username" name="Username" value="@Model.Username" />
+                                    </div>
+
+
+
+                                </div>*@
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label class="text-right col-sm-1 col-md-1 control-label">闂</label>
+                                    <div class="col-sm-11 col-md-11">
+                                        <label class="text-left col-sm-12 col-md-12 control-label">@Model.Question</label>
+                                    </div>
+                                    <input type="hidden" id="Question" name="Question" value="@Model.Question" />
+                                    <input type="hidden" id="Id" name="Id" value="@Model.Id" />
+                                    <input type="hidden" id="Userid" name="Userid" value="@Model.Userid" />
+                                </div>
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鍥炵瓟<i class="red">*</i></label>
+                                    <div class="col-sm-11 col-md-11">
+                                        <textarea class="form-control bt" id="Anwser" name="Anwser" title="鍥炵瓟" isempty="" maxlength="4000" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Anwser</textarea>
+                                    </div>
+                                </div>
+
+
+
+
+
+
+
+
+
+                            </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        </div>
+        <div class="wrapper wrapper-content" style="margin-top:0px"></div>
+        <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
+            <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="鍔熻兘鎸夐挳锛氣�滀繚瀛樷�濓紝鈥滃垹闄も��">
+
+                <a class="btn btn-success" href="javascript:void(0)" onclick="savePosition();" style="margin-left:4px; border-radius:4px;">
+                    <i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;<span class="bold">鎻愪氦</span>
+                </a>
+            </div>
+        </div>
+
+    </form>
+   
+    <script type="text/javascript">
+
+        var Anwser = document.getElementById("Anwser");
+
+        Anwser.style.height = Anwser.scrollHeight + 'px';
+
+        var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
+        $("#div_content").height(hh);
+
+        toastr.options = {
+            "closeButton": true,
+            "debug": false,
+            "progressBar": true,
+            "positionClass": "toast-bottom-right",
+            "onclick": null,
+            "showDuration": "300",
+            "hideDuration": "600",
+            "timeOut": "4500",
+            "extendedTimeOut": "600",
+            "showEasing": "swing",
+            "hideEasing": "linear",
+            "showMethod": "fadeIn",
+            "hideMethod": "fadeOut"
+        };
+
+ 
+
+         var id = '@Model.Id';
+
+       
+
+        // 淇濆瓨宀椾綅淇℃伅
+        var savePosition = function () {
+
+
+            if (Verify.isNull($("#Anwser").val())) {
+                toastr.warning("绛旀涓嶈兘涓虹┖");
+                return;
+            }
+
+
+
+
+
+
+           // var data = { id: $("#Id").val(), DocType: $("#DocType").val(), DocDept: $("#DocDept").val(), PublishTime: $("#PublishTime").val(), DocNo: $("#DocNo").val(), DocTitle: $("#DocTitle").val(), DocContent: ueue, DocZtc: $("#DocZtc").val(), Printtimes: $("#Printtimes").val(), DocCsdw: $("#DocCsdw").val(), PrintStatus: $("#PrintStatus").val()}
+            $.ajax({
+                type: "POST",
+                url: "/Zhuanjiahuida/Save",
+                dataType: "json",
+                global: false,
+                data: $('form').serializeArray(),
+                success: function (data) {
+
+
+
+                        if (data.Result) {
+                            //  parent._afterSave(true);
+                            parent.layer.msg('鎴愬姛淇濆瓨', { icon: 6 });
+                            //window.location = "/Project/add?id=" + data.ReturnID;
+
+
+                            try {
+                                _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶
+                            }
+                            catch (err) {
+                                parent._CloseTab1("/Zhuanjiahuida/Edit/");
+                            }
+
+                        }
+                        else {
+                            // toastr.error("澶辫触");
+                            parent.layer.msg(data.Message, { icon: 5 });
+                        }
+
+                },
+                error: function () {
+
+
+                    parent.layer.msg('澶辫触', { icon: 5 });
+                }
+            });
+        }
+
+
+
+
+        function _pageAutoClose() {
+            parent.window._reloadPageData();
+            var index = parent.layer.getFrameIndex(window.name);
+            parent.layer.isRefresh = true;
+            parent.layer.closeAll('loading');
+            parent.layer.close(index);
+            return false;
+        }
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml b/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml
new file mode 100644
index 0000000..496c7c0
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml
@@ -0,0 +1,97 @@
+锘緻{
+    ViewBag.Title = "Zhuanjiahuida";
+    Layout = "~/Views/Shared/_Layout_Search.cshtml";
+}
+@section headerStyle{
+    <script type="text/javascript">
+        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
+
+
+
+
+        dataCol = [
+            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
+            //{
+            //    label: '鎻愰棶浜�', name: 'Username', labtype: 'txt', hidden: false, width: 100
+            //},
+            {
+                label: '闂', name: 'Question', labtype: 'txt', hidden: false, width: 200,
+                formatter: function (cellvalue, options, rowObject) {
+                    return "<a onclick=\"OpenWindow('鍥炵瓟闂','98%','100%', '/Zhuanjiahuida/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
+                }
+            },
+           
+
+            {
+                label: '鍥炵瓟', name: 'Anwser', labtype: 'txt', hidden: false, width: 300
+
+            },
+            
+        ];
+        dataUrl = "/Zhuanjiahuida/GetList";
+        searchCol = [
+            //{ label: '鎻愰棶浜�', name: 'Username', labtype: 'txt'  },
+            { label: '闂', name: 'Question', labtype: 'txt'  },
+            { label: '鏄惁鍥炵瓟', name: 'HuidaStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou)},
+
+
+
+
+
+
+
+
+        ];
+
+
+        //var _pageAdd = function () {
+        //    OpenWindow("鏂板鍩烘湰宸ヨ祫", "98%", "100%", "/Zhuanjiahuida/Edit/");
+        //}
+
+
+
+
+        var _afterSave = function (result) {
+            if (result) {
+                toastr.success("淇濆瓨鎴愬姛");
+            } else {
+                toastr.error("淇濆瓨澶辫触");
+            }
+        }
+
+        var _afterDel = function (result) {
+            if (result) {
+                toastr.success("鍒犻櫎鎴愬姛");
+            } else {
+                /**/
+                toastr.error("鍒犻櫎鎴愬姛");
+        /**/
+    }
+}
+    </script>
+}
+
+@section footerScripts{
+    <script type="text/javascript">
+
+        function sendHuidaStatus() {
+
+            var msg = $("#PBSHuidaStatus");
+
+
+            if (msg.length > 0) {
+                $("#PBSHuidaStatus").val("D");
+                $("#PBSHuidaStatus").trigger('chosen:updated');//鏇存柊閫夐」
+                _pageSearch();
+            } else {
+                setTimeout(sendHuidaStatus, 100);
+            }
+        }
+
+
+        sendHuidaStatus();
+
+
+
+    </script>
+}
diff --git a/zhengcaioa/zhengcaioa/appsettings.Development.json b/zhengcaioa/zhengcaioa/appsettings.Development.json
index 6a1fcd8..d75cc38 100644
--- a/zhengcaioa/zhengcaioa/appsettings.Development.json
+++ b/zhengcaioa/zhengcaioa/appsettings.Development.json
@@ -9,5 +9,6 @@
       "Microsoft.Hosting.Lifetime": "Information"
     }
   },
-  "Elasticsearchurl": "http://localhost:9200"
+  "Elasticsearchurl": "http://localhost:9200",
+  "SecurityKey": "superSecretKey@345"
 }
diff --git a/zhengcaioa/zhengcaioa/appsettings.json b/zhengcaioa/zhengcaioa/appsettings.json
index 8f875ec..b01ba9c 100644
--- a/zhengcaioa/zhengcaioa/appsettings.json
+++ b/zhengcaioa/zhengcaioa/appsettings.json
@@ -10,5 +10,6 @@
     }
   },
   "AllowedHosts": "*",
-  "Elasticsearchurl": "http://localhost:9200"
+  "Elasticsearchurl": "http://localhost:9200",
+  "SecurityKey": "superSecretKey@345"
 }
diff --git a/zhengcaioa/zhengcaioa/zhengcaioa.csproj.user b/zhengcaioa/zhengcaioa/zhengcaioa.csproj.user
index 0c99ddb..67fd912 100644
--- a/zhengcaioa/zhengcaioa/zhengcaioa.csproj.user
+++ b/zhengcaioa/zhengcaioa/zhengcaioa.csproj.user
@@ -4,7 +4,7 @@
     <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
   </PropertyGroup>
   <PropertyGroup>
-    <ActiveDebugProfile>zhengcaioa</ActiveDebugProfile>
+    <ActiveDebugProfile>IIS Express</ActiveDebugProfile>
     <View_SelectedScaffolderID>RazorViewEmptyScaffolder</View_SelectedScaffolderID>
     <View_SelectedScaffolderCategoryPath>root/Common/MVC/View</View_SelectedScaffolderCategoryPath>
     <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
diff --git "a/\350\241\250\344\277\256\346\224\271.sql" "b/\350\241\250\344\277\256\346\224\271.sql"
index 38629a9..e4de1a1 100644
--- "a/\350\241\250\344\277\256\346\224\271.sql"
+++ "b/\350\241\250\344\277\256\346\224\271.sql"
@@ -1,6 +1,197 @@
 USE [zhengcaioa]
 GO
 
+/****** Object:  Table [dbo].[l_zhuanjiahuida]    Script Date: 2021/6/27 12:38:30 ******/
+SET ANSI_NULLS ON
+GO
+
+SET QUOTED_IDENTIFIER ON
+GO
+IF EXISTS(Select 1 From Sysobjects Where Name='l_zhuanjiahuida')  --查询表名costSeparateConfig是否存在  
+drop table  [l_zhuanjiahuida] 
+GO
+CREATE TABLE [dbo].[l_zhuanjiahuida](
+	[Id] [nvarchar](50) NOT NULL,
+	[userid] [nvarchar](50)   NULL,
+	[username] [nvarchar](100)   NULL,
+	[anwser] [nvarchar](4000)   NULL,
+	[question] [nvarchar](500)   NULL,
+	[huida_status] [nvarchar](1) NOT NULL,
+	[rec_status] [nvarchar](1) NOT NULL,
+	[creater] [nvarchar](50) NOT NULL,
+	[createtime] [datetime] NOT NULL,
+	[modifier] [nvarchar](50) NOT NULL,
+	[modifytime] [datetime] NOT NULL,
+	 
+ CONSTRAINT [PK_zhuanjiahuida] PRIMARY KEY CLUSTERED 
+(
+	[Id] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[l_zhuanjiahuida] ADD  DEFAULT ('A') FOR [rec_status]
+GO
+
+ALTER TABLE [dbo].[l_zhuanjiahuida] ADD  DEFAULT ('1') FOR [creater]
+GO
+
+ALTER TABLE [dbo].[l_zhuanjiahuida] ADD  CONSTRAINT [DF_l_zhuanjiahuida_createtime]  DEFAULT (getdate()) FOR [createtime]
+GO
+
+ALTER TABLE [dbo].[l_zhuanjiahuida] ADD  DEFAULT ('1') FOR [modifier]
+GO
+
+ALTER TABLE [dbo].[l_zhuanjiahuida] ADD  CONSTRAINT [DF_l_zhuanjiahuida_modifytime]  DEFAULT (getdate()) FOR [modifytime]
+GO
+ALTER TABLE [dbo].[l_zhuanjiahuida] ADD  DEFAULT ('D') FOR [huida_status]
+GO
+
+
+ 
+
+
+
+
+
+
+
+USE [zhengcaioa]
+GO
+
+/****** Object:  Table [dbo].[cus_fangwenjilu]    Script Date: 2021/6/9 14:15:04 ******/
+SET ANSI_NULLS ON
+GO
+
+SET QUOTED_IDENTIFIER ON
+GO
+IF EXISTS(Select 1 From Sysobjects Where Name='cus_fangwenjilu')  --查询表名costSeparateConfig是否存在  
+drop table  [cus_fangwenjilu] 
+GO
+
+CREATE TABLE [dbo].[cus_fangwenjilu](
+	[Id] [nvarchar](50) NOT NULL,
+	[fasongfangshi] [nvarchar](50) NULL,
+	[fasongneirong] [nvarchar](4000) NULL,
+	[jieshouren] [nvarchar](2000)   NULL,
+
+ 
+
+	[rec_status] [nvarchar](1) NOT NULL,
+	[creater] [nvarchar](50) NOT NULL,
+	[createtime] [datetime] NOT NULL,
+	[modifier] [nvarchar](50) NOT NULL,
+	[modifytime] [datetime] NOT NULL,
+ CONSTRAINT [PK_cus_fangwenjilu] PRIMARY KEY CLUSTERED 
+(
+	[Id] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[cus_fangwenjilu] ADD  DEFAULT ('A') FOR [rec_status]
+GO
+
+ALTER TABLE [dbo].[cus_fangwenjilu] ADD  DEFAULT ('1') FOR [creater]
+GO
+
+ALTER TABLE [dbo].[cus_fangwenjilu] ADD  DEFAULT (getdate()) FOR [createtime]
+GO
+
+ALTER TABLE [dbo].[cus_fangwenjilu] ADD  DEFAULT ('1') FOR [modifier]
+GO
+
+ALTER TABLE [dbo].[cus_fangwenjilu] ADD  DEFAULT (getdate()) FOR [modifytime]
+GO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+USE [zhengcaioa]
+GO
+
 /****** Object:  Table [dbo].[hr_jixiaoticheng]    Script Date: 2021/6/9 14:15:04 ******/
 SET ANSI_NULLS ON
 GO

--
Gitblit v1.9.1