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