修改了删除条码计数

This commit is contained in:
2025-05-19 16:00:00 +08:00
parent 5a3c26e94e
commit 2fc20d1c53
4 changed files with 32 additions and 12 deletions

View File

@@ -450,17 +450,17 @@ namespace BarCode.Web.Domain.Services
public async Task<Result> Use(List<int> sGIds)
{
var sGList = await _sGenerateRecordRepositories.GetEntityList(sGIds,"");
_logger.LogInformation($"获取到sGList:{JsonConvert.SerializeObject(sGList)}");
//_logger.LogInformation($"获取到sGList:{JsonConvert.SerializeObject(sGList)}");
var sGSNumberList = await _serialNumbersRepositories.GetEntityListByGRIds(sGIds);
_logger.LogInformation($"获取到sGSNumberList:{JsonConvert.SerializeObject(sGSNumberList)}");
// _logger.LogInformation($"获取到sGSNumberList:{JsonConvert.SerializeObject(sGSNumberList)}");
foreach (var sg in sGList)
{
int number = sGSNumberList.Where(w => w.GenerateRecordId == sg.Id && w.BoxId > 0 && w.IsNotCount!="1").Count();
int number = sGSNumberList.Where(w => w.GenerateRecordId == sg.Id && w.BoxId > 0 ).Count();
sg.Use(number);
_logger.LogInformation($"获取到sg:{sg}");
// _logger.LogInformation($"获取到sg:{sg}");
}
var isSuccess = await _sGenerateRecordRepositories.EditEntityList(sGList, false);