|
|
|
@ -510,11 +510,19 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
GoodName = seaExport.GoodsName,
|
|
|
|
|
HSCode = seaExport.HSCode
|
|
|
|
|
};
|
|
|
|
|
var checkInfo = sqlSugarScope.Queryable<CodeGoods>().Where(x => x.HSCode == seaExport.HSCode && x.GoodName ==seaExport.GoodsName).First();
|
|
|
|
|
if (checkInfo.IsNotNull())
|
|
|
|
|
{
|
|
|
|
|
return checkInfo.Id;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var entity = sqlSugarScope.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Goods}{user.TenantId}").ExecuteReturnEntityAsync();
|
|
|
|
|
|
|
|
|
|
var entity = sqlSugarScope.Insertable(data).RemoveDataCache($"{SqlSugarCacheConst.Goods}{user.TenantId}").ExecuteReturnEntityAsync();
|
|
|
|
|
|
|
|
|
|
seaExport.GoodsId = entity.Id;
|
|
|
|
|
return entity.Id;
|
|
|
|
|
seaExport.GoodsId = entity.Id;
|
|
|
|
|
return entity.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|