From 9a0acba23c5b5095be2a89b8ca190fe5202c2ea6 Mon Sep 17 00:00:00 2001
From: duyongjia <adu_555@163.com>
Date: 星期日, 29 十二月 2024 15:58:45 +0800
Subject: [PATCH] 最新修改

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs |  115 +++++++++++++++++++++------------------------------------
 1 files changed, 43 insertions(+), 72 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..2c3506a 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;
 
@@ -206,13 +226,20 @@
                 LikuServiceReference.WmsStereoWhServiceClient likuClient = new LikuServiceReference.WmsStereoWhServiceClient();
 
                 string inparam = JsonConvert.SerializeObject(putAwayReturn);
+                new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAwayReturn", "璇锋眰", $"{inparam}");
                 string response = likuClient.putAwayReturn(inparam);
                 if (response != null)
                 {
                     PutAwayReturnResponse res = JsonConvert.DeserializeObject<PutAwayReturnResponse>(response);
                     if (res != null && res.MSGTX == "S")
                     {
-                        content = WebResponseContent.Instance.OK("浣欐枡鍥炲簱鍥炰紶鎴愬姛锛�");
+                        content = WebResponseContent.Instance.OK("涓婃灦鍥炰紶鎴愬姛锛�");
+                        new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAwayReturn", "鍝嶅簲", $"涓婃灦鍥炰紶鎴愬姛锛�");
+                    }
+                    else
+                    {
+                        content = WebResponseContent.Instance.Error("涓婃灦鍥炰紶澶辫触锛�");
+                        new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAwayReturn", "鍝嶅簲", $"涓婃灦鍥炰紶澶辫触锛�");
                     }
                 }
 
@@ -220,6 +247,7 @@
             catch (Exception ex)
             {
                 content = WebResponseContent.Instance.Error(ex.Message);
+                new LogFactory().GetLog("BYD_WMS鎺ュ彛").InfoFormat(true, "CallPutAwayReturn", "寮傚父", $"{ex.Message}");
             }
             return content;
 
@@ -462,91 +490,34 @@
                 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搴撳瓨淇℃伅鎺ュ彛锛屼緵涓婃父绯荤粺璋冪敤
-        /// </summary>
-        /// <param name="inventoryQueryRequest"></param>
-        /// <returns></returns>
-        public InventoryQueryResponse  InventoryQuery(InventoryQueryRequest inventoryQueryRequest)
-        {
-            InventoryQueryResponse inventoryQueryResponse = new InventoryQueryResponse();
-            try
-            {
-                //todo:WMS鏌ヨ瀹炴椂搴撳瓨
-
-            }
-            catch (Exception)
-            {
-
-
-            }
-            return inventoryQueryResponse;
-
-        }
-
-        /// <summary>
-        /// 绔嬪簱WMS鍐荤粨/瑙e喕淇℃伅鎺ュ彛锛屼緵涓婃父绯荤粺璋冪敤
-        /// </summary>
-        /// <param name="freezeByCustomerResponse"></param>
-        /// <returns></returns>
-        public freezeByCustomerResponse freezeByCustomer(freezeByCustomerRequest freezeRequest)
-        {
-            freezeByCustomerResponse freezeResponse = new freezeByCustomerResponse();
-            try
-            {
-                //todo:WMS鏌ヨ鍐荤粨瑙e喕淇℃伅
-
-            }
-            catch (Exception)
-            {
-
-
-            }
-            return freezeResponse;
-
-        }
 
 
 

--
Gitblit v1.9.3