This commit is contained in:
2025-06-05 17:26:42 +08:00
parent bdae3f56af
commit 70ab6b9162
3 changed files with 30 additions and 185 deletions

View File

@@ -256,7 +256,7 @@ namespace MyCode.Project.Services.Implementation
{
throw new BaseException("每包数量必须大于0");
}
//_tiaoMaRepository.Delete(t => t.InvoceOrderItemId == act.Id);
//_tiaoMaRepository.Delete(t => t.InvoceOrderItemId == act.Id); purchaseOrderItem.F_TSPR_Text_qtr1
var orderItem = _invoiceOrderItemRepository.Queryable().Where(t => t.Id == act.Id).First();
if (orderItem == null)
{
@@ -267,6 +267,12 @@ namespace MyCode.Project.Services.Implementation
{
throw new BaseException("不正确的ID数据");
}
var purchaseOrderItem = _purchaseOrderItemRepository.Queryable().Where(t => t.Id == orderItem.PurchaseOrderItemId).First();
if (purchaseOrderItem == null)
{
throw new BaseException("不正确的ID数据");
}
List<TiaoMaList> addList = new List<TiaoMaList>();
if (orderItem.CuseQty == act.CuseQty)
{
@@ -276,6 +282,8 @@ namespace MyCode.Project.Services.Implementation
{
t.SupplierId = order.SupplierId;
t.SupplierName = order.SupplierName;
t.Fdemandbillno = purchaseOrderItem.F_TSPR_Text_qtr1;
t.Remart = purchaseOrderItem.Remark;
});
@@ -310,6 +318,8 @@ namespace MyCode.Project.Services.Implementation
tiaoMa.SupplierId = order.SupplierId;
tiaoMa.SupplierName = order.SupplierName;
tiaoMa.InvoceOrderItemId = orderItem.Id;
tiaoMa.Fdemandbillno = purchaseOrderItem.F_TSPR_Text_qtr1;
tiaoMa.Remart = purchaseOrderItem.Remark;
addList.Add(tiaoMa);
}
if (yu > 0)
@@ -326,6 +336,8 @@ namespace MyCode.Project.Services.Implementation
tiaoMa.SupplierId = order.SupplierId;
tiaoMa.SupplierName = order.SupplierName;
tiaoMa.InvoceOrderItemId = orderItem.Id;
tiaoMa.Fdemandbillno = purchaseOrderItem.F_TSPR_Text_qtr1;
tiaoMa.Remart = purchaseOrderItem.Remark;
addList.Add(tiaoMa);
}
if (addList.Count > 0)
@@ -345,8 +357,8 @@ namespace MyCode.Project.Services.Implementation
FSupplierLot = t.FSupplierLot == null ? "" : t.FSupplierLot,
FMaterialId = t.MaterialCode,
FLot = t.MSSSupplierLot,
FQty = t.Qty.Value.ToString()
}).ToList();
FQty = t.Qty.Value.ToString(),
}).ToList();
_workProcessService.Add<IKingDeeService>(this.MerchantId, "AddTiaoMa", "生成条码档案", JsonHelper.ToJson(addTiaoMas), 5);
}