序号
This commit is contained in:
@@ -393,6 +393,11 @@
|
||||
是否是尾箱
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Domain.Entitys.BoxMarkBillNo.Sort">
|
||||
<summary>
|
||||
排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Entitys.BoxMarkBillNo.GenerateBillNo(System.Int32,System.Int32)">
|
||||
<summary>
|
||||
生成编号
|
||||
|
||||
@@ -129,10 +129,13 @@ namespace WMS.Web.Domain.Entitys
|
||||
if (hasPart)
|
||||
boxCount = Convert.ToInt32(Math.Ceiling(boxCount_tag));
|
||||
|
||||
for (int i = 0; i < boxCount; i++)
|
||||
for (int i = 1; i <= boxCount; i++)
|
||||
{
|
||||
//添加编号生成
|
||||
var bill = new BoxMarkBillNo();
|
||||
var bill = new BoxMarkBillNo();
|
||||
bill.Sort = i;
|
||||
if (hasPart && i == boxCount)
|
||||
bill.IsTail = true;
|
||||
bill.GenerateBillNo(firstBillNo, lastBillNo);
|
||||
this.BillNos.Add(bill);
|
||||
|
||||
@@ -141,8 +144,8 @@ namespace WMS.Web.Domain.Entitys
|
||||
lastBillNo = bill.LastBillNo;
|
||||
}
|
||||
//判断有小数点,那么它就有尾箱,把当前第一条的编号是否是尾箱字段改为true
|
||||
if (this.BillNos.Count != 0 && hasPart)
|
||||
this.BillNos[0].IsTail = true;
|
||||
//if (this.BillNos.Count != 0 && hasPart)
|
||||
// this.BillNos[0].IsTail = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,6 +43,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
public bool IsTail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生成编号
|
||||
/// </summary>
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace WMS.Web.Domain.Services
|
||||
var list= await _boxMarkRepositories.GetListInfoBy(model.Id, loginInfo.UserInfo.CompanyId);
|
||||
|
||||
|
||||
var resultList = new List<BoxMarkQueryResponse>();
|
||||
//var resultList = new List<BoxMarkQueryResponse>();
|
||||
if (list != null && list.Count != 0)
|
||||
{
|
||||
//处理-总数量
|
||||
@@ -72,31 +72,31 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
});
|
||||
|
||||
var ids = list.GroupBy(x => x.Id).Select(x => x.Key).ToList();
|
||||
foreach (var id in ids)
|
||||
{
|
||||
//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 itemDetailId = 0;
|
||||
// foreach (var item in list)
|
||||
// {
|
||||
// if (id == item.Id)
|
||||
// {
|
||||
|
||||
var current = resultList.Where(x => x.DetailId == itemDetailId).FirstOrDefault();
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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(resultList);
|
||||
return ResultList<BoxMarkQueryResponse>.ReSuccess(list);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -109,7 +109,7 @@ namespace WMS.Web.Domain.Services
|
||||
{
|
||||
var (list, count) = await _boxMarkRepositories.GetPagedList(dto, companyId);
|
||||
|
||||
var resultList = new List<BoxMarkQueryResponse>();
|
||||
//var resultList = new List<BoxMarkQueryResponse>();
|
||||
|
||||
if (list != null && list.Count != 0)
|
||||
{
|
||||
@@ -119,28 +119,28 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
});
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
//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, count);
|
||||
return (list, count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -152,6 +152,7 @@ namespace WMS.Web.Repositories
|
||||
TailboxNetWeightQty = s.order.TailboxNetWeightQty,
|
||||
TailboxGrossWeightQty = s.order.TailboxGrossWeightQty,
|
||||
IsTail=s.detail.IsTail,
|
||||
Sort = s.detail.Sort,
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
|
||||
CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Remark = s.order.Remark,
|
||||
@@ -239,6 +240,7 @@ namespace WMS.Web.Repositories
|
||||
TailboxNetWeightQty = s.order.TailboxNetWeightQty,
|
||||
TailboxGrossWeightQty = s.order.TailboxGrossWeightQty,
|
||||
IsTail = s.detail.IsTail,
|
||||
Sort=s.detail.Sort,
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
|
||||
CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
Remark = s.order.Remark,
|
||||
|
||||
Reference in New Issue
Block a user