委外到货bug
This commit is contained in:
@@ -45,7 +45,7 @@ public partial class WmsOutsourceD : BaseEntity<string>
|
||||
public string? unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采购数量
|
||||
/// 委外数量
|
||||
/// </summary>
|
||||
public decimal? outsource_quantity { get; set; }
|
||||
|
||||
@@ -169,11 +169,6 @@ public partial class WmsOutsourceD : BaseEntity<string>
|
||||
/// </summary>
|
||||
public int? gift { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 委外数量
|
||||
/// </summary>
|
||||
public decimal? outsource_qty { get; set; }
|
||||
|
||||
public string erp_outsource_order_d_pk { get; set; }
|
||||
|
||||
public string erp_outsource_order_d_lineno { get; set; }
|
||||
|
||||
@@ -231,14 +231,24 @@ namespace Tnb.WarehouseMgr
|
||||
instock.is_check = 0;
|
||||
await _db.Insertable(instock).ExecuteCommandAsync();
|
||||
|
||||
instockDs = purchaseDs.Adapt<List<WmsInstockD>>();
|
||||
instockDs.ForEach(instockD =>
|
||||
foreach (var item in purchaseDs)
|
||||
{
|
||||
WmsInstockD instockD = new WmsInstockD();
|
||||
instockD.id = SnowflakeIdHelper.NextId();
|
||||
instockD.bill_id = instock.id;
|
||||
instockD.line_status = WmsWareHouseConst.BILLSTATUS_ADD_ID;
|
||||
instockD.material_id = item.matcode_id;
|
||||
instockD.material_code = item.matcode;
|
||||
instockD.material_specification = item.matspecification;
|
||||
instockD.unit_id = item.unit;
|
||||
instockD.pr_qty = item.outsource_quantity;
|
||||
instockD.qty = item.bind_qty.Value;
|
||||
instockD.code_batch = item.code_batch;
|
||||
instockD.create_id = _userManager.UserId;
|
||||
instockD.create_time = DateTime.Now;
|
||||
instockD.org_id = _userManager.User.OrganizeId;
|
||||
});
|
||||
instockDs.Add(instockD);
|
||||
}
|
||||
await _db.Insertable(instockDs).ExecuteCommandAsync();
|
||||
|
||||
List<WmsOutsourceD> dList = input.details;
|
||||
@@ -253,10 +263,10 @@ namespace Tnb.WarehouseMgr
|
||||
WmsOutsourceOrderH wmsOutsourceOrderH = await _db.Queryable<WmsOutsourceOrderH>().SingleAsync(x => x.id == wmsOutsourceH.erp_bill_code);
|
||||
|
||||
//自制的不调erp接口
|
||||
if (!string.IsNullOrEmpty(wmsOutsourceOrderH.erp_bill_code))
|
||||
if (wmsOutsourceOrderH!=null && !string.IsNullOrEmpty(wmsOutsourceOrderH.erp_bill_code))
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
// ids.Add(_userManager.UserId);
|
||||
ids.Add(_userManager.UserId);
|
||||
// ids.Add(WmsWareHouseConst.AdministratorUserId);
|
||||
ids.Add(WmsWareHouseConst.AdministratorOrgId);
|
||||
ids.AddRange(materialIds);
|
||||
@@ -321,7 +331,7 @@ namespace Tnb.WarehouseMgr
|
||||
// ["nastnum"] = item.purchase_arriveqty,
|
||||
["nnum"] = item.bind_qty,
|
||||
// ["nplanastnum"] = 0,
|
||||
["nplannum"] = item.outsource_qty,
|
||||
["nplannum"] = item.outsource_quantity,
|
||||
["pk_apfinanceorg"] = erpOrg.corpoid,
|
||||
["pk_apfinanceorg_v"] = erpOrg.corpvid,
|
||||
["pk_arriveorder"] = null,
|
||||
|
||||
Reference in New Issue
Block a user