测试
This commit is contained in:
@@ -23,6 +23,7 @@ using Org.BouncyCastle.Crypto;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -475,15 +476,17 @@ namespace BarCode.Web.Domain.Services
|
||||
public async Task<Result> TransferSn(TransferSNOneTwoTwoRequest dto)
|
||||
{
|
||||
|
||||
|
||||
_logger.LogInformation($"获取到:dto:{JsonConvert.SerializeObject(dto)}");
|
||||
//先判断是否有存在使用的序列号,如果有的话,就报错。
|
||||
dto.ids = dto.ids.Distinct().ToList();
|
||||
_logger.LogInformation($"获取到:dto.ids:{JsonConvert.SerializeObject(dto.ids)}");
|
||||
var sAll = dto.ids.Select(s => s.Id).ToList();
|
||||
|
||||
|
||||
_logger.LogInformation($"获取到:sAll:{JsonConvert.SerializeObject(sAll)}");
|
||||
|
||||
List<SerialNumbers> isUselist = await _serialNumbersRepositories.GetUseEntityListByGRIds(sAll);
|
||||
if(isUselist.Count>0)
|
||||
_logger.LogInformation($"获取到:isUselist:{JsonConvert.SerializeObject(isUselist)}");
|
||||
if (isUselist.Count>0)
|
||||
{
|
||||
|
||||
//取出所有GenerateRecordId
|
||||
@@ -491,16 +494,24 @@ namespace BarCode.Web.Domain.Services
|
||||
var GenerateRecordIdAll= isUselist.Select (s=>s.GenerateRecordId).ToList();
|
||||
string spec = "";
|
||||
GenerateRecordIdAll.Distinct();
|
||||
|
||||
_logger.LogInformation($"获取到:GenerateRecordIdAll:{JsonConvert.SerializeObject(GenerateRecordIdAll)}");
|
||||
|
||||
foreach (int g in GenerateRecordIdAll)
|
||||
{
|
||||
var y = dto.ids.Where(x => x.Id == g).ToList();
|
||||
_logger.LogInformation($"获取到:y:{JsonConvert.SerializeObject(y)}");
|
||||
|
||||
|
||||
if (spec == "")
|
||||
{
|
||||
spec = y[0].Specifications;
|
||||
_logger.LogInformation($"获取到:specA:{y[0].Specifications}");
|
||||
}
|
||||
else
|
||||
{
|
||||
spec = spec + "," + y[0].Specifications;
|
||||
_logger.LogInformation($"获取到:spec:{spec}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user