From 5421f9a6e5e2b28cc32aa8aa6dec9becd0c1eb3c Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 04 一月 2023 10:19:57 +0800 Subject: [PATCH] 业务经理意向和合作客户只能1000,90天意向不转合作就制空业务经理,查询没有业务经理的档案客户和合作客户 --- zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs index 6b97fdb..9fea049 100644 --- a/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/Customer/CooperatecustomCustomerController.cs @@ -30,11 +30,12 @@ private readonly IHrDeptService _hrDeptService; private readonly ISysAttachmentService _sysAttachmentService; private readonly IPltPageService _pltPageService; - + private readonly ICooperVisitService _cooperVisitService; public CooperatecustomCustomerController(ILogger<CooperatecustomCustomerController> logger, IProjectService projectService, ILiaotianService liaotianService, ICooperatecustomCustomerService cooperatecustomCustomerService, IUserService userService, IHrDeptService hrDeptService , ISysAttachmentService sysAttachmentService - , IPltPageService pltPageService) + , IPltPageService pltPageService + , ICooperVisitService cooperVisitService) { _logger = logger; _projectService = projectService; @@ -44,6 +45,7 @@ _hrDeptService = hrDeptService; _sysAttachmentService = sysAttachmentService; _pltPageService = pltPageService; + _cooperVisitService = cooperVisitService; } public IActionResult Index() @@ -135,9 +137,12 @@ ViewBag.khly = _liaotianService.GetSYScode("CooperatecustomCustomer", "khly").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewBag.hyfl = _liaotianService.GetSYScode("CooperatecustomCustomer", "hyfl").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); - ViewBag.users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList(); + var users = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList(); + users.Insert(0, new { code = "11111", label = "鏃犱笟鍔$粡鐞�" }); + + ViewBag.users = users; var areaDTOs = _projectService.Getsheng().ToList(); @@ -157,7 +162,7 @@ ViewBag.ShengDropDown = areaDTOs.Select(x => new { code = x.CodeId, label = x.Name }).ToList(); - ViewBag.Baomingtimebegin = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd"); + ViewBag.Baomingtimebegin = DateTime.Now.AddMonths(-6).ToString("yyyy-MM-dd"); ViewBag.Baomingtimeend = DateTime.Now.ToString("yyyy-MM-dd"); @@ -183,6 +188,13 @@ { cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(id); + + CooperVisitDTOSearch searchEntity = new CooperVisitDTOSearch(); + searchEntity.page = 1; + searchEntity.rows = 1000; + searchEntity.Viscustomer = id; + var resultDataEntity = _cooperVisitService.SearchByPaging(searchEntity); + ViewData["visitlishi"] = resultDataEntity.DataList; } else { @@ -191,7 +203,9 @@ cooperatecustomCustomerDTO.Sheng = "510000"; cooperatecustomCustomerDTO.City = "510100"; cooperatecustomCustomerDTO.AreaId = "510107"; - + + ViewData["visitlishi"] = new List<CooperVisitDTO>(); + } var areaDTOs = _projectService.Getsheng().ToList(); -- Gitblit v1.9.1