箱型信息code

optimize
wet 2 years ago
parent 13828dd5c5
commit 1d852ec937

@ -172,6 +172,7 @@ namespace Myshipping.Application
throw Oops.Bah($"未匹配到创建人 {model.CreatedUserName.Trim()} 请联系管理员添加相关用户"); throw Oops.Bah($"未匹配到创建人 {model.CreatedUserName.Trim()} 请联系管理员添加相关用户");
} }
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.BSNO == model.BSNO).FirstAsync(); var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.BSNO == model.BSNO).FirstAsync();
List<CodeCtn> ctncode = await _cache.GetAllCodeCtn();
if (order == null) if (order == null)
{ {
@ -240,6 +241,7 @@ namespace Myshipping.Application
ctnentity.BILLID = entity.Id; ctnentity.BILLID = entity.Id;
ctnentity.CreatedUserId = user.Result.Id; ctnentity.CreatedUserId = user.Result.Id;
ctnentity.CreatedUserName = user.Result.Name; ctnentity.CreatedUserName = user.Result.Name;
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
await _repCtn.InsertAsync(ctnentity); await _repCtn.InsertAsync(ctnentity);
//这里保存有可能没有添加多品名,所有箱下没有货物信息 //这里保存有可能没有添加多品名,所有箱下没有货物信息
@ -387,6 +389,7 @@ namespace Myshipping.Application
ctnentity.BILLID = fdentity.Id; ctnentity.BILLID = fdentity.Id;
ctnentity.CreatedUserId = user.Result.Id; ctnentity.CreatedUserId = user.Result.Id;
ctnentity.CreatedUserName = user.Result.Name; ctnentity.CreatedUserName = user.Result.Name;
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
await _repCtn.InsertAsync(ctnentity); await _repCtn.InsertAsync(ctnentity);
//这里保存有可能没有添加多品名,所有箱下没有货物信息 //这里保存有可能没有添加多品名,所有箱下没有货物信息
@ -548,6 +551,7 @@ namespace Myshipping.Application
ctnentity.BILLID = main.Id; ctnentity.BILLID = main.Id;
ctnentity.CreatedUserId = user.Result.Id; ctnentity.CreatedUserId = user.Result.Id;
ctnentity.CreatedUserName = user.Result.Name; ctnentity.CreatedUserName = user.Result.Name;
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
await _repCtn.InsertAsync(ctnentity); await _repCtn.InsertAsync(ctnentity);
if (item.ctnDetailInputs != null) if (item.ctnDetailInputs != null)
{ {
@ -760,6 +764,7 @@ namespace Myshipping.Application
ctnentity.BILLID = fdmain.Id; ctnentity.BILLID = fdmain.Id;
ctnentity.CreatedUserId = user.Result.Id; ctnentity.CreatedUserId = user.Result.Id;
ctnentity.CreatedUserName = user.Result.Name; ctnentity.CreatedUserName = user.Result.Name;
ctnentity.CTNCODE = ctncode.Where(x => x.Name == ctnentity.CTNALL).Select(x => x.Code).First();
await _repCtn.InsertAsync(ctnentity); await _repCtn.InsertAsync(ctnentity);
if (it.ctnDetailInputs != null) if (it.ctnDetailInputs != null)
{ {

Loading…
Cancel
Save