Merge branch 'master' into Liudl
| | |
| | | var mxId = "0"; |
| | | var yemianid = 0; |
| | | refreshTable(); |
| | | refreshTablemx(mxId) |
| | | //refreshTablemx(mxId) |
| | | //渲染出库分配table |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } else { |
| | | if(res.code==200){//成功 |
| | | if(res.code==0){//成功 |
| | | layer.msg('登陆成功', { |
| | | icon: 1, |
| | | time: 500 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | $.cookie('token', res.ToKen.TokenStr); |
| | | $.cookie('token', res.data); |
| | | //回调 |
| | | location.href="/View/index.html"; |
| | | }); |
| | |
| | | using System.ComponentModel.Design; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Net; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Microsoft.AspNetCore.Identity; |
| | |
| | | ParentName = "库内作业", |
| | | MenuName = "盘点单据", |
| | | FkNo = model.CrNo, |
| | | TypeName = "添加", |
| | | TypeName = "编辑", |
| | | Msg = $"编辑了单据号为{model.CrNo}的盘点单信息" |
| | | }); |
| | | //var k = new OperationCrServer().AddLogOperationCr("库内作业", "盘点单据", model.CrNo, "编辑", $"编辑了单据号为{model.CrNo}的盘点单信息", _userManager.UserId); |
| | |
| | | //盘点下发出库 |
| | | public async Task<List<OutCommandDto>> CheckOutHouse(string crNo, string outMode, string url, string str) |
| | | { |
| | | try |
| | | { |
| | | #region 集合 |
| | | var outDtoList = new List<OutCommandDto>(); //出库数据的集合 |
| | | //记录错误信息的集合 |
| | |
| | | throw Oops.Bah($"未找到{crNo}盘点单信息"); |
| | | } |
| | | //所有要出库的盘点明细信息(等待的信息和待拣货的信息) |
| | | var funSetting = Db.Queryable<SysFunSetting>().First(a => a.IsDel == "0" && a.FunSetNo == "InventoryCheckMethod"); |
| | | if (funSetting == null || funSetting.IsEnable == "OFF") |
| | | { |
| | | throw Oops.Bah("需配置盘点方式"); |
| | | } |
| | | var list = await Db.Queryable<BllStockCheckDetail>().Where(a => a.IsDel == "0" && a.CRNo == crNo && a.Status == 0).ToListAsync(); |
| | | if (list.Count == 0) //判断是否有需要下发的盘点明细 |
| | | { |
| | | throw Oops.Bah("当前盘点单据无需要下发的托盘"); |
| | | } |
| | | if (funSetting.SetValue == "once") |
| | | { |
| | | if (list.Any(s => s.Status == 1 || s.Status == 2)) |
| | | { |
| | | throw Oops.Bah("已有正在出库或待盘点的数据,请完成盘点后再出库"); |
| | | } |
| | | list = new List<BllStockCheckDetail>() { list.FirstOrDefault() }; |
| | | } |
| | | #region |
| | | //要出库的托盘集合 |
| | |
| | | //获取物料信息 |
| | | var skuNo = await Db.Queryable<SysMaterials>().Where(a => a.IsDel == "0" && a.Type == "4").Select(a => a.SkuNo).ToListAsync(); |
| | | var time = DateTime.Now; |
| | | Db.BeginTran(); |
| | | try |
| | | { |
| | | //Db.BeginTran(); |
| | | //循环盘点明细的信息生成出库任务 |
| | | foreach (var item in list) |
| | | { |
| | |
| | | TypeName = "出库", |
| | | Msg = $"点击出库按钮盘点单号为:{crNo}的盘点单" |
| | | }); |
| | | Db.CommitTran(); |
| | | //Db.CommitTran(); |
| | | |
| | | str = string.Empty; |
| | | if (flagList.Count(m => m == 1) > 0) |
| | |
| | | { |
| | | str += "5.要出库的托盘在零箱库、"; |
| | | } |
| | | if (!string.IsNullOrEmpty(str)) |
| | | throw Oops.Bah(str); |
| | | if (outDtoList.Count > 0) |
| | | { |
| | | // 正式运行程序放开 |
| | |
| | | var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | string response = ""; |
| | | |
| | | 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") |
| | |
| | | //if (wcsModel.StatusCode == -1) |
| | | //{ |
| | | // new TaskServer().EditTaskIssueNo(list2, time1, time2, wcsModel.Msg); |
| | | // throw new Exception(wcsModel.Msg); |
| | | // throw Oops.Bah(wcsModel.Msg); |
| | | //} |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | return outDtoList; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Db.RollbackTran(); |
| | | throw new Exception(e.Message); |
| | | } |
| | | #endregion |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //盘点出库完成 |
| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | using WMS.DAL; |
| | | using WMS.Entity.BllSoEntity; |
| | |
| | | } |
| | | |
| | | //查询拣货明细箱码信息(分组后) |
| | | public List<CompleteDetailDto> GetCompleteDetailList(int id, int page, int limit, out int count) |
| | | { |
| | | try |
| | | { |
| | | var total = 0; |
| | | var detailInfo = Db.Queryable<BllCompleteDetail>().First(w => string.IsNullOrEmpty(w.BoxNo) || string.IsNullOrEmpty(w.BoxNo3)); |
| | | if (detailInfo == null) |
| | | public async Task<List<CompleteDetailDto>> GetCompleteDetailList(GetCompleteDetailVm model, RefAsync<int> count) |
| | | { |
| | | Expression<Func<BllCompleteDetail, bool>> item = Expressionable.Create<BllCompleteDetail>() |
| | | .And(it => it.ExportAllotId == id) |
| | | .And(it => it.ExportAllotId == model.Id) |
| | | .And(it => it.IsDel == "0") |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var data = GetAllWhereAsync(item) |
| | | var data = await GetAllWhereAsync(item) |
| | | .GroupBy(m => new |
| | | { |
| | | m.SONo, |
| | |
| | | m.SkuName, |
| | | m.Standard, |
| | | m.PalletNo, |
| | | m.NowPalletNo, |
| | | m.NowPalletNo |
| | | }) |
| | | .Select(a => new CompleteDetailDto() |
| | | { |
| | |
| | | PalletNo = a.PalletNo, |
| | | CompleteQty = SqlFunc.AggregateSum(a.CompleteQty), |
| | | NowPalletNo = a.NowPalletNo, |
| | | //CreateTime = a.CreateTime |
| | | }).ToOffsetPage(page, limit, ref total); |
| | | count = total; |
| | | return data; |
| | | } |
| | | else //箱码或支码为空说明是按数量拣货,增加 CreateTime 分组条件 |
| | | { |
| | | Expression<Func<BllCompleteDetail, bool>> item = Expressionable.Create<BllCompleteDetail>() |
| | | .And(it => it.ExportAllotId == id) |
| | | .And(it => it.IsDel == "0") |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var data = GetAllWhereAsync(item) |
| | | .GroupBy(m => new |
| | | { |
| | | m.SONo, |
| | | m.SODetailNo, |
| | | m.StockId, |
| | | m.ExportAllotId, |
| | | }).ToPageListAsync(model.Page, model.Limit, count); |
| | | |
| | | m.BoxNo, |
| | | m.LotNo, |
| | | m.LotText, |
| | | m.SupplierLot, |
| | | m.SkuNo, |
| | | m.SkuName, |
| | | m.Standard, |
| | | m.PalletNo, |
| | | m.NowPalletNo, |
| | | m.CreateTime |
| | | }) |
| | | .Select(a => new CompleteDetailDto() |
| | | { |
| | | SONo = a.SONo, |
| | | SODetailNo = a.SODetailNo, |
| | | StockId = a.StockId, |
| | | ExportAllotId = a.ExportAllotId, |
| | | |
| | | BoxNo = a.BoxNo, |
| | | LotNo = a.LotNo, |
| | | LotText = a.LotText, |
| | | SupplierLot = a.SupplierLot, |
| | | SkuNo = a.SkuNo, |
| | | SkuName = a.SkuName, |
| | | Standard = a.Standard, |
| | | PalletNo = a.PalletNo, |
| | | CompleteQty = SqlFunc.AggregateSum(a.CompleteQty), |
| | | NowPalletNo = a.NowPalletNo, |
| | | //CreateTime = a.CreateTime |
| | | }).ToOffsetPage(page, limit, ref total); |
| | | count = total; |
| | | return data; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //查询拣货明细支码详细信息 |
| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | using WMS.BLL.LogServer; |
| | | using WMS.DAL; |
| | |
| | | } |
| | | |
| | | //查询出库分配表信息 |
| | | public List<ExportAllotDto> GetExportAllotList(string no, string waveNo, string palletNo, string skuNo, string skuName, string lotNo, string status, string boxNo, int page, int limit, out int count) |
| | | { |
| | | try |
| | | public async Task<List<ExportAllotDto>> GetExportAllotList(GetExportAllotVm model, RefAsync<int> count) |
| | | { |
| | | var strList = new List<int>(); |
| | | |
| | | if (!string.IsNullOrWhiteSpace(boxNo)) |
| | | if (!string.IsNullOrWhiteSpace(model.BoxNo)) |
| | | { |
| | | var detailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.BoxNo.Contains(boxNo.Trim())).Select(m => m.ExportAllotId).Distinct().ToList(); |
| | | var detailList = Db.Queryable<BllCompleteDetail>().Where(m => m.IsDel == "0" && m.BoxNo.Contains(model.BoxNo.Trim())).Select(m => m.ExportAllotId).Distinct().ToList(); |
| | | strList = detailList; |
| | | } |
| | | Expression<Func<BllExportAllot, bool>> item = Expressionable.Create<BllExportAllot>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(no), it => it.SONo.Contains(no.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(waveNo), it => it.WaveNo.Contains(waveNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(palletNo), it => it.PalletNo.Contains(palletNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(skuNo), it => it.SkuNo.Contains(skuNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(skuName), it => it.SkuName.Contains(skuName.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => it.LotNo.Contains(lotNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status) |
| | | .AndIF(!string.IsNullOrWhiteSpace(boxNo), m => strList.Contains(m.Id)) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SoNo), it => it.SONo.Contains(model.SoNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.WaveNo), it => it.WaveNo.Contains(model.WaveNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), it => it.PalletNo.Contains(model.PalletNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), it => it.SkuNo.Contains(model.SkuNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), it => it.SkuName.Contains(model.SkuName.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.BoxNo), m => strList.Contains(m.Id)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var data = GetAllWhereAsync(item) |
| | | var data = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysLogisticsInfo>((a, b) => a.LogisticsId == b.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c, d) => a.CreateUser == d.Id) |
| | |
| | | UpdateUserName = d.RealName, |
| | | CreateTime = a.CreateTime, |
| | | UpdateTime = a.UpdateTime |
| | | }).OrderByDescending(a => a.CreateTime).OrderBy(a => a.Status).OrderBy(a => a.SkuNo).ToOffsetPage(page, limit, ref total); |
| | | }).OrderByDescending(a => a.CreateTime).OrderBy(a => a.Status).OrderBy(a => a.SkuNo) |
| | | .ToPageListAsync(model.Page, model.Limit, count); |
| | | count = total; |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //撤销分配(删除) |
| | |
| | | } |
| | | public async Task<List<ExportNoticeDetailDto>> GetExportNoticeDetailList(GetExportNoticeDetailVm model, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrWhiteSpace(model.SoNo)) |
| | | { |
| | | throw new Exception("出库单号为空"); |
| | |
| | | }).ToPageListAsync(model.Page, model.Limit, count); |
| | | |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | public bool DelExportNoticeDetail(int id, int userId) |
| | |
| | | |
| | | public async Task<List<ExportNoticeDto>> GetExportNoticeList(GetExportNoticeVm model, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | | var strList = new List<string>(); |
| | | |
| | | if (!string.IsNullOrWhiteSpace(model.LotNo)) |
| | |
| | | .ToPageListAsync(model.Page, model.Limit, count); |
| | | |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //获取添加/编辑出库单时选择物料明细信息 |
| | |
| | | /// <param name="limit">零托标记</param> |
| | | /// <param name="count">零托标记</param> |
| | | /// <returns></returns> |
| | | public List<DataStockDetail> GetPalletNoOutList(string skuNo, string skuName, string palletNo, string lotNo, string inspectMark, string bitPalletMark, int page, int limit, out int count) |
| | | { |
| | | |
| | | try |
| | | public async Task<List<DataStockDetail>> GetPalletNoOutList(GetPalletNoOutVm model, RefAsync<int> count) |
| | | { |
| | | Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(skuNo), m => m.SkuNo.Contains(skuNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(skuName), m => m.SkuName.Contains(skuName.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(palletNo), m => m.PalletNo.Contains(palletNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(lotNo), m => m.LotNo.Contains(lotNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(inspectMark), m => m.InspectMark == inspectMark) |
| | | .AndIF(!string.IsNullOrWhiteSpace(bitPalletMark), m => m.BitPalletMark == bitPalletMark) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), m => m.SkuNo.Contains(model.SkuNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), m => m.SkuName.Contains(model.SkuName.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), m => m.PalletNo.Contains(model.PalletNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), m => m.LotNo.Contains(model.LotNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.InspectMark), m => m.InspectMark == model.InspectMark) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.BitPalletMark), m => m.BitPalletMark == model.BitPalletMark) |
| | | .And(m => !string.IsNullOrWhiteSpace(m.WareHouseNo)) |
| | | .And(a => a.Status == "0") |
| | | .And(a => a.WareHouseNo == "W01") |
| | | .ToExpression(); |
| | | var total = 0; |
| | | var data = Db.Queryable<DataStockDetail>().Where(item).OrderBy(m => m.LocatNo).ToOffsetPage(page, limit, ref total); |
| | | var data = await Db.Queryable<DataStockDetail>().Where(item).OrderBy(m => m.LocatNo).ToPageListAsync(model.Page, model.Limit, count); |
| | | //data.Select(m => m.Status == "0" && m.IsDel == "0"); |
| | | count = total; |
| | | |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //托盘出库 |
| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.InterFaceModel; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using WMS.BLL.Logic; |
| | |
| | | } |
| | | |
| | | //获取波次单信息 |
| | | public List<WaveMageDto> GetWaveMageList(string waveNo, string status, string lotNo, int? logisticsId, int page, int limit, out int count) |
| | | { |
| | | try |
| | | public async Task<List<WaveMageDto>> GetWaveMageList(GetWaveMageVm model, RefAsync<int> count) |
| | | { |
| | | Expression<Func<BllWaveMage, bool>> item = Expressionable.Create<BllWaveMage>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(waveNo), it => it.WaveNo.Contains(waveNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status) |
| | | .AndIF(logisticsId != null, it => it.LogisticsId == logisticsId) |
| | | .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => it.LotNo.Contains(lotNo)) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.WaveNo), it => it.WaveNo.Contains(model.WaveNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status) |
| | | .AndIF(model.LogisticsId != null, it => it.LogisticsId == model.LogisticsId) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var data = GetAllWhereAsync(item) |
| | | |
| | | var data = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysLogisticsInfo>((a, b) => a.LogisticsId == b.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c, d) => a.CreateUser == d.Id) |
| | |
| | | |
| | | }) |
| | | .OrderByDescending(a => a.CreateTime) |
| | | .ToOffsetPage(page, limit, ref total); |
| | | count = total; |
| | | .ToPageListAsync(model.Page, model.Limit, count); |
| | | |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | //获取添加波次单的出库单信息 |
| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.LogDto; |
| | | using SqlSugar; |
| | | using WMS.BLL.SysServer; |
| | |
| | | public OperationSOServer() : base(Db) |
| | | { |
| | | } |
| | | public List<OperationDto> GetLogOperationSoList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count) |
| | | { |
| | | try |
| | | public async Task<List<OperationDto>> GetLogOperationSoList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, RefAsync<int> count) |
| | | { |
| | | var item = Expressionable.Create<LogOperationSO>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim())) |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) |
| | | .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var list = GetAllWhereAsync(item) |
| | | |
| | | var list = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) |
| | | .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) |
| | | .Select((it, dic, users) => new OperationDto() |
| | |
| | | CreateUserName = users.RealName, |
| | | }) |
| | | .OrderByDescending(it => it.CreateTime) |
| | | .ToOffsetPage(page, limit, ref total); |
| | | .ToPageListAsync(page, limit, count); |
| | | |
| | | count = total; |
| | | return list.OrderByDescending(m => m.CreateTime).ToList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | public bool AddLogOperationSo(string parentNo, string menuName, string fkNo, string type, string msg, int userId) |
| | | { |
| | |
| | | |
| | | var str = pallNo.Substring(3, 5); |
| | | string remove = pallNo.Substring(0, 3); |
| | | int sibelius = Convert.ToInt16(str); |
| | | int sibelius = 0; |
| | | var num = 0; |
| | | if (remove != "T" + DateTime.Now.ToString("yy")) |
| | | { |
| | | remove = "T" + DateTime.Now.ToString("yy"); |
| | | sibelius = 0; |
| | | } |
| | | else |
| | | { |
| | | sibelius = Convert.ToInt16(str); |
| | | } |
| | | for (int i = 0; i < groupCount; i++) |
| | | { |
| | | sibelius += 1; |
| | |
| | | //Console.WriteLine(UtilMethods.GetNativeSql(sql, pars)); |
| | | |
| | | //获取无参数化SQL 对性能有影响,特别大的SQL参数多的,调试使用 |
| | | //Console.WriteLine(UtilMethods.GetSqlString(DbType.SqlServer, sql, pars)); |
| | | Console.WriteLine(UtilMethods.GetSqlString(DbType.SqlServer, sql, pars)); |
| | | |
| | | }; |
| | | |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.IBllSoServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<CompleteDetailDto> GetCompleteDetailList(int id, int page, int limit, out int count); |
| | | Task<List<CompleteDetailDto>> GetCompleteDetailList(GetCompleteDetailVm model, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 获取拣货明细中详细箱支信息 根据箱码\支码 |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.IBllSoServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<ExportAllotDto> GetExportAllotList(string no, string waveNo, string palletNo, string skuNo, string skuName, string lotNo, string status, string boxNo, int page, int limit, out int count); |
| | | Task<List<ExportAllotDto>> GetExportAllotList(GetExportAllotVm model, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 撤销分配(删除) |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<DataStockDetail> GetPalletNoOutList(string skuNo, string skuName, string palletNo, string lotNo, |
| | | string inspectMark, string bitPalletMark, int page, int limit, out int count); |
| | | Task<List<DataStockDetail>> GetPalletNoOutList(GetPalletNoOutVm model, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 托盘下发出库 |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.InterFaceModel; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.IBllSoServer |
| | | { |
| | |
| | | /// <param name="limit">数量</param> |
| | | /// <param name="count">中数量</param> |
| | | /// <returns></returns> |
| | | List<WaveMageDto> GetWaveMageList(string waveNo, string status, string lotNo, int? logisticsId, int page, int limit, out int count); |
| | | Task<List<WaveMageDto>> GetWaveMageList(GetWaveMageVm model, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 获取添加波次单的出库单信息 |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.LogDto; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.ILogServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<OperationDto> GetLogOperationSoList(string menuName, string type, string msg, string startTime, |
| | | string endTime, int page, int limit, out int count); |
| | | Task<List<OperationDto>> GetLogOperationSoList(string menuName, string type, string msg, string startTime, |
| | | string endTime, int page, int limit, RefAsync<int> count); |
| | | /// <summary> |
| | | /// 添加出库操作日志 |
| | | /// </summary> |
| | |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "入库任务信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "入库任务信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _stockCheckSvc.GetStockCheckList(model.CrNo, model.Status, model.PalletNo, model.SkuNo, model.SkuName, model.LotNo, model.StartTime, model.EndTime, model.Page, model.Limit, count); |
| | | return Ok(new { code = 0, count, msg = "盘点单信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "盘点单信息", data = bolls }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _stockCheckSvc.GetStockCheckDetailList(model.CrNo, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "盘点单明细信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "盘点单明细信息", data = bolls }); |
| | | } |
| | | /// <summary> |
| | | /// 获取库存明细信息(盘点选择明细数据源) |
| | |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _stockCheckSvc.GetCheckStockDetailList(model.HouseNo, model.RoadwayNo, model.LocateNo, model.Msg, model.Page, model.Limit, count); |
| | | return Ok(new { code = 0, count, msg = "获取库存明细信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "获取库存明细信息", data = bolls }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _stockCheckLogSvc.GetStockCheckLogList(model.CrNo, model.Status, model.PalletNo, model.BoxNo, model.SkuNo, model.SkuName, model.LotNo, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "盘点记录", data = list }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "盘点记录", data = list }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "库内任务信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "库内任务信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _logSvc.GetLogOperationCrList(model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库操作日志信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "出库操作日志信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | { |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | List<MateDataStockDto> mateDataStockDtos = await _stockPallet.GetPalletsOutside(model.SkuNo, model.SkuName, model.LotNo, model.PalletNo, model.Page, model.Limit, count); |
| | | return Ok(new { code = 0, count, msg = "获取库外托盘信息成功", data = mateDataStockDtos }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "获取库外托盘信息成功", data = mateDataStockDtos }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetExportAllotList(GetExportAllotVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetExportAllotList(GetExportAllotVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _exAllotSvc.GetExportAllotList(model.SoNo, model.WaveNo, model.PalletNo, model.SkuNo, model.SkuName, model.LotNo, model.Status,model.BoxNo, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _exAllotSvc.GetExportAllotList(model, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库分配信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetCompleteDetailList(GetCompleteDetailVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetCompleteDetailList(GetCompleteDetailVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _comDetailSvc.GetCompleteDetailList(model.Id,model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _comDetailSvc.GetCompleteDetailList(model, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "拣货明细信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | [HttpGet] |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetPalletNoOutList(GetPalletNoOutVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetPalletNoOutList(GetPalletNoOutVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _exNoticeSvc.GetPalletNoOutList(model.SkuNo,model.SkuName,model.PalletNo,model.LotNo,model.InspectMark,model.BitPalletMark,model.Page,model.Limit,out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _exNoticeSvc.GetPalletNoOutList(model, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "获取托盘出库数据异常", data = bolls}); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = "托盘出库数据" + e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _taskSvc.GetTaskList( type, model.Type,model.Status,model.TaskNo,model.IsSuccess,model.PalletNo,model.Msg,model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库任务信息", data = bolls }); |
| | | return Ok(new { code = 0, count = count.Value, msg = "出库任务信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetLogOperationSoList(GetOperationVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetLogOperationSoList(GetOperationVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _logSvc.GetLogOperationSoList(model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime,model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _logSvc.GetLogOperationSoList(model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库操作日志信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | #endregion |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetWaveMageList(GetWaveMageVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetWaveMageList(GetWaveMageVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _waveSvc.GetWaveMageList(model.WaveNo, model.Status, model.LotNo, model.LogisticsId, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _waveSvc.GetWaveMageList(model, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库单信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpGet] |
| | | [UnitOfWork] |
| | | public async Task<IActionResult> CheckOutHouse(string crNo, string outMode) |
| | | { |
| | | try |
| | | { |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | |
| | | |
| | | return Ok(new { code = 0, msg = str, data = list }); |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |