diff --git a/RIZO.Admin.WebApi/Controllers/Mes/MasterData/ProductionLineController.cs b/RIZO.Admin.WebApi/Controllers/Mes/MasterData/ProductionLineController.cs index be1b182..c085ecb 100644 --- a/RIZO.Admin.WebApi/Controllers/Mes/MasterData/ProductionLineController.cs +++ b/RIZO.Admin.WebApi/Controllers/Mes/MasterData/ProductionLineController.cs @@ -112,5 +112,19 @@ namespace RIZO.Admin.WebApi.Controllers.Mes var response = _ProductionLineService.GetAllLine(); return SUCCESS(response); } + + /// + /// 停用产线管理基础信息表 + /// + /// + [HttpPost("stop/{ids}")] + [ActionPermissionFilter(Permission = "productionline:delete")] + [Log(Title = "产线管理基础信息表", BusinessType = BusinessType.DELETE)] + public IActionResult StopProductionLine([FromRoute] string ids) + { + var idArr = Tools.SplitAndConvert(ids); + return ToResponse(_ProductionLineService.Stop(idArr)); + } + } } \ No newline at end of file diff --git a/RIZO.Model/Mes/Dto/MasterData/ProductionLineDto.cs b/RIZO.Model/Mes/Dto/MasterData/ProductionLineDto.cs index 6faa98d..23aaa23 100644 --- a/RIZO.Model/Mes/Dto/MasterData/ProductionLineDto.cs +++ b/RIZO.Model/Mes/Dto/MasterData/ProductionLineDto.cs @@ -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; } diff --git a/RIZO.Service/Mes/IMesService/MasterData/IProductionLineService.cs b/RIZO.Service/Mes/IMesService/MasterData/IProductionLineService.cs index b93a549..d89e1ef 100644 --- a/RIZO.Service/Mes/IMesService/MasterData/IProductionLineService.cs +++ b/RIZO.Service/Mes/IMesService/MasterData/IProductionLineService.cs @@ -17,5 +17,7 @@ namespace RIZO.Service.Mes.IMesService.MasterData int UpdateProductionLine(ProductionLine parm); List GetAllLine(); + + int Stop(object id); } } diff --git a/RIZO.Service/Mes/MasterData/ProductionLineService.cs b/RIZO.Service/Mes/MasterData/ProductionLineService.cs index c9152b1..937f1e5 100644 --- a/RIZO.Service/Mes/MasterData/ProductionLineService.cs +++ b/RIZO.Service/Mes/MasterData/ProductionLineService.cs @@ -91,7 +91,7 @@ namespace RIZO.Service.Mes.MasterData public List 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; + } } } \ No newline at end of file diff --git a/RIZO.Service/Mes/Process/ProcessInfoService.cs b/RIZO.Service/Mes/Process/ProcessInfoService.cs index 51bc8cd..a0b4e68 100644 --- a/RIZO.Service/Mes/Process/ProcessInfoService.cs +++ b/RIZO.Service/Mes/Process/ProcessInfoService.cs @@ -127,10 +127,15 @@ namespace RIZO.Service.Mes.Process List processInfoImports = new List(); List resultList = stream.Query().ToList(); List porocessCodeList = new List(); + List lineCodeList = new List(); //从1开始循环,排除掉0行的标题行 - for(int i = 1;i p.ProcessCode == processInfoImport.ProcessCode)) { ProcessInfo processInfo = new ProcessInfo();