提交代码
This commit is contained in:
@ -88,7 +88,7 @@ namespace WebApi.Controllers
|
||||
[HttpPost(Name = "queryByMatSn")]
|
||||
public async Task<ResponseBase> queryByMatSn(QueryByMatSnRequest request)
|
||||
{
|
||||
return _instoreService.queryByMatSn(request);
|
||||
return await _instoreService.queryByMatSn(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -24,9 +24,12 @@ namespace WCS.WebApi.Controllers
|
||||
{
|
||||
public IMatBaseInfoService _matBaseInfoService { get; set; }
|
||||
|
||||
public MatBaseInfoController(IMatBaseInfoService matBaseInfoService)
|
||||
public IGenerateService _generateMatInfoService { get; set; }
|
||||
|
||||
public MatBaseInfoController(IMatBaseInfoService matBaseInfoService, IGenerateService generateMatInfoService)
|
||||
{
|
||||
_matBaseInfoService = matBaseInfoService;
|
||||
_generateMatInfoService = generateMatInfoService;
|
||||
}
|
||||
|
||||
[Route("getMatBaseInfo")]
|
||||
@ -100,5 +103,12 @@ namespace WCS.WebApi.Controllers
|
||||
{
|
||||
return await _matBaseInfoService.getMatCodeList(request);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("generateMatInfo")]
|
||||
public async Task<ResponseCommon<List<MatInfo>>> generateMatInfo(GenerateMatInfoRequest request)
|
||||
{
|
||||
return await _generateMatInfoService.generateMatInfo(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ using System.Text;
|
||||
using WCS.BLL;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.Model;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
@ -61,7 +62,12 @@ namespace WCS.WebApi.Controllers
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//Logs.Write(e.Message);
|
||||
|
||||
//return new ResponseCommon()
|
||||
//{
|
||||
// Code = 300,
|
||||
// Message = $"操作失败:{e.Message}"
|
||||
//};
|
||||
}
|
||||
|
||||
finally
|
||||
|
88
WCS.WebApi/Controllers/StockTakingController.cs
Normal file
88
WCS.WebApi/Controllers/StockTakingController.cs
Normal file
@ -0,0 +1,88 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel;
|
||||
using WCS.Model.ApiModel.MatInventoryDetail;
|
||||
using WCS.Model.ApiModel.Stocktaking;
|
||||
using WCS.Model.ApiModel.User;
|
||||
|
||||
namespace WCS.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 权限/用户界面的接口
|
||||
/// </summary>
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class StockTakingController : ControllerBase
|
||||
{
|
||||
public IStockTakingService _stockTakingService { get; set; }
|
||||
|
||||
public IGenerateService _generateService { get; set; }
|
||||
|
||||
public StockTakingController(IStockTakingService stockTakingService, IGenerateService generateService)
|
||||
{
|
||||
_stockTakingService = stockTakingService;
|
||||
_generateService = generateService;
|
||||
}
|
||||
|
||||
[Route("SysStockTakingOrder")]
|
||||
[HttpPost(Name = "SysStockTakingOrder")]
|
||||
public async Task<ResponseBase> SysStockTakingOrder(SysStockTakingOrderRequest request)
|
||||
{
|
||||
//判断盘点单号是否已输入
|
||||
if (string.IsNullOrEmpty(request.StocktakingOrderNumber))
|
||||
request.StocktakingOrderNumber = await _generateService.generateStockTakingNumber();
|
||||
return await _stockTakingService.SysStockTakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("getStockTakingOrders")]
|
||||
[HttpPost(Name = "getStockTakingOrders")]
|
||||
public async Task<ResponseBase> getStockTakingOrders(GetStockTakingOrdersRequest request)
|
||||
{
|
||||
return await _stockTakingService.getStockTakingOrders(request);
|
||||
}
|
||||
|
||||
[Route("getStockTakingOrderMatDetail")]
|
||||
[HttpPost(Name = "getStockTakingOrderMatDetail")]
|
||||
public async Task<ResponseBase> getStockTakingOrderMatDetail(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.getStockTakingOrderMatDetail(request);
|
||||
}
|
||||
|
||||
[Route("startStockTakingOrder")]
|
||||
[HttpPost(Name = "startStockTakingOrder")]
|
||||
public async Task<ResponseBase> startStockTakingOrder(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.startStockTakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("endStockTakingOrder")]
|
||||
[HttpPost(Name = "endStockTakingOrder")]
|
||||
public async Task<ResponseBase> endStockTakingOrder(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.endStockTakingOrder(request);
|
||||
}
|
||||
|
||||
|
||||
[Route("queryMatInfoInStocktakingOrder")]
|
||||
[HttpPost(Name = "queryMatInfoInStocktakingOrder")]
|
||||
public async Task<ResponseBase> queryMatInfoInStocktakingOrder(QueryMatInfoInStocktakingOrderRequest request)
|
||||
{
|
||||
return await _stockTakingService.queryMatInfoInStocktakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("comfirmStocktakingOrder")]
|
||||
[HttpPost(Name = "comfirmStocktakingOrder")]
|
||||
public async Task<ResponseBase> comfirmStocktakingOrder(ComfirmStocktakingOrderRequest request)
|
||||
{
|
||||
return await _stockTakingService.comfirmStocktakingOrder(request);
|
||||
}
|
||||
|
||||
[Route("commitStocktakingOrder")]
|
||||
[HttpPost(Name = "commitStocktakingOrder")]
|
||||
public async Task<ResponseBase> commitStocktakingOrder(GetStockTakingOrderMatDetailRequest request)
|
||||
{
|
||||
return await _stockTakingService.commitStockTakingOrder(request);
|
||||
}
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@ using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
using WCS.BLL.Manager;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.BLL.Services.Service;
|
||||
@ -14,7 +12,6 @@ using WCS.DAL;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.WebApi;
|
||||
using WCS.WebApi.Controllers;
|
||||
using TcpClient = TouchSocket.Sockets.TcpClient;
|
||||
|
||||
namespace WebApi
|
||||
{
|
||||
@ -62,6 +59,9 @@ namespace WebApi
|
||||
builder.Services.AddScoped<IMatBaseInfoService, MatBaseInfoService>();
|
||||
builder.Services.AddScoped<IMatInventoryDetailService, MatInventoryDetailService>();
|
||||
builder.Services.AddScoped<IStoreInfoService, StoreInfoService>();
|
||||
builder.Services.AddScoped<IStockTakingService, StockTakingService>();
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롢<EFBFBD><EBA1A2><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ģʽ
|
||||
builder.Services.AddSingleton<IGenerateService, GenerateService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
17
WCS.WebApi/Properties/PublishProfiles/FolderProfile1.pubxml
Normal file
17
WCS.WebApi/Properties/PublishProfiles/FolderProfile1.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>false</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user