| | |
| | | private readonly ILiaotianService _liaotianService; |
| | | private readonly IIntentionCustomerService _intentionCustomerService; |
| | | private readonly IUserService _userService; |
| | | private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService; |
| | | private readonly ISysBaimingdanService _sysBaimingdanService; |
| | | |
| | | |
| | | public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService) |
| | | public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService |
| | | , ICooperatecustomCustomerService cooperatecustomCustomerService |
| | | , ISysBaimingdanService sysBaimingdanService) |
| | | { |
| | | _logger = logger; |
| | | _projectService = projectService; |
| | | _liaotianService = liaotianService; |
| | | _intentionCustomerService = intentionCustomerService; |
| | | _userService = userService; |
| | | _cooperatecustomCustomerService = cooperatecustomCustomerService; |
| | | _sysBaimingdanService = sysBaimingdanService; |
| | | } |
| | | [CheckLogin] |
| | | public IActionResult Index() |
| | |
| | | { |
| | | projectDTO = _projectService.GetLiaotianEntity(id); |
| | | var intentionCustomerDTOs = _intentionCustomerService.GetList(); |
| | | var cooperatecustomCustomerDTOs = _cooperatecustomCustomerService.GetList(); |
| | | |
| | | if (projectDTO.Projectzhongbiaos!=null && projectDTO.Projectzhongbiaos.Count > 0) |
| | | { |
| | |
| | | { |
| | | var intt = intentionCustomerDTOs.Count(x=>x.Name == projectDTO.Projectzhongbiaos[i].Names); |
| | | |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Projectzhongbiaos[i].ProjectId = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Projectzhongbiaos[i].Names); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Projectzhongbiaos[i].ProjectId = "yes"; |
| | |
| | | { |
| | | projectDTO.Drcunzai = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Drhx); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Drcunzai = "yes"; |
| | | } |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(projectDTO.Dshx)) |
| | | { |
| | | var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.Dshx); |
| | | |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Dscunzai = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Dshx); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Dscunzai = "yes"; |
| | |
| | | { |
| | | var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.projectreasons[i].Reasonname); |
| | | |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.projectreasons[i].ProjectId = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.projectreasons[i].Reasonname); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.projectreasons[i].ProjectId = "yes"; |
| | |
| | | { |
| | | projectDTO.Projectyouxiaos[i].ProjectId = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Projectyouxiaos[i].Namesyouxiao); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Projectyouxiaos[i].ProjectId = "yes"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(projectDTO.Caigourenname)) |
| | | { |
| | | var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.Caigourenname); |
| | | |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Caigourennamecunzai = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Caigourenname); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Caigourennamecunzai = "yes"; |
| | | } |
| | | } |
| | | |
| | | if (!string.IsNullOrWhiteSpace(projectDTO.Dailiname)) |
| | | { |
| | | var intt = intentionCustomerDTOs.Count(x => x.Name == projectDTO.Dailiname); |
| | | |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Dailinamecunzai = "yes"; |
| | | } |
| | | intt = cooperatecustomCustomerDTOs.Count(x => x.Name == projectDTO.Dailiname); |
| | | if (intt > 0) |
| | | { |
| | | projectDTO.Dailinamecunzai = "yes"; |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList(); |
| | | |
| | | ViewBag.Creater = _userService.GetList().Select(x => new { code = x.Id, label = x.UserName }).ToList(); |
| | | |
| | | ViewBag.flbx = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | ViewBag.ShiFouyReasonname = _liaotianService.GetSYScode("Project", "ShiFouyReasonname").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | return View(); |
| | | } |
| | | |
| | |
| | | } |
| | | else if (select != null && select.TextContent.IndexOf("中标(成交)信息") >= 0) |
| | | { |
| | | projectDTO.Projectzhongbiaos = new List<Projectzhongbiao>(); |
| | | projectDTO.Projectzhongbiaos = new List<ProjectzhongbiaoDTO>(); |
| | | |
| | | if (table[i + 1] != null) |
| | | { |
| | |
| | | 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) |
| | | //{ |
| | |
| | | var td1 = table[i + 1].QuerySelector("td"); |
| | | if (td1 != null) |
| | | { |
| | | projectDTO.Zhuanjia = table[i + 1].QuerySelector("td").TextContent.Trim();//OuterHtml |
| | | string ssss = table[i + 1].QuerySelector("td").TextContent.Trim(); |
| | | ssss = ssss.Replace("(组长)", "").Replace("(组长)", "").Replace(",", "、").Replace("(评审组长)", "").Replace("(评审组长)", "").Replace(";", "、").Replace("评审组长:", "").Replace("组长:", "").Replace("组员:",""); |
| | | projectDTO.Zhuanjia = ssss;//OuterHtml |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取对手分析 |
| | | public IActionResult GetProjectFenxi([FromBody] ProjectDTOSearch search) |
| | | { |
| | | ReturnMsg<List<ProjectDTO>> returnMsg = new ReturnMsg<List<ProjectDTO>>(); |
| | | returnMsg.code = 2; |
| | | |
| | | var sysBaimingdanDTOs = _sysBaimingdanService.GetList(); |
| | | if (!string.IsNullOrEmpty(search.Zhuanjia)) |
| | | { |
| | | var sss = sysBaimingdanDTOs.Where(x => x.PostType == "01" && search.Zhuanjia.Contains(x.BaimingdanName)).Count(); |
| | | if (sss > 0) |
| | | { |
| | | returnMsg.code = 2; |
| | | returnMsg.error = "该专家请直接联系政采咨询"; |
| | | returnMsg.count = 0; |
| | | return new JsonResult(returnMsg); |
| | | } |
| | | } |
| | | if (!string.IsNullOrEmpty(search.Names)) |
| | | { |
| | | var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.Names.Contains(x.BaimingdanName)).Count(); |
| | | if (sss > 0) |
| | | { |
| | | returnMsg.code = 11; |
| | | returnMsg.error = "该供应商请直接联系政采咨询"; |
| | | returnMsg.count = 0; |
| | | return new JsonResult(returnMsg); |
| | | } |
| | | } |
| | | if (!string.IsNullOrEmpty(search.NamesToubiao)) |
| | | { |
| | | var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.NamesToubiao.Contains(x.BaimingdanName)).Count(); |
| | | if (sss > 0) |
| | | { |
| | | returnMsg.code = 11; |
| | | returnMsg.error = "该供应商请直接联系政采咨询"; |
| | | returnMsg.count = 0; |
| | | return new JsonResult(returnMsg); |
| | | } |
| | | } |
| | | if (!string.IsNullOrEmpty(search.Reasonname)) |
| | | { |
| | | var sss = sysBaimingdanDTOs.Where(x => x.PostType == "02" && search.Reasonname.Contains(x.BaimingdanName)).Count(); |
| | | if (sss > 0) |
| | | { |
| | | returnMsg.code = 11; |
| | | returnMsg.error = "该供应商请直接联系政采咨询"; |
| | | returnMsg.count = 0; |
| | | return new JsonResult(returnMsg); |
| | | } |
| | | } |
| | | |
| | | |
| | | try |
| | | { |
| | | |
| | | //search.page = 1; |
| | | //search.rows = 1; |
| | | ResultDataEntity<ProjectDTO> resultDataEntity = _projectService.SearchByPaging(search); |
| | | |
| | | returnMsg.code = 1; |
| | | returnMsg.count = search.totalrows; |
| | | returnMsg.returnObj = resultDataEntity.DataList; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | returnMsg.code = 2; |
| | | returnMsg.error = "没有获取到token"; |
| | | returnMsg.count = 0; |
| | | |
| | | } |
| | | return new JsonResult(returnMsg); |
| | | } |
| | | } |
| | | } |