|
|
@ -320,7 +320,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
_lst.AddRange(_list.ToArray()); |
|
|
|
} |
|
|
|
// var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
|
|
|
|
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync(); |
|
|
|
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version && p.State!=4).ToListAsync(); |
|
|
|
|
|
|
|
var error = from itm1 in outPutDetail |
|
|
|
join itm2 in _lst on |
|
|
@ -399,11 +399,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
List<WmsKanbanOutPutDetial> _ls = new List<WmsKanbanOutPutDetial>(); |
|
|
|
if (input.Guids.Count() > 0) |
|
|
|
{ |
|
|
|
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version ==input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync(); |
|
|
|
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2 && p.State != 4).ToListAsync(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync(); |
|
|
|
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2 && p.State!=4).ToListAsync(); |
|
|
|
} |
|
|
|
if (_ls.Count() > 0) |
|
|
|
{ |
|
|
@ -457,6 +457,78 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///出库界面功能, 撤销核准出库
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
/// <param name="version"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost] |
|
|
|
[Route("Regenerate")] |
|
|
|
public async Task<bool> WmsKanbanOutPutRegenerate(WmsJitRequestDto input) |
|
|
|
{ |
|
|
|
if (input.Guids != null && input.Guids.Count() > 0) |
|
|
|
{ |
|
|
|
List<string> _ls = new List<string>(); |
|
|
|
|
|
|
|
var _lst = _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.State == 4); |
|
|
|
|
|
|
|
|
|
|
|
List<WmsKanbanOutPutDetial> _detail = new List<WmsKanbanOutPutDetial>(); |
|
|
|
foreach (var itm in _lst.ToList()) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _wmsRepository.BatchDeleteAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//foreach (var itm in input.Guids)
|
|
|
|
//{
|
|
|
|
// _ls.Add(string.Format("{0}", itm));
|
|
|
|
//}
|
|
|
|
|
|
|
|
//string str = string.Join(",", _ls.ToArray());
|
|
|
|
|
|
|
|
//var sql = "DECLARE @return_value int\n" +
|
|
|
|
// "EXEC @return_value = [dbo].[p_wms_output_cancel]\n" +
|
|
|
|
// " @Guids ='{0}', \n" +
|
|
|
|
// " @billnum = N'{1}',\n" +
|
|
|
|
// " @type = 1,\n" +
|
|
|
|
// " @accountdate = N'{2}'\n" +
|
|
|
|
// "SELECT 'Return Value' = @return_value";
|
|
|
|
|
|
|
|
//sql = string.Format(sql, str, input.BillNum, input.AccountDate.ToShortDateString());
|
|
|
|
|
|
|
|
//await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
|
|
|
|
// sql
|
|
|
|
// );
|
|
|
|
|
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 出库界面功能删除
|
|
|
|
/// </summary>
|
|
|
|