using DS.Module.Core; using DS.WMS.Core.System.Dtos; using DS.WMS.Core.System.Entity; using DS.WMS.Core.System.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.WebApi.Controllers; public class CompanyController : ApiController { private readonly ICompanyService _invokeService; /// /// 构造函数 /// /// public CompanyController(ICompanyService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetCompanyList")] public DataResult> GetListByPage([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 企业用户注册 /// /// /// [HttpPost] [Route("CompanyRegister")] public DataResult CompanyRegister([FromBody] CompanyRegisterInput model) { var res = _invokeService.CompanyRegister(model); return res; } /// /// 获取公司信息 /// /// /// [HttpGet] [Route("GetCompanyInfo")] public DataResult GetCompanyInfo([FromQuery]string id) { var res = _invokeService.GetCompanyInfo(id); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditCompany")] public DataResult EditCompany([FromBody] CompanyInput model) { var res = _invokeService.EditCompany(model); return res; } /// /// 获取机构树 /// /// [HttpGet] [Route("GetCompanyTree")] public DataResult> GetCompanyTree() { var res = _invokeService.GetCompanyTree(); return res; } /// /// 获取上级公司 /// /// [HttpGet] [Route("GetParentCompany")] public DataResult> GetParentCompany() { var res = _invokeService.GetParentCompany(); return res; } // /// // /// 提交 // /// // /// // /// // [HttpPost] // [Route("SubmitCompany")] // public DataResult SubmitCompany([FromBody] CompanyInput model) // { // var res = _invokeService.SubmitCompany(model); // return res; // } }