This commit is contained in:
gcw_MV9p2JJN 2026-01-04 14:24:43 +08:00
parent 6c0ccb8029
commit 7ea27b0b43
11 changed files with 135 additions and 19 deletions

View File

@ -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 = 3PgSql = 4

View File

@ -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 获取工厂
/// <summary>
/// 获取工厂
/// </summary>
/// <param name="site_code">工厂code</param>
/// <returns></returns>
[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);
}
}

View File

@ -109,6 +109,20 @@ namespace MDM.Controllers.Plant
return ToResponse(response);
}
//TODO 获取工厂
/// <summary>
/// 获取工厂
/// </summary>
/// <param name="site_code">工厂code</param>
/// <returns></returns>
[HttpGet("get_factory_site")]
public IActionResult GetFactorySite(string site_code)
{
var response = _PlantWorkshopService.GetFactorySite(site_code);
return SUCCESS(response);
}

View File

@ -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 获取工厂
/// <summary>
/// 获取工厂
/// </summary>
/// <param name="site_code">工厂code</param>
/// <returns></returns>
[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);
}
}

View File

@ -124,8 +124,7 @@ namespace MDM.Controllers.Process
/// </summary>
/// <param name="OperationWorkstationMappingId"></param>
/// <returns> int 同步的数据条数</returns>
[HttpGet("sync_CollectParameter")]
[HttpGet("sync_CollectParameter")]
public IActionResult SyncCollectParameter(int OperationWorkstationMappingId)
{
var response = _ProcessOperationWorkstationMappingService.SyncCollectParameter(OperationWorkstationMappingId);

View File

@ -19,5 +19,9 @@ namespace MDM.Services.IPlantService
int UpdatePlantProductlinebody(PlantProductlinebody parm);
List<PlantFactorySite> GetFactorySite(string site_code);
List<PlantWorkshop> GetWorkShop(string workshop_code);
}
}

View File

@ -19,5 +19,7 @@ namespace MDM.Services.IPlantService
int UpdatePlantWorkshop(PlantWorkshop parm);
List<PlantFactorySite> GetFactorySite(string site_code);
}
}

View File

@ -20,5 +20,11 @@ namespace MDM.Services.IPlantService
int UpdatePlantWorkstation(PlantWorkstation parm);
List<PlantFactorySite> GetFactorySite(string site_code);
List<PlantWorkshop> GetWorkShop(string workshop_code);
List<PlantProductlinebody> GetPlantProductlinebodies(string LineCode);
}
}

View File

@ -87,5 +87,16 @@ namespace MDM.Services.Plant
return Update(model, true);
}
public List<PlantFactorySite> GetFactorySite(string site_code)
{
return Context.Queryable<PlantFactorySite>().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
}
public List<PlantWorkshop> GetWorkShop(string workshop_code)
{
return Context.Queryable<PlantWorkshop>().WhereIF(!string.IsNullOrEmpty(workshop_code), it => it.WorkshopCode.Contains(workshop_code)).ToList();
}
}
}

View File

@ -87,5 +87,11 @@ namespace MDM.Services.Plant
return Update(model, true);
}
public List<PlantFactorySite> GetFactorySite(string site_code)
{
return Context.Queryable<PlantFactorySite>().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
}
}
}

View File

@ -96,5 +96,20 @@ namespace MDM.Services.Plant
return Update(model, true);
}
public List<PlantFactorySite> GetFactorySite(string site_code)
{
return Context.Queryable<PlantFactorySite>().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
}
public List<PlantWorkshop> GetWorkShop(string workshop_code)
{
return Context.Queryable<PlantWorkshop>().WhereIF(!string.IsNullOrEmpty(workshop_code), it => it.WorkshopCode.Contains(workshop_code)).ToList();
}
public List<PlantProductlinebody> GetPlantProductlinebodies(string LineCode)
{
return Context.Queryable<PlantProductlinebody>().WhereIF(!string.IsNullOrEmpty(LineCode), it => it.LineCode.Contains(LineCode)).ToList();
}
}
}