修复bug
This commit is contained in:
@@ -16,6 +16,6 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
Task<bool> AddRange(List<ChangeBoxRecord> list, bool isTransaction = true);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ using WMS.Web.Domain.Entitys;
|
|||||||
|
|
||||||
namespace WMS.Web.Domain.Infrastructure
|
namespace WMS.Web.Domain.Infrastructure
|
||||||
{
|
{
|
||||||
public interface IMoveBoxRecordRepositories
|
public interface IMoveBoxRecordRepositories
|
||||||
{
|
{
|
||||||
// 新增
|
// 新增
|
||||||
Task<MoveBoxRecord> Add(MoveBoxRecord entity, bool isTransaction = true);
|
Task<MoveBoxRecord> Add(MoveBoxRecord entity, bool isTransaction = true);
|
||||||
/// 批量添加
|
/// 批量添加
|
||||||
Task<bool> AddRange(List<MoveBoxRecord> entitys, bool isTransaction = true);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
//根据任务单Id搜索
|
//根据任务单Id搜索
|
||||||
Task<OutStock> GetByTaskId(int taskId);
|
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);
|
Task<List<OutStock>> GetEntityList(List<int> ids);
|
||||||
/// 修改实体集合
|
/// 修改实体集合
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<bool> AddRange(List<OutStockTask> entitys, bool isTransaction = true);
|
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);
|
Task<List<OutStockTask>> GetEntityList(List<int> ids);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
//编辑
|
//编辑
|
||||||
Task<TakeStock> Edit(TakeStock entity, bool isTransaction = true);
|
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);
|
Task<List<TakeStock>> GetEntityList(List<int> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,8 +117,10 @@ namespace WMS.Web.Repositories
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <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>();
|
List<int> ids = new List<int>();
|
||||||
if (!string.IsNullOrEmpty(dto.Creator))
|
if (!string.IsNullOrEmpty(dto.Creator))
|
||||||
{
|
{
|
||||||
@@ -164,9 +166,9 @@ namespace WMS.Web.Repositories
|
|||||||
SerialNumbers = string.Join(",", s.changeBox.SerialNumbers),
|
SerialNumbers = string.Join(",", s.changeBox.SerialNumbers),
|
||||||
SrcBox = s.srcBox.BoxBillNo,
|
SrcBox = s.srcBox.BoxBillNo,
|
||||||
DestBox = s.destBox.BoxBillNo,
|
DestBox = s.destBox.BoxBillNo,
|
||||||
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.changeBox.SrcSubStockId),
|
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.changeBox.SrcSubStockId),
|
||||||
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.changeBox.DestSubStockId),
|
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.changeBox.DestSubStockId),
|
||||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.changeBox.CreatorId),
|
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.changeBox.CreatorId),
|
||||||
CreateTime = s.changeBox.CreateTime.DateToStringSeconds()
|
CreateTime = s.changeBox.CreateTime.DateToStringSeconds()
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -176,7 +178,7 @@ namespace WMS.Web.Repositories
|
|||||||
|
|
||||||
public async Task<(object obj, int total)> GetListField(ChangeBoxRecordQueryRequest dto, int companyId)
|
public async Task<(object obj, int total)> GetListField(ChangeBoxRecordQueryRequest dto, int companyId)
|
||||||
{
|
{
|
||||||
return await GetListAsync(dto);
|
return await GetListAsync(dto, companyId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,8 +108,10 @@ namespace WMS.Web.Repositories
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <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>();
|
List<int> ids = new List<int>();
|
||||||
if (!string.IsNullOrEmpty(dto.Creator))
|
if (!string.IsNullOrEmpty(dto.Creator))
|
||||||
{
|
{
|
||||||
@@ -144,11 +146,11 @@ namespace WMS.Web.Repositories
|
|||||||
#region dto组装
|
#region dto组装
|
||||||
BillNo = s.moveBox.BillNo,
|
BillNo = s.moveBox.BillNo,
|
||||||
Box = s.box.BoxBillNo,
|
Box = s.box.BoxBillNo,
|
||||||
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.moveBox.SrcSubStockId),
|
SrcSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.moveBox.SrcSubStockId),
|
||||||
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.moveBox.DestSubStockId),
|
DestSubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.moveBox.DestSubStockId),
|
||||||
Qty = s.moveBox.Qty,
|
Qty = s.moveBox.Qty,
|
||||||
Type = s.moveBox.Type.GetRemark(),
|
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()
|
CreateTime = s.moveBox.CreateTime.DateToStringSeconds()
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -158,7 +160,7 @@ namespace WMS.Web.Repositories
|
|||||||
|
|
||||||
public async Task<(object obj, int total)> GetListField(MoveBoxRecordQueryRequest dto, int companyId)
|
public async Task<(object obj, int total)> GetListField(MoveBoxRecordQueryRequest dto, int companyId)
|
||||||
{
|
{
|
||||||
return await GetListAsync(dto);
|
return await GetListAsync(dto,companyId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,8 +83,10 @@ namespace WMS.Web.Repositories
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <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>();
|
List<int> ids = new List<int>();
|
||||||
if (!string.IsNullOrEmpty(dto.Creator))
|
if (!string.IsNullOrEmpty(dto.Creator))
|
||||||
{
|
{
|
||||||
@@ -161,10 +163,10 @@ namespace WMS.Web.Repositories
|
|||||||
Id = s.order.Id,
|
Id = s.order.Id,
|
||||||
BillNo = s.order.BillNo,
|
BillNo = s.order.BillNo,
|
||||||
Type = s.order.Type.GetRemark(),
|
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(),
|
CreateTime = s.order.CreateTime.DateToStringSeconds(),
|
||||||
SuccessSync = s.order.SuccessSync == SyncStatus.Success ? "成功" : "失败",
|
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(),
|
SourceBillNoList = s.detail.ErpDetails.Select(s => s.SourceBillNo).ToList(),
|
||||||
SaleBillNoList = s.detail.ErpDetails.Select(s => s.SaleBillNo).ToList(),
|
SaleBillNoList = s.detail.ErpDetails.Select(s => s.SaleBillNo).ToList(),
|
||||||
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
|
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)
|
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)
|
public async Task<List<BoxDetailResponse>> GetDetailsByBoxId(int boxId)
|
||||||
|
|||||||
@@ -215,8 +215,10 @@ namespace WMS.Web.Repositories
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <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基础资料
|
#region erp基础资料
|
||||||
List<int> mIds = new List<int>();
|
List<int> mIds = new List<int>();
|
||||||
var materials_result = await _erpService.BillQueryForMaterial();
|
var materials_result = await _erpService.BillQueryForMaterial();
|
||||||
@@ -289,12 +291,12 @@ namespace WMS.Web.Repositories
|
|||||||
RealityQty = s.detail.RealityQty,
|
RealityQty = s.detail.RealityQty,
|
||||||
CreateTime = s.order.CreateTime.DateToStringSeconds(),
|
CreateTime = s.order.CreateTime.DateToStringSeconds(),
|
||||||
OperateTime = s.order.OperateTime.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(),
|
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(),
|
OutStockBeginTime = s.detail.OutStockBeginTime.DateToStringSeconds(),
|
||||||
OutStockEndTime = s.detail.OutStockEndTime.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(),
|
SourceBillNoList = s.detail.ErpDetails.Select(s => s.SourceBillNo).ToList(),
|
||||||
SaleBillNoList = s.detail.ErpDetails.Select(s => s.SaleBillNo).ToList(),
|
SaleBillNoList = s.detail.ErpDetails.Select(s => s.SaleBillNo).ToList(),
|
||||||
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
|
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, s.order.DeliveryOrgId),
|
||||||
@@ -455,7 +457,7 @@ namespace WMS.Web.Repositories
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<(object obj, int total)> GetListField(OutStockTaskQueryRequest dto, int companyId)
|
public async Task<(object obj, int total)> GetListField(OutStockTaskQueryRequest dto, int companyId)
|
||||||
{
|
{
|
||||||
return await GetListAsync(dto);
|
return await GetListAsync(dto, companyId);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据订单号精确搜索
|
/// 根据订单号精确搜索
|
||||||
|
|||||||
@@ -162,8 +162,10 @@ namespace WMS.Web.Repositories
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <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.获取物料集合
|
//1.获取物料集合
|
||||||
var materials_result = await _erpService.BillQueryForMaterial();
|
var materials_result = await _erpService.BillQueryForMaterial();
|
||||||
var materials = materials_result.Data.ToList();
|
var materials = materials_result.Data.ToList();
|
||||||
@@ -198,8 +200,8 @@ namespace WMS.Web.Repositories
|
|||||||
Id = s.order.Id,
|
Id = s.order.Id,
|
||||||
BillNo = s.order.BillNo,
|
BillNo = s.order.BillNo,
|
||||||
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.detail.MaterialId),
|
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.detail.MaterialId),
|
||||||
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.detail.StockCode + s.detail.OrgCode),
|
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.detail.StockCode + s.detail.OrgCode),
|
||||||
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.detail.SubStockId),
|
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.detail.SubStockId),
|
||||||
Erp_SubStock= _erpBasicDataExtendService.GetStockName(subStocks, s.detail.Erp_SubStockId),
|
Erp_SubStock= _erpBasicDataExtendService.GetStockName(subStocks, s.detail.Erp_SubStockId),
|
||||||
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
|
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
|
||||||
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(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)
|
public async Task<(object obj, int total)> GetListField(TakeStockQueryRequest dto, int companyId)
|
||||||
{
|
{
|
||||||
return await GetListAsync(dto);
|
return await GetListAsync(dto,companyId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user