Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Enums;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 采购收货,销售发货,审核、审核反审核 输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class PurchaseAndSaleAuditUpInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 要更新的id集合列表
|
||||||
|
/// </summary>
|
||||||
|
public List<string> ids { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 1、审核 2、反审核
|
||||||
|
/// </summary>
|
||||||
|
public EnumAuditType auditType { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Entity.Constraints
|
||||||
|
{
|
||||||
|
public interface IPurchaseAndSaleAuitEntity
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 审核状态
|
||||||
|
/// </summary>
|
||||||
|
public int? audit_status { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using JNPF.Common.Contracts;
|
using JNPF.Common.Contracts;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Entity.Constraints;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Entities;
|
namespace Tnb.WarehouseMgr.Entities;
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ namespace Tnb.WarehouseMgr.Entities;
|
|||||||
/// 采购收货主表
|
/// 采购收货主表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("wms_purchase_h")]
|
[SugarTable("wms_purchase_h")]
|
||||||
public partial class WmsPurchaseH : BaseEntity<string>
|
public partial class WmsPurchaseH : BaseEntity<string>, IPurchaseAndSaleAuitEntity
|
||||||
{
|
{
|
||||||
public WmsPurchaseH()
|
public WmsPurchaseH()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using JNPF.Common.Contracts;
|
using JNPF.Common.Contracts;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Entity.Constraints;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Entities;
|
namespace Tnb.WarehouseMgr.Entities;
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ namespace Tnb.WarehouseMgr.Entities;
|
|||||||
/// 销售发货主表
|
/// 销售发货主表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("wms_sale_h")]
|
[SugarTable("wms_sale_h")]
|
||||||
public partial class WmsSaleH : BaseEntity<string>
|
public partial class WmsSaleH : BaseEntity<string>, IPurchaseAndSaleAuitEntity
|
||||||
{
|
{
|
||||||
public WmsSaleH()
|
public WmsSaleH()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Enums
|
||||||
|
{
|
||||||
|
public enum EnumAuditType
|
||||||
|
{
|
||||||
|
审核 = 1,
|
||||||
|
反审核 = 2,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -131,10 +131,19 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
|
|
||||||
List<string> carryIds = new();
|
List<string> carryIds = new();
|
||||||
|
var mapKeys = new List<string> { "tablefield120", "details" };
|
||||||
//tablefield120 出库物料明细
|
//tablefield120 出库物料明细
|
||||||
if (input.data.ContainsKey("tablefield120") && input.data["tablefield120"].IsNotEmptyOrNull())
|
if (input.data.Keys.Where(k => mapKeys.Contains(k)).Any()) //input.data.ContainsKey("tablefield120") && input.data["tablefield120"].IsNotEmptyOrNull()
|
||||||
{
|
{
|
||||||
List<WmsOutstockD> outStockDList = input.data["tablefield120"].ToObject<List<WmsOutstockD>>();
|
List<WmsOutstockD> outStockDList = new();
|
||||||
|
if (input.data.ContainsKey("tablefield120") && input.data["tablefield120"].IsNotEmptyOrNull())
|
||||||
|
{
|
||||||
|
outStockDList = input.data["tablefield120"].ToObject<List<WmsOutstockD>>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
outStockDList = input.data["details"].ToObject<List<WmsOutstockD>>();
|
||||||
|
}
|
||||||
if (outStockDList?.Count > 0)
|
if (outStockDList?.Count > 0)
|
||||||
{
|
{
|
||||||
List<WmsCarryMat> carryMats = new();
|
List<WmsCarryMat> carryMats = new();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Tnb.Common.Utils;
|
|||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities.Consts;
|
using Tnb.WarehouseMgr.Entities.Consts;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Entities.Entity.Constraints;
|
using Tnb.WarehouseMgr.Entities.Entity.Constraints;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
@@ -21,71 +22,53 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 采购收货、销售发货,通用业务类
|
/// 采购收货、销售发货,通用业务类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TEntity"></typeparam>
|
/// <typeparam name="TSubEntity"></typeparam>
|
||||||
public class WmsPurchaseAndSaleCommonService<TEntity> : BaseWareHouseService where TEntity : BaseEntity<string>, IPurchaseAndSaleEntity, IPurchaseAndSaleQueryEntity
|
public class WmsPurchaseAndSaleCommonService<TSubEntity> : BaseWareHouseService where TSubEntity : BaseEntity<string>, IPurchaseAndSaleEntity, IPurchaseAndSaleQueryEntity
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarClient _db;
|
private readonly ISqlSugarClient _db;
|
||||||
private readonly IUserManager _userManager;
|
private readonly IUserManager _userManager;
|
||||||
private readonly IWmsPDAScanInStockService _wmsPDAScanInStockService;
|
|
||||||
private readonly IWmsOutStockService _wmsOutStockService;
|
|
||||||
private static Dictionary<string, object> s_materialMap = new();
|
private static Dictionary<string, object> s_materialMap = new();
|
||||||
|
|
||||||
public WmsPurchaseAndSaleCommonService(ISqlSugarRepository<WmsPurchaseH> repo, IUserManager userManager, IWmsOutStockService? wmsOutStockService = null)
|
public WmsPurchaseAndSaleCommonService(ISqlSugarRepository<WmsPurchaseH> repo, IUserManager userManager)
|
||||||
{
|
{
|
||||||
_db = repo.AsSugarClient();
|
_db = repo.AsSugarClient();
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
_wmsOutStockService = wmsOutStockService!;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task<bool> PurchaseAndSaleUpdate(PurchaseAndReceiveUpInput input)
|
protected async Task<List<TSubEntity>> PurchaseAndSaleUpdate(PurchaseAndReceiveUpInput input)
|
||||||
{
|
{
|
||||||
if (input == null) throw new ArgumentNullException("input");
|
if (input == null) throw new ArgumentNullException("input");
|
||||||
if (input.details == null) throw new ArgumentNullException(nameof(input.details));
|
if (input.details == null) throw new ArgumentNullException(nameof(input.details));
|
||||||
|
|
||||||
|
|
||||||
var dicMaterialPurchaseArriveQty = input.details.ToDictionary(x => x.material_id, x => x.purchase_arriveqty);
|
|
||||||
var materialIds = input.details.Select(x => x.material_id).ToList();
|
var materialIds = input.details.Select(x => x.material_id).ToList();
|
||||||
var purchaseDs = await _db.Queryable<TEntity>().Where(it => materialIds.Contains(it.material_id)).ToListAsync();
|
var purchaseDs = await _db.Queryable<TSubEntity>().Where(it => materialIds.Contains(it.material_id)).ToListAsync();
|
||||||
|
|
||||||
if (purchaseDs?.Count > 0)
|
if (purchaseDs?.Count > 0)
|
||||||
{
|
{
|
||||||
var errMaterialTipList = new List<(string materialName, decimal purchaseArriveQty, decimal topPurchaseQty)>();
|
var errMaterialTipList = new List<(string materialName, decimal purchaseArriveQty, decimal topPurchaseQty)>();
|
||||||
|
|
||||||
foreach (var pd in purchaseDs)
|
foreach (var pd in purchaseDs)
|
||||||
{
|
{
|
||||||
pd.purchase_prqty += dicMaterialPurchaseArriveQty.ContainsKey(pd.material_id) ? dicMaterialPurchaseArriveQty[pd.material_id] : 0;
|
|
||||||
var pdInput = input.details.Find(x => x.material_id == pd.material_id);
|
var pdInput = input.details.Find(x => x.material_id == pd.material_id);
|
||||||
if (pdInput != null)
|
if (pdInput != null)
|
||||||
{
|
{
|
||||||
|
pd.purchase_prqty += pdInput.purchase_arriveqty;
|
||||||
|
|
||||||
var topPurchaseQty = pd.purchase_qty - pd.purchase_prqty;
|
var topPurchaseQty = pd.purchase_qty - pd.purchase_prqty;
|
||||||
if (pdInput.purchase_arriveqty > topPurchaseQty)
|
if (pdInput.purchase_arriveqty > topPurchaseQty && s_materialMap.ContainsKey(pdInput.material_id) && s_materialMap[pdInput.material_id] != null)
|
||||||
{
|
{
|
||||||
if (s_materialMap.ContainsKey(pdInput.material_id) && s_materialMap[pdInput.material_id] != null)
|
errMaterialTipList.Add((s_materialMap[pdInput.material_id].ToString()!, pdInput.purchase_arriveqty, topPurchaseQty));
|
||||||
{
|
continue;
|
||||||
errMaterialTipList.Add((s_materialMap[pdInput.material_id].ToString()!, pdInput.purchase_arriveqty, topPurchaseQty));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pd.purchase_prqty >= pd.purchase_qty)
|
|
||||||
{
|
pd.line_status = pd.purchase_prqty >= pd.purchase_qty ? WmsWareHouseConst.BILLSTATUS_COMPLETE_ID : WmsWareHouseConst.BILLSTATUS_ON_ID;
|
||||||
pd.line_status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pd.line_status = WmsWareHouseConst.BILLSTATUS_ON_ID;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errMaterialTipList.Count > 0)
|
if (errMaterialTipList.Count > 0)
|
||||||
{
|
{
|
||||||
var errMsgList = new List<string>();
|
var itemType = typeof(TSubEntity) == typeof(WmsPurchaseD) ? "收货数" : "发货数";
|
||||||
if (typeof(TEntity) == typeof(WmsPurchaseD))
|
var errMsgList = errMaterialTipList.Select(x => $"物料:{x.materialName},实际{itemType}:{x.purchaseArriveQty}已超出可{itemType}:{x.topPurchaseQty}").ToList();
|
||||||
{
|
|
||||||
errMsgList = errMaterialTipList.Select(x => $"物料:{x.materialName},实际收货数:{x.purchaseArriveQty}已超出可收货数:{x.topPurchaseQty}").ToList();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errMsgList = errMaterialTipList.Select(x => $"物料:{x.materialName},实际发货数:{x.purchaseArriveQty}已超出可发货数:{x.topPurchaseQty}").ToList();
|
|
||||||
}
|
|
||||||
var errMsg = string.Join("\r\n", errMsgList);
|
var errMsg = string.Join("\r\n", errMsgList);
|
||||||
throw new AppFriendlyException(errMsg, 500);
|
throw new AppFriendlyException(errMsg, 500);
|
||||||
}
|
}
|
||||||
@@ -95,40 +78,45 @@ namespace Tnb.WarehouseMgr
|
|||||||
x.modify_id = _userManager.UserId;
|
x.modify_id = _userManager.UserId;
|
||||||
x.modify_time = DateTime.Now;
|
x.modify_time = DateTime.Now;
|
||||||
});
|
});
|
||||||
|
|
||||||
await _db.Updateable(purchaseDs).ExecuteCommandAsync();
|
await _db.Updateable(purchaseDs).ExecuteCommandAsync();
|
||||||
|
|
||||||
if (purchaseDs.All(x => x.line_status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID))
|
if (purchaseDs.All(x => x.line_status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID))
|
||||||
{
|
{
|
||||||
var purchase = await _db.Queryable<WmsPurchaseH>().FirstAsync(it => it.bill_code == input.bill_code);
|
var purchase = await _db.Queryable<WmsPurchaseH>().FirstAsync(it => it.id == purchaseDs.First().bill_id);
|
||||||
|
|
||||||
if (purchase != null)
|
if (purchase != null)
|
||||||
{
|
{
|
||||||
purchase.status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID;
|
purchase.status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID;
|
||||||
purchase.modify_id = _userManager.UserId;
|
purchase.modify_id = _userManager.UserId;
|
||||||
purchase.modify_time = DateTime.Now;
|
purchase.modify_time = DateTime.Now;
|
||||||
|
|
||||||
await _db.Updateable(purchase).UpdateColumns(it => it.status).ExecuteCommandAsync();
|
await _db.Updateable(purchase).UpdateColumns(it => it.status).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VisualDevModelDataCrInput visualDevModelDataInput = new();
|
|
||||||
visualDevModelDataInput.data = PocoToDictionary.ToDictionary(input) as Dictionary<string, object>;
|
return await Task.FromResult(purchaseDs);
|
||||||
if (_wmsOutStockService != null)
|
|
||||||
{
|
|
||||||
await _wmsOutStockService.OutStockApplyFor(visualDevModelDataInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
return await Task.FromResult(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task<List<TEntity>> GetDetailsByPkId(string pkId)
|
|
||||||
|
protected async Task<List<TSubEntity>> GetDetailsByPkId(string pkId)
|
||||||
{
|
{
|
||||||
if (s_materialMap.Count == 0)
|
if (s_materialMap.Count == 0)
|
||||||
{
|
{
|
||||||
s_materialMap = await _db.Queryable<BasMaterial>().ToDictionaryAsync(x => x.id, x => x.name);
|
s_materialMap = await _db.Queryable<BasMaterial>().ToDictionaryAsync(x => x.id, x => x.name);
|
||||||
}
|
}
|
||||||
var list = await _db.Queryable<TEntity>().Where(it => it.bill_id == pkId)
|
var list = await _db.Queryable<TSubEntity>().Where(it => it.bill_id == pkId)
|
||||||
.Mapper(it => it.material_name = s_materialMap.ContainsKey(it.material_id) ? s_materialMap[it.material_id]?.ToString() ?? "" : "")
|
.Mapper(it => it.material_name = s_materialMap.ContainsKey(it.material_id) ? s_materialMap[it.material_id]?.ToString() ?? "" : "")
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async Task<bool> Audit<TEntity>(PurchaseAndSaleAuditUpInput input) where TEntity : BaseEntity<string>, IPurchaseAndSaleAuitEntity, new()
|
||||||
|
{
|
||||||
|
return await _db.Updateable<TEntity>().SetColumns(it => it.audit_status == (int)input.auditType).Where(it => input.ids.Contains(it.id)).ExecuteCommandHasChangeAsync();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
|
|
||||||
blFlag = await PurchaseAndSaleUpdate(input);
|
var purchaseDs = await PurchaseAndSaleUpdate(input);
|
||||||
if (blFlag)
|
if (purchaseDs?.Count > 0)
|
||||||
{
|
{
|
||||||
var instock = input.Adapt<WmsInstockH>();
|
var instock = input.Adapt<WmsInstockH>();
|
||||||
instock.id = SnowflakeIdHelper.NextId();
|
instock.id = SnowflakeIdHelper.NextId();
|
||||||
@@ -73,7 +73,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
instock.org_id = _userManager.User.OrganizeId;
|
instock.org_id = _userManager.User.OrganizeId;
|
||||||
await _db.Insertable(instock).ExecuteCommandAsync();
|
await _db.Insertable(instock).ExecuteCommandAsync();
|
||||||
|
|
||||||
var instockD = input.details.Adapt<WmsInstockD>();
|
var instockD = purchaseDs.Adapt<WmsInstockD>();
|
||||||
instockD.create_id = _userManager.UserId;
|
instockD.create_id = _userManager.UserId;
|
||||||
instockD.create_time = DateTime.Now;
|
instockD.create_time = DateTime.Now;
|
||||||
instockD.org_id = _userManager.User.OrganizeId;
|
instockD.org_id = _userManager.User.OrganizeId;
|
||||||
@@ -101,5 +101,18 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
return await GetDetailsByPkId(id);
|
return await GetDetailsByPkId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核反审核
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">
|
||||||
|
///
|
||||||
|
/// </param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> Audit(PurchaseAndSaleAuditUpInput input)
|
||||||
|
{
|
||||||
|
return await Audit<WmsPurchaseH>(input);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,14 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.Common.Utils;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
@@ -17,23 +21,56 @@ namespace Tnb.WarehouseMgr
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class WmsSaleService : WmsPurchaseAndSaleCommonService<WmsSaleD>
|
public class WmsSaleService : WmsPurchaseAndSaleCommonService<WmsSaleD>
|
||||||
{
|
{
|
||||||
|
private readonly IWmsOutStockService _wmsOutStockService;
|
||||||
|
|
||||||
public WmsSaleService(ISqlSugarRepository<WmsPurchaseH> repo, IUserManager userManager, IWmsOutStockService wmsOutStockService)
|
public WmsSaleService(ISqlSugarRepository<WmsPurchaseH> repo, IUserManager userManager, IWmsOutStockService wmsOutStockService)
|
||||||
: base(repo, userManager, wmsOutStockService: wmsOutStockService)
|
: base(repo, userManager)
|
||||||
{
|
{
|
||||||
|
_wmsOutStockService = wmsOutStockService;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 销售发货
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">
|
||||||
|
///
|
||||||
|
/// </param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> Sale(PurchaseAndReceiveUpInput input)
|
public async Task<dynamic> Sale(PurchaseAndReceiveUpInput input)
|
||||||
{
|
{
|
||||||
return await PurchaseAndSaleUpdate(input);
|
_ = await PurchaseAndSaleUpdate(input);
|
||||||
|
VisualDevModelDataCrInput visualDevModelDataInput = new();
|
||||||
|
visualDevModelDataInput.data = PocoToDictionary.ToDictionary(input) as Dictionary<string, object>;
|
||||||
|
visualDevModelDataInput.data["location_id"] = "26412597341221";
|
||||||
|
visualDevModelDataInput.data["location_code"] = "YCL01-01-01";
|
||||||
|
if (_wmsOutStockService != null)
|
||||||
|
{
|
||||||
|
await _wmsOutStockService.OutStockApplyFor(visualDevModelDataInput);
|
||||||
|
}
|
||||||
|
return await Task.FromResult(1);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据销售发货主表Id获取子表明细
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpGet("id")]
|
[HttpGet("id")]
|
||||||
public async Task<dynamic> GetSaleDetailsByBillId(string id)
|
public async Task<dynamic> GetSaleDetailsByBillId(string id)
|
||||||
{
|
{
|
||||||
return await GetDetailsByPkId(id);
|
return await GetDetailsByPkId(id);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 审核反审核
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">
|
||||||
|
///
|
||||||
|
/// </param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> Audit(PurchaseAndSaleAuditUpInput input)
|
||||||
|
{
|
||||||
|
return await Audit<WmsSaleH>(input);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user