IPC-610
2024-09-26 2be1922b035c182c3c516427aa68be54badd6938
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -41,7 +41,7 @@
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool ErpAddExportNotice(SoInfo model)
        public void HttpAddExportNotice(SoInfo model)
        {
            try
            {
@@ -226,7 +226,7 @@
                        SONo = billNo,
                        Type = model.SoType,
                        Status = "0",
                        Origin = "WMS",
                        Origin = model.Origin,
                        CustomerNo = model.Customer,
                        CustomerName = customer.CustomerName,
                        LogisticsId = logisticsId,
@@ -242,12 +242,10 @@
                    if (n <= 0 || m <= 0)
                    {
                        Db.RollbackTran();
                        return false;
                        throw new Exception("入库单或明细添加保存失败");
                    }
                    Db.CommitTran();
                    return true;
                }
                catch (Exception ex)
                {
@@ -259,7 +257,6 @@
            }
            catch (Exception ex)
            {
                Db.RollbackTran();
                throw new Exception(ex.Message);
            }
        }
@@ -363,31 +360,31 @@
                    .LeftJoin<SysUserInfor>((a, b, c, d, e) => a.CheckUser == e.Id)
                    .Select((a, b, c, d, e) => new ExportNoticeDto()
                    {
                        Id = a.Id,
                        SONo = a.SONo,
                        Type = a.Type,
                        Status = a.Status,
                        Origin = a.Origin,
                        CustomerNo = a.CustomerNo,
                        CustomerName = a.CustomerName,
                        LotNo = a.LotNo,
                        LotText = a.LotText,
                        SupplierLot = a.SupplierLot,
                        LogisticsId = a.LogisticsId,
                        //Id = a.Id,
                        //SONo = a.SONo,
                        //Type = a.Type,
                        //Status = a.Status,
                        //Origin = a.Origin,
                        //CustomerNo = a.CustomerNo,
                        //CustomerName = a.CustomerName,
                        //LotNo = a.LotNo,
                        //LotText = a.LotText,
                        //SupplierLot = a.SupplierLot,
                        //LogisticsId = a.LogisticsId,
                        LogisticsName = b.CarrierName,
                        IsWave = a.IsWave,
                        WaveNo = a.WaveNo,
                        IsDespatch = a.IsDespatch,
                        Demo = a.Demo,
                        //IsWave = a.IsWave,
                        //WaveNo = a.WaveNo,
                        //IsDespatch = a.IsDespatch,
                        //Demo = a.Demo,
                        CreateUserName = c.RealName,
                        UpdateUserName = c.RealName,
                        CreateTime = a.CreateTime,
                        UpdateTime = a.UpdateTime,
                        //CreateTime = a.CreateTime,
                        //UpdateTime = a.UpdateTime,
                        CheckUserName = e.RealName,
                        CheckTime = a.CheckTime
                    })
                        //CheckTime = a.CheckTime
                    },true)
                    .OrderByDescending(a => a.CreateTime)
                    .ToOffsetPage(page, limit, ref total);
                count = total;
@@ -478,6 +475,7 @@
                    .AndIF(!string.IsNullOrWhiteSpace(inspectStatus), it => inspectStatus.Contains(it.InspectStatus))
                    .And(m => skuList.Contains(m.SkuNo))
                    .AndIF(type == "6", m => m.OwnerNo == ownerNo)//代储出库需要关联货主
                    .AndIF(type == "2", m=> string.IsNullOrWhiteSpace(m.OwnerNo))
                    .AndIF(!string.IsNullOrWhiteSpace(msg), it => (it.SkuNo.Contains(msg) || it.SkuName.Contains(msg) || it.LotNo.Contains(msg)))
                    .And(it => (it.Qty - it.LockQty - it.FrozenQty) > 0)
                    .And(it => (it.Status == "0" || it.Status == "1"))
@@ -2172,23 +2170,23 @@
                        try
                        {
                            //var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss")
                            //response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS");
                            //var time2 = DateTime.Now;//返回时间 .ToString("yyyy-MM-dd HH:mm:ss")
                            var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss")
                            response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS");
                            var time2 = DateTime.Now;//返回时间 .ToString("yyyy-MM-dd HH:mm:ss")
                            //////解析返回数据 
                            var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response);
                            //if (wcsModel.StatusCode == 0)
                            //{
                            //    //更改任务的发送返回时间//
                            //    new TaskServer().EditTaskIssueOk(list2, time1, time2);
                            //    str += "下发成功";
                            //}
                            //if (wcsModel.StatusCode == -1)
                            //{
                            //    new TaskServer().EditTaskIssueNo(list2, time1, time2, wcsModel.Msg);
                            //    throw new Exception(wcsModel.Msg);
                            //}
                            if (wcsModel.StatusCode == 0)
                            {
                                //更改任务的发送返回时间//
                                new TaskServer().EditTaskIssueOk(list2, time1, time2);
                                str += "下发成功";
                            }
                            if (wcsModel.StatusCode == -1)
                            {
                                new TaskServer().EditTaskIssueNo(list2, time1, time2, wcsModel.Msg);
                                throw new Exception(wcsModel.Msg);
                            }
                        }
                        catch (Exception ex)
                        {