hudong
2025-05-30 1483d0e74b4dde9eb22e022276390bfa1f24495b
wsdl文件替换 大屏接口开发
2个文件已添加
14个文件已修改
2381 ■■■■ 已修改文件
HH.WCS.Mobox3.pinggao.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ApiModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/WmsSapController.cs 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/WmsSpaHelper.cs 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ZCCM_NC.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ZSCM2_CBZX.cs 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ZSCM2_CXPZ.cs 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ZSCM2_SCFL.cs 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ZSCM2_SCFLJHW.cs 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ZSCM_WC.cs 279 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
core/WMSCore.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
enc_temp_folder/d910702ef84a263576574cba1cbe589/WebService.asmx.cs 841 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/CntrItemRel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/DAPING.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/SapRoot.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
process/TaskProcess.cs 435 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HH.WCS.Mobox3.pinggao.csproj
@@ -189,6 +189,7 @@
    <Compile Include="HH\WCS\Mobox3\pinggao\models\SapRo1ot.cs" />
    <Compile Include="models\BaseModel.cs" />
    <Compile Include="models\Area.cs" />
    <Compile Include="models\DAPING.cs" />
    <Compile Include="models\MaterialVoucher.cs" />
    <Compile Include="models\OutboundRecord.cs" />
    <Compile Include="models\SapReturn.cs" />
api/ApiModel.cs
@@ -340,6 +340,7 @@
        /// </summary>
        public class MPSorting
        {
            public string cntr_type { get; set; }
            public string cntr_code { get; set; }
            public string start { get; set; }
         
@@ -370,6 +371,7 @@
        public class FJSorting
        {
            public string cntr_code { get; set; }//容器
            public string cntr_type { get; set; }//容器
            public string start { get; set; }//容器
            public bool IsHK { get; set; }//容器
api/WmsSapController.cs
@@ -17,11 +17,156 @@
using static HH.WCS.Mobox3.pinggao.api.OtherModel;
using static HH.WCS.Mobox3.pinggao.api.ApibackModel;
using HH.WCS.Mobox3.pinggao.models;
using static HH.WCS.Mobox3.pinggao.models.DAPING;
using HH.WCS.Mobox3.pinggao.util;
using SqlSugar;
namespace HH.WCS.Mobox3.pinggao.api
{
    public class WmsSapController : System.Web.Http.ApiController
    {
        #region 大屏数据接口
        /// <summary>
        /// 大屏数据
        /// </summary>
        /// <returns></returns>
        public BarChartResponse InOut(){
            var response = new BarChartResponse
            {
                OutboundData = new List<BarChartData>
                {
                },
                InboundData = new List<BarChartData>
                {
                },
                CKNData = new List<NB> { },
                ListTask = new List<Tasks> { },
                Inttbounddjcount = 0,
                Outtbounddjcount=0,
                IntodayCount = 0,
                OuttodayCount = 0
            };
            var db = new SqlHelper<object>().GetInstance();
            #region 出库
            // 1. 获取当前年份(或指定年份)
            int year = DateTime.Now.Year; // 如2023
            // 2. 生成1-12月所有月份(确保完整性)
            var allMonths = Enumerable.Range(1, 12)
                .Select(m => new DateTime(year, m, 1).ToString("MM"))
                .ToList();
            //var allMonths = Enumerable.Range(1, 12).ToList();
            // 3. 查询数据库获取出库数据(按月份分组统计)
            var outboundCounts = db.Queryable<WCSTask>()
                .Where(a => a.S_TYPE.Contains("出库") &&a.N_B_STATE==3&& a.T_END_TIME != null&&a.T_END_TIME.Value.Year== year)
                .ToList() // 加载到内存
                .GroupBy(a => a.T_END_TIME.Value.ToString("MM")) // 按月份分组
                .ToDictionary(g => g.Key, g => g.Count()); // 转为字典(月份:记录数)
            // 3. 构建完整1-12月数据(缺失月份补0)
            var outboundData = allMonths.Select(month => new BarChartData
            {
                Month = int.Parse(month),
                Count = outboundCounts.TryGetValue(month, out var count) ? count : 0
            }).ToList();
            response.OutboundData = outboundData;
            #endregion
            #region 入库
            var inttboundCounts = db.Queryable<WCSTask>()
           .Where(a => a.S_TYPE.Contains("入库") && a.N_B_STATE == 3 && a.T_END_TIME != null && a.T_END_TIME.Value.Year == year)
           .ToList() // 加载到内存
           .GroupBy(a => a.T_END_TIME.Value.ToString("MM")) // 按月份分组
           .ToDictionary(g => g.Key, g => g.Count()); // 转为字典(月份:记录数)
            var intboundData = allMonths.Select(month => new BarChartData
            {
                Month = int.Parse(month),
                Count = inttboundCounts.TryGetValue(month, out var count) ? count : 0
            }).ToList();
            response.InboundData = intboundData;
            #endregion
            #region 未完成单据量
            var Inttbounddjcount = db.Queryable<TN_Inbound_Order>().Where(s=>s.N_B_STATE==0).Count();
            var Outtbounddjcount = db.Queryable<TN_Ll_Order>().Where(s=>s.N_B_STATE==0).Count();
            var today = DateTime.Today;
            var tomorrow = today.AddDays(1);
            var IntodayCount = db.Queryable<WCSTask>()
                .Where(s => s.N_B_STATE == 3 && s.S_TYPE.Contains("入库")&&
                            s.T_END_TIME >= today &&
                            s.T_END_TIME < tomorrow).Count();
            var OuttodayCount = db.Queryable<WCSTask>()
            .Where(s => s.N_B_STATE == 3 && s.S_TYPE.Contains("出库") &&
                        s.T_END_TIME >= today &&
                        s.T_END_TIME < tomorrow).Count();
            response.Inttbounddjcount = Inttbounddjcount;
            response.Outtbounddjcount = Outtbounddjcount;
            response.OuttodayCount = OuttodayCount;
            response.IntodayCount = IntodayCount;
            #endregion
            #region 任务列表
            var tasklist = db.Queryable<WCSTask>().Where(s => s.N_B_STATE != 2).Select(s => new { s.S_CNTR_CODE, s.S_START_AREA, s.S_END_AREA, s.S_B_STATE }).Take(5).ToList() ;
            var tasksList = tasklist.Select(t => new Tasks
            {
                S_CNTR_CODE = t.S_CNTR_CODE,
                S_START_AREA = t.S_START_AREA,
                S_END_AREA = t.S_END_AREA,
                S_B_STATE = t.S_B_STATE
            }).ToList();
            response.ListTask = tasksList;
            #endregion
            #region 仓库库内审核
            var ManCount = db.Queryable<CntrItemRel>()
                           .Where(s => s.S_CNTR_TYPE == "满托")
                           .GroupBy(s => s.S_CNTR_CODE)
                           .Select(s => new { s.S_CNTR_CODE })
                           .Count();
            var ManName = "满托盘";
            var BanCount = db.Queryable<CntrItemRel>()
                           .Where(s => s.S_CNTR_TYPE == "半托")
                           .GroupBy(s => s.S_CNTR_CODE)
                           .Select(s => new { s.S_CNTR_CODE })
                           .Count();
            var BanName = "半托盘";
            //所有容器的数量
            int allCntrcout = db.Queryable<LocCntrRel>().Count();
            //所有容器物料数量
            int alltprcout = db.Queryable<CntrItemRel>()
                     .GroupBy(s => s.S_CNTR_CODE)
                     .Select(s => new { s.S_CNTR_CODE })
                     .Count();
            var KTCount = allCntrcout - alltprcout;
            var KTName = "空托盘";
            int alllocationcout = db.Queryable<Location>().Count();
            var KHWCount = alllocationcout - allCntrcout;
            var KHWName = "空货位";
            var list = new List<NB>
        {
            new NB { Name = ManName, Count = ManCount },
            new NB { Name = BanName, Count = BanCount },
            new NB { Name = KTName, Count = KTCount },
            new NB { Name = KHWName, Count = KHWCount }
        };
            response.CKNData = list;
            #endregion
            return response;
        }
        #endregion
        /// <summary>
        /// 供应商接收接口获取
        /// </summary>
@@ -326,7 +471,7 @@
            {
                OtherReturnRoot.ITEM wcReturnRoot = new OtherReturnRoot.ITEM();
                wcReturnRoot.WLPZBH = item.WLPZBH;
                wcReturnRoot.WLPZND = item.WLPZND;
                wcReturnRoot.ND = item.WLPZND;
                wcReturnRoot.MSGCODE = item.resultCode;
                wcReturnRoot.MSGDESP = item.resultMsg;
                wcReturnRoots.Add(wcReturnRoot);
api/WmsSpaHelper.cs
@@ -30,7 +30,6 @@
using System.Security.Policy;
using HH.WCS.Mobox3.pinggao.models;
using static HH.WCS.Mobox3.pinggao.wms.WMSHelper;
using WHTest;
using System.Net;
using SqlSugar;
using static HH.WCS.Mobox3.pinggao.models.SapRoot.GYSDto;
@@ -1134,9 +1133,9 @@
                                            result.resultCode = 1;
                                            result.resultMsg = $"物料{a.WLBM}物料主数据不存在该物料";
                                            result.resultMsg = "失败";
                                            result.WLPZBH = itemwlpz.HEAD.WLPZH;
                                            result.WLPZND = itemwlpz.HEAD.ND;
                                            simpleResults.Add(result);
                                            continue;
                                            /*  throw new Exception($"物料{a.WLH}物料主数据不存在该物料")*/
                                            ;
@@ -1261,12 +1260,13 @@
                            }
                        }
                    }
                    result.resultMsg = "成功";
                    result.WLPZBH = itemwlpz.HEAD.WLPZH;
                    result.WLPZND = itemwlpz.HEAD.ND;
                    result.resultCode = 0;
                    result.resultMsg = "";
                    simpleResults.Add(result);
                    var result2 = new SimpleResult();
                    result2.resultMsg = "成功";
                    result2.WLPZBH = itemwlpz.HEAD.WLPZH;
                    result2.WLPZND = itemwlpz.HEAD.ND;
                    result2.resultCode = 0;
                    simpleResults.Add(result2);
                    db.CommitTran();
                }
            }
@@ -1756,7 +1756,7 @@
                result.resultMsg = "成功";
                result.resultCode = 0;
                //校验入库单数量,不可以超,成功后插入托盘物料表,更新入库单累计数量
                result = AddInboundOrder(model.MaterList, model.cntr_code);
                result = AddInboundOrder(model.MaterList, model.cntr_code,model.cntr_type);
                #region MyRegion
@@ -2087,7 +2087,11 @@
                    }
                    //通用接口 对容器货品的删减 和生成回库单 都要用的接口
                    result = await TYAddOutboundOrder(db, model.MaterList, model.arrival_no, model.cntr_code, model.IsHK, model.start, po.S_OUT_TYPE);
                    result = await TYAddOutboundOrder(db, model.MaterList, model.arrival_no, model.cntr_code, model.IsHK, model.start, po.S_OUT_TYPE,model.cntr_type);
                    if (result.resultCode==1)
                    {
                        return result;
                    }
                    #region 升降量
                    bool adds = true;
@@ -2184,7 +2188,7 @@
                            LogHelper.Info($"mobox 库区降量接口返回为空");
                        }
                        if (adds) addOnShelves(po, model.cntr_code, 2);
                        //if (adds) addOnShelves(po, model.cntr_code, 2);
                    }
                    else LogHelper.Info($"托盘{model.cntr_code}无需要升降量的物料");
@@ -2195,6 +2199,7 @@
                }
                catch (Exception e)
                {
                    LogHelper.Info($"报错{e.Message}");
                    result.resultMsg = e.Message;
                    db.RollbackTran();
                    return result;
@@ -2203,7 +2208,7 @@
            }
        }
        public static async Task<SimpleResult> TYAddOutboundOrder(SqlSugarClient db, List<Mater> MaterList, string arrival_no, string cntr_code, bool isHK, string start, string S_OUT_TYPE)
        public static async Task<SimpleResult> TYAddOutboundOrder(SqlSugarClient db, List<Mater> MaterList, string arrival_no, string cntr_code, bool isHK, string start, string S_OUT_TYPE,string cntr_type)
        {
            // var db = new SqlHelper<object>().GetInstance();
            //using (var db = new SqlHelper<object>().GetInstance())
@@ -2234,6 +2239,7 @@
                        if (cir != null)
                        {
                            cir.F_QTY -= item.qty;
                            cir.S_CNTR_TYPE = cntr_type;
                            cir.F_ALLOC_QTY -= item.qty;
                            cir.T_MODIFY = DateTime.Now;
                            if (cir.F_QTY == 0)
@@ -2242,10 +2248,8 @@
                            }
                            else
                            {
                                db.Updateable(cir).UpdateColumns(it => new { it.F_QTY, it.F_ALLOC_QTY, it.T_MODIFY }).ExecuteCommand();
                                db.Updateable(cir).UpdateColumns(it => new { it.F_QTY,it.S_CNTR_TYPE, it.F_ALLOC_QTY, it.T_MODIFY }).ExecuteCommand();
                                //添加回库作业
                            }
                        }
                        else
@@ -2256,31 +2260,7 @@
                            LogHelper.Info($"物料不存在{item.item_code}");
                            return result;
                        }
                        if (isHK)
                        {
                            var wmsTask = new WMSTask
                            {
                                S_CNTR_CODE = cntr_code,
                                S_CODE = WMSHelper.GenerateTaskNo(),
                                S_START_LOC = start,
                                S_START_AREA = startinfo.S_AREA_CODE,
                                S_START_WH = startinfo.S_WH_CODE,
                                S_END_LOC = startinfo.S_CODE,
                                S_END_AREA = startinfo.S_AREA_CODE,
                                S_END_WH = startinfo.S_WH_CODE,
                                N_TYPE = 1,
                                // S_TYPE = WMSTask.GetTypeStr(1),
                                S_TYPE = "回库",
                                S_OP_DEF_CODE = "",
                                S_OP_DEF_NAME = "pda入库"
                            };
                            if (WMSHelper.CreateWmsTask(wmsTask))
                            {
                                LocationHelper.LockLoc(start, 1);
                                result.resultMsg = $"创建作业成功,作业号{wmsTask.S_CODE}";
                            }
                        }
                        OutboundRecord outboundRecord = new OutboundRecord();
                        outboundRecord.S_WLPZBH = pz?.S_WLPZBH;
                        outboundRecord.S_WLPZND = pz?.S_WLPZND;
@@ -2300,14 +2280,65 @@
                        return result;
                    }
                }
                db.Insertable<OutboundRecord>(records).ExecuteCommand();
                if (isHK)
                {
                    var locs= db.Queryable<WCSTask>().Where(a =>a.S_TYPE.Contains("出库")&& a.S_CNTR_CODE == cntr_code&&a.N_B_STATE==3).OrderByDescending(s=>s.T_END_TIME).First();
                    if (locs!=null)
                    {
                        var cntr= db.Queryable<TN_Distribution_CNTR>().Where(a => a.S_DC_NO== locs.S_BS_NO).First();
                        if (cntr!=null)
                        {
                            cntr.S_SORT_TYPE = "已分拣";
                            db.Updateable(cntr).UpdateColumns(it => new { it.S_SORT_TYPE }).ExecuteCommand();
                        }
                        else
                        {
                            result.resultCode = 1;
                            result.resultMsg += $"任务{locs.S_CODE}来源号{locs.S_BS_NO}找不到配盘信息";
                            return result;
                        }
                            //var location = db.Queryable<Location>().Where(a => a.S_CODE == locs.S_LOC_CODE).First();
                            var wmsTask = new WMSTask
                            {
                                S_CNTR_CODE = cntr_code,
                                S_CODE = WMSHelper.GenerateTaskNo(),
                                S_START_LOC = start,
                                S_START_AREA = startinfo.S_AREA_CODE,
                                S_START_WH = startinfo.S_WH_CODE,
                                S_END_LOC = locs?.S_START_LOC,
                                S_END_AREA = locs?.S_START_AREA,
                                S_END_WH = locs?.S_START_WH,
                                N_TYPE = 1,
                                // S_TYPE = WMSTask.GetTypeStr(1),
                                S_TYPE = "回库",
                                S_OP_DEF_CODE = "",
                                S_OP_DEF_NAME = "pda入库"
                            };
                        if (WMSHelper.CreateWmsTask(wmsTask))
                        {
                            LocationHelper.LockLoc(start, 1);
                            result.resultMsg = $"创建作业成功,作业号{wmsTask.S_CODE}";
                        }
                    }
                    else
                    {
                        result.resultCode = 1;
                        result.resultMsg += $"找不到容器对应任务信息{cntr_code}";
                        return result;
                    }
                }
               var sss= db.Insertable<OutboundRecord>(records).ExecuteCommand();
                //db.CommitTran();
            }
            catch (Exception ex)
            {
                //db.RollbackTran();
                LogHelper.Info("物料信息绑定到满容器上" + ex.Message);
                result.resultCode = 1;
                result.resultMsg += ex.Message;
                Console.WriteLine(ex.Message);
                throw;
@@ -3055,7 +3086,7 @@
        /// <param name="cntr_code"></param>
        /// <returns></returns>
        [ApiExplorerSettings(IgnoreApi = true)]
        public static SimpleResult AddInboundOrder(List<Mater> MaterList, string cntr_code)
        public static SimpleResult AddInboundOrder(List<Mater> MaterList, string cntr_code,string S_CNTR_TYPE)
        {
            var result = new SimpleResult();
            //  var db = new SqlHelper<object>().GetInstance();
@@ -3100,12 +3131,13 @@
                                    if (cir != null)
                                    {
                                        cir.F_QTY += item.qty;
                                        db.Updateable(cir).UpdateColumns(it => new { it.F_QTY }).ExecuteCommand();
                                        cir.S_CNTR_TYPE = S_CNTR_TYPE;
                                        db.Updateable(cir).UpdateColumns(it => new { it.F_QTY,it.S_CNTR_TYPE }).ExecuteCommand();
                                    }
                                    else
                                    {
                                        //2.插入新的容器物料信息(容器号不变S_SERIAL_NO = item.S_SERIAL_NO,)
                                        cir = new CntrItemRel { S_CNTR_CODE = cntr.S_CODE.Trim(), S_UOM = info.S_UOM, S_BATCH_NO = item.S_BATCH_NO, N_BS_ROW_NO = item.N_ROW_NO, F_QTY = item.qty, S_ITEM_CODE = item.item_code, S_BS_NO = item.arrival_no };
                                        cir = new CntrItemRel { S_CNTR_TYPE= S_CNTR_TYPE, S_CNTR_CODE = cntr.S_CODE.Trim(), S_UOM = info.S_UOM, S_BATCH_NO = item.S_BATCH_NO, N_BS_ROW_NO = item.N_ROW_NO, F_QTY = item.qty, S_ITEM_CODE = item.item_code, S_BS_NO = item.arrival_no };
                                        db.Insertable<CntrItemRel>(cir).ExecuteCommand();
                                    }
                                    var count = db.Queryable<CntrItemRel>().Count(a => a.S_CNTR_CODE == cntr.S_CODE);
@@ -4071,7 +4103,7 @@
                        // 准备请求参数
                        ZscmNc request = new ZscmNc();
                        request.Input = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + xml;
                        LogHelper.Info($"内采SAP回调");
                        LogHelper.Info($"内采SAP回调{service.Url}");
                        // 调用Web Service
                        ZscmNcResponse responses = service.ZscmNc(request);
api/ZCCM_NC.cs
@@ -33,9 +33,8 @@
    /// <remarks/>
    public ZSCM_NC()
    { this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm_nc/110/zscm_nc/binding";
        // this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm_wc/110/zscm_wc/binding";
    {
        this.Url = "http://10.89.33.201:8001/sap/bc/srt/rfc/sap/zscm_nc/800/zscm_nc/binding";
    }
    /// <remarks/>
api/ZSCM2_CBZX.cs
@@ -25,64 +25,75 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="binding", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_CBZX : System.Web.Services.Protocols.SoapHttpClientProtocol {
[System.Web.Services.WebServiceBindingAttribute(Name = "binding", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_CBZX : System.Web.Services.Protocols.SoapHttpClientProtocol
{
    private System.Threading.SendOrPostCallback ZfmScm2CbzxMm001OperationCompleted;
    /// <remarks/>
    public ZSCM2_CBZX() {
        this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm2_cbzx/110/zscm2_cbzx/bin" +
            "ding";
    public ZSCM2_CBZX()
    {
        this.Url = "http://10.89.33.201:8001/sap/bc/srt/rfc/sap/zscm2_cbzx/800/zscm2_cbzx/bind" +
            "ing";
    }
    /// <remarks/>
    public event ZfmScm2CbzxMm001CompletedEventHandler ZfmScm2CbzxMm001Completed;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZfmScm2CbzxMm001Response", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZfmScm2CbzxMm001Response ZfmScm2CbzxMm001([System.Xml.Serialization.XmlElementAttribute("ZfmScm2CbzxMm001", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")] ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011) {
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZfmScm2CbzxMm001Response", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZfmScm2CbzxMm001Response ZfmScm2CbzxMm001([System.Xml.Serialization.XmlElementAttribute("ZfmScm2CbzxMm001", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")] ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011)
    {
        object[] results = this.Invoke("ZfmScm2CbzxMm001", new object[] {
                    ZfmScm2CbzxMm0011});
        return ((ZfmScm2CbzxMm001Response)(results[0]));
    }
    /// <remarks/>
    public System.IAsyncResult BeginZfmScm2CbzxMm001(ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011, System.AsyncCallback callback, object asyncState) {
    public System.IAsyncResult BeginZfmScm2CbzxMm001(ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011, System.AsyncCallback callback, object asyncState)
    {
        return this.BeginInvoke("ZfmScm2CbzxMm001", new object[] {
                    ZfmScm2CbzxMm0011}, callback, asyncState);
    }
    /// <remarks/>
    public ZfmScm2CbzxMm001Response EndZfmScm2CbzxMm001(System.IAsyncResult asyncResult) {
    public ZfmScm2CbzxMm001Response EndZfmScm2CbzxMm001(System.IAsyncResult asyncResult)
    {
        object[] results = this.EndInvoke(asyncResult);
        return ((ZfmScm2CbzxMm001Response)(results[0]));
    }
    /// <remarks/>
    public void ZfmScm2CbzxMm001Async(ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011) {
    public void ZfmScm2CbzxMm001Async(ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011)
    {
        this.ZfmScm2CbzxMm001Async(ZfmScm2CbzxMm0011, null);
    }
    /// <remarks/>
    public void ZfmScm2CbzxMm001Async(ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011, object userState) {
        if ((this.ZfmScm2CbzxMm001OperationCompleted == null)) {
    public void ZfmScm2CbzxMm001Async(ZfmScm2CbzxMm001 ZfmScm2CbzxMm0011, object userState)
    {
        if ((this.ZfmScm2CbzxMm001OperationCompleted == null))
        {
            this.ZfmScm2CbzxMm001OperationCompleted = new System.Threading.SendOrPostCallback(this.OnZfmScm2CbzxMm001OperationCompleted);
        }
        this.InvokeAsync("ZfmScm2CbzxMm001", new object[] {
                    ZfmScm2CbzxMm0011}, this.ZfmScm2CbzxMm001OperationCompleted, userState);
    }
    private void OnZfmScm2CbzxMm001OperationCompleted(object arg) {
        if ((this.ZfmScm2CbzxMm001Completed != null)) {
    private void OnZfmScm2CbzxMm001OperationCompleted(object arg)
    {
        if ((this.ZfmScm2CbzxMm001Completed != null))
        {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.ZfmScm2CbzxMm001Completed(this, new ZfmScm2CbzxMm001CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    /// <remarks/>
    public new void CancelAsync(object userState) {
    public new void CancelAsync(object userState)
    {
        base.CancelAsync(userState);
    }
}
@@ -92,18 +103,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CbzxMm001 {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CbzxMm001
{
    private string inputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input
    {
        get
        {
            return this.inputField;
        }
        set {
        set
        {
            this.inputField = value;
        }
    }
@@ -114,18 +129,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CbzxMm001Response {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CbzxMm001Response
{
    private string outputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output
    {
        get
        {
            return this.outputField;
        }
        set {
        set
        {
            this.outputField = value;
        }
    }
@@ -139,18 +158,22 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ZfmScm2CbzxMm001CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
public partial class ZfmScm2CbzxMm001CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
    private object[] results;
    internal ZfmScm2CbzxMm001CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {
    internal ZfmScm2CbzxMm001CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
    {
        this.results = results;
    }
    /// <remarks/>
    public ZfmScm2CbzxMm001Response Result {
        get {
    public ZfmScm2CbzxMm001Response Result
    {
        get
        {
            this.RaiseExceptionIfNecessary();
            return ((ZfmScm2CbzxMm001Response)(this.results[0]));
        }
api/ZSCM2_CXPZ.cs
@@ -25,64 +25,75 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="binding", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_CXPZ : System.Web.Services.Protocols.SoapHttpClientProtocol {
[System.Web.Services.WebServiceBindingAttribute(Name = "binding", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_CXPZ : System.Web.Services.Protocols.SoapHttpClientProtocol
{
    private System.Threading.SendOrPostCallback ZfmScm2CxpzMm001OperationCompleted;
    /// <remarks/>
    public ZSCM2_CXPZ() {
        this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm2_cxpz/110/zscm2_cxpz/bin" +
            "ding";
    public ZSCM2_CXPZ()
    {
        this.Url = "http://10.89.33.201:8001/sap/bc/srt/rfc/sap/zscm2_cxpz/800/zscm2_cxpz/bind" +
            "ing";
    }
    /// <remarks/>
    public event ZfmScm2CxpzMm001CompletedEventHandler ZfmScm2CxpzMm001Completed;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZfmScm2CxpzMm001Response", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZfmScm2CxpzMm001Response ZfmScm2CxpzMm001([System.Xml.Serialization.XmlElementAttribute("ZfmScm2CxpzMm001", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")] ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011) {
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZfmScm2CxpzMm001Response", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZfmScm2CxpzMm001Response ZfmScm2CxpzMm001([System.Xml.Serialization.XmlElementAttribute("ZfmScm2CxpzMm001", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")] ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011)
    {
        object[] results = this.Invoke("ZfmScm2CxpzMm001", new object[] {
                    ZfmScm2CxpzMm0011});
        return ((ZfmScm2CxpzMm001Response)(results[0]));
    }
    /// <remarks/>
    public System.IAsyncResult BeginZfmScm2CxpzMm001(ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011, System.AsyncCallback callback, object asyncState) {
    public System.IAsyncResult BeginZfmScm2CxpzMm001(ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011, System.AsyncCallback callback, object asyncState)
    {
        return this.BeginInvoke("ZfmScm2CxpzMm001", new object[] {
                    ZfmScm2CxpzMm0011}, callback, asyncState);
    }
    /// <remarks/>
    public ZfmScm2CxpzMm001Response EndZfmScm2CxpzMm001(System.IAsyncResult asyncResult) {
    public ZfmScm2CxpzMm001Response EndZfmScm2CxpzMm001(System.IAsyncResult asyncResult)
    {
        object[] results = this.EndInvoke(asyncResult);
        return ((ZfmScm2CxpzMm001Response)(results[0]));
    }
    /// <remarks/>
    public void ZfmScm2CxpzMm001Async(ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011) {
    public void ZfmScm2CxpzMm001Async(ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011)
    {
        this.ZfmScm2CxpzMm001Async(ZfmScm2CxpzMm0011, null);
    }
    /// <remarks/>
    public void ZfmScm2CxpzMm001Async(ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011, object userState) {
        if ((this.ZfmScm2CxpzMm001OperationCompleted == null)) {
    public void ZfmScm2CxpzMm001Async(ZfmScm2CxpzMm001 ZfmScm2CxpzMm0011, object userState)
    {
        if ((this.ZfmScm2CxpzMm001OperationCompleted == null))
        {
            this.ZfmScm2CxpzMm001OperationCompleted = new System.Threading.SendOrPostCallback(this.OnZfmScm2CxpzMm001OperationCompleted);
        }
        this.InvokeAsync("ZfmScm2CxpzMm001", new object[] {
                    ZfmScm2CxpzMm0011}, this.ZfmScm2CxpzMm001OperationCompleted, userState);
    }
    private void OnZfmScm2CxpzMm001OperationCompleted(object arg) {
        if ((this.ZfmScm2CxpzMm001Completed != null)) {
    private void OnZfmScm2CxpzMm001OperationCompleted(object arg)
    {
        if ((this.ZfmScm2CxpzMm001Completed != null))
        {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.ZfmScm2CxpzMm001Completed(this, new ZfmScm2CxpzMm001CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    /// <remarks/>
    public new void CancelAsync(object userState) {
    public new void CancelAsync(object userState)
    {
        base.CancelAsync(userState);
    }
}
@@ -92,18 +103,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CxpzMm001 {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CxpzMm001
{
    private string inputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input
    {
        get
        {
            return this.inputField;
        }
        set {
        set
        {
            this.inputField = value;
        }
    }
@@ -114,18 +129,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CxpzMm001Response {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZfmScm2CxpzMm001Response
{
    private string outputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output
    {
        get
        {
            return this.outputField;
        }
        set {
        set
        {
            this.outputField = value;
        }
    }
@@ -139,18 +158,22 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ZfmScm2CxpzMm001CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
public partial class ZfmScm2CxpzMm001CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
    private object[] results;
    internal ZfmScm2CxpzMm001CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {
    internal ZfmScm2CxpzMm001CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
    {
        this.results = results;
    }
    /// <remarks/>
    public ZfmScm2CxpzMm001Response Result {
        get {
    public ZfmScm2CxpzMm001Response Result
    {
        get
        {
            this.RaiseExceptionIfNecessary();
            return ((ZfmScm2CxpzMm001Response)(this.results[0]));
        }
api/ZSCM2_SCFL.cs
@@ -25,64 +25,75 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="binding", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_SCFL : System.Web.Services.Protocols.SoapHttpClientProtocol {
[System.Web.Services.WebServiceBindingAttribute(Name = "binding", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_SCFL : System.Web.Services.Protocols.SoapHttpClientProtocol
{
    private System.Threading.SendOrPostCallback ZscmScflOperationCompleted;
    /// <remarks/>
    public ZSCM2_SCFL() {
        this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm2_scfl/110/zscm2_scfl/bin" +
            "ding";
    public ZSCM2_SCFL()
    {
        this.Url = "http://10.89.33.201:8001/sap/bc/srt/rfc/sap/zscm2_scfl/800/zscm2_scfl/bind" +
            "ing";
    }
    /// <remarks/>
    public event ZscmScflCompletedEventHandler ZscmScflCompleted;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZscmScflResponse", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZscmScflResponse ZscmScfl([System.Xml.Serialization.XmlElementAttribute("ZscmScfl", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")] ZscmScfl ZscmScfl1) {
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZscmScflResponse", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZscmScflResponse ZscmScfl([System.Xml.Serialization.XmlElementAttribute("ZscmScfl", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")] ZscmScfl ZscmScfl1)
    {
        object[] results = this.Invoke("ZscmScfl", new object[] {
                    ZscmScfl1});
        return ((ZscmScflResponse)(results[0]));
    }
    /// <remarks/>
    public System.IAsyncResult BeginZscmScfl(ZscmScfl ZscmScfl1, System.AsyncCallback callback, object asyncState) {
    public System.IAsyncResult BeginZscmScfl(ZscmScfl ZscmScfl1, System.AsyncCallback callback, object asyncState)
    {
        return this.BeginInvoke("ZscmScfl", new object[] {
                    ZscmScfl1}, callback, asyncState);
    }
    /// <remarks/>
    public ZscmScflResponse EndZscmScfl(System.IAsyncResult asyncResult) {
    public ZscmScflResponse EndZscmScfl(System.IAsyncResult asyncResult)
    {
        object[] results = this.EndInvoke(asyncResult);
        return ((ZscmScflResponse)(results[0]));
    }
    /// <remarks/>
    public void ZscmScflAsync(ZscmScfl ZscmScfl1) {
    public void ZscmScflAsync(ZscmScfl ZscmScfl1)
    {
        this.ZscmScflAsync(ZscmScfl1, null);
    }
    /// <remarks/>
    public void ZscmScflAsync(ZscmScfl ZscmScfl1, object userState) {
        if ((this.ZscmScflOperationCompleted == null)) {
    public void ZscmScflAsync(ZscmScfl ZscmScfl1, object userState)
    {
        if ((this.ZscmScflOperationCompleted == null))
        {
            this.ZscmScflOperationCompleted = new System.Threading.SendOrPostCallback(this.OnZscmScflOperationCompleted);
        }
        this.InvokeAsync("ZscmScfl", new object[] {
                    ZscmScfl1}, this.ZscmScflOperationCompleted, userState);
    }
    private void OnZscmScflOperationCompleted(object arg) {
        if ((this.ZscmScflCompleted != null)) {
    private void OnZscmScflOperationCompleted(object arg)
    {
        if ((this.ZscmScflCompleted != null))
        {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.ZscmScflCompleted(this, new ZscmScflCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    /// <remarks/>
    public new void CancelAsync(object userState) {
    public new void CancelAsync(object userState)
    {
        base.CancelAsync(userState);
    }
}
@@ -92,18 +103,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScfl {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScfl
{
    private string inputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input
    {
        get
        {
            return this.inputField;
        }
        set {
        set
        {
            this.inputField = value;
        }
    }
@@ -114,18 +129,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScflResponse {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScflResponse
{
    private string outputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output
    {
        get
        {
            return this.outputField;
        }
        set {
        set
        {
            this.outputField = value;
        }
    }
@@ -139,18 +158,22 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ZscmScflCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
public partial class ZscmScflCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
    private object[] results;
    internal ZscmScflCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {
    internal ZscmScflCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
    {
        this.results = results;
    }
    /// <remarks/>
    public ZscmScflResponse Result {
        get {
    public ZscmScflResponse Result
    {
        get
        {
            this.RaiseExceptionIfNecessary();
            return ((ZscmScflResponse)(this.results[0]));
        }
api/ZSCM2_SCFLJHW.cs
@@ -25,64 +25,75 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="binding", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_SCFLJHW : System.Web.Services.Protocols.SoapHttpClientProtocol {
[System.Web.Services.WebServiceBindingAttribute(Name = "binding", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM2_SCFLJHW : System.Web.Services.Protocols.SoapHttpClientProtocol
{
    private System.Threading.SendOrPostCallback ZscmScflJhwOperationCompleted;
    /// <remarks/>
    public ZSCM2_SCFLJHW() {
        this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm2_scfljhw/110/zscm2_scflj" +
            "hw/binding";
    public ZSCM2_SCFLJHW()
    {
        this.Url = "http://10.89.33.201:8001/sap/bc/srt/rfc/sap/zscm2_scfljhw/800/zscm2_scfljh" +
            "w/binding";
    }
    /// <remarks/>
    public event ZscmScflJhwCompletedEventHandler ZscmScflJhwCompleted;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZscmScflJhwResponse", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZscmScflJhwResponse ZscmScflJhw([System.Xml.Serialization.XmlElementAttribute("ZscmScflJhw", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")] ZscmScflJhw ZscmScflJhw1) {
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZscmScflJhwResponse", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZscmScflJhwResponse ZscmScflJhw([System.Xml.Serialization.XmlElementAttribute("ZscmScflJhw", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")] ZscmScflJhw ZscmScflJhw1)
    {
        object[] results = this.Invoke("ZscmScflJhw", new object[] {
                    ZscmScflJhw1});
        return ((ZscmScflJhwResponse)(results[0]));
    }
    /// <remarks/>
    public System.IAsyncResult BeginZscmScflJhw(ZscmScflJhw ZscmScflJhw1, System.AsyncCallback callback, object asyncState) {
    public System.IAsyncResult BeginZscmScflJhw(ZscmScflJhw ZscmScflJhw1, System.AsyncCallback callback, object asyncState)
    {
        return this.BeginInvoke("ZscmScflJhw", new object[] {
                    ZscmScflJhw1}, callback, asyncState);
    }
    /// <remarks/>
    public ZscmScflJhwResponse EndZscmScflJhw(System.IAsyncResult asyncResult) {
    public ZscmScflJhwResponse EndZscmScflJhw(System.IAsyncResult asyncResult)
    {
        object[] results = this.EndInvoke(asyncResult);
        return ((ZscmScflJhwResponse)(results[0]));
    }
    /// <remarks/>
    public void ZscmScflJhwAsync(ZscmScflJhw ZscmScflJhw1) {
    public void ZscmScflJhwAsync(ZscmScflJhw ZscmScflJhw1)
    {
        this.ZscmScflJhwAsync(ZscmScflJhw1, null);
    }
    /// <remarks/>
    public void ZscmScflJhwAsync(ZscmScflJhw ZscmScflJhw1, object userState) {
        if ((this.ZscmScflJhwOperationCompleted == null)) {
    public void ZscmScflJhwAsync(ZscmScflJhw ZscmScflJhw1, object userState)
    {
        if ((this.ZscmScflJhwOperationCompleted == null))
        {
            this.ZscmScflJhwOperationCompleted = new System.Threading.SendOrPostCallback(this.OnZscmScflJhwOperationCompleted);
        }
        this.InvokeAsync("ZscmScflJhw", new object[] {
                    ZscmScflJhw1}, this.ZscmScflJhwOperationCompleted, userState);
    }
    private void OnZscmScflJhwOperationCompleted(object arg) {
        if ((this.ZscmScflJhwCompleted != null)) {
    private void OnZscmScflJhwOperationCompleted(object arg)
    {
        if ((this.ZscmScflJhwCompleted != null))
        {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.ZscmScflJhwCompleted(this, new ZscmScflJhwCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    /// <remarks/>
    public new void CancelAsync(object userState) {
    public new void CancelAsync(object userState)
    {
        base.CancelAsync(userState);
    }
}
@@ -92,18 +103,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScflJhw {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScflJhw
{
    private string inputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input
    {
        get
        {
            return this.inputField;
        }
        set {
        set
        {
            this.inputField = value;
        }
    }
@@ -114,18 +129,22 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScflJhwResponse {
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmScflJhwResponse
{
    private string outputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output {
        get {
    [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output
    {
        get
        {
            return this.outputField;
        }
        set {
        set
        {
            this.outputField = value;
        }
    }
@@ -139,18 +158,22 @@
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ZscmScflJhwCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
public partial class ZscmScflJhwCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
    private object[] results;
    internal ZscmScflJhwCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {
    internal ZscmScflJhwCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
    {
        this.results = results;
    }
    /// <remarks/>
    public ZscmScflJhwResponse Result {
        get {
    public ZscmScflJhwResponse Result
    {
        get
        {
            this.RaiseExceptionIfNecessary();
            return ((ZscmScflJhwResponse)(this.results[0]));
        }
api/ZSCM_WC.cs
@@ -8,179 +8,150 @@
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
// 
// 此源代码由 wsdl 自动生成, Version=4.8.3928.0。
// 
namespace WHTest
{
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    using HH.WCS.Mobox3.pinggao.util;
/// <remarks/>
// CODEGEN: 未处理命名空间“http://schemas.xmlsoap.org/ws/2004/09/policy”中的可选 WSDL 扩展元素“Policy”。
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="binding", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZSCM_WC : System.Web.Services.Protocols.SoapHttpClientProtocol {
    private System.Threading.SendOrPostCallback ZscmWcOperationCompleted;
    /// <remarks/>
    // CODEGEN: 未处理命名空间“http://schemas.xmlsoap.org/ws/2004/09/policy”中的可选 WSDL 扩展元素“Policy”。
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name = "binding", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public partial class ZSCM_WC : System.Web.Services.Protocols.SoapHttpClientProtocol
    {
        private System.Threading.SendOrPostCallback ZscmWcOperationCompleted;
        /// <remarks/>
        public ZSCM_WC()
        {
            //  this.Url = "http://ceerptest.cee.com.cn:8000/sap/bc/srt/rfc/sap/zscm_wc/110/zscm_wc/binding";
            this.Url = "http://10.89.33.217:8000/sap/bc/srt/rfc/sap/zscm_wc/110/zscm_wc/binding";
    public ZSCM_WC() {
        this.Url = "http://10.89.33.201:8001/sap/bc/srt/rfc/sap/zscm_wc/800/zscm_wc/binding";
    }
    /// <remarks/>
    public event ZscmWcCompletedEventHandler ZscmWcCompleted;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
    [return: System.Xml.Serialization.XmlElementAttribute("ZscmWcResponse", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
    public ZscmWcResponse ZscmWc([System.Xml.Serialization.XmlElementAttribute("ZscmWc", Namespace="urn:sap-com:document:sap:soap:functions:mc-style")] ZscmWc ZscmWc1) {
        object[] results = this.Invoke("ZscmWc", new object[] {
                    ZscmWc1});
        return ((ZscmWcResponse)(results[0]));
    }
    /// <remarks/>
    public System.IAsyncResult BeginZscmWc(ZscmWc ZscmWc1, System.AsyncCallback callback, object asyncState) {
        return this.BeginInvoke("ZscmWc", new object[] {
                    ZscmWc1}, callback, asyncState);
    }
    /// <remarks/>
    public ZscmWcResponse EndZscmWc(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((ZscmWcResponse)(results[0]));
    }
    /// <remarks/>
    public void ZscmWcAsync(ZscmWc ZscmWc1) {
        this.ZscmWcAsync(ZscmWc1, null);
    }
    /// <remarks/>
    public void ZscmWcAsync(ZscmWc ZscmWc1, object userState) {
        if ((this.ZscmWcOperationCompleted == null)) {
            this.ZscmWcOperationCompleted = new System.Threading.SendOrPostCallback(this.OnZscmWcOperationCompleted);
        }
        /// <remarks/>
        public event ZscmWcCompletedEventHandler ZscmWcCompleted;
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
        [return: System.Xml.Serialization.XmlElementAttribute("ZscmWcResponse", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
        public ZscmWcResponse ZscmWc([System.Xml.Serialization.XmlElementAttribute("ZscmWc", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")] ZscmWc ZscmWc1)
        {
            object[] results = this.Invoke("ZscmWc", new object[] {
                        ZscmWc1});
            return ((ZscmWcResponse)(results[0]));
        }
        /// <remarks/>
        public System.IAsyncResult BeginZscmWc(ZscmWc ZscmWc1, System.AsyncCallback callback, object asyncState)
        {
            return this.BeginInvoke("ZscmWc", new object[] {
                        ZscmWc1}, callback, asyncState);
        }
        /// <remarks/>
        public ZscmWcResponse EndZscmWc(System.IAsyncResult asyncResult)
        {
            object[] results = this.EndInvoke(asyncResult);
            return ((ZscmWcResponse)(results[0]));
        }
        /// <remarks/>
        public void ZscmWcAsync(ZscmWc ZscmWc1)
        {
            this.ZscmWcAsync(ZscmWc1, null);
        }
        /// <remarks/>
        public void ZscmWcAsync(ZscmWc ZscmWc1, object userState)
        {
            if ((this.ZscmWcOperationCompleted == null))
            {
                this.ZscmWcOperationCompleted = new System.Threading.SendOrPostCallback(this.OnZscmWcOperationCompleted);
            }
            this.InvokeAsync("ZscmWc", new object[] {
                        ZscmWc1}, this.ZscmWcOperationCompleted, userState);
        }
        private void OnZscmWcOperationCompleted(object arg)
        {
            if ((this.ZscmWcCompleted != null))
            {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ZscmWcCompleted(this, new ZscmWcCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        /// <remarks/>
        public new void CancelAsync(object userState)
        {
            base.CancelAsync(userState);
        this.InvokeAsync("ZscmWc", new object[] {
                    ZscmWc1}, this.ZscmWcOperationCompleted, userState);
    }
    private void OnZscmWcOperationCompleted(object arg) {
        if ((this.ZscmWcCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.ZscmWcCompleted(this, new ZscmWcCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public partial class ZscmWc
    {
    public new void CancelAsync(object userState) {
        base.CancelAsync(userState);
    }
}
        private string inputField;
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Input
        {
            get
            {
                return this.inputField;
            }
            set
            {
                this.inputField = value;
            }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmWc {
    private string inputField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Input {
        get {
            return this.inputField;
        }
        set {
            this.inputField = value;
        }
    }
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="urn:sap-com:document:sap:soap:functions:mc-style")]
public partial class ZscmWcResponse {
    private string outputField;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
    public partial class ZscmWcResponse
    {
        private string outputField;
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Output
        {
            get
            {
                return this.outputField;
            }
            set
            {
                this.outputField = value;
            }
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string Output {
        get {
            return this.outputField;
        }
        set {
            this.outputField = value;
        }
    }
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
public delegate void ZscmWcCompletedEventHandler(object sender, ZscmWcCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ZscmWcCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal ZscmWcCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState) {
        this.results = results;
    }
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    public delegate void ZscmWcCompletedEventHandler(object sender, ZscmWcCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.8.3928.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ZscmWcCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
    {
        private object[] results;
        internal ZscmWcCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState)
        {
            this.results = results;
        }
        /// <remarks/>
        public ZscmWcResponse Result
        {
            get
            {
                this.RaiseExceptionIfNecessary();
                return ((ZscmWcResponse)(this.results[0]));
            }
    public ZscmWcResponse Result {
        get {
            this.RaiseExceptionIfNecessary();
            return ((ZscmWcResponse)(this.results[0]));
        }
    }
}
core/WMSCore.cs
@@ -80,7 +80,8 @@
                                    LocationHelper.LockLoc(endloc.S_CODE, 1);
                                    item.N_B_STATE = 2;
                                    item.S_B_STATE = "作业启动";
                                    db.Updateable(item).UpdateColumns(it => new { it.S_B_STATE, it.N_B_STATE }).ExecuteCommand();
                                    item.S_SORT_TYPE = "待分拣";
                                    db.Updateable(item).UpdateColumns(it => new { it.S_B_STATE, it.N_B_STATE,it.S_SORT_TYPE }).ExecuteCommand();
                                }
                            }
                            else
@@ -93,7 +94,9 @@
                        {
                             LogHelper.Info($"{item.S_BS_NO}配盘 库区{item.S_AREA_CODE}货位找不到");
                        }
                   }
                    else
                    {
enc_temp_folder/d910702ef84a263576574cba1cbe589/WebService.asmx.cs
New file
@@ -0,0 +1,841 @@
using pinggaoWebApi.Services;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Services;
using Newtonsoft.Json;
using System.Web.Http;
using System.Xml.Linq;
using System.Xml.Serialization;
using System.Net.Http;
using System.Text;
using System.Web.UI.WebControls;
using pinggaoWebApi.Models;
using static pinggaoWebApi.Controllers.SapRoot;
using Newtonsoft.Json.Linq;
using System.Web.Mvc;
using System.Xml;
using System.Data;
using pinggaoWebApi.Controllers;
using System.Threading.Tasks;
using System.IO;
using System.Data.SqlTypes;
using System.Text.RegularExpressions;
using System.Reflection;
namespace pinggaoWebApi
{
    /// <summary>
    /// WebService1 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
    // [System.Web.Script.Services.ScriptService]
    public class WebService : System.Web.Services.WebService
    {
        public static void EnsureArrayFormats(JObject json, string name)
        {
            foreach (var property in json.Properties())
            {
                // 如果当前属性名与指定名称匹配
                if (property.Name.Equals(name))
                {
                    // 如果属性值是 JObject,且不是 JArray,则将其包装成数组
                    if (property.Value is JObject)
                    {
                        JArray newArray = new JArray(property.Value);
                        property.Value = newArray;
                    }
                    // 如果属性值已经是 JArray,则不需要进一步操作
                    else if (property.Value is JArray)
                    {
                        // 已经是数组,无需操作
                    }
                    // 如果属性值是其他类型,则将其转换为单个元素的数组
                    else
                    {
                        JArray newArray = new JArray(property.Value);
                        property.Value = newArray;
                    }
                }
                // 如果属性值是 JObject,递归检查其子属性
                else if (property.Value is JObject)
                {
                    EnsureArrayFormats((JObject)property.Value, name);
                }
            }
        }
        /// <summary>
        /// 数据
        /// </summary>
        /// <param name="json"></param>
        /// <param name="name"></param>
        /// <param name="name1"></param>
        public static void EnsureArrayFormat(JObject json, string name, string name1)
        {
            foreach (var property in json.Properties())
            {
                if (property.Name == name || property.Name == name1)
                {
                    if (property.Value is JObject && !(property.Value is JArray))
                    {
                        // 若为单个对象,包装成数组
                        property.Value = new JArray(property.Value);
                    }
                }
                if (property.Value is JObject)
                {
                    // 递归处理子对象
                    EnsureArrayFormat((JObject)property.Value, name, name1);
                }
                else if (property.Value is JArray)
                {
                    // 递归处理数组中的每个元素
                    foreach (var item in (JArray)property.Value)
                    {
                        if (item is JObject)
                        {
                            EnsureArrayFormat((JObject)item, name, name1);
                        }
                    }
                }
            }
        }
        public static void EnsureArrayFormat(JObject json, string propertyName)
        {
            // 查找名为 propertyName 的属性
            JProperty property = json.Property(propertyName);
            if (property != null)
            {
                // 检查属性值是否为 JObject 类型(即单个对象)
                if (property.Value is JObject)
                {
                    // 将单个对象包装成数组
                    JArray newArray = new JArray(property.Value);
                    property.Value = newArray;
                }
                else if (property.Value is JArray)
                {
                    // 如果属性值已经是 JArray,则不需要做任何操作
                    // 但如果需要递归检查数组中的每个元素,可以在这里实现
                }
            }
        }
        /// <summary>
        /// 数据
        /// </summary>
        /// <param name="json"></param>
        /// <param name="name"></param>
        /// <param name="name1"></param>
        public static void EnsureArrayFormat(JObject json, string name, string name1, string name2)
        {
            foreach (var property in json.Properties())
            {
                if (property.Name == name || property.Name == name2)
                {
                    if (property.Value is JObject && !(property.Value is JArray))
                    {
                        // 若为单个对象,包装成数组
                        property.Value = new JArray(property.Value);
                    }
                }
                if (property.Value is JObject)
                {
                    // 递归处理子对象
                    EnsureArrayFormat((JObject)property.Value, name, name1, name2);
                }
                else if (property.Value is JArray)
                {
                    // 递归处理数组中的每个元素
                    foreach (var item in (JArray)property.Value)
                    {
                        if (item is JObject)
                        {
                            EnsureArrayFormat((JObject)item, name, name1, name2);
                        }
                    }
                }
            }
        }
        public static void EnsureArrayFormats(JObject json, string name, string name1, string name2)
        {
            foreach (var property in json.Properties())
            {
                if (property.Name == name || property.Name == name2 || property.Name == name1)
                {
                    if (property.Value is JObject && !(property.Value is JArray))
                    {
                        // 若为单个对象,包装成数组
                        property.Value = new JArray(property.Value);
                    }
                }
                if (property.Value is JObject)
                {
                    // 递归处理子对象
                    EnsureArrayFormat((JObject)property.Value, name, name1, name2);
                }
                else if (property.Value is JArray)
                {
                    // 递归处理数组中的每个元素
                    foreach (var item in (JArray)property.Value)
                    {
                        if (item is JObject)
                        {
                            EnsureArrayFormat((JObject)item, name, name1, name2);
                        }
                    }
                }
            }
        }
        [WebMethod]
        public string InWorkArea(string data)
        {
            var result = "";
            LogHelper.Info($"接口 InWorkArea 输入参数{data}");
            return result;
        }
        /// <summary>
        /// 外采收货
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public string WCReceiveXmlData(string ROOT)
        {
            LogHelper.Info("外采收货接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "WCReceiveXmlData");
            var ss = ConfigurationManager.AppSettings["URL"].ToString();
            //接收xml数据
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(ROOT.ToString());
            //将 XmlDocument 转换为 JSON 字符串
            JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
            // 处理特定字段,强制转换为数组
            EnsureArrayFormat(jsonObject, "WLPZ", "HEAD", "ITEM");
            ///  反序列化为RootWithArray
            var datas = JsonConvert.DeserializeObject<Root>(jsonObject.ToString());
            var sdada = JsonConvert.SerializeObject(datas);
            var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "WCReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
            LogHelper.Info($"WCReceiveXmlData mobox返回参数{feedinfo}");
            var jsonObj = JsonConvert.DeserializeObject<WcReturnRoot.Root>(feedinfo);
            var json = JsonConvert.SerializeObject(jsonObj);
            string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
            LogHelper.Info("  外采收货" + xml);
            return xml;
        }
        /// <summary>
        /// 内采收货
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public  string NCReceiveXmlData(string ROOT)
        {
            LogHelper.Info("进来了" + ROOT);
            LogHelper.Info("内采收货" + ConfigurationManager.AppSettings["URL"].ToString() + "NCReceiveXmlData");
            var ss = ConfigurationManager.AppSettings["URL"].ToString();
            //接收xml数据
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(ROOT.ToString());
            //将 XmlDocument 转换为 JSON 字符串
            JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
            // 处理特定字段,强制转换为数组
            EnsureArrayFormat(jsonObject, "WLPZ", "HEAD", "ITEM");
            ///  反序列化为RootWithArray
            var datas = JsonConvert.DeserializeObject<NcDto.Root>(jsonObject.ToString());
            var sdada = JsonConvert.SerializeObject(datas);
            var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "NCReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
            LogHelper.Info($"NCReceiveXmlData mobox返回参数{feedinfo}");
            var jsonObj = JsonConvert.DeserializeObject<WcReturnRoot.Root>(feedinfo);
            var json = JsonConvert.SerializeObject(jsonObj);
            string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
            LogHelper.Info("  内采收货返回" + xml);
            return xml;
        }
        /// <summary>
        /// 生产订单领料单(生成领料单)
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public string LLDReceiveXmlData(string ROOT)
        {
            LogHelper.Info("生产订单领料单(生成领料单)" + ConfigurationManager.AppSettings["URL"].ToString() + "LLDReceiveXmlData");
            var ss = ConfigurationManager.AppSettings["URL"].ToString();
            //接收xml数据
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(ROOT.ToString());
            //将 XmlDocument 转换为 JSON 字符串
            JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
            // 处理特定字段,强制转换为数组
            EnsureArrayFormat(jsonObject, "SCDDLL", "ITEM", "");
            //EnsureArrayFormat(jsonObject["ROOT"]["SCDDLL"] as JObject, "ITEM");
            ///  反序列化为RootWithArray
            var datas = JsonConvert.DeserializeObject<CKDdto.RootModel>(jsonObject.ToString());
            var sdada = JsonConvert.SerializeObject(datas);
            var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "LLDReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
            LogHelper.Info($"LLDReceiveXmlData mobox返回参数{feedinfo}");
            var jsonObj = JsonConvert.DeserializeObject<LLDReturnRoot.Root>(feedinfo);
            var json = JsonConvert.SerializeObject(jsonObj);
            string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
            LogHelper.Info("生产订单领料单(生成领料单)" + xml);
            return xml;
        }
        public static void EnsureArrayFormat2(JObject obj, string propertyName)
        {
            foreach (var prop in obj.Properties().ToList())
            {
                if (prop.Name == propertyName && prop.Value is JValue)
                {
                    obj[propertyName] = new JArray(prop.Value);
                }
                else if (prop.Value is JObject childObj)
                {
                    EnsureArrayFormat2(childObj, propertyName);
                }
                else if (prop.Value is JArray childArray)
                {
                    foreach (var item in childArray)
                    {
                        if (item is JObject itemObj)
                        {
                            EnsureArrayFormat2(itemObj, propertyName);
                        }
                    }
                }
            }
        }
        public class SingleOrArrayConverter<T> : JsonConverter
        {
            public override bool CanConvert(Type objectType)
            {
                return objectType == typeof(List<T>);
            }
            public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
            {
                // 先检查是否为null
                if (reader.TokenType == JsonToken.Null)
                {
                    return new List<T>();
                }
                // 处理空数组情况
                if (reader.TokenType == JsonToken.StartArray)
                {
                    try
                    {
                        var list = new List<T>();
                        while (reader.Read() && reader.TokenType != JsonToken.EndArray)
                        {
                            if (reader.TokenType == JsonToken.Null)
                            {
                                list.Add(default(T));
                            }
                            else
                            {
                                list.Add(serializer.Deserialize<T>(reader));
                            }
                        }
                        return list;
                    }
                    catch (JsonSerializationException)
                    {
                        // 如果数组解析失败,返回空列表
                        return new List<T>();
                    }
                }
                // 处理单个值情况
                if (reader.TokenType == JsonToken.String ||
                    reader.TokenType == JsonToken.Integer ||
                    reader.TokenType == JsonToken.Float ||
                    reader.TokenType == JsonToken.Boolean)
                {
                    try
                    {
                        return new List<T> { serializer.Deserialize<T>(reader) };
                    }
                    catch
                    {
                        return new List<T>();
                    }
                }
                // 处理对象情况(如 { "XLH": "value" })
                if (reader.TokenType == JsonToken.StartObject)
                {
                    reader.Read(); // 跳过StartObject
                    if (reader.TokenType == JsonToken.PropertyName)
                    {
                        reader.Read(); // 跳过属性名
                        return ReadJson(reader, objectType, existingValue, serializer);
                    }
                }
                // 其他情况返回空列表
                return new List<T>();
            }
            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
                serializer.Serialize(writer, value);
            }
        }
        /// <summary>
        /// 其他出入库
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public string OtherReceiveXmlData(string ROOT)
        {
            try
            {
                LogHelper.Info($"ROOT{ROOT}");
                LogHelper.Info("其他出入库" + ConfigurationManager.AppSettings["URL"].ToString() + "OtherReceiveXmlData");
                var ss = ConfigurationManager.AppSettings["URL"].ToString();
                //接收xml数据
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.LoadXml(ROOT.ToString());
                //将 XmlDocument 转换为 JSON 字符串
                JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
                LogHelper.Info($"jsonObject{JsonConvert.SerializeObject(jsonObject)}");
                // 处理特定字段,强制转换为数组
                EnsureArrayFormat(jsonObject, "WLPZ", "HEAD", "ITEM");
                EnsureArrayFormat2(jsonObject, "XLH");
                var settings = new JsonSerializerSettings
                {
                    Converters = { new SingleOrArrayConverter<string>() }
                };
                var result = JsonConvert.DeserializeObject<otherDto.Root>(jsonObject.ToString(), settings);
                var sss = jsonObject.ToString();
                ///  反序列化为RootWithArray
                var datas = JsonConvert.DeserializeObject<otherDto.Root>(jsonObject.ToString());
                var sdada = JsonConvert.SerializeObject(datas);
                LogHelper.Info($"111返回参数{sdada}");
                var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "OtherReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
                LogHelper.Info($"OtherReceiveXmlData mobox返回参数{feedinfo}");
                var jsonObj = JsonConvert.DeserializeObject<OtherReturnRoot.Root>(feedinfo);
                var json = JsonConvert.SerializeObject(jsonObj);
                string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
                LogHelper.Info("其他出入库返回" + xml);
                return xml;
            }
            catch (Exception e)
            {
                LogHelper.Info("其他出入库返回" + e.Message);
                throw;
            }
        }
        ///// <summary>
        ///// 外采内采通用收货
        ///// </summary>
        ///// <param name="ROOT"></param>
        ///// <returns></returns>
        //[WebMethod]
        //[ValidateInput(false)] // 禁用请求验证
        //public string TYReceiveXmlData(string ROOT)
        //{
        //    LogHelper.Info("收货接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "WCReceiveXmlData");
        //    var ss = ConfigurationManager.AppSettings["URL"].ToString();
        //    //接收xml数据
        //    XmlDocument xmlDoc = new XmlDocument();
        //    xmlDoc.LoadXml(ROOT.ToString());
        //    //将 XmlDocument 转换为 JSON 字符串
        //    JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
        //    // 处理特定字段,强制转换为数组
        //    EnsureArrayFormat(jsonObject, "WLPZ", "HEAD", "ITEM");
        //    ///  反序列化为RootWithArray
        //    var wcdatas = JsonConvert.DeserializeObject<Root>(jsonObject.ToString());
        //    if (wcdatas.ROOT.WLPZ[0].HEAD.YDLX== "103"|| wcdatas.ROOT.WLPZ[0].HEAD.YDLX == "104")
        //    {
        //        var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "WCReceiveXmlData", JsonConvert.SerializeObject(wcdatas), "application/json");
        //        LogHelper.Info($"WCReceiveXmlData mobox返回参数{feedinfo}");
        //        var jsonObj = JsonConvert.DeserializeObject<WcReturnRoot.Root>(feedinfo);
        //        var json = JsonConvert.SerializeObject(jsonObj);
        //        string xml = JsonConvert.DeserializeXmlNode(json, "").OuterXml;
        //        return xml;
        //    }
        //    else
        //    {
        //        var ncdatas = JsonConvert.DeserializeObject<NcDto.Root>(jsonObject.ToString());
        //        var sss = JsonConvert.SerializeObject(wcdatas);
        //        var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "NCReceiveXmlData", JsonConvert.SerializeObject(ncdatas), "application/json");
        //        LogHelper.Info($"NCReceiveXmlData mobox返回参数{feedinfo}");
        //        var jsonObj = JsonConvert.DeserializeObject<WcReturnRoot.Root>(feedinfo);
        //        var json = JsonConvert.SerializeObject(jsonObj);
        //        string xml = JsonConvert.DeserializeXmlNode(json, "").OuterXml;
        //        return xml;
        //    }
        //}
        ///// <summary>
        /////内采收货
        ///// </summary>
        ///// <param name="ROOT"></param>
        ///// <returns></returns>
        //[WebMethod]
        //public ReturrnBackNC.Root NCReceiveXmlData(NcDto.ROOT2 ROOT)
        //{
        //    string result;
        //    LogHelper.Info("内采收货接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "NCReceiveXmlData");
        //    var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "NCReceiveXmlData", JsonConvert.SerializeObject(ROOT), "application/json");
        //    LogHelper.Info($"NCReceiveXmlData mobox返回参数{feedinfo}");
        //    var data = JsonConvert.DeserializeObject<ReturrnBackNC.ITEM>(feedinfo);
        //    // 假设data是一个已经初始化的ITEM对象
        //    ReturrnBackNC.ITEM data1 = new ReturrnBackNC.ITEM
        //    {
        //        KEY = data?.WLPZBH,
        //        WLPZBH = data?.WLPZBH,
        //        WLPZND = data?.WLPZND,
        //        MSGCODE = data?.MSGCODE,
        //        MSGDESP = data?.WLPZBH
        //    };
        //    if (string.IsNullOrEmpty(feedinfo))
        //    {
        //        data1.WLPZBH = "";
        //        data1.MSGCODE = "1";
        //        data1.MSGDESP = "未调通";
        //    }
        //    // 实例化ROOT对象,并将ITEM对象赋值给ROOT的Item属性
        //    ReturrnBackNC.ROOT root = new ReturrnBackNC.ROOT
        //    {
        //        ITEM = data
        //    };
        //    ReturrnBackNC.Root roots = new ReturrnBackNC.Root
        //    {
        //        ROOT = root
        //    };
        //    return roots;
        //}
        ///// <summary>
        /////其他出入库
        ///// </summary>
        ///// <param name="ROOT"></param>
        ///// <returns></returns>
        //[WebMethod]
        //public ReturrnBack.Root OtherReceiveXmlData(otherDto.ROOT3 ROOT)
        //{
        //    string result;
        //    LogHelper.Info("其他出入库接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "OtherReceiveXmlData");
        //    var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "OtherReceiveXmlData", JsonConvert.SerializeObject(ROOT), "application/json");
        //    LogHelper.Info($"OtherReceiveXmlData mobox返回参数{feedinfo}");
        //    var data = JsonConvert.DeserializeObject<ReturrnBack.ITEM>(feedinfo);
        //    // 假设data是一个已经初始化的ITEM对象
        //    ReturrnBack.ITEM data1 = new ReturrnBack.ITEM
        //    {
        //        WLPZBH = data?.WLPZBH,
        //        MSGCODE = data?.MSGCODE,
        //        MSGDESP = data?.WLPZBH
        //    };
        //    if (string.IsNullOrEmpty(feedinfo))
        //    {
        //        data1.WLPZBH = "";
        //        data1.MSGCODE = "1";
        //        data1.MSGDESP = "未调通";
        //    }
        //    // 实例化ROOT对象,并将ITEM对象赋值给ROOT的Item属性
        //    ReturrnBack.ROOT root = new ReturrnBack.ROOT
        //    {
        //        ITEM = data
        //    };
        //    ReturrnBack.Root roots = new ReturrnBack.Root
        //    {
        //        ROOT = root
        //    };
        //    return roots;
        //}
        /// <summary>
        /// 生产订单信息获取
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public string OrderReceiveXmlData(string ROOT)
        {
            LogHelper.Info("生产订单信息获取" + ConfigurationManager.AppSettings["URL"].ToString() + "OrderReceiveXmlData");
            var ss = ConfigurationManager.AppSettings["URL"].ToString();
            //接收xml数据
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(ROOT.ToString());
            //将 XmlDocument 转换为 JSON 字符串
            JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
            // 处理特定字段,强制转换为数组
            EnsureArrayFormat(jsonObject, "SCDD", "ITEM");
            ///  反序列化为RootWithArray
            var datas = JsonConvert.DeserializeObject<OrderDto.Root>(jsonObject.ToString());
            var sdada = JsonConvert.SerializeObject(datas);
            var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "OrderReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
            LogHelper.Info($"OtherReceiveXmlData mobox返回参数{feedinfo}");
            var jsonObj = JsonConvert.DeserializeObject<Orderback.Root>(feedinfo);
            var json = JsonConvert.SerializeObject(jsonObj);
            string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
            return xml;
        }
        /// <summary>
        ///生产订单信息获取
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        //[WebMethod]
        //public ReturrnBack.Root OrderReceiveXmlData(OrderDto.ROOT4 ROOT)
        //{
        //    string result;
        //    LogHelper.Info("生产订单信息获取接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "OrderReceiveXmlData");
        //    var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "OrderReceiveXmlData", JsonConvert.SerializeObject(ROOT), "application/json");
        //    LogHelper.Info($"OrderReceiveXmlData mobox返回参数{feedinfo}");
        //    var data = JsonConvert.DeserializeObject<ReturrnBack.ITEM>(feedinfo);
        //    // 假设data是一个已经初始化的ITEM对象
        //    ReturrnBack.ITEM data1 = new ReturrnBack.ITEM
        //    {
        //        WLPZBH = data?.WLPZBH,
        //        MSGCODE = data?.MSGCODE,
        //        MSGDESP = data?.WLPZBH
        //    };
        //    if (string.IsNullOrEmpty(feedinfo))
        //    {
        //        data1.WLPZBH = "";
        //        data1.MSGCODE = "1";
        //        data1.MSGDESP = "未调通";
        //    }
        //    // 实例化ROOT对象,并将ITEM对象赋值给ROOT的Item属性
        //    ReturrnBack.ROOT root = new ReturrnBack.ROOT
        //    {
        //        ITEM = data
        //    };
        //    ReturrnBack.Root roots = new ReturrnBack.Root
        //    {
        //        ROOT = root
        //    };
        //    return roots;
        //}
        /// <summary>
        /// 主物料信息获取
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public string MaterReceiveXmlData(string ROOT)
        {
            try
            {
                LogHelper.Info("主物料信息获取接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "MaterReceiveXmlData");
            var ss = ConfigurationManager.AppSettings["URL"].ToString();
            //接收xml数据
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(ROOT.ToString());
            //将 XmlDocument 转换为 JSON 字符串
            JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
            // 处理特定字段,强制转换为数组
            EnsureArrayFormat(jsonObject, "ITEM", "");
            ///  反序列化为RootWithArray
            var datas = JsonConvert.DeserializeObject<MaterDto.Root6>(jsonObject.ToString());
            var sdada = JsonConvert.SerializeObject(datas);
            var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "MaterReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
            LogHelper.Info($"MaterReceiveXmlData mobox返回参数{feedinfo}");
            var jsonObj = JsonConvert.DeserializeObject<WLReturnRoot.Root>(feedinfo);
            var json = JsonConvert.SerializeObject(jsonObj);
            string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
            return xml;
            }
            catch (Exception ex)
            {
                LogHelper.Info($"MaterReceiveXmlData 报错{ex.Message}");
                throw;
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="ROOT"></param>
        /// <returns></returns>
        [WebMethod]
        [ValidateInput(false)] // 禁用请求验证
        public string GYSReceiveXmlData(string ROOT)
        {
            LogHelper.Info("供应商信息获取接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "GYSReceiveXmlData");
            var ss = ConfigurationManager.AppSettings["URL"].ToString();
            //接收xml数据
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(ROOT.ToString());
            //将 XmlDocument 转换为 JSON 字符串
            JObject jsonObject = JsonConvert.DeserializeObject<JObject>(JsonConvert.SerializeXmlNode(xmlDoc));
            // 处理特定字段,强制转换为数组
            EnsureArrayFormat(jsonObject, "GYSXX", "", "GYSHB");
            ///  反序列化为RootWithArray
            var datas = JsonConvert.DeserializeObject<GYSDto.Root9>(jsonObject.ToString());
            var sdada = JsonConvert.SerializeObject(datas);
            var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "GYSReceiveXmlData", JsonConvert.SerializeObject(datas), "application/json");
            LogHelper.Info($"MaterReceiveXmlData mobox返回参数{feedinfo}");
            var jsonObj = JsonConvert.DeserializeObject<GYSReturnRoot.Root>(feedinfo);
            var json = JsonConvert.SerializeObject(jsonObj);
            string xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + JsonConvert.DeserializeXmlNode(json, "").OuterXml;
            return xml;
        }
        ///// <summary>
        /////主物料信息获取
        ///// </summary>
        ///// <param name="ROOT"></param>
        ///// <returns></returns>
        //[WebMethod]
        //public ReturrnBack.Root MaterReceiveXmlData(MaterDto.ROOT5 ROOT)
        //{
        //    string result;
        //    LogHelper.Info("主物料信息获取接口地址" + ConfigurationManager.AppSettings["URL"].ToString() + "MaterReceiveXmlData");
        //    var feedinfo = HttpHelper.WebPost(ConfigurationManager.AppSettings["URL"].ToString() + "MaterReceiveXmlData", JsonConvert.SerializeObject(ROOT), "application/json");
        //    LogHelper.Info($"MaterReceiveXmlData mobox返回参数{feedinfo}");
        //    var data = JsonConvert.DeserializeObject<ReturrnBack.ITEM>(feedinfo);
        //    // 假设data是一个已经初始化的ITEM对象
        //    ReturrnBack.ITEM data1 = new ReturrnBack.ITEM
        //    {
        //        WLPZBH = data?.WLPZBH,
        //        MSGCODE = data?.MSGCODE,
        //        MSGDESP = data?.WLPZBH
        //    };
        //    if (string.IsNullOrEmpty(feedinfo))
        //    {
        //        data1.WLPZBH = "";
        //        data1.MSGCODE = "1";
        //        data1.MSGDESP = "未调通";
        //    }
        //    // 实例化ROOT对象,并将ITEM对象赋值给ROOT的Item属性
        //    ReturrnBack.ROOT root = new ReturrnBack.ROOT
        //    {
        //        ITEM = data
        //    };
        //    ReturrnBack.Root roots = new ReturrnBack.Root
        //    {
        //        ROOT = root
        //    };
        //    return roots;
        //}
    }
}
models/CntrItemRel.cs
@@ -37,6 +37,7 @@
        public float F_QTY { get; set; }
        public string S_UOM { get; set; } = "kg";
        public string S_CNTR_CODE { get; set; }
        public string S_CNTR_TYPE { get; set; }
        //public int N_BS_ROW_NO { get; set; }
        public string S_BS_TYPE { get; set; } = "";
        /// <summary>
models/DAPING.cs
New file
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HH.WCS.Mobox3.pinggao.models
{
    public class DAPING
    {
        public class BarChartResponse
        {
            public List<BarChartData> OutboundData { get; set; }  // 出库数据(1-12月)
            public List<BarChartData> InboundData { get; set; }    // 入库数据(1-12月)
            public List<NB> CKNData { get; set; }    // 入库数据(1-12月)
            public List<Tasks> ListTask { get; set; }    // 入库数据(1-12月)
           /// <summary>
           /// 未完成单据数量
           /// </summary>
            public int? Inttbounddjcount { get; set; }
            /// <summary>
            /// 未完成出库单据数量
            /// </summary>
            public int? Outtbounddjcount { get; set; }
            public int? IntodayCount { get; set; }
            public int? OuttodayCount { get; set; }
        }
        public class Tasks {
            public string S_CNTR_CODE { get; set; }
            public string S_START_AREA { get; set; }
            public string S_END_AREA { get; set; }
            public string S_B_STATE { get; set; }
        }
        public class BarChartData
        {
            public int Month { get; set; }   // 月份,如 "2023-01"
            public float? Count { get; set; }   // 数量(可空)
        }
        public class NB
        {
            public string  Name{ get; set; }   // 月份,如 "2023-01"
            public float? Count { get; set; }   // 数量(可空)
        }
    }
}
models/SapRoot.cs
@@ -174,7 +174,7 @@
                /// 物料凭证号
                /// </summary>
                public string WLPZBH { get; set; }
                public string WLPZND { get; set; }
                public string ND { get; set; }
                /// <summary>
                /// 返回结果标识(0成功或者1失败)字符长
                /// </summary>
process/TaskProcess.cs
@@ -14,6 +14,7 @@
using System.Threading.Tasks;
using static HH.WCS.Mobox3.pinggao.models.SapRoot.WcReturnRoot;
using static HH.WCS.Mobox3.pinggao.api.OtherModel;
using NLog.Fluent;
namespace HH.WCS.Mobox3.pinggao.process
{
@@ -94,7 +95,10 @@
                db.CommitTran();
                if (!string.IsNullOrEmpty(TN_Task.S_STATE_PRE) && !string.IsNullOrEmpty(TN_Task.S_EQ_TASK_CODE))
                {
                    weight(TN_Task);
                    if (TN_Task.S_START_LOC == TN_Task.S_END_LOC)
                    {
                        weight(TN_Task);
                    }
                }
@@ -108,12 +112,15 @@
                db.CommitTran();
                if (!string.IsNullOrEmpty(TN_Task.S_STATE_PRE) && !string.IsNullOrEmpty(TN_Task.S_EQ_TASK_CODE))
                {
                    weight(TN_Task);
                    if (TN_Task.S_START_LOC == TN_Task.S_END_LOC)
                    {
                        weight(TN_Task);
                    }
                }
            }
                if (state == 1103)
            if (state == 1103)
            {
                //大铁框叉走以后通知,我们要通知输送线
            }
@@ -123,198 +130,211 @@
        internal static void weight(WCSTask TN_Task)
        {
                if (!string.IsNullOrEmpty(TN_Task.S_STATE_PRE) && !string.IsNullOrEmpty(TN_Task.S_EQ_TASK_CODE))
                {
            if (!string.IsNullOrEmpty(TN_Task.S_STATE_PRE) && !string.IsNullOrEmpty(TN_Task.S_EQ_TASK_CODE))
            {
                string extData = TN_Task.S_STATE_PRE;
                string Ext1 = TN_Task.S_EQ_TASK_CODE;
                    LogHelper.Info($"称重分配入库终点货位高度重量{extData},高度{Ext1},容器{TN_Task.S_CNTR_CODE}");
                    var db = new SqlHelper<object>().GetInstance();
                    var WMStask = db.Queryable<WMSTask>().Where(s => s.S_CODE == TN_Task.S_OP_CODE).First();
                    if (WMStask == null)
                LogHelper.Info($"称重分配入库终点货位高度重量{extData},高度{Ext1},容器{TN_Task.S_CNTR_CODE}");
                var db = new SqlHelper<object>().GetInstance();
                var WMStask = db.Queryable<WMSTask>().Where(s => s.S_CODE == TN_Task.S_OP_CODE).First();
                if (WMStask == null)
                {
                    LogHelper.Info($"未找到此任务对应的作业");
                }
                try
                {
                    Location result = null;
                    //var TN_Task = WCSHelper.GetTask(no);
                    //判断当前容器为托盘还是料框
                    //托盘只能放在1-2层 料箱3-9层
                    //获取集合
                    var locklist = db.Queryable<Location>();
                    if (TN_Task.S_CNTR_CODE.Substring(0, 2) == "TP")//托盘
                    {
                        LogHelper.Info($"未找到此任务对应的作业");
                    }
                    try
                    {
                        Location result = null;
                        //var TN_Task = WCSHelper.GetTask(no);
                        //判断当前容器为托盘还是料框
                        //托盘只能放在1-2层 料箱3-9层
                        //获取集合
                        var locklist = db.Queryable<Location>();
                        if (TN_Task.S_CNTR_CODE.Substring(0, 2) == "TP")//托盘
                        var endlist = locklist
                                   .Where(it => it.N_CURRENT_NUM < it.N_CAPACITY && it.N_LAYER < 3 && it.N_LOCK_STATE == 0 && it.S_AREA_CODE == "HJQ")
                                   .OrderBy(it => it.N_COL)
                                   .PartitionBy(it => it.N_ROW)
                                   .PartitionBy(it => it.N_LAYER)
                                   .Take(1)
                                   .ToList();
                        if (TN_Task.N_ERR == 2)//前移车
                        {
                            var endlist = locklist
                                       .Where(it => it.N_CURRENT_NUM < it.N_CAPACITY && it.N_LAYER < 3 && it.N_LOCK_STATE ==0 && it.S_AREA_CODE == "HJQ")
                                       .OrderBy(it => it.N_COL)
                                       .PartitionBy(it => it.N_ROW)
                                       .PartitionBy(it => it.N_LAYER)
                                       .Take(1)
                                       .ToList();
                            foreach (var item in endlist)
                            endlist = endlist.Where(s => s.N_LAYER < 7).ToList();
                        }
                        foreach (var item in endlist)
                        {
                            LogHelper.Info($"重量{decimal.Parse(extData)}");
                            //大于800kg
                            if (decimal.Parse(extData) > 1)
                            {
                                LogHelper.Info($"重量{decimal.Parse(extData)}");
                                //大于800kg
                                if (decimal.Parse(extData) > 1)
                                LogHelper.Info($"高度{Ext1}");
                                //高度大于1050mm 只放在第一层
                                if (decimal.Parse(Ext1) <= 3)
                                {
                                    LogHelper.Info($"高度{Ext1}");
                                    //高度大于1050mm 只放在第一层
                                    if (decimal.Parse(Ext1) <=3)
                                    var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_LOCK_STATE != 0 && it.N_ROW == item.N_ROW
                                                    && it.N_LAYER == 1).First();
                                    if (lockinfo == null)
                                    {
                                        var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_LOCK_STATE != 0 && it.N_ROW == item.N_ROW
                                                        && it.N_LAYER == 1).First();
                                        if (lockinfo == null)
                                        {
                                            result = item;
                                            break;
                                        }
                                        else
                                        {
                                            LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                            //throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        }
                                        result = item;
                                        break;
                                    }
                                    else
                                    {
                                        LogHelper.Info($"高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                        throw new Exception($"高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                        LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        //throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                    }
                                }
                                else
                                {
                                    LogHelper.Info($"高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                    throw new Exception($"高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                }
                                else//不超重 即 不超过800kg
                                {
                                    //高度<450mm 2-9层
                                    if (decimal.Parse(Ext1) < 2)
                            }
                            else//不超重 即 不超过800kg
                            {
                                //高度<450mm 2-9层
                                if (decimal.Parse(Ext1) < 2)
                                {
                                    LogHelper.Info($"高度<450mm 2-9层");
                                    var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_ROW == item.N_ROW
                                                        && it.N_LAYER == 2).First();
                                        if (lockinfo == null)
                                        {
                                            result = item;
                                            break;
                                        }
                                        else
                                        {
                                            LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                            //throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        }
                                    }
                                    else if (decimal.Parse(Ext1) >= 2 && decimal.Parse(Ext1) < 4)
                                    if (lockinfo == null)
                                    {
                                        var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_ROW == item.N_ROW
                                                       && it.N_LAYER >= 1 && it.N_LAYER <= 2).First();
                                        if (lockinfo == null)
                                        {
                                            result = item;
                                        result = item;
                                            db.Updateable<WMSTask>(TN_Task).UpdateColumns(a => new { a.S_END_LOC, a.S_END_AREA, a.S_END_WH }).ExecuteCommand();
                                            break;
                                        }
                                        else
                                        {
                                            LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                            //throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        }
                                        break;
                                    }
                                    else
                                    {
                                        LogHelper.Info($"托盘高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                        throw new Exception($"托盘高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                        LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        //throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                    }
                                }
                            }
                        }
                        else
                        { //容器为料箱 则放到3-9层
                            var endlist = locklist
                                       .Where(it => it.N_CURRENT_NUM < it.N_CAPACITY && it.N_LAYER >= 3 && it.N_LOCK_STATE == 0 && it.S_AREA_CODE == "HJQ")
                                       .OrderBy(it => it.N_COL)
                                       .PartitionBy(it => it.N_ROW)
                                       .PartitionBy(it => it.N_LAYER)
                                       .Take(1)
                                       .ToList();
                            foreach (var item in endlist)
                            {
                                LogHelper.Info($"重量{decimal.Parse(extData)}");
                                //大于800kg
                                if (decimal.Parse(extData) > 1)
                                else if (decimal.Parse(Ext1) >= 2 && decimal.Parse(Ext1) < 4)
                                {
                                    LogHelper.Info($"料箱重量超过800kg");
                                    throw new Exception($"料箱重量超过800kg");
                                    var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_ROW == item.N_ROW
                                                   && it.N_LAYER >= 1 && it.N_LAYER <= 2).First();
                                    if (lockinfo == null)
                                    {
                                        result = item;
                                        db.Updateable<WMSTask>(TN_Task).UpdateColumns(a => new { a.S_END_LOC, a.S_END_AREA, a.S_END_WH }).ExecuteCommand();
                                        break;
                                    }
                                    else
                                    {
                                        LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        //throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                    }
                                }
                                else
                                {
                                    if (decimal.Parse(Ext1) < 4)
                                    {
                                        var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_LOCK_STATE != 0 && it.S_AREA_CODE == item.S_AREA_CODE && it.N_ROW == item.N_ROW
                                                       && it.N_LAYER >= 3 && it.N_LAYER <= 9).First();
                                        if (lockinfo == null)
                                        {
                                            result = item;
                                            TN_Task.S_END_LOC = item.S_CODE;
                                            db.Updateable<WMSTask>(TN_Task).UpdateColumns(a => new { a.S_END_LOC }).ExecuteCommand();
                                    LogHelper.Info($"托盘高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                    throw new Exception($"托盘高度{decimal.Parse(Ext1)}过高 联系人工处理");
                                            break;
                                        }
                                        else
                                        {
                                            LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                            throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        }
                                    }
                                    else
                                    {
                                        LogHelper.Info($"料箱高度 {decimal.Parse(Ext1)} 过高 联系人工处理");
                                        throw new Exception($"料箱高度 {decimal.Parse(Ext1)} 过高 联系人工处理");
                                    }
                                }
                            }
                        }
                    }
                    else
                    { //容器为料箱 则放到3-9层
                        if (result == null)
                        var endlist = locklist
                                   .Where(it => it.N_CURRENT_NUM < it.N_CAPACITY && it.N_LAYER >= 3 && it.N_LOCK_STATE == 0 && it.S_AREA_CODE == "HJQ")
                                   .OrderBy(it => it.N_COL)
                                   .PartitionBy(it => it.N_ROW)
                                   .PartitionBy(it => it.N_LAYER)
                                   .Take(1)
                                   .ToList();
                        if (TN_Task.N_ERR == 2)//前移车
                        {
                            LogHelper.Info($"小车回调未找到可用库位");
                            throw new Exception($"小车回调未找到可用库位");
                            endlist = endlist.Where(s => s.N_LAYER < 7).ToList();
                        }
                        TN_Task.S_END_LOC = result.S_CODE;
                        TN_Task.S_END_AREA = result.S_AREA_CODE;
                        TN_Task.S_END_WH = result.S_WH_CODE;
                        foreach (var item in endlist)
                        {
                            LogHelper.Info($"重量{decimal.Parse(extData)}");
                            //大于800kg
                            if (decimal.Parse(extData) > 1)
                            {
                                LogHelper.Info($"料箱重量超过800kg");
                                throw new Exception($"料箱重量超过800kg");
                            }
                            else
                            {
                                if (decimal.Parse(Ext1) < 4)
                                {
                                    var lockinfo = locklist.Where(it => it.N_LOCK_STATE != 0 && it.N_LOCK_STATE != 0 && it.S_AREA_CODE == item.S_AREA_CODE && it.N_ROW == item.N_ROW
                                                   && it.N_LAYER >= 3 && it.N_LAYER <= 9).First();
                                    if (lockinfo == null)
                                    {
                                        result = item;
                                        TN_Task.S_END_LOC = item.S_CODE;
                                        db.Updateable<WMSTask>(TN_Task).UpdateColumns(a => new { a.S_END_LOC }).ExecuteCommand();
                        db.Updateable<WCSTask>(TN_Task).UpdateColumns(a => new { a.S_END_LOC, a.S_END_AREA, a.S_END_WH }).ExecuteCommand();
                        WMStask.S_END_LOC = result.S_CODE;
                        WMStask.S_END_AREA = result.S_AREA_CODE;
                        WMStask.S_END_WH = result.S_WH_CODE;
                                        break;
                                    }
                                    else
                                    {
                                        LogHelper.Info($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                        throw new Exception($"货位{lockinfo.S_CODE} 有锁 当排层不可使用");
                                    }
                                }
                                else
                                {
                                    LogHelper.Info($"料箱高度 {decimal.Parse(Ext1)} 过高 联系人工处理");
                                    throw new Exception($"料箱高度 {decimal.Parse(Ext1)} 过高 联系人工处理");
                                }
                            }
                        }
                    }
                        db.Updateable<WMSTask>(WMStask).UpdateColumns(a => new { a.S_END_LOC, a.S_END_AREA, a.S_END_WH }).ExecuteCommand();
                    if (result == null)
                    {
                        LogHelper.Info($"小车回调未找到可用库位");
                        throw new Exception($"小车回调未找到可用库位");
                    }
                    //var lcrList = db.Queryable<LocCntrRel>().Includes(a => a.Container).Where(a => a.S_LOC_CODE == TN_Task.S_CNTR_CODE).ToList();
                    //if (lcrList.Count == 0) {
                    TN_Task.S_END_LOC = result.S_CODE;
                    TN_Task.S_END_AREA = result.S_AREA_CODE;
                    TN_Task.S_END_WH = result.S_WH_CODE;
                    db.Updateable<WCSTask>(TN_Task).UpdateColumns(a => new { a.S_END_LOC, a.S_END_AREA, a.S_END_WH }).ExecuteCommand();
                    WMStask.S_END_LOC = result.S_CODE;
                    WMStask.S_END_AREA = result.S_AREA_CODE;
                    WMStask.S_END_WH = result.S_WH_CODE;
                    db.Updateable<WMSTask>(WMStask).UpdateColumns(a => new { a.S_END_LOC, a.S_END_AREA, a.S_END_WH }).ExecuteCommand();
                    //}
                    var S_AGV_SITE = "";
                    if (TN_Task.N_ERR==1)//前移车
                    if (TN_Task.N_ERR == 1)//前移车
                    {
                        //前移车
                         S_AGV_SITE = LocationHelper.GetAgvSite(TN_Task.S_END_LOC);
                        S_AGV_SITE = LocationHelper.GetAgvSite(TN_Task.S_END_LOC);
                    }
                    else //堆垛车
                    {
                        //堆垛车
                         S_AGV_SITE = db.Queryable<TN_Location_Ext>().Where(a => a.S_LOC_CODE == TN_Task.S_END_LOC).First()?.S_AGV_SITE;
                        S_AGV_SITE = db.Queryable<TN_Location_Ext>().Where(a => a.S_LOC_CODE == TN_Task.S_END_LOC).First()?.S_AGV_SITE;
                    }
                        var dic = new Dictionary<string, string>();
                        dic.Add("No", TN_Task.S_CODE);
                        dic.Add("ParamNo", "3");
                        dic.Add("Param1", S_AGV_SITE);
                    var dic = new Dictionary<string, string>();
                    dic.Add("No", TN_Task.S_CODE);
                    dic.Add("ParamNo", "2");
                    dic.Add("Param1", S_AGV_SITE);
                    //dic.Add("Pri", TN_Task.N_PRIORITY.ToString());
                    //dic.Add("No", TN_Task.S_CODE.Trim());
                    //dic.Add("From", TN_Task.S_START_LOC);
@@ -324,26 +344,32 @@
                    //dic.Add("FRow", "0");
                    var res = NDC.ChangeOrder(dic);
                        LogHelper.Info($"修改终点货位" + JsonConvert.SerializeObject(res));
                        if (res.Res.ErrCode != -1)
                        {
                            var dics = new Dictionary<string, string>();
                            dics.Add("No", TN_Task.S_CODE);
                            dics.Add("ParamNo", "6");
                            dics.Add("Param1", "2");
                            var ss = NDC.ChangeOrder(dics);
                            LogHelper.Info($"小车前往新库位" + JsonConvert.SerializeObject(ss));
                            LocationHelper.BindingLoc(TN_Task.S_END_LOC, TN_Task.S_CNTR_CODE.Split(',').ToList());
                            LocationHelper.LockLoc(TN_Task.S_END_LOC,1);
                        }
                        db.CommitTran();
                    }
                    catch (Exception)
                    LogHelper.Info($"修改终点货位" + JsonConvert.SerializeObject(res));
                    if (res.Res.ErrCode != -1)
                    {
                        db.RollbackTran();
                        throw;
                        var dics = new Dictionary<string, string>();
                        dics.Add("No", TN_Task.S_CODE);
                        dics.Add("ParamNo", "6");
                        dics.Add("Param1", "2");
                        var ss = NDC.ChangeOrder(dics);
                        LogHelper.Info($"小车前往新库位" + JsonConvert.SerializeObject(ss));
                        //if (lcrList.Count()==0)
                        //{
                        LocationHelper.BindingLoc(TN_Task.S_END_LOC, TN_Task.S_CNTR_CODE.Split(',').ToList());
                        LocationHelper.LockLoc(TN_Task.S_END_LOC, 1);
                        //}
                    }
                    db.CommitTran();
                }
                catch (Exception)
                {
                    db.RollbackTran();
                    throw;
                }
            }
        }
@@ -552,7 +578,7 @@
            var taskType = mst.S_TYPE.Trim();
            try
            {
                LogHelper.Info($"推送任务{ mst.S_CODE}");
                LogHelper.Info($"推送任务{mst.S_CODE}");
                Console.WriteLine("推送任务", mst.S_CODE);
                //前移车
                var startlocs = LocationHelper.GetAgvSite(mst.S_START_LOC);
@@ -561,18 +587,18 @@
                var db = new SqlHelper<object>().GetInstance();
                var dstart = db.Queryable<TN_Location_Ext>().Where(a => a.S_LOC_CODE == mst.S_START_LOC).First()?.S_AGV_SITE;
                var dend = db.Queryable<TN_Location_Ext>().Where(a => a.S_LOC_CODE == mst.S_END_LOC).First()?.S_AGV_SITE;
                LogHelper.Info($"获取库位{mst.S_START_LOC}{ mst.S_END_LOC}||{mst.N_B_STATE}");
                LogHelper.Info($"获取库位{mst.S_START_LOC}{mst.S_END_LOC}||{mst.N_B_STATE}");
                LogHelper.Info($"站点数据信息{dstart}/{dend}||{startlocs}/{endlocs}");
                if (mst.N_B_STATE == 0)
                {
                    //堆垛车去站点表找
                    if (mst.S_SCHEDULE_TYPE == "NDC")
                    {
                        var startloc = LocationHelper.GetLoc(mst.S_START_LOC);
                        var endloc = LocationHelper.GetLoc(mst.S_END_LOC);
                        LogHelper.Info($"获取站点{startloc.N_LAYER}");
                        if (startloc.N_LAYER > 7 || endloc.N_LAYER > 7)//大于七层 找有无 前移车的任务 有 不推 无推送
                        if (mst.S_TYPE.Contains("入库"))
                        {
                            var task = WCSHelper.GetWaitingTaskGoList();//查询是否有前移车正在执行的任务
                            if (task.Count() == 0)
@@ -581,29 +607,66 @@
                                start = startlocs;
                                end = endlocs;
                            }
                        }
                        else //小于
                        {
                            LogHelper.Info($"小于7");
                            var task = WCSHelper.GetWaitingTaskGoBackList();//查询是否有堆垛车正在执行的任务、
                            LogHelper.Info($"count{task.Count()}");
                            if (task.Count() == 0)
                            {      //堆垛车 去 站点表去查
                                mst.N_ERR = 2;
                                start = dstart;
                                end = dend;
                            }
                            else
                            {
                                var task1 = WCSHelper.GetWaitingTaskGoList();///查询是否有前移车正在执行的任务
                                LogHelper.Info($"查询是否有前移车正在执行的任务count{task1.Count()}");
                                if (task1.Count() == 0)
                                var task12 = WCSHelper.GetWaitingTaskGoBackList();//查询是否有堆垛车正在执行的任务、
                                LogHelper.Info($"count{task12.Count()}");
                                if (task12.Count() == 0)
                                {      //堆垛车 去 站点表去查
                                    mst.N_ERR = 2;
                                    start = dstart;
                                    end = dend;
                                }
                                else
                                {
                                    var task1 = WCSHelper.GetWaitingTaskGoList();///查询是否有前移车正在执行的任务
                                    LogHelper.Info($"查询是否有前移车正在执行的任务count{task1.Count()}");
                                    if (task1.Count() == 0)
                                    {
                                        mst.N_ERR = 1;
                                        start = startlocs;
                                        end = endlocs;
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (startloc.N_LAYER > 7 || endloc.N_LAYER > 7)//大于七层 找有无 前移车的任务 有 不推 无推送
                            {
                                var task = WCSHelper.GetWaitingTaskGoList();//查询是否有前移车正在执行的任务
                                if (task.Count() == 0)
                                {
                                    mst.N_ERR = 1;
                                    start = startlocs;
                                    end = endlocs;
                                }
                            }
                            else //小于
                            {
                                LogHelper.Info($"小于7");
                                var task = WCSHelper.GetWaitingTaskGoBackList();//查询是否有堆垛车正在执行的任务、
                                LogHelper.Info($"count{task.Count()}");
                                if (task.Count() == 0)
                                {      //堆垛车 去 站点表去查
                                    mst.N_ERR = 2;
                                    start = dstart;
                                    end = dend;
                                }
                                else
                                {
                                    var task1 = WCSHelper.GetWaitingTaskGoList();///查询是否有前移车正在执行的任务
                                    LogHelper.Info($"查询是否有前移车正在执行的任务count{task1.Count()}");
                                    if (task1.Count() == 0)
                                    {
                                        mst.N_ERR = 1;
                                        start = startlocs;
                                        end = endlocs;
                                    }
                                }
                            }
                        }
                        LogHelper.Info($"站点{start}/{end}");
                        if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))