username@email.com
2022-06-23 e0919683625f6a48699ed2c223f22366cc5bc949
zhengcaioa/zhengcaioa/Controllers/ProjectController.cs
@@ -29,11 +29,13 @@
        private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
        private readonly ISysBaimingdanService _sysBaimingdanService;
        private readonly IFiOrderrecievemoneyService _fiOrderrecievemoneyService;
        private readonly IAreaService _areaService;
        public ProjectController(ILogger<ProjectController> logger, IProjectService projectService, ILiaotianService liaotianService,IIntentionCustomerService intentionCustomerService, IUserService userService
            , ICooperatecustomCustomerService cooperatecustomCustomerService
            , ISysBaimingdanService sysBaimingdanService
            , IFiOrderrecievemoneyService fiOrderrecievemoneyService)
            , IFiOrderrecievemoneyService fiOrderrecievemoneyService
            , IAreaService areaService)
        {
            _logger = logger;
            _projectService = projectService;
@@ -43,6 +45,7 @@
            _cooperatecustomCustomerService = cooperatecustomCustomerService;
            _sysBaimingdanService = sysBaimingdanService;
            _fiOrderrecievemoneyService = fiOrderrecievemoneyService;
            _areaService = areaService;
        }
        [CheckLogin]
        public IActionResult Index()
@@ -903,7 +906,7 @@
                    //if (resultDataEntitys.DataList.Count > 0)
                    {
                        string token = key1.Length > 100 ? key1.Substring(key1.Length - 100) : key1;
                        if (ruleCollection.ZXDSFXLS > 0)
                        if (ruleCollection.PrivilegeService.Count(x=>x== "ZXDSFXLS")>0)
                        //if (ruleCollection.ZXDSFXLS == 0)
                        {
                            DateTime yuechu = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
@@ -974,7 +977,7 @@
                                    return new JsonResult(returnMsg);
                                }
                            }
                            if ( token != zxdsfxlDTOsnowdate[0].Token)
                            if (zxdsfxlDTOsnowdate.Count == 0 || token != zxdsfxlDTOsnowdate[0].Token)
                            {
                                //存储本次的访问信息
                                ZxdsfxlDTO zxdsfxlDTO = new ZxdsfxlDTO();
@@ -1034,5 +1037,51 @@
            }
            return new JsonResult(returnMsg);
        }
        //获取项目详细信息
        public IActionResult GetProjectFenxiDtl(string id = null)
        {
            ReturnMsg<ProjectDTO> returnMsg = new ReturnMsg<ProjectDTO>();
            returnMsg.code = 2;
            var  projectDTO = _projectService.GetLiaotianEntity(id);
            var cgfs = _projectService.GetCgfs().Where(x=>x.Id == projectDTO.Cgfs).FirstOrDefault();
            var areaDTOs = _areaService.GetList();
            var flbx = _liaotianService.GetSYScode("Project", "flbx").Where(x => x.Id == projectDTO.Fblx).FirstOrDefault();
            projectDTO.StartTimestr = projectDTO.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
            var shengname = areaDTOs.Where(x => x.CodeId == projectDTO.Sheng).FirstOrDefault();
            if (shengname != null)
            {
                projectDTO.ShengName = shengname.Name;
            }
            var cityname = areaDTOs.Where(x => x.CodeId == projectDTO.City).FirstOrDefault();
            if (cityname != null)
            {
                projectDTO.CityName = cityname.Name;
            }
            var areaIdName = areaDTOs.Where(x => x.CodeId == projectDTO.AreaId).FirstOrDefault();
            if (areaIdName != null)
            {
                projectDTO.AreaIdName = areaIdName.Name;
            }
            if (cgfs != null)
            {
                projectDTO.CgfsName = cgfs.Name;
            }
            if (flbx != null)
            {
                projectDTO.FblxName = flbx.Comments;
            }
            returnMsg.code = 1;
            returnMsg.count = 1;
            returnMsg.returnObj = projectDTO;
            return new JsonResult(returnMsg);
        }
    }
}