This commit is contained in:
2026-01-13 12:36:57 +03:00
commit ebe1f5bd00
29 changed files with 2295 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace API;
trait tundishSample
{
public function getDataHeats($params)
{
$query = "SELECT distinct
[HEAT_NAME]
,convert(varchar, [OPEN_TIME], 104) +' '+convert(varchar, [OPEN_TIME], 108) as OPEN_TIME
,convert(varchar, [CLOSE_TIME], 104) +' '+convert(varchar, [CLOSE_TIME], 108) as CLOSE_TIME
FROM [Level3_KKC].[dbo].[HEAT_CCM1_L3]
-- left join [Pasport_CCM].[dbo].[OPC_T_Tundish_sample_VALUES] ts
-- on [OPEN_TIME]<=ts.datetime and CLOSE_TIME>=ts.datetime
where CAST([CLOSE_TIME] as DATE) between'".$params['dateStart']."' and '".$params['dateEnd']."'
order by [OPEN_TIME] desc, [CLOSE_TIME] desc";
select($query);
}
public function getDataValues($params)
{
$query = "SELECT distinct
[HEAT_NAME]
,[button_all]
,[opc_T_sample_value]
,[count]
,convert(varchar, [datetime], 104) +' '+convert(varchar, [datetime], 108) as [datetime]
FROM [Level3_KKC].[dbo].[HEAT_CCM1_L3] ccm
inner join [Pasport_CCM].[dbo].[OPC_T_Tundish_sample_VALUES] ts
on [OPEN_TIME]<=ts.datetime and CLOSE_TIME>=ts.datetime
where CAST([CLOSE_TIME] as DATE) between'".$params['dateStart']."' and '".$params['dateEnd']."'
order by [datetime] desc";
select($query);
}
}