bonus
This commit is contained in:
parent
6babd91d22
commit
af46e47314
|
@ -642,10 +642,16 @@ namespace HRM.DA
|
||||||
|
|
||||||
internal static IDataReader Get(TransactionContext tc, string empID, DateTime fromDate, DateTime toDate)
|
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 =
|
string sql =
|
||||||
SQLParser.MakeSQL(
|
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",
|
"SELECT dap.* FROM DailyAttnProcess dap " +
|
||||||
empID, fromDate, toDate);
|
"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);
|
IDataReader dr = tc.ExecuteReader(sql);
|
||||||
return dr;
|
return dr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,6 +339,7 @@ namespace HRM.Report
|
||||||
DateTime? bonusIntime = DateTime.MinValue;
|
DateTime? bonusIntime = DateTime.MinValue;
|
||||||
DateTime? bonusOuttime = DateTime.MinValue;
|
DateTime? bonusOuttime = DateTime.MinValue;
|
||||||
List<ProdBonusAttn> prodAttn = new ProdBonusAttnService().GetBySetupID(designId);
|
List<ProdBonusAttn> prodAttn = new ProdBonusAttnService().GetBySetupID(designId);
|
||||||
|
if (prodAttn.Count <= 0) return null;
|
||||||
string empIds = string.Empty;
|
string empIds = string.Empty;
|
||||||
empIds = prodAttn.Select(x => x.EmployeeID).Distinct().Aggregate(new StringBuilder(), (sb, empid) => sb.Append(empid + ","), sb => sb.ToString().Trim(','));
|
empIds = prodAttn.Select(x => x.EmployeeID).Distinct().Aggregate(new StringBuilder(), (sb, empid) => sb.Append(empid + ","), sb => sb.ToString().Trim(','));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user