|
@ -294,13 +294,44 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
var sql = "DECLARE @return_value int\n" + |
|
|
var sql = "DECLARE @return_value int\n" + |
|
|
"EXEC @return_value = [dbo].[p_wms_output]\n" + |
|
|
"EXEC @return_value = [dbo].[p_wms_output]\n" + |
|
|
" @billnum = N'{0}',\n" + |
|
|
" @billnum = N'{0}',\n" + |
|
|
" @type = 4\n" + |
|
|
" @type = 9\n" + |
|
|
|
|
|
" @date = '{1}'\n" + |
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
string.Format(sql, input.BillNum)); |
|
|
string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString())); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 出库界面功能删除
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="version"></param>
|
|
|
|
|
|
/// <param name="p_list"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost] |
|
|
|
|
|
[Route("WmsOutPutDelete")] |
|
|
|
|
|
[UnitOfWork(false)] |
|
|
|
|
|
public async Task<bool> WmsOutPutDelete(WmsJitRequestDto input) |
|
|
|
|
|
{ |
|
|
|
|
|
var count = _wmsRepository.Count(p => p.BillNum == input.BillNum && p.State != 0); |
|
|
|
|
|
|
|
|
|
|
|
if (count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
var sql = "DECLARE @return_value int\n" + |
|
|
|
|
|
"EXEC @return_value = [dbo].[p_wms_output_cancel_all]\n" + |
|
|
|
|
|
" @billnum = N'{0}',\n" + |
|
|
|
|
|
" @type = 9,\n" + |
|
|
|
|
|
"SELECT 'Return Value' = @return_value"; |
|
|
|
|
|
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync( |
|
|
|
|
|
string.Format(sql, input.BillNum, input.AccountDate.ToShortDateString()) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|