ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_JobService.cs
@@ -22,6 +22,7 @@
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.Log;
using WIDESEA_Core.LogHelper;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.System;
using WIDESEA_IBasicRepository;
@@ -94,11 +95,14 @@
                           Dt_LabelMaster labMaster =  _labelMasterRepository.QueryFirst(x=>x.LABEL_NO == item.LABEL_NO);
                            if (labMaster != null)//更新状态
                            {
                                labMaster.RECEIPT_NO = item.RECEIPT_NO;
                                labMaster.QC_RESULT_CODE = item.QC_RESULT_CODE;
                                labMaster.LABEL_STATUS = item.LABEL_STATUS;
                                _labelMasterRepository.UpdateData(labMaster);
                            }
                            else
                            {
                                item.WH_NUMBER = AppSettings.Configuration["SYSNO"];
                                _labelMasterRepository.AddData(item);
                            }
                        }
@@ -183,12 +187,14 @@
                
                string inparam = JsonConvert.SerializeObject(putAway);
                new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPutAway", "请求", $"{inparam}");
                //Logger.Write_Log("System/test_in", "", "inparam =  " + inparam);
                string response = likuClient.putaway(inparam);
                //Logger.Write_Log("System/test_in", "", "response =  " + response);
                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.MSGTY == "S")
                    {
                        content = WebResponseContent.Instance.OK("上架回传成功");
                        new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPutAway", "响应", $"上架回传成功!");
@@ -227,11 +233,13 @@
                string inparam = JsonConvert.SerializeObject(putAwayReturn);
                new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPutAwayReturn", "请求", $"{inparam}");
                //Logger.Write_Log("System/test_re", "", "inparam = "+ inparam);
                string response = likuClient.putAwayReturn(inparam);
                //Logger.Write_Log("System/test_re", "", "response = " + response);
                if (response != null)
                {
                    PutAwayReturnResponse res = JsonConvert.DeserializeObject<PutAwayReturnResponse>(response);
                    if (res != null && res.MSGTX == "S")
                    if (res != null && res.MSGTY == "S")
                    {
                        content = WebResponseContent.Instance.OK("上架回传成功!");
                        new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPutAwayReturn", "响应", $"上架回传成功!");
@@ -267,12 +275,18 @@
                outStoreOrder.WERKS = AppSettings.Configuration["WERKS"];
                outStoreOrder.WH_NUMBER = AppSettings.Configuration["SYSNO"];
                string inparam = JsonConvert.SerializeObject(outStoreOrder);
                //string response = client.selectOutStoreOrder(inparam);
                string response = "{\r\n    \"MSGTY\": \"S\",\r\n    \"DATA\": \"[{REQUIREMENT_NO=XAXQGX25012005354, WERKS=GX25, WH_NUMBER=null, SYSNOD=G30, BUSINESS_CODE=00, BUSINESS_NAME=47, LGORT=0030, STATION=null, MO_NO=null, SAP_OUT_NO=null, RECEIVE_LGORT=W001, OVERSTEP_REQ_FLAG=0, SPLIT=null, STATUS=01, CREATE_PERSON=66694:宋子超, CREATE_DATE=2024-12-18 11:36:17, ITEMS=[{REQUIREMENT_ITEM_NO=1, MATNR=12825222-00, BATCH=null, QTY=10.0, GEAR=null, PI_NO=null, LABELS=[]}]}, {REQUIREMENT_NO=XAXQGX25012005353, WERKS=GX25, WH_NUMBER=null, SYSNOD=G30, BUSINESS_CODE=00, BUSINESS_NAME=47, LGORT=0030, STATION=null, MO_NO=null, SAP_OUT_NO=null, RECEIVE_LGORT=W001, OVERSTEP_REQ_FLAG=0, SPLIT=null, STATUS=01, CREATE_PERSON=66694:宋子超, CREATE_DATE=2024-12-18 11:35:22, ITEMS=[{REQUIREMENT_ITEM_NO=1, MATNR=12825222-00, BATCH=null, QTY=10.0, GEAR=null, PI_NO=null, LABELS=[]}]}]\",\r\n    \"MSGTX\": \"success\"\r\n}";
                string response = client.selectOutStoreOrder(inparam);
                //string response = "{\r\n    \"MSGTY\": \"S\",\r\n    \"DATA\": \"[{REQUIREMENT_NO=XAXQGX25012005354, WERKS=GX25, WH_NUMBER=null, SYSNOD=G30, BUSINESS_CODE=00, BUSINESS_NAME=47, LGORT=0030, STATION=null, MO_NO=null, SAP_OUT_NO=null, RECEIVE_LGORT=W001, OVERSTEP_REQ_FLAG=0, SPLIT=null, STATUS=01, CREATE_PERSON=66694:宋子超, CREATE_DATE=2024-12-18 11:36:17, ITEMS=[{REQUIREMENT_ITEM_NO=1, MATNR=12825222-00, BATCH=null, QTY=10.0, GEAR=null, PI_NO=null, LABELS=[]}]}, {REQUIREMENT_NO=XAXQGX25012005353, WERKS=GX25, WH_NUMBER=null, SYSNOD=G30, BUSINESS_CODE=00, BUSINESS_NAME=47, LGORT=0030, STATION=null, MO_NO=null, SAP_OUT_NO=null, RECEIVE_LGORT=W001, OVERSTEP_REQ_FLAG=0, SPLIT=null, STATUS=01, CREATE_PERSON=66694:宋子超, CREATE_DATE=2024-12-18 11:35:22, ITEMS=[{REQUIREMENT_ITEM_NO=1, MATNR=12825222-00, BATCH=null, QTY=10.0, GEAR=null, PI_NO=null, LABELS=[]}]}]\",\r\n    \"MSGTX\": \"success\"\r\n}";
                if (response != null)
                {
                    SelectOutStoreOrderResponse res = JsonConvert.DeserializeObject<SelectOutStoreOrderResponse>(response);
                    if (res != null && res.MSGTY == "S"&&!string.IsNullOrEmpty(res.DATA))
                    if (res != null && res.MSGTY == "S")
                    {
                        if (string.IsNullOrEmpty(res.DATA) || res.DATA == "[]")
                        {
                            content = WebResponseContent.Instance.Error("出库单数据为空");
                        }
                        else
                    {
                        string data = stringToJson(res.DATA);
                        string newdata = data.Replace("},\"", "},").Replace("\" ", "\"");
@@ -467,6 +481,7 @@
                    
                }
                }
            }
            catch (Exception ex)
@@ -487,16 +502,18 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                StereoServiceReference.WhStereoWebServiceClient client = new StereoServiceReference.WhStereoWebServiceClient();
                LikuServiceReference.WmsStereoWhServiceClient likuClient = new LikuServiceReference.WmsStereoWhServiceClient();
                string inparam = JsonConvert.SerializeObject(pickAndPost);
                //Logger.Write_Log("System/test_out", "", "inparam= "+ inparam);
                new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPickAndPost", "请求", $"{inparam}");
                string response = client.pickAndPost(inparam);
                string response = likuClient.pickAndPost(inparam);
                new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPickAndPost", "响应", $"{response}");
                //Logger.Write_Log("System/test_out", "", "response= " + response);
                if (response != null)
                {
                    PickAndPostResponse res = JsonConvert.DeserializeObject<PickAndPostResponse>(response);
                    if (res != null && res.MSGTX == "S")
                    if (res != null && res.MSGTY == "S")
                    {
                        content = WebResponseContent.Instance.OK("出库回传成功!");
                        new LogFactory().GetLog("BYD_WMS接口").InfoFormat(true, "CallPickAndPost", "响应", $"出库回传成功!");