Просмотр исходного кода

S0表名修正回原系统表名

YY968XX 1 день назад
Родитель
Сommit
bf03b79cc4
43 измененных файлов с 436 добавлено и 334 удалено
  1. 57 46
      Web/src/views/aidop/s0/api/s0ManufacturingApi.ts
  2. 1 0
      Web/src/views/aidop/s0/manufacturing/PreprocessElementList.vue
  3. 2 2
      server/Admin.NET.Application/Configuration/Database.json
  4. 97 0
      server/Plugins/Admin.NET.Plugin.AiDOP.Tests/S0/Quality/AdoS0ApiErrorsTests.cs
  5. 8 10
      server/Plugins/Admin.NET.Plugin.AiDOP/Controllers/S0/Manufacturing/AdoS0MfgPreprocessElementParamsController.cs
  6. 10 18
      server/Plugins/Admin.NET.Plugin.AiDOP/Controllers/S0/Manufacturing/AdoS0MfgPreprocessElementsController.cs
  7. 87 57
      server/Plugins/Admin.NET.Plugin.AiDOP/Dto/S0/Manufacturing/AdoS0ManufacturingDtos.cs
  8. 0 49
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/AdoSmartOpsEntities.cs
  9. 2 3
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0DevMonitor.cs
  10. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0EmpSkills.cs
  11. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ImageType.cs
  12. 2 3
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ItemOpCondition.cs
  13. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0LineMaster.cs
  14. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0LineSkillDetail.cs
  15. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0LineSkillMaster.cs
  16. 14 92
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0MfgMastersAndSop.cs
  17. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0MfgRoutingOpDetail.cs
  18. 102 0
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0PreprocessEntities.cs
  19. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ProdLineDetail.cs
  20. 4 4
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ProductStructure.cs
  21. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0QualitySegmentImage.cs
  22. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0StdOpMaster.cs
  23. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0WorkCtrMaster.cs
  24. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0WorkOrdControl.cs
  25. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0CustMaster.cs
  26. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0ItemMaster.cs
  27. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0ItemSubstituteDetail.cs
  28. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0PriorityCode.cs
  29. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Supply/AdoS0SrmPurchase.cs
  30. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Supply/AdoS0SuppMaster.cs
  31. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0BarCodeNbr.cs
  32. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0BarCodeType.cs
  33. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0CostCtrMaster.cs
  34. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0DepartmentMaster.cs
  35. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0EmpWorkDutyMaster.cs
  36. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0EmployeeMaster.cs
  37. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0ItemPackMaster.cs
  38. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0LocationMaster.cs
  39. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0LocationShelfMaster.cs
  40. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0NbrControl.cs
  41. 2 2
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0NbrTypeMaster.cs
  42. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0TaskAssignment.cs
  43. 1 1
      server/Plugins/Admin.NET.Plugin.AiDOP/Startup.cs

+ 57 - 46
Web/src/views/aidop/s0/api/s0ManufacturingApi.ts

@@ -224,55 +224,66 @@ export interface S0MfgLinePostUpsert {
 	skills: S0MfgLinePostSkillUpsert[];
 }
 
-export interface S0MfgPreprocessHeader {
-	id: number;
-	companyRefId: number;
-	factoryRefId: number;
-	code: string;
-	name: string;
-	materialId?: number | null;
-	operationId?: number | null;
-	isKeyElement: boolean;
-	remark?: string | null;
-	isEnabled: boolean;
-	createdAt?: string;
-	updatedAt?: string | null;
-}
-
 export interface S0MfgPreprocessParamRow {
 	id: number;
-	preprocessElementId: number;
-	elementParamId: number;
-	paramValue?: string | null;
-	sortNo: number;
-	remark?: string | null;
-	isEnabled: boolean;
+	domain: string;
+	deviceNumber: string;
+	deviceDescr?: string | null;
+	messageCode: string;
+	codeDescr?: string | null;
+	valueType?: string | null;
+	stdValue?: string | null;
+	topLimit?: number | null;
+	lowLimit?: number | null;
+	ufld1?: string | null;
+	um?: string | null;
+	createUser?: string | null;
+	createTime?: string | null;
+	updateUser?: string | null;
+	updateTime?: string | null;
 }
 
-export interface S0MfgPreprocessDetail {
-	header: S0MfgPreprocessHeader;
-	params: S0MfgPreprocessParamRow[];
+export interface S0MfgPreprocessElementRow {
+	id: number;
+	itemNum: string;
+	itemDescr?: string | null;
+	op?: string | null;
+	opDescr?: string | null;
+	line?: string | null;
+	typed?: string | null;
+	itemCode?: string | null;
+	descr?: string | null;
+	isMain: boolean;
+	domain: string;
+	createUser?: string | null;
+	createTime?: string | null;
+	updateUser?: string | null;
+	updateTime?: string | null;
 }
 
-export interface S0MfgPreprocessParamLineUpsert {
-	elementParamId: number;
-	paramValue?: string;
-	sortNo: number;
-	remark?: string;
-	isEnabled: boolean;
+export interface S0MfgPreprocessUpsert {
+	domain: string;
+	itemNum: string;
+	op?: string;
+	line?: string;
+	typed?: string;
+	itemCode?: string;
+	descr?: string;
+	isMain: boolean;
 }
 
-export interface S0MfgPreprocessUpsert {
-	companyRefId: number;
-	factoryRefId: number;
-	code: string;
-	name: string;
-	materialId?: number | null;
-	operationId?: number | null;
-	isKeyElement: boolean;
-	remark?: string;
-	isEnabled: boolean;
-	params: S0MfgPreprocessParamLineUpsert[];
+export interface S0MfgPreprocessElementParamUpsert {
+	domain: string;
+	deviceNumber: string;
+	deviceDescr?: string;
+	messageCode: string;
+	codeDescr?: string;
+	valueType?: string;
+	stdValue?: string;
+	topLimit?: number | null;
+	lowLimit?: number | null;
+	ufld1?: string;
+	um?: string;
 }
 
 function crud<T>(
@@ -528,11 +539,11 @@ export const s0MfgLinePostsApi = {
 
 export const s0MfgPreprocessElementsApi = {
 	list: (params: Record<string, unknown>) =>
-		service.get<Paged<S0MfgPreprocessHeader>>(`${mfg}/preprocess-elements`, { params }).then(unwrap),
-	get: (id: number) => service.get<S0MfgPreprocessDetail>(`${mfg}/preprocess-elements/${id}`).then(unwrap),
-	create: (body: S0MfgPreprocessUpsert) => service.post<S0MfgPreprocessDetail>(`${mfg}/preprocess-elements`, body).then(unwrap),
-	update: (id: number, body: S0MfgPreprocessUpsert) => service.put<S0MfgPreprocessDetail>(`${mfg}/preprocess-elements/${id}`, body).then(unwrap),
+		service.get<Paged<S0MfgPreprocessElementRow>>(`${mfg}/preprocess-elements`, { params }).then(unwrap),
+	get: (id: number) => service.get<S0MfgPreprocessElementRow>(`${mfg}/preprocess-elements/${id}`).then(unwrap),
+	create: (body: S0MfgPreprocessUpsert) => service.post<S0MfgPreprocessElementRow>(`${mfg}/preprocess-elements`, body).then(unwrap),
+	update: (id: number, body: S0MfgPreprocessUpsert) => service.put<S0MfgPreprocessElementRow>(`${mfg}/preprocess-elements/${id}`, body).then(unwrap),
 	delete: (id: number) => service.delete(`${mfg}/preprocess-elements/${id}`).then(unwrap),
 	toggleEnabled: (id: number, body: ToggleEnabledBody) =>
-		service.patch<S0MfgPreprocessHeader>(`${mfg}/preprocess-elements/${id}/toggle-enabled`, body).then(unwrap),
+		service.patch<S0MfgPreprocessElementRow>(`${mfg}/preprocess-elements/${id}/toggle-enabled`, body).then(unwrap),
 };

+ 1 - 0
Web/src/views/aidop/s0/manufacturing/PreprocessElementList.vue

@@ -160,6 +160,7 @@ async function loadList() {
 			keyword: query.keyword || undefined,
 			domain: query.domain.trim(),
 			materialCode: query.itemNum || undefined,
+			op: query.op || undefined,
 			elementCode: query.itemCode || undefined,
 		});
 		rows.value = data.list as Row[];

+ 2 - 2
server/Admin.NET.Application/Configuration/Database.json

@@ -10,9 +10,9 @@
         //"ConfigId": "1300000000001", // 默认库标识-禁止修改
         "DbType": "MySql",
         "DbNickName": "系统库",
-        "ConnectionString": "Server=123.60.180.165;Port=3306;Database=dopdemo;Uid=root;Pwd=5heng=uN;SslMode=None;Charset=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;",
+        //"ConnectionString": "Server=123.60.180.165;Port=3306;Database=dopdemo;Uid=root;Pwd=5heng=uN;SslMode=None;Charset=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;",
         //"ConnectionString": "Server=106.14.73.46;Port=3306;Database=aidopcore;Uid=aidopremote;Pwd=AidOp#Remote2026$Secure;SslMode=None;Charset=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;",
-        //"ConnectionString": "Server=123.60.180.165;Port=3306;Database=aidopdev;Uid=aidopremote;Pwd=1234567890aiDOP#;SslMode=None;Charset=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;",
+        "ConnectionString": "Server=123.60.180.165;Port=3306;Database=aidopdev;Uid=aidopremote;Pwd=1234567890aiDOP#;SslMode=None;Charset=utf8mb4;AllowLoadLocalInfile=true;AllowUserVariables=true;",
         // 本地 SQLite 示例(切回时改 DbType 为 Sqlite 并恢复下行连接串)
         //"DbType": "Sqlite",
         //"ConnectionString": "DataSource=./Admin.NET.db",

+ 97 - 0
server/Plugins/Admin.NET.Plugin.AiDOP.Tests/S0/Quality/AdoS0ApiErrorsTests.cs

@@ -0,0 +1,97 @@
+using Admin.NET.Plugin.AiDOP.Infrastructure;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Xunit;
+
+namespace Admin.NET.Plugin.AiDOP.Tests.S0.Quality;
+
+public class AdoS0ApiErrorsTests
+{
+    [Theory]
+    [InlineData("/api/s0/quality/inspection-plans", true)]
+    [InlineData("/API/S0/QUALITY/inspection-plans", true)]
+    [InlineData("/api/v1/quality/inspection-plans", false)]
+    public void R1_IsS0Request_PathBoundary_IsExpected(string path, bool expected)
+    {
+        Assert.Equal(expected, AdoS0ApiErrors.IsS0Request(path));
+    }
+
+    [Fact]
+    public void R2_InvalidRequest_EmptyMessage_UsesDefaultMessage()
+    {
+        var result = AdoS0ApiErrors.InvalidRequest(" ");
+        var body = Assert.IsType<AdoS0ApiErrorResponse>(result.Value);
+        Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode);
+        Assert.Equal(AdoS0ErrorCodes.InvalidRequest, body.Code);
+        Assert.Equal("请求参数非法", body.Message);
+    }
+
+    [Fact]
+    public void R2_WrapResult_NotFound_UsesUnifiedErrorEnvelope()
+    {
+        var wrapped = AdoS0ApiErrors.WrapResult(new NotFoundResult());
+        var result = Assert.IsType<ObjectResult>(wrapped);
+        var body = Assert.IsType<AdoS0ApiErrorResponse>(result.Value);
+        Assert.Equal(StatusCodes.Status404NotFound, result.StatusCode);
+        Assert.Equal(AdoS0ErrorCodes.RecordNotFound, body.Code);
+    }
+
+    [Fact]
+    public void R2_TryMapUnhandledException_DuplicateKeyInKnownPath_MapsToBusinessDuplicateCode()
+    {
+        var ok = AdoS0ApiErrors.TryMapUnhandledException(
+            "/api/s0/supply/suppliers",
+            new InvalidOperationException("Duplicate entry 'S001' for key 'uq_supplier_code'"),
+            out var result);
+
+        Assert.True(ok);
+        var obj = Assert.IsType<ObjectResult>(result);
+        var body = Assert.IsType<AdoS0ApiErrorResponse>(obj.Value);
+        Assert.Equal(StatusCodes.Status409Conflict, obj.StatusCode);
+        Assert.Equal(AdoS0ErrorCodes.SupplierCodeExists, body.Code);
+    }
+
+    [Fact]
+    public void R2_TryMapUnhandledException_DuplicateKeyInUnknownPath_UsesGenericDuplicateCode()
+    {
+        var ok = AdoS0ApiErrors.TryMapUnhandledException(
+            "/api/s0/quality/raw-whitelists",
+            new Exception("UNIQUE constraint failed: qms_lymjbmd.gysbm"),
+            out var result);
+
+        Assert.True(ok);
+        var obj = Assert.IsType<ObjectResult>(result);
+        var body = Assert.IsType<AdoS0ApiErrorResponse>(obj.Value);
+        Assert.Equal(StatusCodes.Status409Conflict, obj.StatusCode);
+        Assert.Equal(AdoS0ErrorCodes.DuplicateCode, body.Code);
+        Assert.Equal("编码已存在", body.Message);
+    }
+
+    [Fact]
+    public void R2_TryMapUnhandledException_NonDuplicateException_ReturnsInternalServerError()
+    {
+        var ok = AdoS0ApiErrors.TryMapUnhandledException(
+            "/api/s0/quality/inspection-bases",
+            new ApplicationException("db timeout"),
+            out var result);
+
+        Assert.True(ok);
+        var obj = Assert.IsType<ObjectResult>(result);
+        var body = Assert.IsType<AdoS0ApiErrorResponse>(obj.Value);
+        Assert.Equal(StatusCodes.Status500InternalServerError, obj.StatusCode);
+        Assert.Equal(AdoS0ErrorCodes.InternalServerError, body.Code);
+        Assert.Equal("系统繁忙,请稍后再试", body.Message);
+    }
+
+    [Fact]
+    public void R2_TryMapUnhandledException_NonS0Path_DoesNotHandle()
+    {
+        var ok = AdoS0ApiErrors.TryMapUnhandledException(
+            "/api/system/users",
+            new Exception("Duplicate entry"),
+            out var result);
+
+        Assert.False(ok);
+        Assert.Null(result);
+    }
+}

+ 8 - 10
server/Plugins/Admin.NET.Plugin.AiDOP/Controllers/S0/Manufacturing/AdoS0MfgPreprocessElementParamsController.cs

@@ -5,7 +5,7 @@ using Admin.NET.Plugin.AiDOP.Infrastructure;
 namespace Admin.NET.Plugin.AiDOP.Controllers.S0.Manufacturing;
 
 /// <summary>
-/// 前处理要素参数(源平台 DevMonitor 子集;固定 CodeType='PrevProcess')
+/// 前处理要素参数独立资源
 /// </summary>
 [ApiController]
 [Route("api/s0/manufacturing/preprocess-element-params")]
@@ -13,15 +13,15 @@ namespace Admin.NET.Plugin.AiDOP.Controllers.S0.Manufacturing;
 [NonUnify]
 public class AdoS0MfgPreprocessElementParamsController : ControllerBase
 {
-    private readonly SqlSugarRepository<AdoS0DevMonitor> _rep;
+    private readonly SqlSugarRepository<AdoS0MfgPreprocessElementParam> _rep;
 
-    public AdoS0MfgPreprocessElementParamsController(SqlSugarRepository<AdoS0DevMonitor> rep)
+    public AdoS0MfgPreprocessElementParamsController(SqlSugarRepository<AdoS0MfgPreprocessElementParam> rep)
     {
         _rep = rep;
     }
 
     [HttpGet]
-    public async Task<IActionResult> GetPagedAsync([FromQuery] AdoS0DevMonitorQueryDto q)
+    public async Task<IActionResult> GetPagedAsync([FromQuery] AdoS0MfgPreprocessElementParamQueryDto q)
     {
         var page = q.Page;
         var pageSize = q.PageSize;
@@ -29,7 +29,7 @@ public class AdoS0MfgPreprocessElementParamsController : ControllerBase
 
         var domain = q.Domain.Trim();
         var query = _rep.AsQueryable()
-            .Where(x => x.Domain == domain && x.CodeType == "PrevProcess")
+            .Where(x => x.Domain == domain)
             .WhereIF(!string.IsNullOrWhiteSpace(q.Keyword),
                 x => x.DeviceNumber.Contains(q.Keyword!)
                     || (x.DeviceDescr != null && x.DeviceDescr.Contains(q.Keyword!))
@@ -53,13 +53,12 @@ public class AdoS0MfgPreprocessElementParamsController : ControllerBase
     }
 
     [HttpPost]
-    public async Task<IActionResult> CreateAsync([FromBody] AdoS0DevMonitorUpsertDto dto)
+    public async Task<IActionResult> CreateAsync([FromBody] AdoS0MfgPreprocessElementParamUpsertDto dto)
     {
         var now = DateTime.Now;
-        var entity = new AdoS0DevMonitor
+        var entity = new AdoS0MfgPreprocessElementParam
         {
             Domain = dto.Domain.Trim(),
-            CodeType = "PrevProcess",
             DeviceNumber = dto.DeviceNumber.Trim(),
             DeviceDescr = dto.DeviceDescr,
             MessageCode = dto.MessageCode.Trim(),
@@ -80,13 +79,12 @@ public class AdoS0MfgPreprocessElementParamsController : ControllerBase
     }
 
     [HttpPut("{id:long}")]
-    public async Task<IActionResult> UpdateAsync(long id, [FromBody] AdoS0DevMonitorUpsertDto dto)
+    public async Task<IActionResult> UpdateAsync(long id, [FromBody] AdoS0MfgPreprocessElementParamUpsertDto dto)
     {
         var entity = await _rep.GetByIdAsync(id);
         if (entity == null) return NotFound();
 
         entity.Domain = dto.Domain.Trim();
-        entity.CodeType = "PrevProcess";
         entity.DeviceNumber = dto.DeviceNumber.Trim();
         entity.DeviceDescr = dto.DeviceDescr;
         entity.MessageCode = dto.MessageCode.Trim();

+ 10 - 18
server/Plugins/Admin.NET.Plugin.AiDOP/Controllers/S0/Manufacturing/AdoS0MfgPreprocessElementsController.cs

@@ -12,12 +12,12 @@ namespace Admin.NET.Plugin.AiDOP.Controllers.S0.Manufacturing;
 [NonUnify]
 public class AdoS0MfgPreprocessElementsController : ControllerBase
 {
-    private readonly SqlSugarRepository<AdoS0ItemOpCondition> _rep;
+    private readonly SqlSugarRepository<AdoS0MfgPreprocessElement> _rep;
     private readonly SqlSugarRepository<AdoS0ItemMaster> _itemRep;
     private readonly SqlSugarRepository<AdoS0GeneralizedCodeMaster> _codeRep;
 
     public AdoS0MfgPreprocessElementsController(
-        SqlSugarRepository<AdoS0ItemOpCondition> rep,
+        SqlSugarRepository<AdoS0MfgPreprocessElement> rep,
         SqlSugarRepository<AdoS0ItemMaster> itemRep,
         SqlSugarRepository<AdoS0GeneralizedCodeMaster> codeRep)
     {
@@ -29,26 +29,21 @@ public class AdoS0MfgPreprocessElementsController : ControllerBase
     [HttpGet]
     public async Task<IActionResult> GetPagedAsync([FromQuery] AdoS0MfgPreprocessElementQueryDto q)
     {
-        // 物料前处理要素:收敛到 ItemOpCondition,并固定 CodeType='PrevProcess'
         var page = q.EffectivePage;
         var pageSize = q.PageSize;
         (page, pageSize) = PagingGuard.Normalize(page, pageSize);
 
-        // 兼容旧 QueryDto 字段:materialCode/materialName/elementCode/keyword/companyRefId... → 仅用作过滤
-        var domain = (q.FactoryRefId?.ToString() ?? "").Trim(); // 旧 DTO 无 Domain,临时占位;前端已改为传 domain(见页面改造)
-        // 若前端按方案传 domain,则会落在 q.Keyword 或其它字段里;这里允许从 querystring 直接读取 domain
+        var domain = q.Domain?.Trim() ?? string.Empty;
         var qsDomain = HttpContext.Request.Query["domain"].ToString();
-        if (!string.IsNullOrWhiteSpace(qsDomain)) domain = qsDomain.Trim();
+        if (!string.IsNullOrWhiteSpace(qsDomain))
+            domain = qsDomain.Trim();
         if (string.IsNullOrWhiteSpace(domain))
             return Ok(new { total = 0, page, pageSize, list = Array.Empty<object>() });
 
-        var itemNums = new List<string>();
-        if (!string.IsNullOrWhiteSpace(q.MaterialCode))
-            itemNums.Add(q.MaterialCode.Trim());
-
         var query = _rep.AsQueryable()
-            .Where(x => x.Domain == domain && x.CodeType == "PrevProcess")
+            .Where(x => x.Domain == domain)
             .WhereIF(!string.IsNullOrWhiteSpace(q.MaterialCode), x => x.ItemNum.Contains(q.MaterialCode!))
+            .WhereIF(!string.IsNullOrWhiteSpace(q.Op), x => x.Op != null && x.Op.Contains(q.Op!))
             .WhereIF(!string.IsNullOrWhiteSpace(q.ElementCode), x => x.ItemCode != null && x.ItemCode.Contains(q.ElementCode!))
             .WhereIF(!string.IsNullOrWhiteSpace(q.Keyword),
                 x => x.ItemNum.Contains(q.Keyword!)
@@ -87,7 +82,6 @@ public class AdoS0MfgPreprocessElementsController : ControllerBase
             itemCode = x.ItemCode,
             descr = x.Descr,
             isMain = x.IsMain,
-            codeType = x.CodeType,
             domain = x.Domain,
             createUser = x.CreateUser,
             createTime = x.CreateTime,
@@ -106,13 +100,12 @@ public class AdoS0MfgPreprocessElementsController : ControllerBase
     }
 
     [HttpPost]
-    public async Task<IActionResult> CreateAsync([FromBody] AdoS0ItemOpConditionUpsertDto dto)
+    public async Task<IActionResult> CreateAsync([FromBody] AdoS0MfgPreprocessElementUpsertDto dto)
     {
         var now = DateTime.Now;
-        var entity = new AdoS0ItemOpCondition
+        var entity = new AdoS0MfgPreprocessElement
         {
             Domain = dto.Domain.Trim(),
-            CodeType = "PrevProcess",
             ItemNum = dto.ItemNum.Trim(),
             Op = dto.Op,
             Line = dto.Line,
@@ -130,13 +123,12 @@ public class AdoS0MfgPreprocessElementsController : ControllerBase
     }
 
     [HttpPut("{id:long}")]
-    public async Task<IActionResult> UpdateAsync(long id, [FromBody] AdoS0ItemOpConditionUpsertDto dto)
+    public async Task<IActionResult> UpdateAsync(long id, [FromBody] AdoS0MfgPreprocessElementUpsertDto dto)
     {
         var entity = await _rep.GetByIdAsync(id);
         if (entity == null) return NotFound();
 
         entity.Domain = dto.Domain.Trim();
-        entity.CodeType = "PrevProcess";
         entity.ItemNum = dto.ItemNum.Trim();
         entity.Op = dto.Op;
         entity.Line = dto.Line;

+ 87 - 57
server/Plugins/Admin.NET.Plugin.AiDOP/Dto/S0/Manufacturing/AdoS0ManufacturingDtos.cs

@@ -44,11 +44,51 @@ public class AdoS0LineMasterQueryDto : AdoS0MfgPagedQueryBase
 
 public class AdoS0MfgPreprocessElementQueryDto : AdoS0MfgPagedQueryBase
 {
+    public string? Domain { get; set; }
     public string? MaterialCode { get; set; }
     public string? MaterialName { get; set; }
+    public string? Op { get; set; }
     public string? ElementCode { get; set; }
 }
 
+public class AdoS0MfgPreprocessElementUpsertDto
+{
+    [Required(ErrorMessage = "工厂域不能为空")]
+    [MaxLength(50)]
+    public string Domain { get; set; } = string.Empty;
+
+    [Required(ErrorMessage = "物料编码不能为空")]
+    [MaxLength(100)]
+    public string ItemNum { get; set; } = string.Empty;
+
+    [MaxLength(100)]
+    public string? Op { get; set; }
+
+    [MaxLength(100)]
+    public string? Line { get; set; }
+
+    [MaxLength(100)]
+    public string? Typed { get; set; }
+
+    [MaxLength(100)]
+    public string? ItemCode { get; set; }
+
+    [MaxLength(255)]
+    public string? Descr { get; set; }
+
+    public bool IsMain { get; set; }
+
+    [MaxLength(64)]
+    public string? CreateUser { get; set; }
+
+    public DateTime? CreateTime { get; set; }
+
+    [MaxLength(64)]
+    public string? UpdateUser { get; set; }
+
+    public DateTime? UpdateTime { get; set; }
+}
+
 public class AdoS0MfgMaterialProcessElementQueryDto : AdoS0MfgPagedQueryBase
 {
     public string? MaterialCode { get; set; }
@@ -114,11 +154,6 @@ public class AdoS0MfgSopFileTypeQueryDto
     public int PageSize { get; set; } = 20;
 }
 
-public class AdoS0MfgPreprocessElementParamQueryDto : AdoS0MfgPagedQueryBase
-{
-    public long? PreprocessElementId { get; set; }
-}
-
 #endregion
 
 #region 标准资源 Upsert(12 个非聚合)
@@ -252,6 +287,18 @@ public class AdoS0DevMonitorQueryDto
     public int PageSize { get; set; } = 20;
 }
 
+public class AdoS0MfgPreprocessElementParamQueryDto
+{
+    [Required(ErrorMessage = "工厂域不能为空")]
+    [MaxLength(50)]
+    public string Domain { get; set; } = string.Empty;
+
+    public string? Keyword { get; set; }
+
+    public int Page { get; set; } = 1;
+    public int PageSize { get; set; } = 20;
+}
+
 public class AdoS0DevMonitorUpsertDto
 {
     [Required(ErrorMessage = "工厂域不能为空")]
@@ -285,6 +332,41 @@ public class AdoS0DevMonitorUpsertDto
     public DateTime? UpdateTime { get; set; }
 }
 
+public class AdoS0MfgPreprocessElementParamUpsertDto
+{
+    [Required(ErrorMessage = "工厂域不能为空")]
+    [MaxLength(50)]
+    public string Domain { get; set; } = string.Empty;
+
+    [Required(ErrorMessage = "要素编码不能为空")]
+    [MaxLength(100)]
+    public string DeviceNumber { get; set; } = string.Empty;
+
+    public string? DeviceDescr { get; set; }
+
+    [Required(ErrorMessage = "参数编码不能为空")]
+    [MaxLength(100)]
+    public string MessageCode { get; set; } = string.Empty;
+
+    public string? CodeDescr { get; set; }
+    public string? ValueType { get; set; }
+    public string? UM { get; set; }
+    public string? StdValue { get; set; }
+    public decimal? TopLimit { get; set; }
+    public decimal? LowLimit { get; set; }
+    public string? Ufld1 { get; set; }
+
+    [MaxLength(64)]
+    public string? CreateUser { get; set; }
+
+    public DateTime? CreateTime { get; set; }
+
+    [MaxLength(64)]
+    public string? UpdateUser { get; set; }
+
+    public DateTime? UpdateTime { get; set; }
+}
+
 /// <summary>
 /// 物料工序生产要素(ItemOpCondition;固定 CodeType='Prod'):列表查询
 /// </summary>
@@ -647,25 +729,6 @@ public class AdoS0MfgSopDocumentUpsertDto
     public int? SortID { get; set; }
 }
 
-public class AdoS0MfgPreprocessElementParamUpsertDto
-{
-    [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
-    public long CompanyRefId { get; set; }
-
-    [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
-    public long FactoryRefId { get; set; }
-
-    [Range(1, long.MaxValue, ErrorMessage = "前处理要素不能为空")]
-    public long PreprocessElementId { get; set; }
-
-    [Range(1, long.MaxValue, ErrorMessage = "生产要素参数不能为空")]
-    public long ElementParamId { get; set; }
-    public string? ParamValue { get; set; }
-    public int SortNo { get; set; }
-    public string? Remark { get; set; }
-    public bool IsEnabled { get; set; } = true;
-}
-
 #endregion
 
 #region 聚合 Upsert(步骤 9)
@@ -837,37 +900,4 @@ public class AdoS0LineSkillMasterUpsertDto
     public List<AdoS0LineSkillDetailUpsertDto> Skills { get; set; } = new();
 }
 
-public class AdoS0MfgPreprocessElementParamLineUpsertDto
-{
-    public long? Id { get; set; }
-
-    [Range(1, long.MaxValue, ErrorMessage = "生产要素参数不能为空")]
-    public long ElementParamId { get; set; }
-    public string? ParamValue { get; set; }
-    public int SortNo { get; set; }
-    public string? Remark { get; set; }
-    public bool IsEnabled { get; set; } = true;
-}
-
-public class AdoS0MfgPreprocessElementUpsertDto
-{
-    [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
-    public long CompanyRefId { get; set; }
-
-    [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
-    public long FactoryRefId { get; set; }
-
-    [Required(ErrorMessage = "前处理要素编码不能为空")]
-    public string Code { get; set; } = string.Empty;
-
-    [Required(ErrorMessage = "前处理要素名称不能为空")]
-    public string Name { get; set; } = string.Empty;
-    public long? MaterialId { get; set; }
-    public long? OperationId { get; set; }
-    public bool IsKeyElement { get; set; }
-    public string? Remark { get; set; }
-    public bool IsEnabled { get; set; } = true;
-    public List<AdoS0MfgPreprocessElementParamLineUpsertDto> Params { get; set; } = new();
-}
-
 #endregion

+ 0 - 49
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/AdoSmartOpsEntities.cs

@@ -1,49 +0,0 @@
-namespace Admin.NET.Plugin.AiDOP.Entity;
-
-/// <summary>
-/// 智慧运营看板订单查询表。
-/// </summary>
-[IgnoreTable]
-[SugarTable("ado_order", "智慧运营看板订单查询表")]
-public class AdoOrder
-{
-    [SugarColumn(ColumnName = "Id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = false, ColumnDataType = "bigint")]
-    public long Id { get; set; }
-
-    [SugarColumn(ColumnName = "Product", ColumnDescription = "产品", IsNullable = true, Length = 200)]
-    public string? Product { get; set; }
-
-    [SugarColumn(ColumnName = "OrderNo", ColumnDescription = "订单号", IsNullable = true, Length = 100)]
-    public string? OrderNo { get; set; }
-}
-
-/// <summary>
-/// 智慧运营看板计划查询表。
-/// </summary>
-[IgnoreTable]
-[SugarTable("ado_plan", "智慧运营看板计划查询表")]
-public class AdoPlan
-{
-    [SugarColumn(ColumnName = "Id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = false, ColumnDataType = "bigint")]
-    public long Id { get; set; }
-
-    [SugarColumn(ColumnName = "ProductName", ColumnDescription = "产品名称", IsNullable = true, Length = 200)]
-    public string? ProductName { get; set; }
-}
-
-/// <summary>
-/// 智慧运营看板工单查询表。
-/// </summary>
-[IgnoreTable]
-[SugarTable("ado_work_order", "智慧运营看板工单查询表")]
-public class AdoWorkOrder
-{
-    [SugarColumn(ColumnName = "Id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = false, ColumnDataType = "bigint")]
-    public long Id { get; set; }
-
-    [SugarColumn(ColumnName = "Product", ColumnDescription = "产品", IsNullable = true, Length = 200)]
-    public string? Product { get; set; }
-
-    [SugarColumn(ColumnName = "WorkCenter", ColumnDescription = "工作中心", IsNullable = true, Length = 100)]
-    public string? WorkCenter { get; set; }
-}

+ 2 - 3
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0DevMonitor.cs

@@ -1,9 +1,9 @@
 namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 
 /// <summary>
-/// 生产要素参数(源平台 DevMonitor;页面固定 CodeType='Prod')。
+/// 生产要素参数(源平台 DevMonitor)。
 /// </summary>
-[SugarTable("ado_s0_mfg_dev_monitor", "生产要素参数表")]
+[SugarTable("DevMonitor", "生产要素参数表")]
 public class AdoS0DevMonitor
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "生产要素参数主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -57,4 +57,3 @@ public class AdoS0DevMonitor
     [SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间", IsNullable = true)]
     public DateTime? UpdateTime { get; set; }
 }
-

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0EmpSkills.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 人员技能维护(源平台 EmpSkills:员工与技能关系表)。
 /// </summary>
-[SugarTable("ado_s0_mfg_emp_skills", "人员技能关系表")]
+[SugarTable("EmpSkills", "人员技能关系表")]
 public class AdoS0EmpSkills
 {
     [SugarColumn(ColumnDescription = "人员技能主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ImageType.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// SOP 文件类型(源平台 ImageType)。
 /// </summary>
-[SugarTable("ado_s0_mfg_image_type", "S0 SOP 文件类型(ImageType)")]
-[SugarIndex("uk_ado_s0_mfg_image_type_scope", nameof(Domain), OrderByType.Asc, nameof(ImageTypeID), OrderByType.Asc, IsUnique = true)]
+[SugarTable("ImageType", "S0 SOP 文件类型(ImageType)")]
+[SugarIndex("uk_ImageType_scope", nameof(Domain), OrderByType.Asc, nameof(ImageTypeID), OrderByType.Asc, IsUnique = true)]
 public class AdoS0ImageType
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "文件类型主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 3
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ItemOpCondition.cs

@@ -1,9 +1,9 @@
 namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 
 /// <summary>
-/// 物料工序生产要素(源平台 ItemOpCondition;页面固定 CodeType='Prod')。
+/// 物料工序生产要素(源平台 ItemOpCondition)。
 /// </summary>
-[SugarTable("ado_s0_mfg_item_op_condition", "物料工序生产要素表")]
+[SugarTable("ItemOpCondition", "物料工序生产要素表")]
 public class AdoS0ItemOpCondition
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "物料工序生产要素主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -48,4 +48,3 @@ public class AdoS0ItemOpCondition
     [SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间", IsNullable = true)]
     public DateTime? UpdateTime { get; set; }
 }
-

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0LineMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 生产线主数据(复刻 LineMaster)。
 /// </summary>
-[SugarTable("ado_s0_mfg_line_master", "生产线主数据表")]
-[SugarIndex("uk_ado_s0_line_master_scope_line", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Line), OrderByType.Asc, IsUnique = true)]
+[SugarTable("LineMaster", "生产线主数据表")]
+[SugarIndex("uk_LineMaster_scope_line", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Line), OrderByType.Asc, IsUnique = true)]
 public class AdoS0LineMaster
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "生产线主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0LineSkillDetail.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 产线岗位技能明细(子表)。源平台子表结构待确认;当前以“岗位→人员技能主数据引用”占位实现。
 /// </summary>
-[SugarTable("ado_s0_mfg_line_skill_detail", "产线岗位技能明细")]
+[SugarTable("LineSkillDetail", "产线岗位技能明细")]
 public class AdoS0LineSkillDetail
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "明细主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0LineSkillMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 产线岗位维护(源平台 LineSkillMaster 语义,头表)。
 /// </summary>
-[SugarTable("ado_s0_mfg_line_skill_master", "产线岗位主表")]
-[SugarIndex("uk_ado_s0_mfg_lsm_domain_job", nameof(Domain), OrderByType.Asc, nameof(JOBNo), OrderByType.Asc, IsUnique = true)]
+[SugarTable("LineSkillMaster", "产线岗位主表")]
+[SugarIndex("uk_LineSkillMaster_domain_job", nameof(Domain), OrderByType.Asc, nameof(JOBNo), OrderByType.Asc, IsUnique = true)]
 public class AdoS0LineSkillMaster
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "产线岗位主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 14 - 92
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0MfgMastersAndSop.cs

@@ -1,6 +1,6 @@
 namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 
-[SugarTable("ado_s0_mfg_person_skill_assignment", "S0 人员技能分配")]
+[SugarTable("PersonSkillAssignment", "S0 人员技能分配")]
 public class AdoS0MfgPersonSkillAssignment
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -40,8 +40,8 @@ public class AdoS0MfgPersonSkillAssignment
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_work_order_control", "S0 工单控制参数")]
-[SugarIndex("uk_ado_s0_mfg_woc_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
+[SugarTable("WorkOrderControl", "S0 工单控制参数")]
+[SugarIndex("uk_WorkOrderControl_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
 public class AdoS0MfgWorkOrderControl
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -78,8 +78,8 @@ public class AdoS0MfgWorkOrderControl
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_person_skill", "S0 人员技能主数据")]
-[SugarIndex("uk_ado_s0_mfg_ps_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
+[SugarTable("PersonSkill", "S0 人员技能主数据")]
+[SugarIndex("uk_PersonSkill_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
 public class AdoS0MfgPersonSkill
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -113,8 +113,8 @@ public class AdoS0MfgPersonSkill
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_line_post", "S0 线体岗位")]
-[SugarIndex("uk_ado_s0_mfg_lp_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
+[SugarTable("LinePost", "S0 线体岗位")]
+[SugarIndex("uk_LinePost_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
 public class AdoS0MfgLinePost
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -148,7 +148,7 @@ public class AdoS0MfgLinePost
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_line_post_skill", "S0 线体岗位技能")]
+[SugarTable("LinePostSkill", "S0 线体岗位技能")]
 public class AdoS0MfgLinePostSkill
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -185,8 +185,8 @@ public class AdoS0MfgLinePostSkill
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_work_center", "S0 工作中心")]
-[SugarIndex("uk_ado_s0_mfg_wc_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
+[SugarTable("WorkCenter", "S0 工作中心")]
+[SugarIndex("uk_WorkCenter_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
 public class AdoS0MfgWorkCenter
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -226,7 +226,7 @@ public class AdoS0MfgWorkCenter
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_line_material", "S0 线边物料")]
+[SugarTable("LineMaterial", "S0 线边物料")]
 public class AdoS0MfgLineMaterial
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -284,8 +284,8 @@ public class AdoS0MfgLineMaterial
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_element_param", "S0 生产要素参数")]
-[SugarIndex("uk_ado_s0_mfg_ep_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(ElementCategory), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
+[SugarTable("ElementParam", "S0 生产要素参数")]
+[SugarIndex("uk_ElementParam_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(ElementCategory), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
 public class AdoS0MfgElementParam
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -343,7 +343,7 @@ public class AdoS0MfgElementParam
     public DateTime? UpdatedAt { get; set; }
 }
 
-[SugarTable("ado_s0_mfg_material_process_element", "S0 物料工艺要素")]
+[SugarTable("MaterialProcessElement", "S0 物料工艺要素")]
 public class AdoS0MfgMaterialProcessElement
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -394,81 +394,3 @@ public class AdoS0MfgMaterialProcessElement
     [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
     public DateTime? UpdatedAt { get; set; }
 }
-
-[SugarTable("ado_s0_mfg_preprocess_element", "S0 前处理要素头")]
-[SugarIndex("uk_ado_s0_mfg_ppe_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
-public class AdoS0MfgPreprocessElement
-{
-    [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
-    public long Id { get; set; }
-
-    [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
-    public long CompanyRefId { get; set; }
-
-    [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
-    public long FactoryRefId { get; set; }
-
-    [SugarColumn(ColumnDescription = "编码", Length = 100)]
-    public string Code { get; set; } = string.Empty;
-
-    [SugarColumn(ColumnDescription = "名称", Length = 200)]
-    public string Name { get; set; } = string.Empty;
-
-    [SugarColumn(ColumnDescription = "物料", ColumnDataType = "bigint", IsNullable = true)]
-    public long? MaterialId { get; set; }
-
-    [SugarColumn(ColumnDescription = "工序", ColumnDataType = "bigint", IsNullable = true)]
-    public long? OperationId { get; set; }
-
-    [SugarColumn(ColumnDescription = "关键要素", ColumnDataType = "boolean")]
-    public bool IsKeyElement { get; set; }
-
-    [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
-    public string? Remark { get; set; }
-
-    [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
-    public bool IsEnabled { get; set; } = true;
-
-    [SugarColumn(ColumnDescription = "创建时间")]
-    public DateTime CreatedAt { get; set; } = DateTime.Now;
-
-    [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
-    public DateTime? UpdatedAt { get; set; }
-}
-
-[SugarTable("ado_s0_mfg_preprocess_element_param", "S0 前处理要素参数行")]
-public class AdoS0MfgPreprocessElementParam
-{
-    [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
-    public long Id { get; set; }
-
-    [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
-    public long CompanyRefId { get; set; }
-
-    [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
-    public long FactoryRefId { get; set; }
-
-    [SugarColumn(ColumnDescription = "前处理要素", ColumnDataType = "bigint")]
-    public long PreprocessElementId { get; set; }
-
-    [SugarColumn(ColumnDescription = "要素参数", ColumnDataType = "bigint")]
-    public long ElementParamId { get; set; }
-
-    [SugarColumn(ColumnDescription = "参数值", Length = 500, IsNullable = true)]
-    public string? ParamValue { get; set; }
-
-    [SugarColumn(ColumnDescription = "排序")]
-    public int SortNo { get; set; }
-
-    [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
-    public string? Remark { get; set; }
-
-    [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
-    public bool IsEnabled { get; set; } = true;
-
-    [SugarColumn(ColumnDescription = "创建时间")]
-    public DateTime CreatedAt { get; set; } = DateTime.Now;
-
-    [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
-    public DateTime? UpdatedAt { get; set; }
-}

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0MfgRoutingOpDetail.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 标准工艺路线明细(源平台 RoutingOpDetail 行级复刻,方案 A)。
 /// </summary>
-[SugarTable("ado_s0_mfg_routing_op_detail", "S0 标准工艺路线明细")]
+[SugarTable("RoutingOpDetail", "S0 标准工艺路线明细")]
 public class AdoS0MfgRoutingOpDetail
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 102 - 0
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0PreprocessEntities.cs

@@ -0,0 +1,102 @@
+namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
+
+/// <summary>
+/// 前处理要素独立表。
+/// </summary>
+[SugarTable("PreprocessElement", "前处理要素表")]
+public class AdoS0MfgPreprocessElement
+{
+    [SugarColumn(ColumnName = "id", ColumnDescription = "前处理要素主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
+    public long Id { get; set; }
+
+    [SugarColumn(ColumnName = "item_num", ColumnDescription = "物料编码", Length = 100)]
+    public string ItemNum { get; set; } = string.Empty;
+
+    [SugarColumn(ColumnName = "op", ColumnDescription = "工序编码", Length = 100, IsNullable = true)]
+    public string? Op { get; set; }
+
+    [SugarColumn(ColumnName = "line", ColumnDescription = "生产线编码", Length = 100, IsNullable = true)]
+    public string? Line { get; set; }
+
+    [SugarColumn(ColumnName = "typed", ColumnDescription = "类型编码", Length = 100, IsNullable = true)]
+    public string? Typed { get; set; }
+
+    [SugarColumn(ColumnName = "item_code", ColumnDescription = "要素编码", Length = 100, IsNullable = true)]
+    public string? ItemCode { get; set; }
+
+    [SugarColumn(ColumnName = "descr", ColumnDescription = "描述", Length = 255, IsNullable = true)]
+    public string? Descr { get; set; }
+
+    [SugarColumn(ColumnName = "is_main", ColumnDescription = "是否关键", ColumnDataType = "boolean")]
+    public bool IsMain { get; set; }
+
+    [SugarColumn(ColumnName = "domain", ColumnDescription = "工厂域编码", Length = 50)]
+    public string Domain { get; set; } = string.Empty;
+
+    [SugarColumn(ColumnName = "create_user", ColumnDescription = "创建人", Length = 64, IsNullable = true)]
+    public string? CreateUser { get; set; }
+
+    [SugarColumn(ColumnName = "create_time", ColumnDescription = "创建时间", IsNullable = true)]
+    public DateTime? CreateTime { get; set; }
+
+    [SugarColumn(ColumnName = "update_user", ColumnDescription = "更新人", Length = 64, IsNullable = true)]
+    public string? UpdateUser { get; set; }
+
+    [SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间", IsNullable = true)]
+    public DateTime? UpdateTime { get; set; }
+}
+
+/// <summary>
+/// 前处理要素参数独立表。
+/// </summary>
+[SugarTable("PreprocessElementParam", "前处理要素参数表")]
+public class AdoS0MfgPreprocessElementParam
+{
+    [SugarColumn(ColumnName = "id", ColumnDescription = "前处理要素参数主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
+    public long Id { get; set; }
+
+    [SugarColumn(ColumnName = "device_number", ColumnDescription = "要素编码", Length = 100)]
+    public string DeviceNumber { get; set; } = string.Empty;
+
+    [SugarColumn(ColumnName = "device_descr", ColumnDescription = "要素描述", Length = 255, IsNullable = true)]
+    public string? DeviceDescr { get; set; }
+
+    [SugarColumn(ColumnName = "message_code", ColumnDescription = "参数编码", Length = 100)]
+    public string MessageCode { get; set; } = string.Empty;
+
+    [SugarColumn(ColumnName = "code_descr", ColumnDescription = "参数描述", Length = 255, IsNullable = true)]
+    public string? CodeDescr { get; set; }
+
+    [SugarColumn(ColumnName = "value_type", ColumnDescription = "值类型", Length = 50, IsNullable = true)]
+    public string? ValueType { get; set; }
+
+    [SugarColumn(ColumnName = "std_value", ColumnDescription = "标准值", Length = 255, IsNullable = true)]
+    public string? StdValue { get; set; }
+
+    [SugarColumn(ColumnName = "top_limit", ColumnDescription = "上限值", DecimalDigits = 6, Length = 18, IsNullable = true)]
+    public decimal? TopLimit { get; set; }
+
+    [SugarColumn(ColumnName = "low_limit", ColumnDescription = "下限值", DecimalDigits = 6, Length = 18, IsNullable = true)]
+    public decimal? LowLimit { get; set; }
+
+    [SugarColumn(ColumnName = "ufld1", ColumnDescription = "值选择数据", Length = 1000, IsNullable = true)]
+    public string? Ufld1 { get; set; }
+
+    [SugarColumn(ColumnName = "um", ColumnDescription = "单位", Length = 50, IsNullable = true)]
+    public string? UM { get; set; }
+
+    [SugarColumn(ColumnName = "domain", ColumnDescription = "工厂域编码", Length = 50)]
+    public string Domain { get; set; } = string.Empty;
+
+    [SugarColumn(ColumnName = "create_user", ColumnDescription = "创建人", Length = 64, IsNullable = true)]
+    public string? CreateUser { get; set; }
+
+    [SugarColumn(ColumnName = "create_time", ColumnDescription = "创建时间", IsNullable = true)]
+    public DateTime? CreateTime { get; set; }
+
+    [SugarColumn(ColumnName = "update_user", ColumnDescription = "更新人", Length = 64, IsNullable = true)]
+    public string? UpdateUser { get; set; }
+
+    [SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间", IsNullable = true)]
+    public DateTime? UpdateTime { get; set; }
+}

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ProdLineDetail.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 生产线物料维护(源平台 ProdLineDetail)。
 /// </summary>
-[SugarTable("ado_s0_mfg_prod_line_detail", "生产线物料维护表")]
+[SugarTable("ProdLineDetail", "生产线物料维护表")]
 public class AdoS0ProdLineDetail
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "生产线物料主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 4 - 4
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0ProductStructure.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 标准 BOM 行维护(复刻 ProductStructureMaster,路线 A)。
 /// </summary>
-[SugarTable("ado_s0_mfg_product_structure_master", "标准BOM行维护(复刻 ProductStructureMaster)")]
-[SugarIndex("ix_ado_s0_psm_factory_parent", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(ParentMaterialId), OrderByType.Asc)]
+[SugarTable("ProductStructureMaster", "标准BOM行维护(复刻 ProductStructureMaster)")]
+[SugarIndex("ix_ProductStructureMaster_factory_parent", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(ParentMaterialId), OrderByType.Asc)]
 public class AdoS0ProductStructureMaster
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
@@ -66,8 +66,8 @@ public class AdoS0ProductStructureMaster
 /// <summary>
 /// 标准 BOM 行关联多工序(复刻 ProductStructureOp)。
 /// </summary>
-[SugarTable("ado_s0_mfg_product_structure_op", "标准BOM行工序(复刻 ProductStructureOp)")]
-[SugarIndex("ix_ado_s0_pso_factory_pc", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(ParentMaterialId), OrderByType.Asc, nameof(ComponentMaterialId), OrderByType.Asc)]
+[SugarTable("ProductStructureOp", "标准BOM行工序(复刻 ProductStructureOp)")]
+[SugarIndex("ix_ProductStructureOp_factory_pc", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(ParentMaterialId), OrderByType.Asc, nameof(ComponentMaterialId), OrderByType.Asc)]
 public class AdoS0ProductStructureOp
 {
     [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0QualitySegmentImage.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// SOP 维护(源平台 QualitySegmentImage)。
 /// </summary>
-[SugarTable("ado_s0_mfg_quality_segment_image", "S0 SOP 维护(QualitySegmentImage)")]
-[SugarIndex("uk_ado_s0_mfg_qsi_scope", nameof(Domain), OrderByType.Asc, nameof(Line), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, nameof(Op), OrderByType.Asc, nameof(ImageTypeID), OrderByType.Asc, IsUnique = false)]
+[SugarTable("QualitySegmentImage", "S0 SOP 维护(QualitySegmentImage)")]
+[SugarIndex("uk_QualitySegmentImage_scope", nameof(Domain), OrderByType.Asc, nameof(Line), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, nameof(Op), OrderByType.Asc, nameof(ImageTypeID), OrderByType.Asc, IsUnique = false)]
 public class AdoS0QualitySegmentImage
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "SOP 主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0StdOpMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 标准工序主数据(复刻 StdOpMaster)。
 /// </summary>
-[SugarTable("ado_s0_mfg_std_op_master", "标准工序主数据表")]
-[SugarIndex("uk_ado_s0_std_op_master_scope_name", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(StdOp), OrderByType.Asc, IsUnique = true)]
+[SugarTable("StdOpMaster", "标准工序主数据表")]
+[SugarIndex("uk_StdOpMaster_scope_name", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(StdOp), OrderByType.Asc, IsUnique = true)]
 public class AdoS0StdOpMaster
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "标准工序主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0WorkCtrMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 工作中心主数据(源平台 WorkCtrMaster)。
 /// </summary>
-[SugarTable("ado_s0_mfg_work_ctr_master", "工作中心主数据表")]
-[SugarIndex("uk_ado_s0_mfg_wcm_domain_ctr", nameof(Domain), OrderByType.Asc, nameof(WorkCtr), OrderByType.Asc, IsUnique = true)]
+[SugarTable("WorkCtrMaster", "工作中心主数据表")]
+[SugarIndex("uk_WorkCtrMaster_domain_ctr", nameof(Domain), OrderByType.Asc, nameof(WorkCtr), OrderByType.Asc, IsUnique = true)]
 public class AdoS0WorkCtrMaster
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "工作中心主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Manufacturing/AdoS0WorkOrdControl.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
 /// <summary>
 /// 工单控制参数(WorkOrdControl 语义):按 Domain 维护的单记录配置。
 /// </summary>
-[SugarTable("ado_s0_mfg_work_ord_control", "S0 工单控制参数设置")]
-[SugarIndex("uk_ado_s0_mfg_woc_domain", nameof(Domain), OrderByType.Asc, IsUnique = true)]
+[SugarTable("WorkOrdControl", "S0 工单控制参数设置")]
+[SugarIndex("uk_WorkOrdControl_domain", nameof(Domain), OrderByType.Asc, IsUnique = true)]
 public class AdoS0WorkOrdControl
 {
     [SugarColumn(ColumnDescription = "工单控制参数主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0CustMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
 /// <summary>
 /// 客户主数据(复刻 CustMaster)
 /// </summary>
-[SugarTable("ado_s0_sales_cust_master", "客户主数据(复刻 CustMaster)")]
-[SugarIndex("uk_ado_s0_sales_cust_master_factory_cust", nameof(FactoryRefId), OrderByType.Asc, nameof(Cust), OrderByType.Asc, IsUnique = true)]
+[SugarTable("CustMaster", "客户主数据(复刻 CustMaster)")]
+[SugarIndex("uk_CustMaster_factory_cust", nameof(FactoryRefId), OrderByType.Asc, nameof(Cust), OrderByType.Asc, IsUnique = true)]
 public class AdoS0CustMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0ItemMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
 /// <summary>
 /// 物料主数据(复刻 ItemMaster)
 /// </summary>
-[SugarTable("ado_s0_sales_item_master", "物料主数据(复刻 ItemMaster)")]
-[SugarIndex("uk_ado_s0_sales_item_master_factory_item", nameof(FactoryRefId), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, IsUnique = true)]
+[SugarTable("ItemMaster", "物料主数据(复刻 ItemMaster)")]
+[SugarIndex("uk_ItemMaster_factory_item", nameof(FactoryRefId), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, IsUnique = true)]
 public class AdoS0ItemMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0ItemSubstituteDetail.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
 /// <summary>
 /// 物料替代关系(源平台 ItemSubstituteDetail 行级复刻)。
 /// </summary>
-[SugarTable("ado_s0_sales_item_substitute_detail", "物料替代关系表")]
+[SugarTable("ItemSubstituteDetail", "物料替代关系表")]
 public class AdoS0ItemSubstituteDetail
 {
     [SugarColumn(ColumnDescription = "物料替代关系主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Sales/AdoS0PriorityCode.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
 /// <summary>
 /// 订单优先级配置(复刻 PriorityCode)
 /// </summary>
-[SugarTable("ado_s0_sales_priority_code", "订单优先级配置(复刻 PriorityCode)")]
+[SugarTable("PriorityCode", "订单优先级配置(复刻 PriorityCode)")]
 public class AdoS0PriorityCode
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Supply/AdoS0SrmPurchase.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Supply;
 /// <summary>
 /// 货源清单 / 物料采购报价(复刻 srm_purchase,左联物料主数据仅用于展示)
 /// </summary>
-[SugarTable("ado_s0_supply_srm_purchase", "货源清单(srm_purchase)")]
+[SugarTable("srm_purchase", "货源清单(srm_purchase)")]
 public class AdoS0SrmPurchase
 {
     [SugarColumn(ColumnName = "id", ColumnDescription = "货源清单主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Supply/AdoS0SuppMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Supply;
 /// <summary>
 /// 供应商主数据(复刻 SuppMaster)
 /// </summary>
-[SugarTable("ado_s0_supply_supp_master", "供应商主数据(复刻 SuppMaster)")]
-[SugarIndex("uk_ado_s0_supply_supp_master_factory_supp", nameof(FactoryRefId), OrderByType.Asc, nameof(Supp), OrderByType.Asc, IsUnique = true)]
+[SugarTable("SuppMaster", "供应商主数据(复刻 SuppMaster)")]
+[SugarIndex("uk_SuppMaster_factory_supp", nameof(FactoryRefId), OrderByType.Asc, nameof(Supp), OrderByType.Asc, IsUnique = true)]
 public class AdoS0SuppMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0BarCodeNbr.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 条码规则主数据(复刻 BarCodeNbr)
 /// </summary>
-[SugarTable("ado_s0_wh_barcode_nbr", "条码规则主数据(复刻 BarCodeNbr)")]
-[SugarIndex("uk_ado_s0_wh_bcn_domain_customer_type", nameof(DomainCode), OrderByType.Asc, nameof(Customer), OrderByType.Asc, nameof(Type), OrderByType.Asc, IsUnique = true)]
+[SugarTable("BarCodeNbr", "条码规则主数据(复刻 BarCodeNbr)")]
+[SugarIndex("uk_BarCodeNbr_domain_customer_type", nameof(DomainCode), OrderByType.Asc, nameof(Customer), OrderByType.Asc, nameof(Type), OrderByType.Asc, IsUnique = true)]
 public class AdoS0BarCodeNbr
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0BarCodeType.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 标签格式头表(复刻 BarCodeType)
 /// </summary>
-[SugarTable("ado_s0_wh_barcode_type", "标签格式头表(复刻 BarCodeType)")]
-[SugarIndex("uk_ado_s0_wh_bct_domain_bartype", nameof(DomainCode), OrderByType.Asc, nameof(BarType), OrderByType.Asc, IsUnique = true)]
+[SugarTable("BarCodeType", "标签格式头表(复刻 BarCodeType)")]
+[SugarIndex("uk_BarCodeType_domain_bartype", nameof(DomainCode), OrderByType.Asc, nameof(BarType), OrderByType.Asc, IsUnique = true)]
 public class AdoS0BarCodeType
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0CostCtrMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 成本中心主数据(复刻 CostCtrMaster)
 /// </summary>
-[SugarTable("ado_s0_wh_cost_ctr_master", "成本中心主数据(复刻 CostCtrMaster)")]
-[SugarIndex("uk_ado_s0_wh_cost_ctr_domain_code", nameof(DomainCode), OrderByType.Asc, nameof(CostCtr), OrderByType.Asc, IsUnique = true)]
+[SugarTable("CostCtrMaster", "成本中心主数据(复刻 CostCtrMaster)")]
+[SugarIndex("uk_CostCtrMaster_domain_code", nameof(DomainCode), OrderByType.Asc, nameof(CostCtr), OrderByType.Asc, IsUnique = true)]
 public class AdoS0CostCtrMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0DepartmentMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 部门主数据(复刻 DepartmentMaster)
 /// </summary>
-[SugarTable("ado_s0_wh_department_master", "部门主数据(复刻 DepartmentMaster)")]
-[SugarIndex("uk_ado_s0_wh_dept_domain_dept", nameof(DomainCode), OrderByType.Asc, nameof(Department), OrderByType.Asc, IsUnique = true)]
+[SugarTable("DepartmentMaster", "部门主数据(复刻 DepartmentMaster)")]
+[SugarIndex("uk_DepartmentMaster_domain_dept", nameof(DomainCode), OrderByType.Asc, nameof(Department), OrderByType.Asc, IsUnique = true)]
 public class AdoS0DepartmentMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0EmpWorkDutyMaster.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 物料职责主数据(复刻 EmpWorkDutyMaster)
 /// </summary>
-[SugarTable("ado_s0_wh_emp_work_duty_master", "物料职责主数据(复刻 EmpWorkDutyMaster)")]
+[SugarTable("EmpWorkDutyMaster", "物料职责主数据(复刻 EmpWorkDutyMaster)")]
 public class AdoS0EmpWorkDutyMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0EmployeeMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 雇员主数据(复刻 EmployeeMaster)
 /// </summary>
-[SugarTable("ado_s0_wh_employee_master", "雇员主数据(复刻 EmployeeMaster)")]
-[SugarIndex("uk_ado_s0_wh_emp_domain_employee", nameof(DomainCode), OrderByType.Asc, nameof(Employee), OrderByType.Asc, IsUnique = true)]
+[SugarTable("EmployeeMaster", "雇员主数据(复刻 EmployeeMaster)")]
+[SugarIndex("uk_EmployeeMaster_domain_employee", nameof(DomainCode), OrderByType.Asc, nameof(Employee), OrderByType.Asc, IsUnique = true)]
 public class AdoS0EmployeeMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0ItemPackMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 零件包装规格主数据(复刻 ItemPackMaster)
 /// </summary>
-[SugarTable("ado_s0_wh_item_pack_master", "零件包装规格主数据(复刻 ItemPackMaster)")]
-[SugarIndex("uk_ado_s0_wh_ipm_domain_itemnum", nameof(DomainCode), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, IsUnique = true)]
+[SugarTable("ItemPackMaster", "零件包装规格主数据(复刻 ItemPackMaster)")]
+[SugarIndex("uk_ItemPackMaster_domain_itemnum", nameof(DomainCode), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, IsUnique = true)]
 public class AdoS0ItemPackMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0LocationMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 库位主数据(复刻 LocationMaster,供供应商等模块左联展示)
 /// </summary>
-[SugarTable("ado_s0_warehouse_location_master", "库位主数据(复刻 LocationMaster)")]
-[SugarIndex("uk_ado_s0_wh_loc_domain_location", nameof(DomainCode), OrderByType.Asc, nameof(Location), OrderByType.Asc, IsUnique = true)]
+[SugarTable("LocationMaster", "库位主数据(复刻 LocationMaster)")]
+[SugarIndex("uk_LocationMaster_domain_location", nameof(DomainCode), OrderByType.Asc, nameof(Location), OrderByType.Asc, IsUnique = true)]
 public class AdoS0LocationMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0LocationShelfMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 货架主数据(复刻 LocationShelfMaster,从属于 LocationMaster 聚合)
 /// </summary>
-[SugarTable("ado_s0_wh_location_shelf_master", "货架主数据(复刻 LocationShelfMaster)")]
-[SugarIndex("uk_ado_s0_wh_shelf_domain_loc_shelf", nameof(DomainCode), OrderByType.Asc, nameof(Location), OrderByType.Asc, nameof(InvShelf), OrderByType.Asc, IsUnique = true)]
+[SugarTable("LocationShelfMaster", "货架主数据(复刻 LocationShelfMaster)")]
+[SugarIndex("uk_LocationShelfMaster_domain_loc_shelf", nameof(DomainCode), OrderByType.Asc, nameof(Location), OrderByType.Asc, nameof(InvShelf), OrderByType.Asc, IsUnique = true)]
 public class AdoS0LocationShelfMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0NbrControl.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 单号规则主数据(复刻 NbrControl)
 /// </summary>
-[SugarTable("ado_s0_wh_nbr_control", "单号规则主数据(复刻 NbrControl)")]
-[SugarIndex("uk_ado_s0_wh_nbc_domain_nbrtype", nameof(DomainCode), OrderByType.Asc, nameof(NbrType), OrderByType.Asc, IsUnique = true)]
+[SugarTable("NbrControl", "单号规则主数据(复刻 NbrControl)")]
+[SugarIndex("uk_NbrControl_domain_nbrtype", nameof(DomainCode), OrderByType.Asc, nameof(NbrType), OrderByType.Asc, IsUnique = true)]
 public class AdoS0NbrControl
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 2 - 2
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0NbrTypeMaster.cs

@@ -3,8 +3,8 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 单号类型主数据(复刻 NbrTypeMaster)
 /// </summary>
-[SugarTable("ado_s0_wh_nbr_type_master", "单号类型主数据(复刻 NbrTypeMaster)")]
-[SugarIndex("uk_ado_s0_wh_nbt_domain_nbrtype", nameof(DomainCode), OrderByType.Asc, nameof(NbrType), OrderByType.Asc, IsUnique = true)]
+[SugarTable("NbrTypeMaster", "单号类型主数据(复刻 NbrTypeMaster)")]
+[SugarIndex("uk_NbrTypeMaster_domain_nbrtype", nameof(DomainCode), OrderByType.Asc, nameof(NbrType), OrderByType.Asc, IsUnique = true)]
 public class AdoS0NbrTypeMaster
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Entity/S0/Warehouse/AdoS0TaskAssignment.cs

@@ -3,7 +3,7 @@ namespace Admin.NET.Plugin.AiDOP.Entity.S0.Warehouse;
 /// <summary>
 /// 物料状态任务指派(复刻 wms_rwzp)
 /// </summary>
-[SugarTable("ado_s0_wh_task_assignment", "物料状态任务指派(复刻 wms_rwzp)")]
+[SugarTable("wms_rwzp", "物料状态任务指派(复刻 wms_rwzp)")]
 public class AdoS0TaskAssignment
 {
     [SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/Startup.cs

@@ -62,7 +62,7 @@ public class Startup : AppStartup
         if (!env.IsDevelopment())
             return;
 
-        // 客户/物料/优先级:ado_s0_sales_cust_master、ado_s0_sales_item_master、ado_s0_sales_priority_code(旧表可 DROP 后重启)
+        // 客户/物料/优先级等;前处理要素/前处理要素参数现为独立表 PreprocessElement / PreprocessElementParam
         using var scope = app.ApplicationServices.CreateScope();
         var db = scope.ServiceProvider.GetRequiredService<ISqlSugarClient>();
         db.CodeFirst.InitTables(