zhengcaioa/DTO/CooperOrderDTO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/IServices/ICooperOrderService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/Model/zcUserInfoN_db/GadeRole.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/Model/zcUserInfoN_db/UsergGadeRole.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/Services/CooperOrderService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/zhengcaioa/Startup.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/zhengcaioa/appsettings.Development.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zhengcaioa/zhengcaioa/appsettings.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
zhengcaioa/DTO/CooperOrderDTO.cs
@@ -144,6 +144,21 @@ public string OrderId { get; set; } public int PrintNum { get; set; } public bool AnswerRoles { get; set; } public bool XiaocaiKeTang { get; set; } public bool XiaoCaiQandA { get; set; } public int Discount { get; set; } public int BiddingDocumentsCount { get; set; } public int ComplaintsDisputeCount { get; set; } public int PerformanceDisputeCount { get; set; } public int BiddingDocumentsCountused { get; set; } public int ComplaintsDisputeCountused { get; set; } public int PerformanceDisputeCountused { get; set; } } public class CooperOrderDTOSearch : SearchEntity zhengcaioa/IServices/ICooperOrderService.cs
@@ -87,5 +87,8 @@ ResultDataEntity<CooperOrderDTO> SearchByPagingWenshu(CooperOrderDTOSearch searchEntity); //获取质疑投诉的次数 List<CooperOrderDTO> GetListComplaintsDisputeCount(string huiyuanid); } } zhengcaioa/Model/zcUserInfoN_db/GadeRole.cs
New file @@ -0,0 +1,36 @@ using System; using System.Collections.Generic; #nullable disable namespace zhengcaioa.Models { public partial class GadeRole { public GadeRole() { UsergGadeRoleSecondUserGadeRoles = new HashSet<UsergGadeRole>(); UsergGadeRoleUserGadeRoles = new HashSet<UsergGadeRole>(); } public Guid Id { get; set; } public Guid? FrameworkRoleId { get; set; } public bool AnswerRoles { get; set; } public bool XiaocaiKeTang { get; set; } public bool XiaoCaiQandA { get; set; } public bool GaveBook { get; set; } public int Discount { get; set; } public int BiddingDocumentsCount { get; set; } public int ComplaintsDisputeCount { get; set; } public int PerformanceDisputeCount { get; set; } public decimal Price { get; set; } public bool OnShelf { get; set; } public DateTime? CreateTime { get; set; } public string CreateBy { get; set; } public DateTime? UpdateTime { get; set; } public string UpdateBy { get; set; } public virtual ICollection<UsergGadeRole> UsergGadeRoleSecondUserGadeRoles { get; set; } public virtual ICollection<UsergGadeRole> UsergGadeRoleUserGadeRoles { get; set; } } } zhengcaioa/Model/zcUserInfoN_db/UsergGadeRole.cs
New file @@ -0,0 +1,27 @@ using System; using System.Collections.Generic; #nullable disable namespace zhengcaioa.Models { public partial class UsergGadeRole { public Guid Id { get; set; } public Guid? UserId { get; set; } public bool GaveBook { get; set; } public DateTime? TimeOut { get; set; } public int BiddingDocumentsCount { get; set; } public int ComplaintsDisputeCount { get; set; } public int PerformanceDisputeCount { get; set; } public Guid? UserGadeRolesId { get; set; } public Guid? SecondUserGadeRolesId { get; set; } public DateTime? CreateTime { get; set; } public string CreateBy { get; set; } public DateTime? UpdateTime { get; set; } public string UpdateBy { get; set; } public virtual GadeRole SecondUserGadeRoles { get; set; } public virtual GadeRole UserGadeRoles { get; set; } } } zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs
New file @@ -0,0 +1,93 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; #nullable disable namespace zhengcaioa.Models { public partial class zcUserInfoN_dbContext : DbContext { public zcUserInfoN_dbContext() { } public zcUserInfoN_dbContext(DbContextOptions<zcUserInfoN_dbContext> options) : base(options) { } public virtual DbSet<GadeRole> GadeRoles { get; set; } public virtual DbSet<UsergGadeRole> UsergGadeRoles { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { #warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263. optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=zcUserInfoN_db;User ID=sa;Password=123456"); } } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS"); modelBuilder.Entity<GadeRole>(entity => { entity.ToTable("gadeRoles"); entity.HasIndex(e => e.FrameworkRoleId, "IX_gadeRoles_FrameworkRoleId"); entity.Property(e => e.Id) .ValueGeneratedNever() .HasColumnName("ID"); entity.Property(e => e.CreateBy).HasMaxLength(50); entity.Property(e => e.OnShelf).HasColumnName("onShelf"); entity.Property(e => e.Price) .HasColumnType("decimal(18, 2)") .HasColumnName("price"); entity.Property(e => e.UpdateBy).HasMaxLength(50); entity.Property(e => e.XiaoCaiQandA).HasColumnName("XiaoCaiQAndA"); entity.Property(e => e.XiaocaiKeTang).HasColumnName("xiaocaiKeTang"); }); modelBuilder.Entity<UsergGadeRole>(entity => { entity.ToTable("usergGadeRoles"); entity.HasIndex(e => e.SecondUserGadeRolesId, "IX_usergGadeRoles_SecondUserGadeRolesId"); entity.HasIndex(e => e.UserGadeRolesId, "IX_usergGadeRoles_UserGadeRolesId"); entity.HasIndex(e => e.UserId, "IX_usergGadeRoles_UserId"); entity.Property(e => e.Id) .ValueGeneratedNever() .HasColumnName("ID"); entity.Property(e => e.CreateBy).HasMaxLength(50); entity.Property(e => e.UpdateBy).HasMaxLength(50); entity.HasOne(d => d.SecondUserGadeRoles) .WithMany(p => p.UsergGadeRoleSecondUserGadeRoles) .HasForeignKey(d => d.SecondUserGadeRolesId); entity.HasOne(d => d.UserGadeRoles) .WithMany(p => p.UsergGadeRoleUserGadeRoles) .HasForeignKey(d => d.UserGadeRolesId); }); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); } } zhengcaioa/Services/CooperOrderService.cs
@@ -14,11 +14,13 @@ public class CooperOrderService: ICooperOrderService { private readonly zhengcaioaContext _context; private readonly zcUserInfoN_dbContext _zcUserInfoN_dbContext; private readonly IMapper _mapper; public CooperOrderService(zhengcaioaContext context, IMapper mapper) public CooperOrderService(zhengcaioaContext context, IMapper mapper, zcUserInfoN_dbContext zcUserInfoN_dbContext) { _context = context; _mapper = mapper; _zcUserInfoN_dbContext = zcUserInfoN_dbContext; } @@ -1936,5 +1938,37 @@ data.LoadData(searchEntity, lianlist); return data; } public List<CooperOrderDTO> GetListComplaintsDisputeCount(string huiyuanid) { var query = (from a in _zcUserInfoN_dbContext.UsergGadeRoles join b in _zcUserInfoN_dbContext.GadeRoles on a.UserGadeRolesId equals b.Id where a.UserId == Guid.Parse(huiyuanid) select new CooperOrderDTO { Id = a.UserId.ToString(), AnswerRoles = b.AnswerRoles, XiaocaiKeTang = b.XiaocaiKeTang, XiaoCaiQandA = b.XiaoCaiQandA, Discount = b.Discount, BiddingDocumentsCount = b.BiddingDocumentsCount, ComplaintsDisputeCount = b.ComplaintsDisputeCount, PerformanceDisputeCount = b.PerformanceDisputeCount, BiddingDocumentsCountused = a.BiddingDocumentsCount, ComplaintsDisputeCountused = a.ComplaintsDisputeCount, PerformanceDisputeCountused = a.PerformanceDisputeCount, } ).ToList(); return query; } } } zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
@@ -582,14 +582,51 @@ var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); ViewData["curentuser"] = curentuser; data.RecStatus = "A"; bool youhui = true; if (String.IsNullOrEmpty(data.Id)) { var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(data.Khdw); if (cooperatecustomCustomerDTO != null && !string.IsNullOrEmpty(cooperatecustomCustomerDTO.HuiyuanId)) { var cooperOrderDTOs = _cooperOrderService.GetListComplaintsDisputeCount(cooperatecustomCustomerDTO.HuiyuanId).FirstOrDefault(); if(cooperOrderDTOs != null) { if ((cooperOrderDTOs.ComplaintsDisputeCount - cooperOrderDTOs.ComplaintsDisputeCountused > 0) && (data.OrderType == "02" && (data.OrderType1 == "代拟投诉书" || data.OrderType1 == "代拟质疑函"))) { data.Youhui = data.Money.Value; data.Money = 0; youhui = false; } else if ((cooperOrderDTOs.BiddingDocumentsCount - cooperOrderDTOs.BiddingDocumentsCountused > 0) && data.OrderType == "03") { data.Youhui = data.Money.Value; data.Money = 0; youhui = false; } else if ((cooperOrderDTOs.PerformanceDisputeCount - cooperOrderDTOs.PerformanceDisputeCountused > 0) && data.OrderType == "07") { data.Youhui = data.Money.Value; data.Money = 0; youhui = false; } } } data.Creater = curentuser.Id; data.Createtime = DateTime.Now; data.XdTime = data.Createtime; if (data.OrderType == "03" || data.OrderType == "07" || (data.OrderType == "02" && (data.OrderType1 == "代拟投诉书" || data.OrderType1 == "代拟质疑函"))) { var cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(data.Khdw); if (cooperatecustomCustomerDTO != null && !string.IsNullOrEmpty(cooperatecustomCustomerDTO.HuiyuanId)) { string huiyuanurl = _configuration.GetSection("huiyuanurl").Value; @@ -662,6 +699,8 @@ )) { if (youhui) { var youHuiDTOs = _askService.GetAskYouHuiList(data.Khdw, data.OrderType).FirstOrDefault(); if (youHuiDTOs != null) { @@ -695,6 +734,8 @@ } } data.ShouliStatus = "1"; data.Modifier = curentuser.Id; zhengcaioa/zhengcaioa/Startup.cs
@@ -74,6 +74,10 @@ services.AddDbContext<zcwebContext>(options => options.UseSqlServer(connectionString1)); var connectionString2 = Configuration.GetConnectionString("zcUserInfoNConnection"); services.AddDbContext<zcUserInfoN_dbContext>(options => options.UseSqlServer(connectionString2)); services.AddControllersWithViews(); services.AddScoped(typeof(ISimService), typeof(SimService)); zhengcaioa/zhengcaioa/appsettings.Development.json
@@ -1,7 +1,8 @@ { "ConnectionStrings": { "DefaultConnection": "server=.;database=zhengcaioa;uid=sa;pwd=123456;", "zcwebConnection": "server=localhost;database=zcweb;uid=sa;pwd=123456;" "zcwebConnection": "server=localhost;database=zcweb;uid=sa;pwd=123456;", "zcUserInfoNConnection": "server=localhost;database=zcUserInfoN_db;uid=sa;pwd=123456;" }, "Logging": { "LogLevel": { zhengcaioa/zhengcaioa/appsettings.json
@@ -1,7 +1,8 @@ { "ConnectionStrings": { "DefaultConnection": "server=localhost;database=zhengcaioa;uid=sa;pwd=123456;", "zcwebConnection": "server=localhost;database=zcweb;uid=sa;pwd=123456;" "zcwebConnection": "server=localhost;database=zcweb;uid=sa;pwd=123456;", "zcUserInfoNConnection": "server=localhost;database=zcUserInfoN_db;uid=sa;pwd=123456;" }, "Logging": { "LogLevel": {