调整出库任务单增加组织
This commit is contained in:
Binary file not shown.
@@ -26,6 +26,8 @@ using WMS.Web.Core.Dto.Erp;
|
|||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using WMS.Web.Domain.Services;
|
using WMS.Web.Domain.Services;
|
||||||
|
using SkiaSharp;
|
||||||
|
using Google.Protobuf.Collections;
|
||||||
|
|
||||||
namespace WMS.Web.Api.Controllers
|
namespace WMS.Web.Api.Controllers
|
||||||
{
|
{
|
||||||
@@ -89,9 +91,22 @@ namespace WMS.Web.Api.Controllers
|
|||||||
[Route("hj")]
|
[Route("hj")]
|
||||||
public async Task<string> TestHJ()
|
public async Task<string> TestHJ()
|
||||||
{
|
{
|
||||||
|
//List<string> list = new List<string>();
|
||||||
|
//list.Add("GD-02-15");
|
||||||
|
//list.Add("GD-01-15");
|
||||||
|
//list.Add("AB-02-23");
|
||||||
|
//list.Add("AB-01-23");
|
||||||
|
//list.Add("AB-01-15");
|
||||||
|
//list.Add("AB-1-06");
|
||||||
|
//list.Add("AB-3-15");
|
||||||
|
//list.Add("C-3-15");
|
||||||
|
//List<string> list2 = new List<string>();
|
||||||
|
//list.ForEach(f => list2.Add(f.Replace("-0", "-")));
|
||||||
|
//var ss = list2.OrderBy(s => s).ToList();
|
||||||
|
|
||||||
//await _inStockTaskService.ErpDel();
|
//await _inStockTaskService.ErpDel();
|
||||||
//await _outStockTaskService.BillQueryForMisDeliveryOutStock(true, new List<string>() { "QTCK026812" });
|
//await _outStockTaskService.BillQueryForMisDeliveryOutStock(true, new List<string>() { "QTCK026812" });
|
||||||
await _inStockTaskService.SysnMiscellaneous(new List<string>() { "QTRK028204" }, true);
|
//await _inStockTaskService.SysnMiscellaneous(new List<string>() { "QTRK028204" }, true);
|
||||||
|
|
||||||
|
|
||||||
// List<int> boxIds = new List<int>();
|
// List<int> boxIds = new List<int>();
|
||||||
|
|||||||
@@ -523,16 +523,18 @@ namespace WMS.Web.Repositories
|
|||||||
|
|
||||||
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo, string stockCode)
|
public async Task<List<string>> GetOutStockTaskNosByNo(string billNo, string stockCode)
|
||||||
{
|
{
|
||||||
|
var split = stockCode.Split("_$");
|
||||||
|
|
||||||
var res = await _context.OutStockTask.Include(x => x.Details.Where(w => w.IsRepeal != true)).ThenInclude(s => s.ErpDetails)
|
var res = await _context.OutStockTask.Include(x => x.Details.Where(w => w.IsRepeal != true)).ThenInclude(s => s.ErpDetails)
|
||||||
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
.Where(f => EF.Functions.Like(f.BillNo, "%" + billNo + "%") &&
|
||||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait) && f.StockCode.Equals(stockCode))
|
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait) && f.StockCode.Equals(split[0]) && f.OrgCode.Equals(split[1]))
|
||||||
.OrderByDescending(o => o.Id)
|
.OrderByDescending(o => o.Id)
|
||||||
.Select(s => s.BillNo)
|
.Select(s => s.BillNo)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var ress = await _context.OutStockTask.Include(x => x.Details.Where(w => w.IsRepeal != true)).ThenInclude(s => s.ErpDetails)
|
var ress = await _context.OutStockTask.Include(x => x.Details.Where(w => w.IsRepeal != true)).ThenInclude(s => s.ErpDetails)
|
||||||
.Where(f => (f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
.Where(f => (f.Details.SelectMany(s => s.ErpDetails).Where(w => EF.Functions.Like(w.SourceBillNo, "%" + billNo + "%")).Any()) &&
|
||||||
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait) && f.StockCode.Equals(stockCode))
|
(f.Status == OutStockStatus.Part || f.Status == OutStockStatus.Wait) && f.StockCode.Equals(split[0]) && f.OrgCode.Equals(split[1]))
|
||||||
.OrderByDescending(o => o.Id)
|
.OrderByDescending(o => o.Id)
|
||||||
.Select(s => s.BillNo)
|
.Select(s => s.BillNo)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user