You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using Admin.Core.IRepository ;
using Admin.Core.IService ;
using Admin.Core.Model ;
using Admin.Core.Model.Model_New ;
using Admin.Core.Model.ViewModels ;
using Microsoft.IdentityModel.Logging ;
using System ;
using System.Collections.Generic ;
using System.Threading.Tasks ;
namespace Admin.Core.Service
{
public class OffLineInfoServices : BaseServices < OffLineInfo > , IOffLineInfoServices
{
private readonly IBaseRepository < OffLineInfo > _dal ;
public OffLineInfoServices ( IBaseRepository < OffLineInfo > dal )
{
this . _dal = dal ;
base . BaseDal = dal ;
}
/// <summary>
/// 图表统计,根据登录班组
/// -- 如果是白班,查询当天白班数据
/// -- 如果是夜班, 并且当前时间大于12:00, 统计当天12:00以后的夜班数据
/// -- 否则为第二天凌晨, 统计前一天12:00以后的夜班数据
/// 传入参数: productLine产线,teamName班组名称
/// </summary>
public List < OffLineInfo > getTeamOffData ( string productLine , string teamName )
{
try
{
List < OffLineInfo > list = null ;
var _db = this . BaseDal . Db ;
list = _db . CopyNew ( ) . Ado . SqlQuery < OffLineInfo > ( $"SELECT * FROM DATA_OFFLINE_VIEW WHERE LOGIN_TEAM='{teamName}' and PRODUCT_LINE_CODE='{productLine}'" ) ;
return list ;
}
catch ( Exception )
{
return null ;
}
}
}
}