diff --git a/DOAN.Admin.WebApi/appsettings.Development.json b/DOAN.Admin.WebApi/appsettings.Development.json
index 3dd9ea3..287ebb5 100644
--- a/DOAN.Admin.WebApi/appsettings.Development.json
+++ b/DOAN.Admin.WebApi/appsettings.Development.json
@@ -8,9 +8,9 @@
},
"dbConfigs": [
{
- "Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308",
+ // "Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308",
//"Conn": "Data Source=118.25.48.201;User ID=root;Password=123456;Initial Catalog=gxassembly;Port=3306;AllowLoadLocalInfile=true",
- // "Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306;AllowLoadLocalInfile=true",
+ "Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306;AllowLoadLocalInfile=true",
// "Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306",
//"Conn": "Data Source=192.168.50.163;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306",
"DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
diff --git a/MDM/Controllers/Plant/PlantProductlinebodyController.cs b/MDM/Controllers/Plant/PlantProductlinebodyController.cs
index 14563d6..1dba443 100644
--- a/MDM/Controllers/Plant/PlantProductlinebodyController.cs
+++ b/MDM/Controllers/Plant/PlantProductlinebodyController.cs
@@ -1,17 +1,17 @@
-using Microsoft.AspNetCore.Mvc;
-
using DOAN.Admin.WebApi.Filters;
-using Infrastructure.Controllers;
+using DOAN.Common;
using DOAN.ServiceCore.Middleware;
-using Mapster;
-using Infrastructure.Enums;
using Infrastructure;
using Infrastructure.Attribute;
-using DOAN.Common;
+using Infrastructure.Controllers;
+using Infrastructure.Enums;
using Infrastructure.Model;
-using MDM.Services.IPlantService;
-using MDM.Model.Plant.Dto;
+using Mapster;
using MDM.Model.Plant;
+using MDM.Model.Plant.Dto;
+using MDM.Services.IPlantService;
+using MDM.Services.Plant;
+using Microsoft.AspNetCore.Mvc;
//创建时间:2025-11-15
@@ -112,6 +112,30 @@ namespace MDM.Controllers.Plant
}
+ //TODO 获取工厂
+ ///
+ /// 获取工厂
+ ///
+ /// 工厂code
+ ///
+ [HttpGet("get_factory_site")]
+ public IActionResult GetFactorySite(string site_code)
+ {
+ var response = _PlantProductlinebodyService.GetFactorySite(site_code);
+
+ return SUCCESS(response);
+ }
+
+ //获取车间
+
+ [HttpGet("get_workshop")]
+ public IActionResult GetWorkShop(string workshop_code)
+ {
+ var response = _PlantProductlinebodyService.GetWorkShop(workshop_code);
+
+ return SUCCESS(response);
+ }
+
}
diff --git a/MDM/Controllers/Plant/PlantWorkshopController.cs b/MDM/Controllers/Plant/PlantWorkshopController.cs
index bedde01..ad576b6 100644
--- a/MDM/Controllers/Plant/PlantWorkshopController.cs
+++ b/MDM/Controllers/Plant/PlantWorkshopController.cs
@@ -109,6 +109,20 @@ namespace MDM.Controllers.Plant
return ToResponse(response);
}
+ //TODO 获取工厂
+ ///
+ /// 获取工厂
+ ///
+ /// 工厂code
+ ///
+ [HttpGet("get_factory_site")]
+ public IActionResult GetFactorySite(string site_code)
+ {
+ var response = _PlantWorkshopService.GetFactorySite(site_code);
+
+ return SUCCESS(response);
+ }
+
diff --git a/MDM/Controllers/Plant/PlantWorkstationController.cs b/MDM/Controllers/Plant/PlantWorkstationController.cs
index 2596ba7..7f1fc9d 100644
--- a/MDM/Controllers/Plant/PlantWorkstationController.cs
+++ b/MDM/Controllers/Plant/PlantWorkstationController.cs
@@ -1,17 +1,17 @@
-using Microsoft.AspNetCore.Mvc;
-
using DOAN.Admin.WebApi.Filters;
-using Infrastructure.Controllers;
+using DOAN.Common;
using DOAN.ServiceCore.Middleware;
-using Mapster;
-using Infrastructure.Enums;
using Infrastructure;
using Infrastructure.Attribute;
-using DOAN.Common;
+using Infrastructure.Controllers;
+using Infrastructure.Enums;
using Infrastructure.Model;
-using MDM.Services.IPlantService;
+using Mapster;
using MDM.Model.Plant;
using MDM.Model.Plant.Dto;
+using MDM.Services.IPlantService;
+using MDM.Services.Plant;
+using Microsoft.AspNetCore.Mvc;
//创建时间:2025-11-15
namespace MDM.Controllers.Plant
{
@@ -110,6 +110,41 @@ namespace MDM.Controllers.Plant
}
+ //TODO 获取工厂
+ ///
+ /// 获取工厂
+ ///
+ /// 工厂code
+ ///
+ [HttpGet("get_factory_site")]
+ public IActionResult GetFactorySite(string site_code)
+ {
+ var response = _PlantWorkstationService.GetFactorySite(site_code);
+
+ return SUCCESS(response);
+ }
+
+
+ //获取车间
+
+ [HttpGet("get_workshop")]
+ public IActionResult GetWorkShop(string workshop_code)
+ {
+ var response = _PlantWorkstationService.GetWorkShop(workshop_code);
+
+ return SUCCESS(response);
+ }
+
+ //获取产线
+
+ [HttpGet("get_productlinebody")]
+ public IActionResult GetProductlinebody(string linecode)
+ {
+ var response = _PlantWorkstationService.GetPlantProductlinebodies(linecode);
+
+ return SUCCESS(response);
+ }
+
}
diff --git a/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs b/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs
index eab2336..144363b 100644
--- a/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs
+++ b/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs
@@ -124,8 +124,7 @@ namespace MDM.Controllers.Process
///
///
/// int 同步的数据条数
- [HttpGet("sync_CollectParameter")]
-
+ [HttpGet("sync_CollectParameter")]
public IActionResult SyncCollectParameter(int OperationWorkstationMappingId)
{
var response = _ProcessOperationWorkstationMappingService.SyncCollectParameter(OperationWorkstationMappingId);
diff --git a/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs b/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs
index 0a821c7..742295c 100644
--- a/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs
+++ b/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs
@@ -19,5 +19,9 @@ namespace MDM.Services.IPlantService
int UpdatePlantProductlinebody(PlantProductlinebody parm);
+ List GetFactorySite(string site_code);
+
+ List GetWorkShop(string workshop_code);
+
}
}
diff --git a/MDM/Services/Plant/IService/IPlantWorkshopService.cs b/MDM/Services/Plant/IService/IPlantWorkshopService.cs
index 1b07b82..4bd2d0d 100644
--- a/MDM/Services/Plant/IService/IPlantWorkshopService.cs
+++ b/MDM/Services/Plant/IService/IPlantWorkshopService.cs
@@ -19,5 +19,7 @@ namespace MDM.Services.IPlantService
int UpdatePlantWorkshop(PlantWorkshop parm);
+ List GetFactorySite(string site_code);
+
}
}
diff --git a/MDM/Services/Plant/IService/IPlantWorkstationService.cs b/MDM/Services/Plant/IService/IPlantWorkstationService.cs
index a319474..518b952 100644
--- a/MDM/Services/Plant/IService/IPlantWorkstationService.cs
+++ b/MDM/Services/Plant/IService/IPlantWorkstationService.cs
@@ -20,5 +20,11 @@ namespace MDM.Services.IPlantService
int UpdatePlantWorkstation(PlantWorkstation parm);
+ List GetFactorySite(string site_code);
+
+ List GetWorkShop(string workshop_code);
+
+ List GetPlantProductlinebodies(string LineCode);
+
}
}
diff --git a/MDM/Services/Plant/PlantProductlinebodyService.cs b/MDM/Services/Plant/PlantProductlinebodyService.cs
index e7b2a04..4ba0c44 100644
--- a/MDM/Services/Plant/PlantProductlinebodyService.cs
+++ b/MDM/Services/Plant/PlantProductlinebodyService.cs
@@ -87,5 +87,16 @@ namespace MDM.Services.Plant
return Update(model, true);
}
+ public List GetFactorySite(string site_code)
+ {
+ return Context.Queryable().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
+ }
+
+
+ public List GetWorkShop(string workshop_code)
+ {
+ return Context.Queryable().WhereIF(!string.IsNullOrEmpty(workshop_code), it => it.WorkshopCode.Contains(workshop_code)).ToList();
+ }
+
}
}
\ No newline at end of file
diff --git a/MDM/Services/Plant/PlantWorkshopService.cs b/MDM/Services/Plant/PlantWorkshopService.cs
index e5fa8e7..799e2a7 100644
--- a/MDM/Services/Plant/PlantWorkshopService.cs
+++ b/MDM/Services/Plant/PlantWorkshopService.cs
@@ -87,5 +87,11 @@ namespace MDM.Services.Plant
return Update(model, true);
}
+
+ public List GetFactorySite(string site_code)
+ {
+ return Context.Queryable().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
+ }
+
}
}
\ No newline at end of file
diff --git a/MDM/Services/Plant/PlantWorkstationService.cs b/MDM/Services/Plant/PlantWorkstationService.cs
index ac0611e..548fd0d 100644
--- a/MDM/Services/Plant/PlantWorkstationService.cs
+++ b/MDM/Services/Plant/PlantWorkstationService.cs
@@ -96,5 +96,20 @@ namespace MDM.Services.Plant
return Update(model, true);
}
+
+ public List GetFactorySite(string site_code)
+ {
+ return Context.Queryable().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
+ }
+
+ public List GetWorkShop(string workshop_code)
+ {
+ return Context.Queryable().WhereIF(!string.IsNullOrEmpty(workshop_code), it => it.WorkshopCode.Contains(workshop_code)).ToList();
+ }
+ public List GetPlantProductlinebodies(string LineCode)
+ {
+ return Context.Queryable().WhereIF(!string.IsNullOrEmpty(LineCode), it => it.LineCode.Contains(LineCode)).ToList();
+ }
+
}
}
\ No newline at end of file