| | |
| | | private readonly IAdmPieceCheckService _admPieceCheckService; |
| | | private readonly IHrDeptService _hrDeptService; |
| | | private readonly IFiPiecerateService _fiPiecerateService; |
| | | private readonly IPltPageService _pltPageService; |
| | | |
| | | |
| | | public AdmPieceCheckController(ILogger<AdmPieceCheckController> logger, ILiaotianService liaotianService, IUserService userService, IAdmPieceCheckService admPieceCheckService, IHrDeptService hrDeptService, IFiPiecerateService fiPiecerateService) |
| | | public AdmPieceCheckController(ILogger<AdmPieceCheckController> logger, ILiaotianService liaotianService, IUserService userService, IAdmPieceCheckService admPieceCheckService, IHrDeptService hrDeptService, IFiPiecerateService fiPiecerateService |
| | | , IPltPageService pltPageService) |
| | | { |
| | | _logger = logger; |
| | | _liaotianService = liaotianService; |
| | |
| | | _admPieceCheckService = admPieceCheckService; |
| | | _hrDeptService = hrDeptService; |
| | | _fiPiecerateService = fiPiecerateService; |
| | | _pltPageService = pltPageService; |
| | | } |
| | | public IActionResult Index() |
| | | { |
| | |
| | | actionEntity.PageIco = "fa fa-search"; |
| | | actionEntity.ActionName = "查询"; |
| | | actionlist.Add(actionEntity); |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = 0; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = "Add"; |
| | | actionEntity1.PageIco = "fa fa-plus"; |
| | | actionEntity1.ActionName = "新增"; |
| | | actionlist.Add(actionEntity1); |
| | | //ActionEntity actionEntity1 = new ActionEntity(); |
| | | //actionEntity1.OpenType = 0; |
| | | //actionEntity1.ActionUrl = ""; |
| | | //actionEntity1.ActionFun = "Add"; |
| | | //actionEntity1.PageIco = "fa fa-plus"; |
| | | //actionEntity1.ActionName = "新增"; |
| | | //actionlist.Add(actionEntity1); |
| | | |
| | | //ActionEntity actionEntity3 = new ActionEntity(); |
| | | //actionEntity3.OpenType = 0; |
| | | //actionEntity3.ActionUrl = ""; |
| | | //actionEntity3.ActionFun = "Print"; |
| | | //actionEntity3.PageIco = "fa fa-print"; |
| | | //actionEntity3.ActionName = "打印"; |
| | | //actionlist.Add(actionEntity3); |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/AdmPieceCheck/Index/"); |
| | | var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList(); |
| | | |
| | | foreach (var pageEntity in pageEntities1) |
| | | { |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = pageEntity.OpenType; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = pageEntity.PageShortcut; |
| | | actionEntity1.PageIco = pageEntity.PageIco; |
| | | actionEntity1.ActionName = pageEntity.PageName; |
| | | actionlist.Add(actionEntity1); |
| | | } |
| | | ViewData["ActionInfo"] = actionlist; |
| | | |
| | | |
| | | |
| | | ViewBag.PayType = _liaotianService.GetSYScode("CooperVisit", "jtype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | //ViewBag.PayType = _liaotianService.GetSYScode("CooperVisit", "jtype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | |
| | | ViewBag.DeptId = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); |
| | | |
| | | return View(); |
| | | |
| | | } |
| | | public IActionResult GetList(AdmPieceCheckDTOSearch search) |
| | | { |
| | | //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); |
| | | return new JsonResult(_admPieceCheckService.SearchByPaging(search)); |
| | | } |
| | | |
| | | |
| | | public IActionResult printList(AdmPieceCheckDTOSearch search) |
| | | { |
| | | //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); |
| | | search.rows = 1000; |
| | | search.page = 1; |
| | | var resultDataEntity = _admPieceCheckService.SearchByPaging(search); |
| | | ViewBag.ListCooperOrderDTO = resultDataEntity.DataList as List<AdmPieceCheckDTO>; |
| | | ViewBag.Heji1 = resultDataEntity.Heji1; |
| | | ViewBag.Heji2 = resultDataEntity.Heji2; |
| | | |
| | | return View(); |
| | | } |
| | | |
| | | public IActionResult IndexCheck() |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | List<ActionEntity> actionlist = new List<ActionEntity>(); |
| | | ActionEntity actionEntity = new ActionEntity(); |
| | | actionEntity.OpenType = 0; |
| | | actionEntity.ActionUrl = ""; |
| | | actionEntity.ActionFun = "Search"; |
| | | actionEntity.PageIco = "fa fa-search"; |
| | | actionEntity.ActionName = "查询"; |
| | | actionlist.Add(actionEntity); |
| | | |
| | | |
| | | ViewData["ActionInfo"] = actionlist; |
| | | |
| | | |
| | | |
| | | //ViewBag.PayType = _liaotianService.GetSYScode("CooperVisit", "jtype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); |
| | | |
| | | ViewBag.DeptId = _hrDeptService.GetList().Select(x => new { code = x.Id, label = x.DeptName }).ToList(); |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | public IActionResult GetList(AdmPieceCheckDTOSearch search) |
| | | { |
| | | //JsonResult jsonResult = new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver()); |
| | | return new JsonResult(_admPieceCheckService.SearchByPaging(search)); |
| | | } |
| | | |
| | | public IActionResult Edit(string id = null) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/AdmPieceCheck/Index/"); |
| | | var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList(); |
| | | ViewData["ActionInfo2"] = pageEntities2; |
| | | AdmPieceCheckDTO dto = new AdmPieceCheckDTO(); |
| | | if (!String.IsNullOrEmpty(id)) |
| | | { |
| | |
| | | ViewData["UserId"] = _userService.GetList(); |
| | | |
| | | ViewData["DeptId"] = _hrDeptService.GetList(); |
| | | ViewData["WorkPro"] = _fiPiecerateService.GetList(); |
| | | ViewData["WorkPro"] = _fiPiecerateService.GetList().Where(x=>x.Standard == "A").ToList(); |
| | | |
| | | ViewData.Model = dto; |
| | | return View(); |
| | |
| | | data.Creater = curentuser.Id; |
| | | data.Createtime = DateTime.Now; |
| | | } |
| | | data.DeptId = _userService.GetPltUserEntity(data.UserId).DeptId; |
| | | data.Modifier = curentuser.Id; |
| | | data.Modifytime = DateTime.Now; |
| | | |
| | | |
| | | |
| | | ResultEntity resultEntity = _admPieceCheckService.save(data); |
| | | |
| | | return new JsonResult(resultEntity); |