|
@@ -460,8 +460,8 @@ namespace wms.service.Service
|
|
|
if (bominfo == null)
|
|
|
{
|
|
|
res.ResCode = ResponseStatusCodeEnum.ErrParam.GetHashCode();
|
|
|
- res.ResMsg = string.Format("当前产出为芯股,此芯股投料信息不存在请先同步投料信息,投料编码{0},产出物{1}", reqDto.FeedCode,
|
|
|
- reqDto.MatCode);
|
|
|
+ res.ResMsg = string.Format("当前产出为芯股,此芯股投料信息不存在请先同步投料信息,投料编码{0},产出物{1}", reqDto.FeedCode,reqDto.MatCode);
|
|
|
+
|
|
|
return res;
|
|
|
}
|
|
|
|
|
@@ -827,7 +827,8 @@ namespace wms.service.Service
|
|
|
{
|
|
|
ResMsg = "成功",
|
|
|
ResData = spoolbar.Direct,
|
|
|
- ResCode = ResponseStatusCodeEnum.Sucess.GetHashCode()
|
|
|
+ ResCode = ResponseStatusCodeEnum.Sucess.GetHashCode(),
|
|
|
+ Memo1= reqDto.SpoolBarCode
|
|
|
};
|
|
|
}
|
|
|
|
|
@@ -4085,18 +4086,9 @@ namespace wms.service.Service
|
|
|
//机台垛型编码
|
|
|
var stack = _BillBomsetgrpRepository.GetSingle(p => p.Id == stackdetail.BomSetHdrId && p.IsStop == 0);
|
|
|
//找到垛型对应的机台信息
|
|
|
- //var macList = _basemachinforepository.GetList(p => stack.Code == p.SetGrpCode);
|
|
|
var paiKuList = _billBillPaiKuRepository.GetList(p => p.BomsetgrpId == stack.Id);
|
|
|
|
|
|
- //查询出来的垛型没有对应的机台,开始尝试通过产出匹配机台(适配同产出配多个垛型的情况)
|
|
|
- //if (macList.Count <= 0)
|
|
|
- //{
|
|
|
- // //查出当前这个垛型同产出对应的所有启用垛型
|
|
|
- // var stacks =
|
|
|
- // _BillBomsetgrpRepository.GetList(p => p.ProMaterCode == stack.ProMaterCode && p.IsStop == 0);
|
|
|
- // var stackCodes = stacks.Select(x => x.Code).ToList();
|
|
|
- // macList = _basemachinforepository.GetList(p => stackCodes.Contains(p.SetGrpCode));
|
|
|
- //}
|
|
|
+
|
|
|
if (paiKuList.Count <= 0)
|
|
|
{
|
|
|
//查出当前这个垛型同产出对应的所有启用垛型
|
|
@@ -4107,15 +4099,12 @@ namespace wms.service.Service
|
|
|
}
|
|
|
|
|
|
//查询机台,找到机台对应的仓库信息
|
|
|
- //var wareList = macList.Where(x => !x.WarehouseCode.IsNullOrEmpty()).Select(p => p.WarehouseCode).Distinct()
|
|
|
- // .OrderBy(v => v);
|
|
|
var wareList = paiKuList.Where(x => !x.WarehouseCode.IsNullOrEmpty()).Select(p => p.WarehouseCode).Distinct()
|
|
|
.OrderBy(v => v);
|
|
|
|
|
|
if (!wareList.Any()) //当前订单没有对应仓库信息
|
|
|
{
|
|
|
res.ResCode = ResponseStatusCodeEnum.Fail.GetHashCode();
|
|
|
- //res.ResMsg = $"条码:[{reqDto.SpoolCode}]对应的垛型[{stack.Code}]没有配置机台信息";
|
|
|
res.ResMsg = $"条码:[{reqDto.SpoolCode}]对应的垛型[{stack.Code}]没有配置排库信息";
|
|
|
var error = new BaseErrorInfo
|
|
|
{
|
|
@@ -4146,8 +4135,6 @@ namespace wms.service.Service
|
|
|
else //当前订单对应多个仓库信息
|
|
|
{
|
|
|
//先计算出当前物料在各仓库中应该的占比
|
|
|
- //var wareTempList = macList.Where(x => !x.WarehouseCode.IsNullOrEmpty())
|
|
|
- // .Select(p => new { p.WarehouseCode }).Distinct();
|
|
|
var wareTempList = paiKuList.Where(x => !x.WarehouseCode.IsNullOrEmpty())
|
|
|
.Select(p => new { p.WarehouseCode }).Distinct();
|
|
|
var vaule = _sysconfigrepository.GetSingle(x => x.Code == "EqualDistributionTimeRange");
|
|
@@ -4161,8 +4148,6 @@ namespace wms.service.Service
|
|
|
decimal currentWarehouseGoodsSum = warehouseGoods.Count(s =>
|
|
|
s.MatCode == reqDto.MatCode && s.WarehouseCode == x.WarehouseCode);
|
|
|
decimal warehouseGoodsSum = warehouseGoods.Count;
|
|
|
- //var a = Convert.ToDecimal(macList.Count(m => m.WarehouseCode == x.WarehouseCode));
|
|
|
- //var b = Convert.ToDecimal(macList.Count);
|
|
|
var a = Convert.ToDecimal(paiKuList.Where(m => m.WarehouseCode == x.WarehouseCode).Sum(m => m.Percent));
|
|
|
var b = Convert.ToDecimal(paiKuList.Sum(m => m.Percent));
|
|
|
var specificGravityValue = b == 0 ? 0 : a / b;
|
|
@@ -5600,17 +5585,15 @@ namespace wms.service.Service
|
|
|
|
|
|
var cellMatCodeList = cells.Where(x => x.MatCode == wcsTask.MatCode);
|
|
|
//取当前SKU在垛形明细中所有的信息
|
|
|
- bomSetInfos = _billBomsetinfoRepository.GetList(x =>
|
|
|
- x.BomSetHdrId == ringPalletizingInfo.BomSetGrpId && x.IsEmpty == 0 &&
|
|
|
- x.MatCode == wcsTask.MatCode).ToList();
|
|
|
+ bomSetInfos = _billBomsetinfoRepository.GetList(x =>x.BomSetHdrId == ringPalletizingInfo.BomSetGrpId && x.IsEmpty == 0 &&x.MatCode == wcsTask.MatCode).ToList();
|
|
|
+
|
|
|
//取当前SKU在垛形明细中最小的一个坐标号 ,初始化时默认取第一个
|
|
|
- var lastXYNO =
|
|
|
- Convert.ToInt32(bomSetInfos.Select(x => Convert.ToInt32(x.XYNo)).OrderBy(x => x).First());
|
|
|
+ var lastXYNO =Convert.ToInt32(bomSetInfos.Select(x => Convert.ToInt32(x.XYNo)).OrderBy(x => x).First());
|
|
|
if (cellMatCodeList.Any()) //货位中已有当前SKU的产品,取最大数 最大数表示最近入库的
|
|
|
{
|
|
|
lastXYNO = cellMatCodeList.OrderByDescending(x => x.XYNO).First().XYNO;
|
|
|
- var xyNo = bomSetInfos.Select(x => Convert.ToInt32(x.XYNo)).Where(x => x > lastXYNO)
|
|
|
- .OrderBy(x => x).First();
|
|
|
+ var xyNo = bomSetInfos.Select(x => Convert.ToInt32(x.XYNo)).Where(x => x > lastXYNO).OrderBy(x => x).First();
|
|
|
+
|
|
|
ringPalletizingInfo.LastXYNO = xyNo;
|
|
|
}
|
|
|
else
|