| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public List<TChallengeletterDTO> GetListChallengeletterChosen() |
| | | { |
| | | var query = (from a in _context.TChallengeletters |
| | | join b in _context.CooperOrders.Where(x => x.RecStatus == "A") |
| | | on a.OrderId equals b.Id |
| | | |
| | | select new TChallengeletterDTO |
| | | { |
| | | Id = b.Id, |
| | | OrderId = b.OrderNo, |
| | | khid = b.Khdw, |
| | | Createtime = b.Createtime, |
| | | } |
| | | ).OrderByDescending(x=>x.Createtime).ToList(); |
| | | |
| | | |
| | | |
| | | |
| | | return query; |
| | | } |
| | | |
| | | |
| | | public ResultEntity saveChallengeletter(TChallengeletterDTO dto) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | |
| | | WeishouMoney = (a.Money ?? 0) /*- (a.Youhui ?? 0)*/ - (lll.YishouMoney ?? 0), |
| | | OrderType1 = a.OrderType1, |
| | | Status = b.Status.ToString(), |
| | | Modifytime = b.Modifytime.Value, |
| | | //StatusName = ddd.Comments |
| | | } |
| | | ).ToList(); |
| | |
| | | WeishouMoney = (a.Money ?? 0) /*- (a.Youhui ?? 0)*/ - (lll.YishouMoney ?? 0), |
| | | OrderType1 = a.OrderType1, |
| | | Status = b.Status.ToString(), |
| | | Modifytime = b.Modifytime.Value, |
| | | } |
| | | ).ToList(); |
| | | |
| | | query2.AddRange(query1); |
| | | var query = query2.Where(x => x.WeishouMoney <= 0).OrderByDescending(x => x.Createtime).ToList(); |
| | | var query = query2.Where(x => x.WeishouMoney <= 0).OrderByDescending(x => x.Modifytime).ToList(); |
| | | |
| | | |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | public FrameworkUser GetFrameworkUsers(string ID) |
| | | { |
| | | |
| | | |
| | | |
| | | var entity = _zcUserInfoN_dbContext.FrameworkUsers.Find(new Guid(ID)); |
| | | |
| | | |
| | | |
| | | return entity; |
| | | } |
| | | } |
| | | } |