username@email.com
2021-06-28 8de9a465342385e0ebee7dc430abadd69a2b67dd
工资修改
33个文件已修改
12个文件已添加
2232 ■■■■■ 已修改文件
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AreaDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/CusFangwenjiluDTO.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/LZhuanjiahuidumDTO.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ProjectDTO.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ProjectzhongbiaoDTO.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ResultEntity.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/ICusFangwenjiluService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IIntentionCustomerService.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IIntentionVisitService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/ILZhuanjiahuidumService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IPltRoleService.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/CusFangwenjilu.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/LZhuanjiahuidum.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/Project.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/Projectzhongbiao.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/CusFangwenjiluService.cs 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/HrJixiaotichengService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/IntentionCustomerService.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/IntentionVisitService.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/LZhuanjiahuidumService.cs 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/PltRoleService.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/ProjectService.cs 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/AdmManagement/DailyManagementController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/CooperVisitController.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Expert/ZhuanjiahuidaController.cs 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/HR/HrJixiaotichengController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/ProjectController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/UserController.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/settings/AreaController.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Startup.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Timer/TimedBackgroundService.cs 352 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Project/Add.cshtml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Signin/Index.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Edit.cshtml 263 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/appsettings.Development.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/appsettings.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/zhengcaioa.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
表修改.sql 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>();
        }
    }
}
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
zhengcaioa/DTO/CusFangwenjiluDTO.cs
New file
@@ -0,0 +1,19 @@
using 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; }
    }
}
zhengcaioa/DTO/LZhuanjiahuidumDTO.cs
New file
@@ -0,0 +1,33 @@
using 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; }
    }
}
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; }
    }
}
zhengcaioa/DTO/ProjectzhongbiaoDTO.cs
New file
@@ -0,0 +1,17 @@
using 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; }
    }
}
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; }
    }
}
zhengcaioa/IServices/ICusFangwenjiluService.cs
New file
@@ -0,0 +1,21 @@
using 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();
    }
}
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);
    }
}
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);
    }
}
zhengcaioa/IServices/ILZhuanjiahuidumService.cs
New file
@@ -0,0 +1,21 @@
using 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 = "");
    }
}
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);
    }
}
zhengcaioa/Model/CusFangwenjilu.cs
New file
@@ -0,0 +1,20 @@
using 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; }
    }
}
zhengcaioa/Model/LZhuanjiahuidum.cs
New file
@@ -0,0 +1,22 @@
using 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; }
    }
}
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; }
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; }
    }
}
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 =>
zhengcaioa/Services/CusFangwenjiluService.cs
New file
@@ -0,0 +1,114 @@
using 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;
        }
    }
}
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,
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;
        }
    }
}
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;
        }
    }
}
zhengcaioa/Services/LZhuanjiahuidumService.cs
New file
@@ -0,0 +1,169 @@
using 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;
        }
    }
}
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;
        }
    }
}
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 + "%') ");
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
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);
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 = "无联系人号码";
            }
            
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);
zhengcaioa/zhengcaioa/Controllers/Expert/ZhuanjiahuidaController.cs
New file
@@ -0,0 +1,292 @@
using 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 = "没有获取到token";
                        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 = "没有获取到token";
                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 = "没有获取到token";
                        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 = "没有获取到token";
                returnMsg.count = 0;
            }
            return new JsonResult(returnMsg);
        }
}
}
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>();
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)
                                            //{
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;
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);
        }
    }
}
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>();
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;
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 {
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;
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>
}
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);*@
zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Edit.cshtml
New file
@@ -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>
zhengcaioa/zhengcaioa/Views/Zhuanjiahuida/Index.cshtml
New file
@@ -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>
}
zhengcaioa/zhengcaioa/appsettings.Development.json
@@ -9,5 +9,6 @@
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "Elasticsearchurl": "http://localhost:9200"
  "Elasticsearchurl": "http://localhost:9200",
  "SecurityKey": "superSecretKey@345"
}
zhengcaioa/zhengcaioa/appsettings.json
@@ -10,5 +10,6 @@
    }
  },
  "AllowedHosts": "*",
  "Elasticsearchurl": "http://localhost:9200"
  "Elasticsearchurl": "http://localhost:9200",
  "SecurityKey": "superSecretKey@345"
}
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>
±íÐÞ¸Ä.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