|
@@ -25,33 +25,34 @@ namespace WCS.WorkEngineering.Systems
|
|
|
//获取条码
|
|
|
var bcr = obj.GetBarCode(World);
|
|
|
|
|
|
+ var key = $"AllocationWarehouseSort:{bcr}";
|
|
|
//获取到仓库Id
|
|
|
- var mainlineDiversion = JsonConvert.DeserializeObject<MainlineDiversion>(RedisHub.WMS.Get($"MainlineDiversion{bcr}"));
|
|
|
+ var mainlineDiversion = JsonConvert.DeserializeObject<MainlineDiversion>(RedisHub.WMS.Get(key));
|
|
|
//更具仓库ID来分配目标地址
|
|
|
int nextAdd = 0;
|
|
|
- switch (mainlineDiversion.WarehouseId)
|
|
|
+ switch (mainlineDiversion.WarehouseCode)
|
|
|
{
|
|
|
- case 1:
|
|
|
+ case "1N":
|
|
|
nextAdd = 0;
|
|
|
break;
|
|
|
|
|
|
- case 2:
|
|
|
+ case "1S":
|
|
|
nextAdd = 0;
|
|
|
break;
|
|
|
|
|
|
- case 3:
|
|
|
+ case "2N":
|
|
|
nextAdd = 0;
|
|
|
break;
|
|
|
|
|
|
- case 4:
|
|
|
+ case "2S":
|
|
|
nextAdd = 0;
|
|
|
break;
|
|
|
|
|
|
- case 5:
|
|
|
+ case "3N":
|
|
|
nextAdd = 0;
|
|
|
break;
|
|
|
|
|
|
- case 6:
|
|
|
+ case "3S":
|
|
|
nextAdd = 0;
|
|
|
break;
|
|
|
}
|
|
@@ -60,6 +61,7 @@ namespace WCS.WorkEngineering.Systems
|
|
|
obj.Data.GoodsEnd = nextAdd.ToShort();
|
|
|
obj.Data.TaskNumber = mainlineDiversion.TaskId;
|
|
|
obj.Data.VoucherNo++;
|
|
|
+ RedisHub.WMS.Del(key);
|
|
|
}
|
|
|
|
|
|
public override bool Select(Device dev)
|
|
@@ -81,6 +83,6 @@ namespace WCS.WorkEngineering.Systems
|
|
|
/// <summary>
|
|
|
/// 仓库号
|
|
|
/// </summary>
|
|
|
- public int WarehouseId { get; set; }
|
|
|
+ public string WarehouseCode { get; set; }
|
|
|
}
|
|
|
}
|