|
|
|
|
@ -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<CollectAnalysisDetail>(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<CollectAnalysisListItem>(sql, new { RawLogId = rawLogId }).AsList();
|
|
|
|
|
|