From b371ec4d997f37d2a0ca8012e9e876f792328dce Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期日, 12 一月 2025 00:18:13 +0800 Subject: [PATCH] 更新油墨,修改密码 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 146 ++++++++++++++-------------- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 51 +++++---- 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/062176ae-3338-43a8-9030-bb1a16e68b97.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 2 代码管理/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User.js | 1 /dev/null | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs | 5 + 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs | 3 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs | 33 ++++++ 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs | 1 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/CommonHoisterJob.cs | 7 代码管理/WMS/WIDESEA_WMSClient/public/webconfig.js | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs | 11 ++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue | 6 15 files changed, 163 insertions(+), 105 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs" index 4f1d3ff..7055a8a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs" @@ -101,5 +101,10 @@ /// </summary> [Description("浠诲姟寮傚父")] Exception = 990, + /// <summary> + /// 鎻愬崌鏈烘墽琛屼腑 + /// </summary> + [Description("鍫嗗灈鏈哄緟鎵ц")] + HT_Executing = 110, } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" index 41866de..bb8941d 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" @@ -239,7 +239,8 @@ OtherDevice otherDevice = (OtherDevice)device; otherDevice.SetValue(GroundStationDBName.W_PutFinish, true, stationManger.StationCode); - + Thread.Sleep(1000); + otherDevice.SetValue(GroundStationDBName.W_PutFinish, false, stationManger.StationCode); return WebResponseContent.Instance.OK(); } catch (Exception ex) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" index d94d4dd..549f044 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" @@ -93,8 +93,7 @@ task.NextAddress = locationCode; task.DeviceCode = stationManger.StackerCraneCode; task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); - _taskRepository.UpdateData(task); - + _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, currentAddress: task.CurrentAddress, nextAddress: task.NextAddress); bool isWrite = hoister.SetValue(HoisterDBName.RequestIn, false, deviceChildCode); } else @@ -107,13 +106,15 @@ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType)); if (task != null) { + task.TaskState=TaskStatusEnum.HT_Executing.ObjToInt(); + _taskService.UpdateTask(task, TaskStatusEnum.HT_Executing); bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, true, deviceChildCode); WriteError(hoister.DeviceName, $"璇锋眰鍑哄簱,璁惧缂栧彿:{deviceChildCode},浠诲姟鍙�:{task.TaskNum}"); } } else if (!leisure && !tray && !requestIn && !inbounding && requestOut && outbounding) { - Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType)); + Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.HT_Executing.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType)); if (task != null) { Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == deviceChildCode); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js" index a77f4bc..9ca9383 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/public/webconfig.js" @@ -1,4 +1,4 @@ window.webConfig = { - "webApiBaseUrl": "http://127.0.0.1:9283/", + "webApiBaseUrl": "http://127.0.0.1:9293/", "webApiProduction":"http://10.30.4.92:9283/" } \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User.js" index 4be7155..b44ab20 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User.js" @@ -30,6 +30,7 @@ style: { 'margin-right': '15px' }, onClick: (e) => { e.stopPropagation() + console.log(row); this.$refs.gridHeader.open(row); } }, "淇敼瀵嗙爜" diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue" index f6f59be..baa43b8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue" @@ -59,11 +59,11 @@ if (this.password.length < 6) return this.$Message.error("瀵嗙爜闀垮害鑷冲皯6浣�"); let url = - "/api/user/modifyUserPwd?password=" + + "/api/User/ModifyUserPwd?password=" + this.password + "&userName=" + - this.row.UserName; - this.http.post(url, {}, true).then((x) => { + this.row.userName; + this.http.post(url, null, true).then((x) => { if (!x.status) { return this.$message.error(x.message); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/062176ae-3338-43a8-9030-bb1a16e68b97.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/062176ae-3338-43a8-9030-bb1a16e68b97.vsidx" new file mode 100644 index 0000000..d8708e7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/062176ae-3338-43a8-9030-bb1a16e68b97.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx" deleted file mode 100644 index d9643f1..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/35b9e878-61a3-436f-b549-08084babf3ff.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d39d9aff-c2cd-40cb-82ad-2a7895fa7047.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d39d9aff-c2cd-40cb-82ad-2a7895fa7047.vsidx" deleted file mode 100644 index d1f9230..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d39d9aff-c2cd-40cb-82ad-2a7895fa7047.vsidx" +++ /dev/null Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" new file mode 100644 index 0000000..e69de29 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs" index cc46628..e41d987 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs" @@ -21,5 +21,6 @@ WebResponseContent GetCurrentUserInfo(); WebResponseContent ModifyPwd(string oldPwd, string newPwd); + WebResponseContent ModifyUserPwd(string password, string userName); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" index 47bcfe6..8e1f0ed 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" @@ -779,83 +779,83 @@ /// </summary> /// <param name="id"></param> /// <returns></returns> - public WebResponseContent FeedbackInboundOrder(int id) - { - try - { - Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == id).Includes(x => x.Details).First(); - if (inboundOrder == null) - { - return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟淇℃伅"); - } - if (inboundOrder.Details == null || inboundOrder.Details.Count == 0) - { - return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟鏄庣粏淇℃伅"); - } - if (inboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt()) - { - return WebResponseContent.Instance.Error($"鍏ュ簱鍗曟嵁宸插畬鎴�"); - } + //public WebResponseContent FeedbackInboundOrder(int id) + //{ + // try + // { + // Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.Id == id).Includes(x => x.Details).First(); + // if (inboundOrder == null) + // { + // return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟淇℃伅"); + // } + // if (inboundOrder.Details == null || inboundOrder.Details.Count == 0) + // { + // return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟鏄庣粏淇℃伅"); + // } + // if (inboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt()) + // { + // return WebResponseContent.Instance.Error($"鍏ュ簱鍗曟嵁宸插畬鎴�"); + // } - List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => x.Details.Any(v => v.OrderNo == inboundOrder.InboundOrderNo)).Includes(x => x.Details).ToList(); - List<Dt_Warehouse> warehouses = Db.Queryable<Dt_Warehouse>().ToList(); + // List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => x.Details.Any(v => v.OrderNo == inboundOrder.InboundOrderNo)).Includes(x => x.Details).ToList(); + // List<Dt_Warehouse> warehouses = Db.Queryable<Dt_Warehouse>().ToList(); - List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>(); - foreach (var item in inboundOrder.Details) - { - Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(v => v.InboundOrderRowNo == item.RowNo && v.MaterielCode == item.MaterielCode)); - if (stockInfo == null) - { - return WebResponseContent.Instance.Error($"鏈壘鍒板簱瀛樹俊鎭�"); - } + // List<ERPInboundDetailModel> detailModels = new List<ERPInboundDetailModel>(); + // foreach (var item in inboundOrder.Details) + // { + // Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(v => v.InboundOrderRowNo == item.RowNo && v.MaterielCode == item.MaterielCode)); + // if (stockInfo == null) + // { + // return WebResponseContent.Instance.Error($"鏈壘鍒板簱瀛樹俊鎭�"); + // } - Dt_Warehouse? warehouse = warehouses.FirstOrDefault(x => x.WarehouseId == stockInfo.WarehouseId); - if (warehouse == null) - { - return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); - } + // Dt_Warehouse? warehouse = warehouses.FirstOrDefault(x => x.WarehouseId == stockInfo.WarehouseId); + // if (warehouse == null) + // { + // return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); + // } - ERPInboundDetailModel detailModel = new ERPInboundDetailModel() - { - ExpiryDate = stockInfo.Details.FirstOrDefault()?.EffectiveDate ?? "", - LocationCode = warehouse.WarehouseCode, - MaterialsCode = item.MaterielCode, - MfgDate = stockInfo.Details.FirstOrDefault()?.ProductionDate ?? "", - QtyCustoms = "0", - Quantity = stockInfo.Details.Sum(x => x.StockQuantity).ToString(), - Rack = stockInfo.LocationCode, - ReceiptCode = inboundOrder.UpperOrderNo, - ReceiptSerNo = item.RowNo.ToString() - }; - detailModels.Add(detailModel); - } - Dt_Warehouse? warehouse2 = warehouses.FirstOrDefault(x => x.WarehouseId == inboundOrder.WarehouseId); - if (warehouse2 == null) - { - return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); - } - ERPInboundModel model = new ERPInboundModel() - { - Code = inboundOrder.InboundOrderNo, - CreatorCode = inboundOrder.Creater,//娴嬭瘯 - EntDate = inboundOrder.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"), - StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), - SuppliersId = inboundOrder.SupplierId, - Type = "S", - UniqueTag = inboundOrder.Id.ToString(), - WarehouseCode = warehouse2.WarehouseCode, - Way = 1, - Details = detailModels - }; - //娴嬭瘯娉ㄩ噴 - _invokeERPService.InvokeInboundOrderApi(model); - return WebResponseContent.Instance.OK(); - } - catch (Exception ex) - { - return WebResponseContent.Instance.Error(ex.Message); - } - } + // ERPInboundDetailModel detailModel = new ERPInboundDetailModel() + // { + // ExpiryDate = stockInfo.Details.FirstOrDefault()?.EffectiveDate ?? "", + // LocationCode = warehouse.WarehouseCode, + // MaterialsCode = item.MaterielCode, + // MfgDate = stockInfo.Details.FirstOrDefault()?.ProductionDate ?? "", + // QtyCustoms = "0", + // Quantity = stockInfo.Details.Sum(x => x.StockQuantity).ToString(), + // Rack = stockInfo.LocationCode, + // ReceiptCode = inboundOrder.UpperOrderNo, + // ReceiptSerNo = item.RowNo.ToString() + // }; + // detailModels.Add(detailModel); + // } + // Dt_Warehouse? warehouse2 = warehouses.FirstOrDefault(x => x.WarehouseId == inboundOrder.WarehouseId); + // if (warehouse2 == null) + // { + // return WebResponseContent.Instance.Error($"鏈壘鍒颁粨搴撲俊鎭�"); + // } + // ERPInboundModel model = new ERPInboundModel() + // { + // Code = inboundOrder.InboundOrderNo, + // CreatorCode = inboundOrder.Creater,//娴嬭瘯 + // EntDate = inboundOrder.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"), + // StockDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + // SuppliersId = inboundOrder.SupplierId, + // Type = "S", + // UniqueTag = inboundOrder.Id.ToString(), + // WarehouseCode = warehouse2.WarehouseCode, + // Way = 1, + // Details = detailModels + // }; + // //娴嬭瘯娉ㄩ噴 + // _invokeERPService.InvokeInboundOrderApi(model); + // return WebResponseContent.Instance.OK(); + // } + // catch (Exception ex) + // { + // return WebResponseContent.Instance.Error(ex.Message); + // } + //} public int GetPalletType(Dt_Warehouse warehouse, string palletCode, Dt_MaterielInfo materielInfo) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" index 483ba11..efc8049 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" @@ -157,7 +157,6 @@ }; Dt_OutboundOrder outboundOrder = new Dt_OutboundOrder() { - OrderNo = model.OrderNo, UpperOrderNo = model.OrderNo, OrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(), OrderType = OutOrderTypeEnum.Issue.ObjToInt(), @@ -240,31 +239,37 @@ //娴嬭瘯鏋跺簱缁橢RP涓婃姤鍑哄簱瀹屾垚 if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString()) { - stockInfos = TestOutStocksUpdate(warehouse).Data as List<Dt_StockInfo> ?? new List<Dt_StockInfo>(); - List<ERPPickItemModel> eRPOutPick = new List<ERPPickItemModel>(); - for (int i = 0; i < stockInfos.Count; i++) + List<ERPPickModel> eRPPicks = new List<ERPPickModel>(); + foreach (var item in outboundOrder.Details) { - ERPPickItemModel pickItemModel = new ERPPickItemModel() + if (item.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()) continue; + stockInfos = TestOutStocksUpdate(warehouse, item).Data as List<Dt_StockInfo> ?? null; + if (stockInfos == null) continue; + List<ERPPickItemModel> eRPOutPick = new List<ERPPickItemModel>(); + for (int i = 0; i < stockInfos.Count; i++) { - Lotno = stockInfos[i].Details[0].BatchNo, - Qty = stockInfos[i].Details[0].StockQuantity.ObjToInt().ToString(), - Location = warehouse.WarehouseCode + ERPPickItemModel pickItemModel = new ERPPickItemModel() + { + Lotno = stockInfos[i].Details[0].BatchNo, + Qty = stockInfos[i].Details[0].StockQuantity.ObjToInt().ToString(), + Location = warehouse.WarehouseCode + }; + eRPOutPick.Add(pickItemModel); + } + + ERPPickModel pickModel = new ERPPickModel() + { + Rowindex = item.RowNo, + Material = item.MaterielCode, + Qty = (item.OrderQuantity.ObjToInt()).ToString(), + Dataitem = eRPOutPick }; - eRPOutPick.Add(pickItemModel); + eRPPicks.Add(pickModel); } - - ERPPickModel pickModel = new ERPPickModel() - { - Rowindex = outboundOrder.Details[0].RowNo, - Material = outboundOrder.Details[0].MaterielCode, - Qty = (outboundOrder.Details[0].OrderQuantity.ObjToInt()).ToString(), - Dataitem = eRPOutPick - }; - ERPIssueItemModel issueItemModel = new ERPIssueItemModel() { Pickcode = outboundOrder.UpperOrderNo, - PickList = new List<ERPPickModel>() { pickModel } + PickList = eRPPicks }; issueModel = new ERPIssueModel() { @@ -316,7 +321,7 @@ issueModel = new ERPIssueModel() { UniqueTag = id.ToString(), - Code = outboundOrder.OrderNo,//娴嬭瘯 + Code = outboundOrder.OrderNo, WarehouseCode = warehouse.WarehouseCode, Docremark = "", Deptno = outboundOrder.DepartmentCode, @@ -350,15 +355,15 @@ /// <param name="warehouse"></param> /// <param name="model"></param> /// <returns></returns> - public WebResponseContent TestOutStocksUpdate(Dt_Warehouse warehouse) + public WebResponseContent TestOutStocksUpdate(Dt_Warehouse warehouse,Dt_OutboundOrderDetail outboundOrderDetails) { try { //鑾峰彇鍑哄簱鍗曞簱瀛� - List<Dt_StockInfo> stockInfos = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).ToList(); + List<Dt_StockInfo> stockInfos = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).Where(x=>x.Details.Any(j=>j.MaterielCode== outboundOrderDetails.MaterielCode)).Take((int)outboundOrderDetails.OrderQuantity).ToList(); if (stockInfos.Count <= 0) { - return WebResponseContent.Instance.Error($"搴撳瓨涓嶈冻"); + return WebResponseContent.Instance.OK(); } //鏇存敼鐘舵�� stockInfos.ForEach(x => diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs" index 414f91a..44d2822 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs" @@ -233,5 +233,38 @@ } return content; } + public WebResponseContent ModifyUserPwd(string password,string userName) + { + WebResponseContent content = new WebResponseContent(); + string message = ""; + password = password?.Trim(); + try + { + if (string.IsNullOrEmpty(password)) return WebResponseContent.Instance.Error("瀵嗙爜涓嶈兘涓虹┖"); + //鑾峰彇鐢ㄦ埛 + Sys_User user = BaseDal.QueryFirst(x=>x.UserName==userName); + if (user == null) return WebResponseContent.Instance.Error("鐢ㄦ埛涓嶅瓨鍦�"); + user.UserPwd = password.EncryptDES(AppSecret.User); + BaseDal.UpdateData(user); + if (App.User.UserId== user.UserId) + { + string token = JwtHelper.IssueJwt(new TokenModelJwt() + { + UserId = user.UserId, + RoleId = user.RoleId, + UserName = user.UserName, + TenantId = user.TenantId, + }); + _cacheService.AddOrUpdate(user.UserId.ToString(), token); + } + return content.OK("鏇存敼鎴愬姛"); + } + catch (Exception ex) + { + message = ex.Message; + content.Error("鏈嶅姟鍣ㄤ簡鐐归棶棰�,璇风◢鍚庡啀璇�"); + } + return content; + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index 5238521..e6150ad 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -53,7 +53,7 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); } - if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt()) + if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt()) { return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱"); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" index 8345af4..0545c40 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" @@ -123,6 +123,17 @@ } } + /// <summary> + /// 鏇存柊瀵嗙爜 + /// </summary> + /// <param name="password">瀵嗙爜</param> + /// <param name="userName">鐢ㄦ埛鍚�</param> + /// <returns></returns> + [HttpPost,Route("ModifyUserPwd")] + public WebResponseContent ModifyUserPwd(string password, string userName) + { + return Service.ModifyUserPwd(password,userName); + } } public class SwaggerLoginRequest -- Gitblit v1.9.3