海运出口、舱单箱型相关代码

usertest
ZR20090193-陈敬勇 5 months ago
parent cd05267d2c
commit bf675b1377

@ -14,6 +14,7 @@ using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.View;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface;
using DS.WMS.Core.Sys.Method;
@ -403,6 +404,10 @@ namespace DS.WMS.Core.Check.Method
var businessList = new List<CheckBillBusiness>();
var feeList = new List<CheckBillFeeRecords>();
if (tenantDb.Queryable<VW_Op_Business>().Where(x => req.Ids.Contains(x.BusinessId) && x.CustomerId!= info.CustomerId).Any())
return DataResult.Failed("明细客户与对账客户不一致");
var businessIds = tenantDb.Queryable<CheckBillBusiness>().Where(x => x.CheckId == checkId).Select(x => x.BusinessId).ToList();
if (businessIds.Where(x=> req.Ids.Contains(x)).Any())
return DataResult.Failed("明细业务存在已添加");

@ -35,7 +35,10 @@ namespace DS.WMS.Core.Op.Dtos
/// 箱型
/// </summary>
public string Ctn { get; set; }
/// <summary>
/// 箱型Id
/// </summary>
public long CtnId { get; set; }
/// <summary>
/// 箱量
/// </summary>

@ -34,7 +34,10 @@ namespace DS.WMS.Core.Op.Dtos
/// 箱型
/// </summary>
public string Ctn { get; set; }
/// <summary>
/// 箱型Id
/// </summary>
public long CtnId { get; set; }
/// <summary>
/// 箱量
/// </summary>

@ -32,7 +32,10 @@ namespace DS.WMS.Core.Op.Dtos
/// 箱型
/// </summary>
public string Ctn { get; set; }
/// <summary>
/// 箱型Id
/// </summary>
public long CtnId { get; set; }
/// <summary>
/// 表现形式

@ -32,7 +32,10 @@ namespace DS.WMS.Core.Op.Dtos
/// 箱型
/// </summary>
public string Ctn { get; set; }
/// <summary>
/// 箱型Id
/// </summary>
public long CtnId { get; set; }
/// <summary>
/// 表现形式

@ -33,8 +33,11 @@ namespace DS.WMS.Core.Op.Entity
/// </summary>
[SugarColumn(ColumnDescription = "箱型", IsNullable = true, Length = 10)]
public string Ctn { get; set; }
/// <summary>
/// 箱型Id
/// </summary>
[SugarColumn(ColumnDescription = "箱型Id")]
public long CtnId { get; set; }
/// <summary>
/// 表现形式
/// </summary>

@ -215,36 +215,35 @@ namespace DS.WMS.Core.Op.Method
{
var ctn = item.Adapt<SeaExportShippingBillCtn>();
ctn.Pid = info.Id;
if (ctn.CtnAll.Length == 4)
{
ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : "";
ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : "";
}
if (ctn.CtnAll.Contains("'"))
{
ctn.Size = ctn.CtnAll.Split("'")[0].ToString();
ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString();
}
//if (ctn.CtnAll.Length == 4)
//{
// ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : "";
// ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : "";
//}
//if (ctn.CtnAll.Contains("'"))
//{
// ctn.Size = ctn.CtnAll.Split("'")[0].ToString();
// ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString();
//}
tenantDb.Insertable(ctn).ExecuteCommand();
}
else
{
var ctn = ctnList.First(x => x.Id == item.Id);
ctn = item.Adapt(ctn);
if (ctn.CtnAll.Length == 4)
{
ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : "";
ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : "";
}
if (ctn.CtnAll.Contains("'"))
{
ctn.Size = ctn.CtnAll.Split("'")[0].ToString();
ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString();
}
//if (ctn.CtnAll.Length == 4)
//{
// ctn.Size = ctn.CtnAll != null ? ctn.CtnAll.Substring(0, 2) : "";
// ctn.Ctn = ctn.CtnAll != null ? ctn.CtnAll.Substring(2, 2) : "";
//}
//if (ctn.CtnAll.Contains("'"))
//{
// ctn.Size = ctn.CtnAll.Split("'")[0].ToString();
// ctn.Ctn = ctn.CtnAll.Split("'")[1].ToString();
//}
tenantDb.Updateable(ctn).ExecuteCommand();
}

Loading…
Cancel
Save