修正项目结构
This commit is contained in:
@@ -8,6 +8,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
||||
{
|
||||
public class MomOrderController : ApiController
|
||||
{
|
||||
[Route("api/MomOrder/List")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.MOM.MomOrder> List()
|
||||
{
|
||||
@@ -15,14 +16,21 @@ namespace NX.ERP.WebAPi.Controllers.MOM
|
||||
return customerDAL.GetList();
|
||||
|
||||
}
|
||||
|
||||
[Route("api/MomOrder/list/{id}")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.MOM.MomOrder> GetListByLastID(int Code)
|
||||
public IEnumerable<Model.MOM.MomOrder> GetListByLastID(int id)
|
||||
{
|
||||
var customerDAL = new NX.ERP.U8.Mom.MomOrderDAL();
|
||||
return customerDAL.GetListByLastID(Code);
|
||||
return customerDAL.GetListByLastID(id);
|
||||
}
|
||||
|
||||
[Route("api/MomOrder/{Code}")]
|
||||
[HttpGet]
|
||||
public Model.MOM.MomOrder GetModel(string Code)
|
||||
{
|
||||
var customerDAL = new NX.ERP.U8.Mom.MomOrderDAL();
|
||||
return customerDAL.GetModel(Code);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
{
|
||||
public class ArrivalController : ApiController
|
||||
{
|
||||
|
||||
[Route("api/Arrival/List")]
|
||||
// GET api/values
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.Purchase.Arrival> List()
|
||||
@@ -18,18 +18,20 @@ namespace NX.ERP.WebAPi.Controllers
|
||||
return customerDAL.GetList();
|
||||
}
|
||||
|
||||
|
||||
[Route("api/Arrival/{Code}")]
|
||||
[HttpGet]
|
||||
public Model.Purchase.Arrival Model(string Code)
|
||||
{
|
||||
var customerDAL = new ArrivalDAL();
|
||||
return customerDAL.GetModel(Code);
|
||||
}
|
||||
|
||||
[Route("api/Arrival/list/{id}")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.Purchase.Arrival> GetListByLastID(int Code)
|
||||
public IEnumerable<Model.Purchase.Arrival> GetListByLastID(int id)
|
||||
{
|
||||
var customerDAL = new ArrivalDAL();
|
||||
return customerDAL.GetListByLastId(Code);
|
||||
return customerDAL.GetListByLastId(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace NX.ERP.WebAPi.Controllers.Sale
|
||||
{
|
||||
public class DispatchController : ApiController
|
||||
{
|
||||
[Route("api/Dispatch/List")]
|
||||
// GET api/values
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.Sale.DispatchList> List()
|
||||
@@ -24,18 +25,19 @@ namespace NX.ERP.WebAPi.Controllers.Sale
|
||||
var customerDAL = new DispatchListDAL();
|
||||
return customerDAL.GetModel(id);
|
||||
}
|
||||
|
||||
[Route("api/Dispatch/{Code}")]
|
||||
[HttpGet]
|
||||
public Model.Sale.DispatchList ModelByCode(string Code)
|
||||
{
|
||||
var customerDAL = new DispatchListDAL();
|
||||
return customerDAL.GetModel(Code);
|
||||
}
|
||||
[Route("api/Dispatch/List/{id}")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.Sale.DispatchList> GetListByLastID(int Code)
|
||||
public IEnumerable<Model.Sale.DispatchList> GetListByLastID(int id)
|
||||
{
|
||||
var customerDAL = new DispatchListDAL();
|
||||
return customerDAL.GetListByLastID(Code);
|
||||
return customerDAL.GetListByLastID(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,8 +8,10 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
public class MaterielStoreOutController:ApiController
|
||||
{
|
||||
[Route("api/MaterialOut/Add")]
|
||||
[HttpPost]
|
||||
public string AddVoucher([FromBody] Model.Store.MaterielStoreOut storeIn)
|
||||
|
||||
public string AddVoucher([FromBody] Model.Request.MaterielStoreOut storeIn)
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.MaterielStoreOutDAL();
|
||||
return dal.AddVocher(storeIn);
|
||||
|
||||
@@ -8,11 +8,12 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
{
|
||||
public class PuStoreInController : ApiController
|
||||
{
|
||||
[Route("api/PuStoreIn/Add")]
|
||||
[HttpPost]
|
||||
public string AddVoucher([FromBody] Model.Store.PuStoreIn storeIn)
|
||||
public object AddVoucher([FromBody] Model.Request.PuStoreIn storeIn)
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.PuStoreInDAL();
|
||||
return dal.AddVocher(storeIn);
|
||||
return new { Id = dal.AddVocher(storeIn) };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user