Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
Conflicts:
This commit is contained in:
@@ -125,19 +125,19 @@ namespace Tnb.ProductionMgr
|
|||||||
// Log.Information($"{device},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
|
// Log.Information($"{device},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
string equipStatus = await _redisData.GetHash(device, "1 启动 2 停止 3手动 4 急停");
|
int equipStatus = await _redisData.TryGetValueByKeyField<int>(device, "1 启动 2 停止 3手动 4 急停");
|
||||||
Log.Information($"换箱机状态:{equipStatus}");
|
Log.Information($"换箱机状态:{equipStatus}");
|
||||||
if (equipStatus != "1")
|
if (equipStatus.ToString() != "1")
|
||||||
{
|
{
|
||||||
if (equipStatus.Trim() == "2")
|
if (equipStatus.ToString().Trim() == "2")
|
||||||
{
|
{
|
||||||
throw Oops.Bah("换箱机状态为停止");
|
throw Oops.Bah("换箱机状态为停止");
|
||||||
}
|
}
|
||||||
if (equipStatus.Trim() == "3")
|
if (equipStatus.ToString().Trim() == "3")
|
||||||
{
|
{
|
||||||
throw Oops.Bah("换箱机状态为手动");
|
throw Oops.Bah("换箱机状态为手动");
|
||||||
}
|
}
|
||||||
if (equipStatus.Trim() == "4")
|
if (equipStatus.ToString().Trim() == "4")
|
||||||
{
|
{
|
||||||
throw Oops.Bah("换箱机状态为急停");
|
throw Oops.Bah("换箱机状态为急停");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,8 +334,15 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
|
|
||||||
OutStockStrategyQuery outStockStrategyInput = new() { warehouse_id = WmsWareHouseConst.WAREHOUSE_YCL_ID, material_id = wmsMaterialTransferD.material_id,
|
OutStockStrategyQuery outStockStrategyInput = new()
|
||||||
code_batch = input.code_batch, Size = input.palletCount,Region_id = WmsWareHouseConst.REGION_Purchase_ID,PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK};
|
{
|
||||||
|
warehouse_id = WmsWareHouseConst.WAREHOUSE_YCL_ID,
|
||||||
|
material_id = wmsMaterialTransferD.material_id,
|
||||||
|
code_batch = input.code_batch,
|
||||||
|
Size = input.palletCount,
|
||||||
|
Region_id = WmsWareHouseConst.REGION_Purchase_ID,
|
||||||
|
PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK
|
||||||
|
};
|
||||||
List<WmsCarryH> items = await _wareHouseService.OutStockStrategy(outStockStrategyInput);
|
List<WmsCarryH> items = await _wareHouseService.OutStockStrategy(outStockStrategyInput);
|
||||||
|
|
||||||
if (items.Count == 0)
|
if (items.Count == 0)
|
||||||
@@ -1032,10 +1039,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
if (wmsMaterialTransfer.warehouse_outstock != WmsWareHouseConst.WAREHOUSE_YCL_ID)
|
if (wmsMaterialTransfer.warehouse_outstock != WmsWareHouseConst.WAREHOUSE_YCL_ID)
|
||||||
{
|
{
|
||||||
Logger.LogInformation("【WmsMaterialTransferService ModifyAsync】同步其它出库单到erp...");
|
Logger.LogInformation("【WmsMaterialTransferService ModifyAsync】同步其它出库单到erp...");
|
||||||
|
|
||||||
List<WmsMaterialTransferD> dList = await _db.Queryable<WmsMaterialTransferD>().Where(x => x.bill_id == wmsMaterialTransferd.bill_id).OrderBy(x => x.id).ToListAsync();
|
List<WmsMaterialTransferD> dList = await _db.Queryable<WmsMaterialTransferD>().Where(x => x.bill_id == wmsMaterialTransferd.bill_id).OrderBy(x => x.id).ToListAsync();
|
||||||
DictionaryDataEntity unitData = await _db.Queryable<DictionaryTypeEntity>()
|
DictionaryDataEntity unitData = await _db.Queryable<DictionaryTypeEntity>()
|
||||||
.LeftJoin<DictionaryDataEntity>((x, y) => x.Id == y.DictionaryTypeId)
|
.LeftJoin<DictionaryDataEntity>((x, y) => x.Id == y.DictionaryTypeId)
|
||||||
.Where((x, y) => x.EnCode == DictConst.MeasurementUnit && y.EnCode == wmsMaterialTransferd.unit_id)
|
.Where((x, y) => x.EnCode == DictConst.MeasurementUnit && (y.EnCode == wmsMaterialTransferd.unit_id || y.Id == wmsMaterialTransferd.unit_id))
|
||||||
.Select((x, y) => y)
|
.Select((x, y) => y)
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
string unitId = unitData?.Id ?? "";
|
string unitId = unitData?.Id ?? "";
|
||||||
|
|||||||
Reference in New Issue
Block a user