12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using Microsoft.AspNetCore.Mvc;
- using WMS.BZModels.Models.UserCenterManager;
- using WMS.BZServices.UserCenterManager;
- using WMS.Info;
- namespace WMS.BZWeb.Areas.UserCenterManager.Controllers
- {
- [Area("UserCenterManager")]
- public class UserRelationController : MvcControllerBase
- {
- private readonly ACLUserRelationService _aclUserRelationService;
- public UserRelationController(ACLUserRelationService aclUserRelationService)
- {
- _aclUserRelationService = aclUserRelationService;
- }
- #region 获取视图
- /// <summary>
- /// 人员选择
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult SelectForm()
- {
- return View();
- }
- /// <summary>
- /// 人员选择
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult LookForm()
- {
- return View();
- }
- #endregion
- /// <summary>
- /// 获取用户主键列表信息
- /// </summary>
- /// <param name="objectId">用户主键</param>
- /// <returns></returns>
- [HttpGet]
- public ActionResult GetUserIdList(string objectno, ACLObjType objecttype)
- {
- var data = _aclUserRelationService.GetUserList(objectno, objecttype);
- string UserNos = "";
- if (data != null)
- {
- UserNos = string.Join(",", data.Select(it => it.Id).ToList());
- }
- var datajson = new
- {
- usernos = UserNos,
- userInfoList = data
- };
- return Success("", datajson);
- }
- [HttpPost]
- [ValidateAntiForgeryToken]
- public ActionResult SaveForm(string objectno, ACLObjType objecttype, List<string> usernos)
- {
- _aclUserRelationService.SaveEntityList(objectno, objecttype, usernos);
- return Success("保存成功!");
- }
- }
- }
|