diff --git a/src/CncRepository/Impl/Log/CollectAnalysisRepository.cs b/src/CncRepository/Impl/Log/CollectAnalysisRepository.cs index 6a79e73..543d539 100644 --- a/src/CncRepository/Impl/Log/CollectAnalysisRepository.cs +++ b/src/CncRepository/Impl/Log/CollectAnalysisRepository.cs @@ -68,14 +68,13 @@ namespace CncRepository.Impl.Log DATE_FORMAT(a.analysis_time, '%Y-%m-%d %H:%i:%s') AS AnalysisTime, a.collect_address_id AS CollectAddressId, a.machine_id AS MachineId, - m.name AS MachineName, + NULL AS MachineName, a.analysis_type AS AnalysisType, a.previous_program AS PreviousProgram, a.current_program AS CurrentProgram, a.part_count_delta AS PartCountDelta, a.analysis_summary AS AnalysisSummary FROM log_collect_analysis a - LEFT JOIN cnc_business.cnc_machine m ON a.machine_id = m.id WHERE {whereSql} ORDER BY a.analysis_time DESC LIMIT @PageSize OFFSET @Offset"; @@ -102,7 +101,7 @@ namespace CncRepository.Impl.Log DATE_FORMAT(a.analysis_time, '%Y-%m-%d %H:%i:%s') AS AnalysisTime, a.collect_address_id AS CollectAddressId, a.machine_id AS MachineId, - m.name AS MachineName, + NULL AS MachineName, a.analysis_type AS AnalysisType, a.previous_program AS PreviousProgram, a.current_program AS CurrentProgram, @@ -115,7 +114,6 @@ namespace CncRepository.Impl.Log a.analysis_detail AS AnalysisDetail, a.raw_log_id AS RawLogId FROM log_collect_analysis a - LEFT JOIN cnc_business.cnc_machine m ON a.machine_id = m.id WHERE a.id = @Id"; return conn.QueryFirstOrDefault(sql, new { Id = id }); } @@ -130,14 +128,13 @@ namespace CncRepository.Impl.Log DATE_FORMAT(a.analysis_time, '%Y-%m-%d %H:%i:%s') AS AnalysisTime, a.collect_address_id AS CollectAddressId, a.machine_id AS MachineId, - m.name AS MachineName, + NULL AS MachineName, a.analysis_type AS AnalysisType, a.previous_program AS PreviousProgram, a.current_program AS CurrentProgram, a.part_count_delta AS PartCountDelta, a.analysis_summary AS AnalysisSummary FROM log_collect_analysis a - LEFT JOIN cnc_business.cnc_machine m ON a.machine_id = m.id WHERE a.raw_log_id = @RawLogId ORDER BY a.analysis_time DESC"; return conn.Query(sql, new { RawLogId = rawLogId }).AsList(); diff --git a/src/CncRepository/Impl/Log/CollectCycleRepository.cs b/src/CncRepository/Impl/Log/CollectCycleRepository.cs index 7bb70e3..7d8ac3f 100644 --- a/src/CncRepository/Impl/Log/CollectCycleRepository.cs +++ b/src/CncRepository/Impl/Log/CollectCycleRepository.cs @@ -55,7 +55,7 @@ namespace CncRepository.Impl.Log c.id AS Id, DATE_FORMAT(c.cycle_time, '%Y-%m-%d %H:%i:%s') AS CycleTime, c.collect_address_id AS CollectAddressId, - ca.address_name AS AddressName, + NULL AS AddressName, c.total_machines AS TotalMachines, c.success_count AS SuccessCount, c.fail_count AS FailCount, @@ -63,7 +63,6 @@ namespace CncRepository.Impl.Log c.change_distribution AS ChangeDistribution, c.cycle_summary AS CycleSummary FROM log_collect_cycle c - LEFT JOIN cnc_business.cnc_collect_address ca ON c.collect_address_id = ca.id WHERE {whereSql} ORDER BY c.cycle_time DESC LIMIT @PageSize OFFSET @Offset"; diff --git a/src/CncWebApi/Controllers/CollectLogController.cs b/src/CncWebApi/Controllers/CollectLogController.cs index 7ab02e0..567c5d8 100644 --- a/src/CncWebApi/Controllers/CollectLogController.cs +++ b/src/CncWebApi/Controllers/CollectLogController.cs @@ -73,7 +73,7 @@ namespace CncWebApi.Controllers [HttpGet] [Route("raw")] [ResponseType(typeof(ApiResponse>))] - public IHttpActionResult GetRawList([FromUri] int? collectAddressId, [FromUri] int page = 1, [FromUri] int pageSize = 20) + public IHttpActionResult GetRawList([FromUri] int? collectAddressId = null, [FromUri] int page = 1, [FromUri] int pageSize = 20) { var result = _rawRepository.GetByAddressId(collectAddressId ?? 0, page, pageSize); return Ok(ApiResponse>.Success(result));