| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public List<TChallengeletterDTO> GetListChallengelettertousu(string customid, string XmCode) |
| | | { |
| | | |
| | | var entity = (from a in _context.CooperOrders.Where(x=>x.OrderType1== "代拟质疑函" && x.RecStatus == "A" && x.Khdw == customid) |
| | | join b in _context.TChallengeletters.Where(x=>x.XmCode == XmCode) on a.Id equals b.OrderId |
| | | select b ).ToList(); |
| | | |
| | | |
| | | //_context.TChallengeletters.Where(x =>/* x.Status == 1 && */x.OrderId == OrderId).ToList(); |
| | | |
| | | |
| | | |
| | | var result = _mapper.Map<List<TChallengeletterDTO>>(entity); |
| | | |
| | | |
| | | var listCode = (from a in _context.SysCodeDtls |
| | | join b in _context.SysCodes |
| | | on a.CodeId equals b.Id |
| | | where a.RecStatus == "A" |
| | | && b.RecStatus == "A" |
| | | select new CodeDataEntity() |
| | | { |
| | | CodeId = b.Id, |
| | | CodeTable = b.CodeTable, |
| | | CodeField = b.CodeField, |
| | | CodeSn = a.CodeSn, |
| | | Comments = a.Comments, |
| | | Contents = a.Contents, |
| | | RecStatus = a.RecStatus, |
| | | Sort = a.Sort |
| | | } |
| | | ).Where(x => x.CodeTable == "t_challengeletter" && x.CodeField == "request_info").ToList(); |
| | | foreach (var challengeletterDTO in result) |
| | | { |
| | | var codeDataEntity = listCode.Where(x => x.CodeSn == challengeletterDTO.RequestInfo).FirstOrDefault(); |
| | | if (codeDataEntity != null) |
| | | { |
| | | challengeletterDTO.RequestInfoName = codeDataEntity.Comments; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | 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; |
| | | } |
| | | |
| | | |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |