diff --git a/HHWMS.Web/Areas/Api/IWCSController.cs b/HHWMS.Web/Areas/Api/IWCSController.cs index 4bfb653..ea3fd5a 100644 --- a/HHWMS.Web/Areas/Api/IWCSController.cs +++ b/HHWMS.Web/Areas/Api/IWCSController.cs @@ -295,6 +295,10 @@ namespace HHWMS.Web } _unitwork.Update(task); + if (task.Status == TaskStatusEnum.完成) + { + _unitwork.Delete(task); + } } } diff --git a/HHWMS.Web/Areas/Configs/Controllers/PrintController.cs b/HHWMS.Web/Areas/Configs/Controllers/PrintController.cs index 67b088d..4295001 100644 --- a/HHWMS.Web/Areas/Configs/Controllers/PrintController.cs +++ b/HHWMS.Web/Areas/Configs/Controllers/PrintController.cs @@ -54,13 +54,20 @@ namespace HHWMS.Web.Controllers } else { - - var prefix = code.Split("@")[1].Substring(2); - var unique = _unitwork.GetSerialNumber(prefix, 8); - var uniqueCode = prefix + unique; + if (string.IsNullOrEmpty(material.UniqueCode)) + { + var prefix = code.Split("@")[1].Substring(2); + var unique = _unitwork.GetSerialNumber(prefix, 8); + var uniqueCode = prefix + unique; - material.UniqueCode = uniqueCode; - return JsonMore(uniqueCode); + material.UniqueCode = uniqueCode; + _unitwork.Update(material); + return JsonMore(uniqueCode); + } + else + { + return JsonMore(material.UniqueCode); + } } } } diff --git a/HHWMS.Web/Areas/Configs/Views/Location/Index.cshtml b/HHWMS.Web/Areas/Configs/Views/Location/Index.cshtml index 8d9405c..0b53a0c 100644 --- a/HHWMS.Web/Areas/Configs/Views/Location/Index.cshtml +++ b/HHWMS.Web/Areas/Configs/Views/Location/Index.cshtml @@ -30,7 +30,7 @@ { "options": { "left": 0, - "top": 0, + "top": 2, "height": 38, "width": 84, "field": "code", diff --git a/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml b/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml index dd38600..7166674 100644 --- a/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml +++ b/HHWMS.Web/Areas/Configs/Views/Print/Index.cshtml @@ -39,10 +39,10 @@ "printElements": [ { "options": { - "left": 15, - "top": 5, - "height": 44, - "width": 54, + "left": 0, + "top": 2, + "height": 52, + "width": 81, "title": "", "field": "uniqueCode", "testData": "", diff --git a/HHWMS.Web/Areas/System/Controllers/jobs/SendWcsJob.cs b/HHWMS.Web/Areas/System/Controllers/jobs/SendWcsJob.cs index 08a5a64..e63c8be 100644 --- a/HHWMS.Web/Areas/System/Controllers/jobs/SendWcsJob.cs +++ b/HHWMS.Web/Areas/System/Controllers/jobs/SendWcsJob.cs @@ -53,9 +53,9 @@ namespace HHWMS.Web // 调用wcs任务下发接口 try { - //var res = Wtm.CallAPI>("WCS", "TaskAssign", HttpMethodEnum.POST, item).Result.Data; - if (true) - //if (res.Success) + var res = Wtm.CallAPI>("WCS", "TaskAssign", HttpMethodEnum.POST, item).Result.Data; + //if (true) + if (res.Success) { var locationList = _unitwork.Find(x => task.FromLocation.Equals(x.Code) || task.ToLocation.Equals(x.Code)).ToList(); var begin = locationList.FirstOrDefault(x => x.Code.Equals(task.FromLocation)); diff --git a/HHWMS.Web/appsettings.json b/HHWMS.Web/appsettings.json index 5078053..9337766 100644 --- a/HHWMS.Web/appsettings.json +++ b/HHWMS.Web/appsettings.json @@ -24,7 +24,7 @@ "Connections": [ { "Key": "default", - "Value": "Server=localhost;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;", + "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;", "DBType": "mysql" } //{