|
|
|
@ -20,6 +20,7 @@ using Org.BouncyCastle.Ocsp;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using DS.WMS.Core.Fee.Entity;
|
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Dtos;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Map.Method
|
|
|
|
|
{
|
|
|
|
@ -78,6 +79,9 @@ namespace DS.WMS.Core.Map.Method
|
|
|
|
|
|
|
|
|
|
var data = req.Adapt<MappingCtn>();
|
|
|
|
|
|
|
|
|
|
if (data.CarrierId == 0)
|
|
|
|
|
data.Carrier = null;
|
|
|
|
|
|
|
|
|
|
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
|
|
|
|
|
|
|
|
|
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
|
|
|
|
@ -85,9 +89,11 @@ namespace DS.WMS.Core.Map.Method
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var info = tenantDb.Queryable<MappingCtn>().Where(x => x.Id == req.Id).First();
|
|
|
|
|
|
|
|
|
|
info = req.Adapt(info);
|
|
|
|
|
|
|
|
|
|
if (info.CarrierId == 0)
|
|
|
|
|
info.Carrier = null;
|
|
|
|
|
|
|
|
|
|
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();
|
|
|
|
|
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
|