diff --git a/HHWMS.Web/Areas/Receipt/Controllers/ReceiptSLInController.cs b/HHWMS.Web/Areas/Receipt/Controllers/ReceiptSLInController.cs index 8b9056a..a265951 100644 --- a/HHWMS.Web/Areas/Receipt/Controllers/ReceiptSLInController.cs +++ b/HHWMS.Web/Areas/Receipt/Controllers/ReceiptSLInController.cs @@ -217,6 +217,10 @@ public class ReceiptSLInController : BaseController { return JsonMore(null, 500, $"站台{boxCode}不存在,无法入库!"); } + if (string.IsNullOrEmpty(station.ContainerCode)) + { + return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!"); + } // 判断箱号是否合理 var box = _unitWork.FindSingle(x => x.ContainerCode.Equals(station.ContainerCode) && x.Type != LocationTypeEnum.散料库站台); diff --git a/HHWMS.Web/Areas/Shipment/Controllers/ShipOutController.cs b/HHWMS.Web/Areas/Shipment/Controllers/ShipOutController.cs index b2c7920..04fee34 100644 --- a/HHWMS.Web/Areas/Shipment/Controllers/ShipOutController.cs +++ b/HHWMS.Web/Areas/Shipment/Controllers/ShipOutController.cs @@ -93,7 +93,7 @@ public class ShipOutController : BaseController if (list.Count() == 0) { var Sation = _unitWork.Find(x => x.Code == station).FirstOrDefault(); - if (Sation != null) + if (Sation != null && Sation.Type == "L") { Sation.ContainerCode = ""; Sation.Height = 0; @@ -125,8 +125,12 @@ public class ShipOutController : BaseController { return JsonMore(null, 500, $"站台{boxCode}不存在,无法回库!"); } + if (string.IsNullOrEmpty(station.ContainerCode)) + { + return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!"); + } //判断是否拣货完成 - if(_unitWork.IsExit(x => x.LocationCode.Equals(station.Code))) + if (_unitWork.IsExit(x => x.LocationCode.Equals(station.Code))) { return JsonMore(null, 500, $"站台{boxCode}存在未拣货物料,无法回库!"); } @@ -152,7 +156,7 @@ public class ShipOutController : BaseController ZoneCode = ZoneCodeEnum.散料库, TaskNo = _unitWork.GetSerialNumber("CIn"), TaskType = TaskTypeEnum.散料盒入库, - ContainerCode = station.ContainerCode, + ContainerCode = toLocation.Code, FromLocation = station.Code, ToLocation = toLocation.Code, Status = TaskStatusEnum.待下发, diff --git a/HHWMS.Web/Areas/Shipment/Views/ShipOut/Index.cshtml b/HHWMS.Web/Areas/Shipment/Views/ShipOut/Index.cshtml index 6d6800b..401d8d1 100644 --- a/HHWMS.Web/Areas/Shipment/Views/ShipOut/Index.cshtml +++ b/HHWMS.Web/Areas/Shipment/Views/ShipOut/Index.cshtml @@ -39,7 +39,7 @@ - + @@ -67,7 +67,7 @@ - + 回库 @@ -98,8 +98,8 @@ { label: "唯一码", value: "uniqueCode" }, ], invTable:[], - showTable: false - + showTable: false, + showBack: false }; }, methods: { @@ -114,6 +114,10 @@ select(data) { this.form.code = ""; this.form.type = data; + if (data == "slbox") + this.showBack = true; + else + this.showBack = fasle; }, // 扫描料塔站台号 scanCode(data) { diff --git a/HHWMS.Web/Areas/System/Controllers/jobs/SendWmsJob.cs b/HHWMS.Web/Areas/System/Controllers/jobs/SendWmsJob.cs index 1e40fb1..e137f79 100644 --- a/HHWMS.Web/Areas/System/Controllers/jobs/SendWmsJob.cs +++ b/HHWMS.Web/Areas/System/Controllers/jobs/SendWmsJob.cs @@ -87,9 +87,15 @@ namespace HHWMS.Web _unitwork.Update(shipment); } + var inTaskContainerList = _unitwork.Find(x => x.TaskType == TaskTypeEnum.盘料盒入库 + || x.TaskType == TaskTypeEnum.盘料入库 + || x.TaskType == TaskTypeEnum.散料盒入库) + .Select(x => x.ContainerCode) + .ToList(); //出库库存通过托盘号分组 var lockInvs = _unitwork.Find(x => x.TaskStatus == InventoryTaskStatus.任务中 - && !"L01,L02".Contains(x.ContainerCode)) + && !"L01,L02".Contains(x.LocationCode) + && !inTaskContainerList.Contains(x.LocationCode)) .ToList(); shiInventorys.AddRange(lockInvs); //已生成任务的库存不再生成任务 @@ -281,7 +287,7 @@ namespace HHWMS.Web _unitwork.Update(tLoc); _unitwork.Update(containerTask); } - else + else if (tLoc != null) { task.ZoneCode = ZoneCodeEnum.盘料库; task.TaskNo = _unitwork.GetSerialNumber("pout", 4); diff --git a/HHWMS.Web/appsettings.json b/HHWMS.Web/appsettings.json index 64f4382..170fe01 100644 --- a/HHWMS.Web/appsettings.json +++ b/HHWMS.Web/appsettings.json @@ -27,18 +27,18 @@ // "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;", // "DBType": "mysql" //} - //{ - // "Key": "default", - // "Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True", - // "DbContext": "DataContext", - // "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle - //} { "Key": "default", - "Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True", + "Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True", "DbContext": "DataContext", "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle } + //{ + // "Key": "default", + // "Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True", + // "DbContext": "DataContext", + // "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle + //} ], "CookiePre": "HHWMS", //cookie前缀 "IsQuickDebug": true, //是否启用debug模式