| | |
| | | updateproject.SonghuoTime1 = entity.SonghuoTime1; |
| | | updateproject.HuifangJdr = entity.HuifangJdr; |
| | | updateproject.HuifangKehuyijian = entity.HuifangKehuyijian; |
| | | updateproject.Xmname = entity.Xmname; |
| | | updateproject.Xmcode = entity.Xmcode; |
| | | updateproject.Jichumoney = entity.Jichumoney; |
| | | |
| | | } |
| | | |
| | |
| | | into msssss |
| | | from mmm in msssss.DefaultIfEmpty() |
| | | |
| | | join n in _context.PltUsers |
| | | on a.Creater equals n.Id |
| | | into nsssss |
| | | from nnn in nsssss.DefaultIfEmpty() |
| | | |
| | | where a.RecStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.XdTime) || (a.XdTime >= XdTimestart && a.XdTime <= XdTimeend)) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Ywjl) || ggg.Ywjl == searchEntity.Ywjl.Trim()) |
| | |
| | | Remark = a.Remark, |
| | | |
| | | Creater = a.Creater, |
| | | Createtime = a.Createtime, |
| | | CreaterName = nnn.UserName, |
| | | Createtime = a.Createtime, |
| | | |
| | | RecStatus = a.RecStatus, |
| | | Modifier = a.Modifier, |
| | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | data.Heji1 = Math.Round(query.Sum(x => x.OrderNum) ?? 0, 2); |
| | | data.Heji2 = Math.Round(query.Sum(x => x.Price) ?? 0, 2); |
| | | data.Heji3 = Math.Round(query.Sum(x => x.Money) ?? 0, 2); |
| | | data.Heji4 = Math.Round(query.Sum(x => x.Youhui) ?? 0, 2); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.DangyeHeji1 = Math.Round(lianlist.Sum(x => x.OrderNum) ?? 0, 2); |
| | | data.DangyeHeji2 = Math.Round(lianlist.Sum(x => x.Price) ?? 0, 2); |
| | | data.DangyeHeji3 = Math.Round(lianlist.Sum(x => x.Money) ?? 0, 2); |
| | | data.DangyeHeji4 = Math.Round(lianlist.Sum(x => x.Youhui) ?? 0, 2); |
| | | data.LoadData(searchEntity, lianlist); |
| | | return data; |
| | | } |
| | |
| | | updateproject.Law = entity.Law; |
| | | updateproject.Sort = entity.Sort; |
| | | updateproject.Lawcoment = entity.Lawcoment; |
| | | updateproject.Questionname = entity.Questionname; |
| | | |
| | | } |
| | | |
| | |
| | | updateproject.Law = entity.Law; |
| | | updateproject.Sort = entity.Sort; |
| | | updateproject.Lawcoment = entity.Lawcoment; |
| | | |
| | | updateproject.Questionname = entity.Questionname; |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | return entity; |
| | | } |
| | | |
| | | |
| | | public List<TChallengeRequestInfoDTO> GetListChallengeRequestInfo(string ChallengeId) |
| | | { |
| | | |
| | | var entity = _context.TChallengeRequestInfos.Where(x => x.ChallengeId == ChallengeId).OrderBy(x => x.Id).ToList(); |
| | | |
| | | |
| | | |
| | | var result = _mapper.Map<List<TChallengeRequestInfoDTO>>(entity); |
| | | |
| | | |
| | | var request_info = (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 challengeItemDTO in result) |
| | | { |
| | | var codeDataEntity = request_info.Where(x => x.CodeSn == challengeItemDTO.RequestInfo).FirstOrDefault(); |
| | | if (codeDataEntity != null) |
| | | { |
| | | challengeItemDTO.RequestInfoNameName = codeDataEntity.Comments; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public ResultEntity saveChallengeRequestInfo(TChallengeRequestInfoDTO dto) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | try |
| | | { |
| | | |
| | | |
| | | var entity = _mapper.Map<TChallengeRequestInfo>(dto); |
| | | |
| | | |
| | | if (entity.Id <= 0) |
| | | { |
| | | |
| | | |
| | | _context.TChallengeRequestInfos.Add(entity); |
| | | } |
| | | else |
| | | { |
| | | var updateproject = _context.TChallengeRequestInfos.Find(entity.Id); |
| | | |
| | | |
| | | updateproject.ChallengeId = entity.ChallengeId; |
| | | updateproject.RequestInfo = entity.RequestInfo; |
| | | updateproject.RequestInfoname = entity.RequestInfoname; |
| | | |
| | | |
| | | } |
| | | |
| | | _context.SaveChanges(); |
| | | resultEntity.ReturnID = entity.Id.ToString(); |
| | | resultEntity.Result = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "保存失败,请联系管理员"; |
| | | |
| | | } |
| | | return resultEntity; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 删除质疑函子表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResultEntity deleteChallengeRequestInfo(string ChallengeId) |
| | | { |
| | | ResultEntity result = new ResultEntity(); |
| | | result.Result = true; |
| | | |
| | | var models = _context.TChallengeRequestInfos.Where(x => x.ChallengeId == ChallengeId).ToList(); ; |
| | | |
| | | foreach (var challengeItem in models) |
| | | { |
| | | _context.TChallengeRequestInfos.Remove(challengeItem); |
| | | } |
| | | _context.SaveChanges(); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | | } |