From d3470bb47c0f4627962b270f9667f420e394d0de Mon Sep 17 00:00:00 2001 From: duyongjia <adu_555@163.com> Date: 星期五, 27 十二月 2024 15:11:17 +0800 Subject: [PATCH] PDA端上传 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs | 60 ++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 34 insertions(+), 26 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs" index 98fc363..c5813fb 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs" @@ -1,4 +1,5 @@ 锘縰sing LikuServiceReference; +using LogLibrary.Log; using Newtonsoft.Json; using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; using OfficeOpenXml.FormulaParsing.Excel.Functions.Information; @@ -21,8 +22,11 @@ using WIDESEA_Core.Enums; using WIDESEA_Core.Helper; using WIDESEA_Core.Log; +using WIDESEA_DTO.Inbound; using WIDESEA_DTO.System; using WIDESEA_IBasicRepository; +using WIDESEA_IInboundService; +using WIDESEA_InboundService; using WIDESEA_IOutboundRepository; using WIDESEA_IOutboundService; using WIDESEA_ISystemRepository; @@ -45,7 +49,8 @@ private readonly IOutboundOrderDetail_LabelsBYDRepository _outboundOrderDetailLabelsByDRepository; private readonly IOutboundOrderDetailRepository _outboundOrderDetailRepository; private readonly IOutboundOrderRepository _outboundOrderRepository; - + private readonly IInboundService _inboundService; + public Sys_JobService(ISys_JobRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService,ILabelMasterRepository labelMasterRepository, IOutBoundOrderBYDRepository outBoundOrderBYDRepository, IOutboundOrderDetailBYDRepository outboundOrderDetailByDRepository, IOutboundOrderDetail_LabelsBYDRepository outboundOrderDetailLabelsByDRepository, IOutboundOrderDetailRepository outboundOrderDetailRepository, IOutboundOrderRepository outboundOrderRepository) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManage; @@ -56,6 +61,8 @@ _outboundOrderDetailLabelsByDRepository = outboundOrderDetailLabelsByDRepository; _outboundOrderRepository = outboundOrderRepository; _outboundOrderDetailRepository = outboundOrderDetailRepository; + + } /// <summary> @@ -148,8 +155,10 @@ } content = WebResponseContent.Instance.OK("鑾峰彇鏉$爜涓绘暟鎹垚鍔�", item); } - - + } + else + { + content = WebResponseContent.Instance.Error("鏍规嵁鏉$爜鍚屾鏉$爜涓绘暟鎹け璐�"); } } @@ -162,7 +171,7 @@ } /// <summary> - /// 鍘熸潗鏂欎笂鏋舵帴鍙o紝鍏ュ簱鍥炰紶 + /// 鍘熸潗鏂欎笂鏋舵帴鍙o紝鍏ュ簱鍥炰紶 LABEL _STATUS 鏉$爜鐘舵�� 02宸叉敹鏂�(鏃犻渶璐ㄦ)03 寰呰繘浠�(宸茶川妫�)锛屽苟涓旓紝QC RESULT CODE璐ㄦ鐘舵�佷负鈥�02鈥� /// </summary> /// <returns></returns> public WebResponseContent CallPutAway(PutAwayRequest putAway) @@ -173,20 +182,31 @@ LikuServiceReference.WmsStereoWhServiceClient likuClient = new LikuServiceReference.WmsStereoWhServiceClient(); string inparam = JsonConvert.SerializeObject(putAway); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAway", "璇锋眰", $"{inparam}"); string response = likuClient.putaway(inparam); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAway", "鍝嶅簲", $"{response}"); if (response != null) { PutAwayResponse res = JsonConvert.DeserializeObject<PutAwayResponse>(response); - if(res!=null&&res.MSGTX=="S") + if (res != null && res.MSGTX == "S") { content = WebResponseContent.Instance.OK("涓婃灦鍥炰紶鎴愬姛锛�"); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAway", "鍝嶅簲", $"涓婃灦鍥炰紶鎴愬姛锛�"); } + else + { + content = WebResponseContent.Instance.Error("涓婃灦鍥炰紶澶辫触锛�"); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAway", "鍝嶅簲", $"涓婃灦鍥炰紶澶辫触锛�"); + } + + } } catch (Exception ex) { content = WebResponseContent.Instance.Error(ex.Message); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAway", "寮傚父", $"{ex.Message}"); } return content; @@ -462,47 +482,35 @@ StereoServiceReference.WhStereoWebServiceClient client = new StereoServiceReference.WhStereoWebServiceClient(); string inparam = JsonConvert.SerializeObject(pickAndPost); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPickAndPost", "璇锋眰", $"{inparam}"); string response = client.pickAndPost(inparam); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPickAndPost", "鍝嶅簲", $"{response}"); if (response != null) { PickAndPostResponse res = JsonConvert.DeserializeObject<PickAndPostResponse>(response); if (res != null && res.MSGTX == "S") { content = WebResponseContent.Instance.OK("鍑哄簱鍥炰紶鎴愬姛锛�"); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPickAndPost", "鍝嶅簲", $"鍑哄簱鍥炰紶鎴愬姛锛�"); } + } + else + { + content = WebResponseContent.Instance.Error("鍑哄簱鍥炰紶澶辫触锛�"); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPickAndPost", "鍝嶅簲", $"鍑哄簱鍥炰紶澶辫触锛�"); } } catch (Exception ex) { content = WebResponseContent.Instance.Error(ex.Message); + new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPickAndPost", "寮傚父", $"{ex.Message}"); } return content; } - - /// <summary> - /// 绔嬪簱閫�鍥炰俊鎭帴鍙o紝渚涗笂娓哥郴缁熻皟鐢紝绔嬪簱鐢熸垚閫�璐т换鍔� - /// </summary> - /// <returns></returns> - public ReturnInventoryResponse returnInventory(ReturnInventoryRequest inventoryRequest) - { - ReturnInventoryResponse returnInventoryResponse = new ReturnInventoryResponse(); - try - { - //todo:WMS鐢熸垚閫�璐т换鍔� - - } - catch (Exception) - { - - - } - return returnInventoryResponse; - - } /// <summary> /// 绔嬪簱WMS搴撳瓨淇℃伅鎺ュ彛锛屼緵涓婃父绯荤粺璋冪敤 -- Gitblit v1.9.3