using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Mvc;
|
using SqlSugar;
|
using WIDESEA_Common.CommonEnum;
|
using WIDESEA_Common.MaterielEnum;
|
using WIDESEA_Common.OrderEnum;
|
using WIDESEA_Core;
|
using WIDESEA_Core.Attributes;
|
using WIDESEA_Core.Helper;
|
using WIDESEA_DTO;
|
using WIDESEA_DTO.Basic;
|
using WIDESEA_DTO.ERP;
|
using WIDESEA_External.ERPService;
|
using WIDESEA_External.Model;
|
using WIDESEA_IBasicRepository;
|
using WIDESEA_IBasicService;
|
using WIDESEA_Model.Models;
|
using static WIDESEA_DTO.ErpResponseContent;
|
|
namespace WIDESEA_WMSServer.Controllers.ERP
|
{
|
/// <summary>
|
/// ERP接口
|
/// </summary>
|
[Route("api/Erp")]
|
[ApiController]
|
public class ErpController : ControllerBase
|
{
|
private readonly IBasicService _basicService;
|
private readonly IInvokeERPService _invokeERPService;
|
|
public ErpController(IBasicService basicService,IInvokeERPService invokeERPService)
|
{
|
_basicService = basicService;
|
_invokeERPService = invokeERPService;
|
}
|
/// <summary>
|
/// 添加二期物料
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, HttpGet, Route("ReceiveMaterial"), AllowAnonymous]
|
|
public WebResponseContent ReceiveMaterial([FromBody] ERPRoot<ERPMaterialDTO> eRPMaterialDTO)
|
{
|
return _basicService.MaterielInfoService.ReceiveMaterial(eRPMaterialDTO.Content);
|
}
|
|
/// <summary>
|
/// 添加二期供应商
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, HttpGet, Route("ReceiveSupplier"), AllowAnonymous]
|
|
public WebResponseContent ReceiveSupplier([FromBody] ERPRoot<ERPSupplierDTO> eRPSupplierDTO)
|
{
|
return _basicService.SupplierInfoService.ReceiveSupplier(eRPSupplierDTO.Content);
|
}
|
|
/// <summary>
|
/// 添加二期客户
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, HttpGet, Route("ReceiveCustomer"), AllowAnonymous]
|
|
public WebResponseContent ReceiveCustomer([FromBody] ERPRoot<ERPCustomerDTO> eRPSupplierDTO)
|
{
|
return _basicService.CustomerInfoService.ReceiveCustomer(eRPSupplierDTO.Content);
|
}
|
|
/// <summary>
|
/// 添加二期员工
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, HttpGet, Route("ReceiveStaff"), AllowAnonymous]
|
|
public WebResponseContent ReceiveStaff([FromBody] ERPRoot<ERPUserInfoDTO> eRPCustomerDTO)
|
{
|
return _basicService.UserInfoService.ReceiveStaff(eRPCustomerDTO.Content);
|
}
|
}
|
}
|