修改服务项目保存问题

dev
jianghaiqing 5 days ago
parent d6a630a47c
commit 836db9e47b

@ -0,0 +1,144 @@
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Entity;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
namespace DS.WMS.Core.Op.Dtos.Mapper
{
public static class OpMapsterSetup
{
/// <summary>
/// 添加映射规则
/// </summary>
public static void AddOpPlatMapsterSetup(this IServiceCollection services)
{
{
TypeAdapterConfig<ServiceProjectBaseDto, ServiceProjectBaseInfo>.NewConfig()
.Map(dest => dest.PK_ID, src => src.PKId)
.Map(dest => dest.SERVICE_PROJECT_CODE, src => src.ServiceProjectCode)
.Map(dest => dest.SERVICE_PROJECT_NAME, src => src.ServiceProjectName)
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.SERVICE_PROJECT_NOTE, src => src.ServiceProjectNote);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO);
}
{
TypeAdapterConfig<StatusSkuBaseDto, StatusSkuBaseInfo>.NewConfig()
.Map(dest => dest.PK_ID, src => src.PKId)
.Map(dest => dest.STATUS_SKU_CODE, src => src.StatusSKUCode)
.Map(dest => dest.STATUS_SKU_NAME, src => src.StatusSKUName)
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.STATUS_SKU_NOTE, src => src.StatusSKUNote)
.Map(dest => dest.BACKGROUND_COLOR, src => src.BackgroundColor);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBaseDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, ServiceProjectStatusDto>.NewConfig()
.Map(dest => dest.SkuPKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBaseShowDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.StatusSKUNote, src => src.STATUS_SKU_NOTE)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBasePageDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.StatusSKUNote, src => src.STATUS_SKU_NOTE)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
}
{
TypeAdapterConfig<ServiceProjectBaseDto, ServiceProjectBaseInfo>.NewConfig()
.Map(dest => dest.PK_ID, src => src.PKId)
.Map(dest => dest.SERVICE_PROJECT_CODE, src => src.ServiceProjectCode)
.Map(dest => dest.SERVICE_PROJECT_NAME, src => src.ServiceProjectName)
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.SERVICE_PROJECT_NOTE, src => src.ServiceProjectNote);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseShowDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.ServiceProjectNote, src => src.SERVICE_PROJECT_NOTE);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBasePageDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.ServiceProjectNote, src => src.SERVICE_PROJECT_NOTE);
}
}
}
}

@ -109,6 +109,8 @@ namespace DS.WMS.Core.Op.Method
if (string.IsNullOrWhiteSpace(entity.PK_ID))
{
entity.PK_ID = SnowFlakeSingle.Instance.NextId().ToString();
tenantDb.Insertable<StatusSkuBaseInfo>(entity);
}
else

@ -853,133 +853,7 @@ namespace DS.WMS.Core.TaskPlat.Dtos.Mapper
}
{
TypeAdapterConfig<ServiceProjectBaseDto, ServiceProjectBaseInfo>.NewConfig()
.Map(dest => dest.PK_ID, src => src.PKId)
.Map(dest => dest.SERVICE_PROJECT_CODE, src => src.ServiceProjectCode)
.Map(dest => dest.SERVICE_PROJECT_NAME, src => src.ServiceProjectName)
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.SERVICE_PROJECT_NOTE, src => src.ServiceProjectNote);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO);
}
{
TypeAdapterConfig<StatusSkuBaseDto, StatusSkuBaseInfo>.NewConfig()
.Map(dest => dest.PK_ID, src => src.PKId)
.Map(dest => dest.STATUS_SKU_CODE, src => src.StatusSKUCode)
.Map(dest => dest.STATUS_SKU_NAME, src => src.StatusSKUName)
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.STATUS_SKU_NOTE, src => src.StatusSKUNote)
.Map(dest => dest.BACKGROUND_COLOR, src => src.BackgroundColor);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBaseDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, ServiceProjectStatusDto>.NewConfig()
.Map(dest => dest.SkuPKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBaseShowDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.StatusSKUNote, src => src.STATUS_SKU_NOTE)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
}
{
TypeAdapterConfig<StatusSkuBaseInfo, StatusSkuBasePageDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.StatusSKUCode, src => src.STATUS_SKU_CODE)
.Map(dest => dest.StatusSKUName, src => src.STATUS_SKU_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.StatusSKUNote, src => src.STATUS_SKU_NOTE)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.BackgroundColor, src => src.BACKGROUND_COLOR);
}
{
TypeAdapterConfig<ServiceProjectBaseDto, ServiceProjectBaseInfo>.NewConfig()
.Map(dest => dest.PK_ID, src => src.PKId)
.Map(dest => dest.SERVICE_PROJECT_CODE, src => src.ServiceProjectCode)
.Map(dest => dest.SERVICE_PROJECT_NAME, src => src.ServiceProjectName)
.Map(dest => dest.SORT_NO, src => src.SortNo)
.Map(dest => dest.SERVICE_PROJECT_NOTE, src => src.ServiceProjectNote);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBaseShowDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.ServiceProjectNote, src => src.SERVICE_PROJECT_NOTE);
}
{
TypeAdapterConfig<ServiceProjectBaseInfo, ServiceProjectBasePageDto>.NewConfig()
.Map(dest => dest.PKId, src => src.PK_ID)
.Map(dest => dest.ServiceProjectCode, src => src.SERVICE_PROJECT_CODE)
.Map(dest => dest.ServiceProjectName, src => src.SERVICE_PROJECT_NAME)
.Map(dest => dest.SortNo, src => src.SORT_NO)
.Map(dest => dest.CreatedTime, src => src.CreateTime)
.Map(dest => dest.UpdatedTime, src => src.UpdateTime)
.Map(dest => dest.CreatedUserId, src => src.CreateBy)
.Map(dest => dest.CreatedUserName, src => src.CreateUserName)
.Map(dest => dest.UpdatedUserId, src => src.UpdateBy)
.Map(dest => dest.UpdatedUserName, src => src.UpdateUserName)
.Map(dest => dest.IsEnable, src => src.IS_ENABLE)
.Map(dest => dest.ServiceProjectNote, src => src.SERVICE_PROJECT_NOTE);
}
}
}
}

@ -17,6 +17,7 @@ using DS.WMS.Core;
using NLog.Web;
using Swashbuckle.AspNetCore.SwaggerUI;
using DS.Module.QuartzModuleInstall;
using DS.WMS.Core.Op.Dtos.Mapper;
var builder = WebApplication.CreateBuilder(args);
var environment = builder.Environment.EnvironmentName;
@ -46,7 +47,7 @@ builder.Services.AddSaasDbInstall();//
builder.Services.AddMultiLanguageInstall();//多语言服务
builder.Services.AddDjyModuleInstall();//Djy服务
builder.Services.AddRuleEngineModuleInstall();//Djy规则引擎校验服务
builder.Services.AddOpPlatMapsterSetup(); // 全局的Mapster自定义映射规则
//builder.Services.AddHangfireModuleInstall();//Hangfire服务
//builder.Services.AddHangfireOPInstall();//Hangfire服务
builder.Services.AddMQModuleInstall();//MQ

@ -220,7 +220,10 @@ public class SaasTest
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotBase));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotCtn));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotStock));
tenantDb.CodeFirst.InitTables(typeof(BookingSlotRolling));
tenantDb.CodeFirst.InitTables(typeof(StatusSkuBaseInfo));
tenantDb.CodeFirst.InitTables(typeof(ServiceProjectBaseInfo));
tenantDb.CodeFirst.InitTables(typeof(ServiceWorkFlowProjectRelation));
//tenantDb.CodeFirst.InitTables(typeof(DraftCompareFeedBackRecord));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocationCtn));
//tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemand));

Loading…
Cancel
Save