diff --git a/SlnMesnac.RfidUpload.Business/CsbHandleBusiness.cs b/SlnMesnac.RfidUpload.Business/CsbHandleBusiness.cs new file mode 100644 index 0000000..a11cc8d --- /dev/null +++ b/SlnMesnac.RfidUpload.Business/CsbHandleBusiness.cs @@ -0,0 +1,572 @@ +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; +using SlnMesnac.RfidUpload.Common; +using SlnMesnac.RfidUpload.Model.config; +using SlnMesnac.RfidUpload.TouchSocket; +using System; +using System.Collections.Generic; +using SlnMesnac.RfidUpload.Model; +using SlnMesnac.RfidUpload.NLog; +using System.Reflection.Emit; +using System.Security.Cryptography; +using SlnMesnac.RfidUpload.Model.apiParam; + +#region << 版 本 注 释 >> +/*-------------------------------------------------------------------- +* 版权所有 (c) 2024 WenJY 保留所有权利。 +* CLR版本:4.0.30319.42000 +* 机器名称:T14-GEN3-7895 +* 命名空间:SlnMesnac.RfidUpload.Business +* 唯一标识:1326b9fc-9ad1-4bd7-883a-32a01ab38cb1 +* +* 创建者:WenJY +* 电子邮箱: +* 创建时间:2024-12-06 14:21:17 +* 版本:V1.0.0 +* 描述: +* +*-------------------------------------------------------------------- +* 修改人: +* 时间: +* 修改说明: +* +* 版本:V1.0.0 +*--------------------------------------------------------------------*/ +#endregion << 版 本 注 释 >> +namespace SlnMesnac.RfidUpload.Business +{ + public class CsbHandleBusiness + { + + private static readonly Lazy _lazy = new Lazy(() => new CsbHandleBusiness()); + + public static CsbHandleBusiness Instance + { + get + { + return _lazy.Value; + } + } + private CsbHandleBusiness() { } + + private AppConfig appConfig = AppConfig.Instance; + private WebApiClientApp webApiClientApp = WebApiClientApp.Instance; + private LogHelper logHelper = LogHelper.Instance; + private JsonChange jsonChange = JsonChange.Instance; + private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/App.InI"); + + /// + /// 容器指定封发扫描接口 + /// + public void getScanInfoAppointRfidByCSB(string rqtm) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 101, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["containerRegisterQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("ContainerRegisterQuery", "opOrgCode"), + ["opOrgName"] = iNIFile.IniReadValue("ContainerRegisterQuery", "opOrgName"), + ["userCode"] = iNIFile.IniReadValue("ContainerRegisterQuery", "userCode"), + ["userName"] = iNIFile.IniReadValue("ContainerRegisterQuery", "userName"), + ["provice"] = iNIFile.IniReadValue("ContainerRegisterQuery", "provice"), + ["rqzlmc"] = iNIFile.IniReadValue("ContainerRegisterQuery", "rqzlmc"), + ["zbid"] = iNIFile.IniReadValue("ContainerRegisterQuery", "zbid"), + ["destinationOrgName"] = iNIFile.IniReadValue("ContainerRegisterQuery", "destinationOrgName"), + ["destinationOrgCode"] = iNIFile.IniReadValue("ContainerRegisterQuery", "destinationOrgCode"), + ["rqzl"] = iNIFile.IniReadValue("ContainerRegisterQuery", "rqzl"), + ["rqxh"] = iNIFile.IniReadValue("ContainerRegisterQuery", "rqxh"), + ["rqxhmc"] = iNIFile.IniReadValue("ContainerRegisterQuery", "rqxhmc"), + ["rqtm"] = rqtm, + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器指定封发扫描接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"容器指定封发扫描接口处理异常:{ex.Message}", ex); + } + } + + /// + /// 容器入库接口 + /// + public CsbResult scanAnyContainerCodeByCsb(string rqtm) + { + CsbResult res = new CsbResult(); + try + { + + JObject jsonObject = new JObject + { + ["code"] = 102, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["batchOpenQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("batchOpenQuery", "opOrgCode"), + ["userCode"] = iNIFile.IniReadValue("batchOpenQuery", "userCode"), + ["userName"] = iNIFile.IniReadValue("batchOpenQuery", "userName"), + ["provice"] = iNIFile.IniReadValue("batchOpenQuery", "provice"), + ["rqtm"] = rqtm, + ["devicedId"] = iNIFile.IniReadValue("batchOpenQuery", "zbid"), + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器入库接口返回信息:{jsonChange.ModeToJson(res)}"); + return res; + } + catch (Exception ex) + { + logHelper.Error($"容器入库接口处理异常:{ex.Message}", ex); + res.status = "500"; + res.msg = $"新容器入库接口处理异常:{ex.Message}"; + return res; + } + } + + /// + /// 新容器入库-调拨单号验证接口 + /// + public CsbResult containerStorageQueryByCsb(string dbbh,string rqtmStart,string rqtmEnd) + { + CsbResult res = new CsbResult(); + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["newContainerStorageQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("newContainerStorageQuery", "opOrgCode"), + ["dbbh"] = dbbh, + ["devicedId"] = iNIFile.IniReadValue("newContainerStorageQuery", "userName"), + ["rqtmSerialList"] = new JObject + { + ["rqtmStart"] = rqtmStart, + ["rqtmEnd"] = rqtmEnd, + }, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + res = JsonConvert.DeserializeObject(str); + logHelper.Info($"新容器入库-调拨单号验证接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"新容器入库-调拨单号验证接口处理异常:{ex.Message}", ex); + res.status = "500"; + res.msg = $"新容器入库-调拨单号验证接口处理异常:{ex.Message}"; + } + + return res; + } + + /// + /// 新容器入库-按送货单接收容器接口 + /// + public void containerStorageBatchQueryByCsb(string trackNo,string batchNo,string rqtmList,string rqtmEnd) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["newContainerStorageBatchQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("newContainerStorageBatchQuery", "opOrgCode"), + ["trackNo"] = trackNo, + ["devicedId"] = iNIFile.IniReadValue("newContainerStorageBatchQuery", "userName"), + ["batchNo"] = batchNo, + ["rqtmList"] = rqtmList, + ["rqtmEnd"] = rqtmEnd, + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"新容器入库-按送货单接收容器接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"新容器入库-按送货单接收容器接口处理异常:{ex.Message}", ex); + } + } + + /// + /// 6.6.新容器入库-按送货单反馈接收结果接口 + /// + public void receContainerStorageByCsb(string trackNo,string msgType) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["newContainerStorageQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("newContainerStorageQuery", "opOrgCode"), + ["trackNo"] = trackNo, + ["msgType"] = msgType, + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"新容器入库-按送货单反馈接收结果接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"新容器入库-按送货单反馈接收结果接口处理异常:{ex.Message}", ex); + } + } + /// + /// 容器封发-获取调拨单和封发计划 + /// + public CsbResult transferOrderFfjhByCsb(string jsdw,string beginDate,string endDate) + { + CsbResult res = new CsbResult(); + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjStockTransferOrderQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjStockTransferOrderQuery", "opOrgCode"), + ["devicedId"] = iNIFile.IniReadValue("TdjStockTransferOrderQuery", "devicedId"), + ["jsdw"] = jsdw, + ["beginDate"] = beginDate, + ["endDate"] = endDate, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器封发-获取调拨单和封发计划接口返回信息:{jsonChange.ModeToJson(res)}"); + return res; + } + catch (Exception ex) + { + logHelper.Error($"容器封发-获取调拨单和封发计划接口处理异常:{ex.Message}", ex); + res.status = "500"; + res.msg = $"容器封发-获取调拨单和封发计划接口处理异常:{ex.Message}"; + return res; + } + } + + /// + /// 容器封发-验证封发计划 + /// + public CsbResult transferOrderFfjhCheckByCsb(string ffjhNo,string ffjhscrq) + { + CsbResult res = new CsbResult(); + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjStockTransferOrderffjhCheckQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjStockTransferOrderffjhCheckQuery", "opOrgCode"), + ["devicedId"] = iNIFile.IniReadValue("TdjStockTransferOrderffjhCheckQuery", "devicedId"), + ["ffjhNo"] = ffjhNo, + ["ffjhscrq"] = ffjhscrq, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器封发-验证封发计划接口返回信息:{jsonChange.ModeToJson(res)}"); + return res; + } + catch (Exception ex) + { + logHelper.Error($"容器封发-验证封发计划接口处理异常:{ex.Message}", ex); + res.msg = "500"; + res.msg = $"容器封发-验证封发计划接口处理异常:{ex.Message}"; + return res; + } + } + + /// + /// 容器封发-接收容器条码 + /// + public CsbResult containerScanSealByCsb(string ffjhNo,string opBatch,string ffjhscrq,string batchNo,string rqtmList) + { + CsbResult res = new CsbResult(); + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjContainerScanSealQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjContainerScanSealQuery", "opOrgCode"), + ["devicedId"] = iNIFile.IniReadValue("TdjContainerScanSealQuery", "devicedId"), + ["shopCode"] = iNIFile.IniReadValue("TdjContainerScanSealQuery", "shopCode"), + ["ffjhNo"] = ffjhNo, + ["turnFlag"] = 1, + ["opBatch"] = opBatch, + ["ffjhscrq"] = ffjhscrq, + ["batchNo"] = batchNo, + ["rqtmList"] = rqtmList, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器封发-接收容器条码接口返回信息:{jsonChange.ModeToJson(res)}"); + return res; + } + catch (Exception ex) + { + logHelper.Error($"容器封发-接收容器条码接口处理异常:{ex.Message}", ex); + res.status = "500"; + res.msg = $"容器封发-接收容器条码接口处理异常:{ex.Message}"; + return res; + } + } + + /// + /// 容器封发-反馈接收结果 + /// + public CsbResult containerScanSealResultByCsb(string ffjhNo,string opBatch) + { + CsbResult res = new CsbResult(); + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjContainerScanSealQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjContainerScanSealQuery", "opOrgCode"), + ["ffjhNo"] = ffjhNo, + ["opBatch"] = opBatch, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器封发-反馈接收结果接口返回信息:{jsonChange.ModeToJson(res)}"); + return res; + } + catch (Exception ex) + { + logHelper.Error($"容器封发-反馈接收结果接口处理异常:{ex.Message}", ex); + res.msg = $"容器封发-反馈接收结果接口处理异常:{ex.Message}"; + res.status = "500"; + return res; + } + } + + /// + /// 容器直连配发-获取邮路卸交站 + /// + public void findStationSequenceByCsb(string ffjhNo,string opBatch) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjContainerAllotQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "opOrgCode"), + ["devicedId"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "devicedId"), + ["shopCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "shopCode"), + ["routeCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "routeCode"), + ["ffjhNo"] = ffjhNo, + ["opBatch"] = opBatch, + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器直连配发-获取邮路卸交站接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"容器直连配发-获取邮路卸交站接口处理异常:{ex.Message}", ex); + } + } + + /// + /// 容器直连配发-校验发运计划 + /// + public void tranPlanCheckByCsb(string ffjhNo,string opBatch,string stationOrgCode,string stationOrgName) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjContainerAllotQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "opOrgCode"), + ["devicedId"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "devicedId"), + ["shopCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "shopCode"), + ["routeCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "routeCode"), + ["ffjhNo"] = ffjhNo, + ["opBatch"] = opBatch, + ["areaCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "shopName"), + ["shopName"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "shopName"), + ["stationOrgCode"] = stationOrgCode, + ["stationOrgName"] = stationOrgName, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器直连配发-校验发运计划接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"容器直连配发-校验发运计划接口处理异常:{ex.Message}", ex); + } + } + + /// + /// 容器直连配发-开始配发 + /// + public void containerAllotByCsb(string ffjhNo,string opBatch) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjContainerAllotQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "opOrgCode"), + ["devicedId"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "devicedId"), + ["shopCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "shopCode"), + ["ffjhNo"] = ffjhNo, + ["opBatch"] = opBatch, + ["userCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "userCode"), + ["userName"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "userName"), + ["groupCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "groupCode"), + ["groupName"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "groupName"), + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器直连配发-开始配发接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"容器直连配发-开始配发接口处理异常:{ex.Message}", ex); + } + } + + /// + /// 容器直连配发-反馈接收结果 + /// + public void containerAllotResultByCsb(string ffjhNo,string opBatch) + { + try + { + JObject jsonObject = new JObject + { + ["code"] = 103, + ["requestURL"] = appConfig.requestURL, + ["sysCode"] = appConfig.sysCode, + ["password"] = appConfig.password, + ["ak"] = appConfig.ak, + ["sk"] = appConfig.sk, + ["TdjContainerAllotQuery"] = new JObject + { + ["opOrgCode"] = iNIFile.IniReadValue("TdjContainerAllotQuery", "opOrgCode"), + ["ffjhNo"] = ffjhNo, + ["opBatch"] = opBatch, + + } + }; + string jsonString = jsonObject.ToString(); + var str = webApiClientApp.UploadAsync(jsonString); + CsbResult res = JsonConvert.DeserializeObject(str); + logHelper.Info($"容器直连配发-反馈接收结果接口返回信息:{jsonChange.ModeToJson(res)}"); + } + catch (Exception ex) + { + logHelper.Error($"容器直连配发-反馈接收结果接口处理异常:{ex.Message}", ex); + } + } + } +} diff --git a/SlnMesnac.RfidUpload.Business/SlnMesnac.RfidUpload.Business.csproj b/SlnMesnac.RfidUpload.Business/SlnMesnac.RfidUpload.Business.csproj index d3e3651..19c7c0c 100644 --- a/SlnMesnac.RfidUpload.Business/SlnMesnac.RfidUpload.Business.csproj +++ b/SlnMesnac.RfidUpload.Business/SlnMesnac.RfidUpload.Business.csproj @@ -8,6 +8,7 @@ + diff --git a/SlnMesnac.RfidUpload.Model/ContainerInbound.cs b/SlnMesnac.RfidUpload.Model/ContainerInbound.cs index 4e63465..a85b18f 100644 --- a/SlnMesnac.RfidUpload.Model/ContainerInbound.cs +++ b/SlnMesnac.RfidUpload.Model/ContainerInbound.cs @@ -5,41 +5,6 @@ namespace SlnMesnac.RfidUpload.Model /// public class ContainerInbound { - ///// - ///// 入参1,请求报文到消息头 - ///// - //public string messageHeader { get; set; } - - ///// - ///// 入参2,将下列参数封装到batchOpenQuery - ///// - //public string batchOpenQuery { get; set; } - - ///// - ///// 机构代码 - ///// - //public string opOrgCode { get; set; } - - ///// - ///// 登录人代码 - ///// - //public string userCode { get; set; } - - ///// - ///// 登录人名称 - ///// - //public string userName { get; set; } - - ///// - ///// 省份代码 - ///// - //public string province { get; set; } - - ///// - ///// 容器条码 - ///// - //public string rqtm { get; set; } - public int code { get; set; } public string requestURL { get; set; } diff --git a/SlnMesnac.RfidUpload.Model/SlnMesnac.RfidUpload.Model.csproj b/SlnMesnac.RfidUpload.Model/SlnMesnac.RfidUpload.Model.csproj index 6f5b237..bec5699 100644 --- a/SlnMesnac.RfidUpload.Model/SlnMesnac.RfidUpload.Model.csproj +++ b/SlnMesnac.RfidUpload.Model/SlnMesnac.RfidUpload.Model.csproj @@ -7,6 +7,7 @@ + diff --git a/SlnMesnac.RfidUpload.Model/TransferOrderInfo.cs b/SlnMesnac.RfidUpload.Model/TransferOrderInfo.cs new file mode 100644 index 0000000..3845a6c --- /dev/null +++ b/SlnMesnac.RfidUpload.Model/TransferOrderInfo.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; + +#region << 版 本 注 释 >> +/*-------------------------------------------------------------------- +* 版权所有 (c) 2024 WenJY 保留所有权利。 +* CLR版本:4.0.30319.42000 +* 机器名称:T14-GEN3-7895 +* 命名空间:SlnMesnac.RfidUpload.Model +* 唯一标识:9dfe9f14-5520-4242-9cfc-25620e6632e5 +* +* 创建者:WenJY +* 电子邮箱: +* 创建时间:2024-12-06 9:53:12 +* 版本:V1.0.0 +* 描述: +* +*-------------------------------------------------------------------- +* 修改人: +* 时间: +* 修改说明: +* +* 版本:V1.0.0 +*--------------------------------------------------------------------*/ +#endregion << 版 本 注 释 >> +namespace SlnMesnac.RfidUpload.Model +{ + /// + /// 封发计划信息 + /// + public class TransferOrderInfo + { + public string dbdh { get; set; } + public string jsdw{get;set;} + public string ffjhNo{get;set;} + public string rqzlbm{get;set;} + public string rqzlmc{get;set;} + public string rqxhbm{get;set;} + public string rqxhmc{get;set;} + public string kdbsl{get;set;} + public string ffjhscrq { get;set;} + } +} diff --git a/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs b/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs new file mode 100644 index 0000000..af0c05f --- /dev/null +++ b/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Text; + +#region << 版 本 注 释 >> +/*-------------------------------------------------------------------- +* 版权所有 (c) 2024 WenJY 保留所有权利。 +* CLR版本:4.0.30319.42000 +* 机器名称:T14-GEN3-7895 +* 命名空间:SlnMesnac.RfidUpload.Model.apiParam +* 唯一标识:24151d41-1e82-4326-bab7-94d9a9655cbd +* +* 创建者:WenJY +* 电子邮箱: +* 创建时间:2024-12-06 16:37:58 +* 版本:V1.0.0 +* 描述: +* +*-------------------------------------------------------------------- +* 修改人: +* 时间: +* 修改说明: +* +* 版本:V1.0.0 +*--------------------------------------------------------------------*/ +#endregion << 版 本 注 释 >> +namespace SlnMesnac.RfidUpload.Model.apiParam +{ + public class CsbResult + { + public string status { get; set; } + + public string msg { get; set; } + + public List @object { get; set; } + } +} diff --git a/SlnMesnac.RfidUpload.TouchSocket/WebApiClientApp.cs b/SlnMesnac.RfidUpload.TouchSocket/WebApiClientApp.cs index 07b429f..8edd8dd 100644 --- a/SlnMesnac.RfidUpload.TouchSocket/WebApiClientApp.cs +++ b/SlnMesnac.RfidUpload.TouchSocket/WebApiClientApp.cs @@ -75,6 +75,25 @@ namespace SlnMesnac.RfidUpload.TouchSocket return result; } + public string UploadAsync(string paramStr) + { + string result = string.Empty; + try + { + + logger.Info($"请求CSB接口调用服务,参数:{paramStr}"); + result = Post("http://127.0.0.1:9090/api/uploadCsb", paramStr); + logger.Info($"CSB接口返回信息:{result}"); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + result = e.Message; + logger.Info($"请求CSB接口调用服务异常:{e.Message}"); + } + return result; + } + public static string Post(string url, object postData) { HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); diff --git a/SlnMesnac.RfidUpload.UI/MainWindow.xaml b/SlnMesnac.RfidUpload.UI/MainWindow.xaml index fde09cd..5080da6 100644 --- a/SlnMesnac.RfidUpload.UI/MainWindow.xaml +++ b/SlnMesnac.RfidUpload.UI/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SlnMesnac.RfidUpload.UI" xmlns:local1="clr-namespace:SlnMesnac.RfidUpload.UI.converter" - mc:Ignorable="d" + mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Title="海威物联RFID移动盘点系统" Height="766" Width="1268" WindowState="Maximized" WindowStyle="SingleBorderWindow" > @@ -13,7 +13,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -59,9 +59,12 @@