Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -249,4 +249,9 @@ public partial class BasMaterial : BaseEntity<string>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? is_contain_into_num { get; set; }
|
public int? is_contain_into_num { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否创建子工单
|
||||||
|
/// </summary>
|
||||||
|
public string? is_create_sub_work_order { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,19 @@ namespace Tnb.BasicData.Interfaces
|
|||||||
{
|
{
|
||||||
public interface IBasMaterialService
|
public interface IBasMaterialService
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取本物料清单及其所有子集物料信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="queryInput"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public Task<dynamic> GetMaterialSelectInfo(MaterialSelectQueryInput queryInput);
|
public Task<dynamic> GetMaterialSelectInfo(MaterialSelectQueryInput queryInput);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取可创建子工单的物料
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="queryInput"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Task<dynamic> GetCanCreateSubWorkOrderMaterial(MaterialSelectQueryInput queryInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,6 +128,38 @@ namespace Tnb.BasicData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> GetCanCreateSubWorkOrderMaterial(MaterialSelectQueryInput queryInput)
|
||||||
|
{
|
||||||
|
var db = _repository.AsSugarClient();
|
||||||
|
if (!string.IsNullOrEmpty(queryInput.ebom_id))
|
||||||
|
{
|
||||||
|
List<string> ids = await GetAllChildrenMaterialId(queryInput.ebom_id,0);
|
||||||
|
var result = await db.Queryable<BasMaterial>()
|
||||||
|
.LeftJoin<DictionaryTypeEntity>((a, b) => b.EnCode == DictConst.MeasurementUnit && b.DeleteMark == null)
|
||||||
|
.LeftJoin<DictionaryDataEntity>((a, b, c) => c.DictionaryTypeId == b.Id && a.unit_id == c.EnCode)
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(queryInput.material_info), (a, b, c) => a.code.Contains(queryInput.material_info) || a.name.Contains(queryInput.material_info))
|
||||||
|
.WhereIF(!string.IsNullOrEmpty(queryInput.ebom_id), (a, b, c) => ids.Contains(a.id))
|
||||||
|
.Where((a,b,c)=>a.is_create_sub_work_order=="1")
|
||||||
|
.Select((a, b, c) => new MaterialSelectOutput()
|
||||||
|
{
|
||||||
|
id = a.id,
|
||||||
|
code = a.code,
|
||||||
|
name = a.name,
|
||||||
|
descrip = a.descrip,
|
||||||
|
unit_id = a.unit_id,
|
||||||
|
unit_name = c.FullName,
|
||||||
|
}).ToPagedListAsync(queryInput.currentPage, queryInput.pageSize);
|
||||||
|
|
||||||
|
return PageResult<MaterialSelectOutput>.SqlSugarPageResult(result);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return PageResult<MaterialSelectOutput>.SqlSugarPageResult(new SqlSugarPagedList<MaterialSelectOutput>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取物料清单下所子集物料id
|
/// 获取物料清单下所子集物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ using Tnb.WarehouseMgr.Interfaces;
|
|||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 载具移入
|
/// 载具移出
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[OverideVisualDev(ModuleConsts.MODULE_WMSCARRYMOOUTSTKPDA_ID)]
|
[OverideVisualDev(ModuleConsts.MODULE_WMSCARRYMOOUTSTKPDA_ID)]
|
||||||
[ServiceModule(BizTypeId)]
|
[ServiceModule(BizTypeId)]
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
//await _runService.Create(templateEntity, input);
|
//await _runService.Create(templateEntity, input);
|
||||||
//入库取终点 //出库起点
|
//入库取终点 //出库起点
|
||||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
||||||
var inbaleItem =await _db.Queryable<WmsInbale>().SingleAsync(it => it.bill_code == input.data[nameof(WmsInbale.bill_code)].ToString());
|
var inbaleItem = await _db.Queryable<WmsInbale>().SingleAsync(it => it.bill_code == input.data[nameof(WmsInbale.bill_code)].ToString());
|
||||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||||
WmsPointH sPoint = null;
|
WmsPointH sPoint = null;
|
||||||
WmsPointH ePoint = null;
|
WmsPointH ePoint = null;
|
||||||
@@ -143,8 +143,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
//根据载具移入Id,回更单据状态
|
//根据载具移入Id,回更单据状态
|
||||||
await _db.Updateable<WmsInbale>().SetColumns(it => new WmsInbale { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
await _db.Updateable<WmsInbale>().SetColumns(it => new WmsInbale { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||||
|
|
||||||
|
var baleNum = input.data[nameof(WmsCarryH.bale_num)]?.ToString();
|
||||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||||
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode, carry_status= ((int)EnumCarryStatus.寄存).ToString() },
|
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode, carry_status = ((int)EnumCarryStatus.寄存).ToString(), bale_num = baleNum },
|
||||||
it => new BasLocation { is_lock = 1 });
|
it => new BasLocation { is_lock = 1 });
|
||||||
//((int)EnumCarryStatus.寄存).ToString()
|
//((int)EnumCarryStatus.寄存).ToString()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user