调整权限
This commit is contained in:
@@ -55,10 +55,10 @@ namespace WMS.Web.Api.Controllers
|
|||||||
[Route("GetUcStock")]
|
[Route("GetUcStock")]
|
||||||
public async Task<ResultList<UcStockHeadOfficeResponse>> GetUcStock([FromQuery] string name)
|
public async Task<ResultList<UcStockHeadOfficeResponse>> GetUcStock([FromQuery] string name)
|
||||||
{
|
{
|
||||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
//var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
//if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
return ResultList<UcStockHeadOfficeResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
// return ResultList<UcStockHeadOfficeResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
var r = await _basicsRepositories.GetUcStockByHeadOfficeAsync(name, loginInfo.UserInfo.CompanyId);
|
var r = await _basicsRepositories.GetUcStockByHeadOfficeAsync(name, 1);
|
||||||
var response = r.Where(w => w.ManagementSystem == 1 || w.ManagementSystem == 4
|
var response = r.Where(w => w.ManagementSystem == 1 || w.ManagementSystem == 4
|
||||||
|| (w.ManagementSystem == 2 && !string.IsNullOrEmpty(w.WarehouseCodeOfJushuitan))
|
|| (w.ManagementSystem == 2 && !string.IsNullOrEmpty(w.WarehouseCodeOfJushuitan))
|
||||||
||(w.ManagementSystem == 3 && !string.IsNullOrEmpty(w.WarehouseCodeOfLingxing))).ToList();
|
||(w.ManagementSystem == 3 && !string.IsNullOrEmpty(w.WarehouseCodeOfLingxing))).ToList();
|
||||||
@@ -74,9 +74,9 @@ namespace WMS.Web.Api.Controllers
|
|||||||
[Route("GetList")]
|
[Route("GetList")]
|
||||||
public async Task<ResultPagedNumber2List<ProductInventoryQueryResponse>> GetPagedList([FromBody] ProductInventoryQueryRequest dto)
|
public async Task<ResultPagedNumber2List<ProductInventoryQueryResponse>> GetPagedList([FromBody] ProductInventoryQueryRequest dto)
|
||||||
{
|
{
|
||||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
//var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
//if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
return ResultPagedNumber2List<ProductInventoryQueryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
// return ResultPagedNumber2List<ProductInventoryQueryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
|
||||||
var (list, count, details) = await _repositories.GetListAsync(dto);
|
var (list, count, details) = await _repositories.GetListAsync(dto);
|
||||||
var result = ResultPagedNumber2List<ProductInventoryQueryResponse>.ReSuccess(list,count,details);
|
var result = ResultPagedNumber2List<ProductInventoryQueryResponse>.ReSuccess(list,count,details);
|
||||||
@@ -112,9 +112,9 @@ namespace WMS.Web.Api.Controllers
|
|||||||
[Route("Refresh")]
|
[Route("Refresh")]
|
||||||
public async Task<Result> Refresh()
|
public async Task<Result> Refresh()
|
||||||
{
|
{
|
||||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
//var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
//if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
// return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
|
||||||
return await _productInventoryService.Refresh();
|
return await _productInventoryService.Refresh();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace WMS.Web.Repositories.DependencyInjection
|
|||||||
string[] pathlist = path.Split('/');
|
string[] pathlist = path.Split('/');
|
||||||
bool isLogin = pathlist.Where(x => x == "login" || x.ToLower() == "heart"
|
bool isLogin = pathlist.Where(x => x == "login" || x.ToLower() == "heart"
|
||||||
|| x.ToLower() == "test" || x.ToLower() == "serialnumber" || x.ToLower() == "barcode" ||
|
|| x.ToLower() == "test" || x.ToLower() == "serialnumber" || x.ToLower() == "barcode" ||
|
||||||
x.ToLower() == "swagger").Any();
|
x.ToLower() == "swagger" || x.ToLower() == "productinventory").Any();
|
||||||
if (isLogin)
|
if (isLogin)
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = 200;
|
context.Response.StatusCode = 200;
|
||||||
|
|||||||
@@ -105,8 +105,10 @@ namespace WMS.Web.Repositories
|
|||||||
|
|
||||||
public async Task<(List<ProductInventoryQueryResponse> list, int total, List<decimal> details)> GetListAsync(ProductInventoryQueryRequest dto, int companyId = 0)
|
public async Task<(List<ProductInventoryQueryResponse> list, int total, List<decimal> details)> GetListAsync(ProductInventoryQueryRequest dto, int companyId = 0)
|
||||||
{
|
{
|
||||||
if (companyId == 0)
|
//因为要开放给别的系统用 固定死
|
||||||
companyId = _loginRepositories.CompanyId;
|
companyId = 1;
|
||||||
|
//if (companyId == 0)
|
||||||
|
// companyId = _loginRepositories.CompanyId;
|
||||||
#region erp基础资料
|
#region erp基础资料
|
||||||
List<string> mNumber = new List<string>();
|
List<string> mNumber = new List<string>();
|
||||||
var materials_result = await _erpService.BillQueryForMaterial();
|
var materials_result = await _erpService.BillQueryForMaterial();
|
||||||
|
|||||||
Reference in New Issue
Block a user