修复bug

This commit is contained in:
18942506660
2023-12-18 15:59:57 +08:00
parent de14aa8965
commit 70cb97a29e
10 changed files with 39 additions and 29 deletions

View File

@@ -16,6 +16,6 @@ namespace WMS.Web.Domain.Infrastructure
Task<bool> AddRange(List<ChangeBoxRecord> list, bool isTransaction = true);
// 获取列表
Task<(List<ChangeBoxRecordQueryInfoResponse> list,int total)> GetListAsync(ChangeBoxRecordQueryRequest dto);
Task<(List<ChangeBoxRecordQueryInfoResponse> list,int total)> GetListAsync(ChangeBoxRecordQueryRequest dto, int companyId = 0);
}
}

View File

@@ -14,6 +14,6 @@ namespace WMS.Web.Domain.Infrastructure
/// 批量添加
Task<bool> AddRange(List<MoveBoxRecord> entitys, bool isTransaction = true);
// 获取列表
Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto);
Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto, int companyId = 0);
}
}

View File

@@ -17,7 +17,7 @@ namespace WMS.Web.Domain.Infrastructure
//根据任务单Id搜索
Task<OutStock> GetByTaskId(int taskId);
// 获取列表
Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto);
Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto, int companyId = 0);
/// 查询实体集合
Task<List<OutStock>> GetEntityList(List<int> ids);
/// 修改实体集合

View File

@@ -19,7 +19,7 @@ namespace WMS.Web.Domain.Infrastructure
/// <returns></returns>
Task<bool> AddRange(List<OutStockTask> entitys, bool isTransaction = true);
// 获取列表
Task<(List<OutStockTaskQueryInfoResponse> list, int total)> GetListAsync(OutStockTaskQueryRequest dto);
Task<(List<OutStockTaskQueryInfoResponse> list, int total)> GetListAsync(OutStockTaskQueryRequest dto, int companyId = 0);
/// 查询实体集合
Task<List<OutStockTask>> GetEntityList(List<int> ids);
/// <summary>

View File

@@ -21,7 +21,7 @@ namespace WMS.Web.Domain.Infrastructure
//编辑
Task<TakeStock> Edit(TakeStock entity, bool isTransaction = true);
// 获取列表
Task<(List<TakeStockQueryInfoResponse> list, int total)> GetListAsync(TakeStockQueryRequest dto);
Task<(List<TakeStockQueryInfoResponse> list, int total)> GetListAsync(TakeStockQueryRequest dto, int companyId = 0);
/// 查询实体集合
Task<List<TakeStock>> GetEntityList(List<int> ids);
}

View File

@@ -117,8 +117,10 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<ChangeBoxRecordQueryInfoResponse> list, int total)> GetListAsync(ChangeBoxRecordQueryRequest dto)
public async Task<(List<ChangeBoxRecordQueryInfoResponse> list, int total)> GetListAsync(ChangeBoxRecordQueryRequest dto, int companyId = 0)
{
if (companyId == 0)
companyId = _loginRepositories.CompanyId;
List<int> ids = new List<int>();
if (!string.IsNullOrEmpty(dto.Creator))
{
@@ -164,9 +166,9 @@ namespace WMS.Web.Repositories
SerialNumbers = string.Join(",", s.changeBox.SerialNumbers),
SrcBox = s.srcBox.BoxBillNo,
DestBox = s.destBox.BoxBillNo,
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.changeBox.SrcSubStockId),
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.changeBox.DestSubStockId),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.changeBox.CreatorId),
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.changeBox.SrcSubStockId),
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.changeBox.DestSubStockId),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.changeBox.CreatorId),
CreateTime = s.changeBox.CreateTime.DateToStringSeconds()
#endregion
@@ -176,7 +178,7 @@ namespace WMS.Web.Repositories
public async Task<(object obj, int total)> GetListField(ChangeBoxRecordQueryRequest dto, int companyId)
{
return await GetListAsync(dto);
return await GetListAsync(dto, companyId);
}
}
}

View File

@@ -108,8 +108,10 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto)
public async Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto, int companyId=0)
{
if (companyId == 0)
companyId = _loginRepositories.CompanyId;
List<int> ids = new List<int>();
if (!string.IsNullOrEmpty(dto.Creator))
{
@@ -144,11 +146,11 @@ namespace WMS.Web.Repositories
#region dto组装
BillNo = s.moveBox.BillNo,
Box = s.box.BoxBillNo,
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.moveBox.SrcSubStockId),
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.moveBox.DestSubStockId),
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.moveBox.SrcSubStockId),
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.moveBox.DestSubStockId),
Qty = s.moveBox.Qty,
Type = s.moveBox.Type.GetRemark(),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.moveBox.CreatorId),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.moveBox.CreatorId),
CreateTime = s.moveBox.CreateTime.DateToStringSeconds()
#endregion
@@ -158,7 +160,7 @@ namespace WMS.Web.Repositories
public async Task<(object obj, int total)> GetListField(MoveBoxRecordQueryRequest dto, int companyId)
{
return await GetListAsync(dto);
return await GetListAsync(dto,companyId);
}
}
}

View File

@@ -83,8 +83,10 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto)
public async Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto, int companyId = 0)
{
if (companyId == 0)
companyId = _loginRepositories.CompanyId;
List<int> ids = new List<int>();
if (!string.IsNullOrEmpty(dto.Creator))
{
@@ -161,10 +163,10 @@ namespace WMS.Web.Repositories
Id = s.order.Id,
BillNo = s.order.BillNo,
Type = s.order.Type.GetRemark(),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.CreatorId),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
CreateTime = s.order.CreateTime.DateToStringSeconds(),
SuccessSync = s.order.SuccessSync == SyncStatus.Success ? "成功" : "失败",
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode + s.order.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.order.StockCode + s.order.OrgCode),
SourceBillNoList = s.detail.ErpDetails.Select(s => s.SourceBillNo).ToList(),
SaleBillNoList = s.detail.ErpDetails.Select(s => s.SaleBillNo).ToList(),
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
@@ -313,7 +315,7 @@ namespace WMS.Web.Repositories
public async Task<(object obj, int total)> GetListField(OutStockQueryRequest dto, int companyId)
{
return await GetListAsync(dto);
return await GetListAsync(dto, companyId);
}
public async Task<List<BoxDetailResponse>> GetDetailsByBoxId(int boxId)

View File

@@ -215,8 +215,10 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<OutStockTaskQueryInfoResponse> list, int total)> GetListAsync(OutStockTaskQueryRequest dto)
public async Task<(List<OutStockTaskQueryInfoResponse> list, int total)> GetListAsync(OutStockTaskQueryRequest dto, int companyId = 0)
{
if (companyId == 0)
companyId = _loginRepositories.CompanyId;
#region erp基础资料
List<int> mIds = new List<int>();
var materials_result = await _erpService.BillQueryForMaterial();
@@ -289,12 +291,12 @@ namespace WMS.Web.Repositories
RealityQty = s.detail.RealityQty,
CreateTime = s.order.CreateTime.DateToStringSeconds(),
OperateTime = s.order.OperateTime.DateToStringSeconds(),
Operator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.OperatorId ?? 0),
Operator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.OperatorId ?? 0),
OutStockTime = s.order.OutStockTime.DateToStringSeconds(),
OutStock = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.OutStockId ?? 0),
OutStock = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.OutStockId ?? 0),
OutStockBeginTime = s.detail.OutStockBeginTime.DateToStringSeconds(),
OutStockEndTime = s.detail.OutStockEndTime.DateToStringSeconds(),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode + s.order.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.order.StockCode + s.order.OrgCode),
SourceBillNoList = s.detail.ErpDetails.Select(s => s.SourceBillNo).ToList(),
SaleBillNoList = s.detail.ErpDetails.Select(s => s.SaleBillNo).ToList(),
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
@@ -455,7 +457,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<(object obj, int total)> GetListField(OutStockTaskQueryRequest dto, int companyId)
{
return await GetListAsync(dto);
return await GetListAsync(dto, companyId);
}
/// <summary>
/// 根据订单号精确搜索

View File

@@ -162,8 +162,10 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<TakeStockQueryInfoResponse> list, int total)> GetListAsync(TakeStockQueryRequest dto)
public async Task<(List<TakeStockQueryInfoResponse> list, int total)> GetListAsync(TakeStockQueryRequest dto, int companyId = 0)
{
if (companyId == 0)
companyId = _loginRepositories.CompanyId;
//1.获取物料集合
var materials_result = await _erpService.BillQueryForMaterial();
var materials = materials_result.Data.ToList();
@@ -198,8 +200,8 @@ namespace WMS.Web.Repositories
Id = s.order.Id,
BillNo = s.order.BillNo,
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.detail.MaterialId),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.detail.StockCode + s.detail.OrgCode),
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.detail.SubStockId),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.detail.StockCode + s.detail.OrgCode),
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.detail.SubStockId),
Erp_SubStock= _erpBasicDataExtendService.GetStockName(subStocks, s.detail.Erp_SubStockId),
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.detail.MaterialId),
@@ -220,7 +222,7 @@ namespace WMS.Web.Repositories
public async Task<(object obj, int total)> GetListField(TakeStockQueryRequest dto, int companyId)
{
return await GetListAsync(dto);
return await GetListAsync(dto,companyId);
}
}
}