This commit is contained in:
chapal 2025-01-07 15:40:12 +06:00
parent 6babd91d22
commit af46e47314
2 changed files with 10 additions and 3 deletions

View File

@ -642,10 +642,16 @@ namespace HRM.DA
internal static IDataReader Get(TransactionContext tc, string empID, DateTime fromDate, DateTime toDate)
{
//string sql =
// SQLParser.MakeSQL(
// "SELECT dap.* FROM DailyAttnProcess dap Inner Join Employee e on e.EmployeeID=dap.EmployeeID " +
// "WHERE dap.EmployeeID IN(%q) AND dap.AttnDate BETWEEN %d AND %d order by dap.AttnDate DESC",
// empID, fromDate, toDate);
string sql =
SQLParser.MakeSQL(
"SELECT dap.* FROM DailyAttnProcess dap Inner Join Employee e on e.EmployeeID=dap.EmployeeID WHERE dap.EmployeeID IN(%q) AND dap.AttnDate BETWEEN %d AND %d order by dap.AttnDate DESC",
empID, fromDate, toDate);
SQLParser.MakeSQL(
"SELECT dap.* FROM DailyAttnProcess dap " +
"WHERE dap.EmployeeID IN(%q) AND dap.AttnDate BETWEEN %d AND %d order by dap.AttnDate DESC",
empID, fromDate, toDate);
IDataReader dr = tc.ExecuteReader(sql);
return dr;
}

View File

@ -339,6 +339,7 @@ namespace HRM.Report
DateTime? bonusIntime = DateTime.MinValue;
DateTime? bonusOuttime = DateTime.MinValue;
List<ProdBonusAttn> prodAttn = new ProdBonusAttnService().GetBySetupID(designId);
if (prodAttn.Count <= 0) return null;
string empIds = string.Empty;
empIds = prodAttn.Select(x => x.EmployeeID).Distinct().Aggregate(new StringBuilder(), (sb, empid) => sb.Append(empid + ","), sb => sb.ToString().Trim(','));