| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | |
| | | 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", "ååº", $"䏿¶åä¼ æåï¼"); |
| | |
| | | |
| | | 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", "ååº", $"䏿¶åä¼ æåï¼"); |
| | |
| | | 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("\" ", "\""); |
| | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | |
| | | 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", "ååº", $"åºåºåä¼ æåï¼"); |