产线管理

This commit is contained in:
quowingwang 2025-11-11 15:37:11 +08:00
parent 515992a2ba
commit 9a9d443302
5 changed files with 35 additions and 3 deletions

View File

@ -112,5 +112,19 @@ namespace RIZO.Admin.WebApi.Controllers.Mes
var response = _ProductionLineService.GetAllLine();
return SUCCESS(response);
}
/// <summary>
/// 停用产线管理基础信息表
/// </summary>
/// <returns></returns>
[HttpPost("stop/{ids}")]
[ActionPermissionFilter(Permission = "productionline:delete")]
[Log(Title = "产线管理基础信息表", BusinessType = BusinessType.DELETE)]
public IActionResult StopProductionLine([FromRoute] string ids)
{
var idArr = Tools.SplitAndConvert<long>(ids);
return ToResponse(_ProductionLineService.Stop(idArr));
}
}
}

View File

@ -26,7 +26,7 @@ namespace RIZO.Model.Mes.Dto.MasterData
[Required(ErrorMessage = "产线名称不能为空")]
public string LineName { get; set; }
[Required(ErrorMessage = "产线状态0-在用1-停用)不能为空")]
//"产线状态0-在用1-停用)
public int LineStatus { get; set; }
public string CreateBy { get; set; }

View File

@ -17,5 +17,7 @@ namespace RIZO.Service.Mes.IMesService.MasterData
int UpdateProductionLine(ProductionLine parm);
List<ProductionLinePullDownDto> GetAllLine();
int Stop(object id);
}
}

View File

@ -91,7 +91,7 @@ namespace RIZO.Service.Mes.MasterData
public List<ProductionLinePullDownDto> GetAllLine()
{
var lineOptions = Queryable()
.Where(it => it.LineStatus == 0)
.Where(it => it.LineStatus == 0)
.Select(it => new ProductionLinePullDownDto
{
value = it.LineCode, // value绑定产线编码唯一标识
@ -100,5 +100,16 @@ namespace RIZO.Service.Mes.MasterData
.ToList(); // 执行查询并转换为列表
return lineOptions;
}
//停用产线
public int Stop(object id)
{
int iResult = 0;
if (id != null)
{
}
return iResult;
}
}
}

View File

@ -127,10 +127,15 @@ namespace RIZO.Service.Mes.Process
List<ProcessInfoImport> processInfoImports = new List<ProcessInfoImport>();
List<ProcessInfoImport> resultList = stream.Query<ProcessInfoImport>().ToList();
List<string> porocessCodeList = new List<string>();
List<string> lineCodeList = new List<string>();
//从1开始循环排除掉0行的标题行
for(int i = 1;i<resultList.Count; i++)
for (int i = 1;i<resultList.Count; i++)
{
ProcessInfoImport processInfoImport = resultList[i];
if (lineCodeList.Any())
{
}
if (!processInfos.Any(p => p.ProcessCode == processInfoImport.ProcessCode))
{
ProcessInfo processInfo = new ProcessInfo();