优化
This commit is contained in:
@@ -46,7 +46,6 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
_logger.LogInformation($"箱唛生成:{JsonConvert.SerializeObject(dto)} 操作人:{loginInfo.UserInfo.StaffId + loginInfo.UserInfo.Nickname}");
|
||||
//1.获取最新的箱唛信息
|
||||
//var entity_new = await _boxMarkRepositories.GetBy();
|
||||
var billNo_new = await _boxMarkRepositories.GetLastBillNo();
|
||||
|
||||
//2.dto映射实体
|
||||
@@ -66,8 +65,6 @@ namespace WMS.Web.Domain.Services
|
||||
//返回列表-对应刚刚生成的数据和编号集合
|
||||
var list= await _boxMarkRepositories.GetListInfoBy(model.Id, loginInfo.UserInfo.CompanyId);
|
||||
|
||||
|
||||
//var resultList = new List<BoxMarkQueryResponse>();
|
||||
if (list != null && list.Count != 0)
|
||||
{
|
||||
//处理-总数量
|
||||
@@ -76,29 +73,6 @@ namespace WMS.Web.Domain.Services
|
||||
x.BoxSortCount = this.GetSortCount(x.ProductQty, x.CratingQty);
|
||||
|
||||
});
|
||||
|
||||
//var ids = list.GroupBy(x => x.Id).Select(x => x.Key).ToList();
|
||||
//foreach (var id in ids)
|
||||
//{
|
||||
|
||||
// var itemDetailId = 0;
|
||||
// foreach (var item in list)
|
||||
// {
|
||||
// if (id == item.Id)
|
||||
// {
|
||||
|
||||
// var current = resultList.Where(x => x.DetailId == itemDetailId).FirstOrDefault();
|
||||
|
||||
// var newItem = item;
|
||||
// if (current == null)
|
||||
// newItem.Sort = 1;
|
||||
// else
|
||||
// newItem.Sort = current.Sort + 1;
|
||||
// resultList.Add(newItem);
|
||||
// itemDetailId = item.DetailId;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
return ResultList<BoxMarkQueryResponse>.ReSuccess(list);
|
||||
@@ -114,35 +88,12 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
var (list, count) = await _boxMarkRepositories.GetPagedList(dto, companyId);
|
||||
|
||||
//var resultList = new List<BoxMarkQueryResponse>();
|
||||
|
||||
if (list != null && list.Count != 0)
|
||||
{
|
||||
list.ForEach(x =>
|
||||
{
|
||||
x.BoxSortCount = this.GetSortCount(x.ProductQty, x.CratingQty);
|
||||
|
||||
});
|
||||
|
||||
//var ids = list.GroupBy(x => x.Id).Select(x => x.Key).ToList();
|
||||
//foreach (var id in ids)
|
||||
//{
|
||||
// var itemDetailId = 0;
|
||||
// foreach (var item in list)
|
||||
// {
|
||||
// if (id == item.Id)
|
||||
// {
|
||||
// var current = resultList.Where(x => x.DetailId == itemDetailId).FirstOrDefault();
|
||||
// var newItem = item;
|
||||
// if (current == null)
|
||||
// newItem.Sort = 1;
|
||||
// else
|
||||
// newItem.Sort = current.Sort + 1;
|
||||
// resultList.Add(newItem);
|
||||
// itemDetailId = item.DetailId;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
return (list, count);
|
||||
|
||||
Reference in New Issue
Block a user