工资计算试.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. 1、原工资计算方式:
  2. CString strSQL;
  3. CString strStaff; // 职工;
  4. CString strStartDate; // 开始日期;
  5. CString strEndofDate; // 结束日期;
  6. strStaff = _T("张三");
  7. strStartDate = _T("2015-11-10");
  8. strEndofDate = _T("2015-12-10");
  9. case 34: renyuan;
  10. // 查找出该姓名的在职职员;
  11. strSQL.Format(_T("select * from renyuan where name = '%s' and dimission = '在职'"), strStaff);
  12. case 59: dindanbukuanview;
  13. // 查找出指定日期内的所有补款;
  14. strSQL.Format(_T("select * from dindanbukuanview where [date] >= '%s' and [date] <= '%s' "), strStartDate, strEndofDate);
  15. case 60: dindan;
  16. // 获取全部订单信息,以便从中筛选出该职员的工作;
  17. strSQL = T("select * from dindan"));
  18. case 198: singleincomemeneyview;
  19. // 获取该职员的其他收入;
  20. strSQL.Format(_T("select * from singleincomemeneyview where [date] >= '%s' and [date] <= '%s' and renyuan3 = '%s'"), strStartDate, strEndofDate, strStaff);
  21. case 61: dindan && dindanbukuan;
  22. // 获取指定拍照OK日期的订单;
  23. strSQL.Format(_T("select * from dindan where time2 >= '%s' and time2 = '%s' and status = 'OK'"), strStartDate, strEndofDate);
  24. // 获取补款小于开始日期的全部补款;
  25. strSQL.Format(_T("select * from dindanbukuan where [date] < '%s'"), strStartDate);
  26. case 142: dindan && mywork;
  27. // 获取职员在指定工作安排日期的全部订单信息;
  28. strSQL.Format(_T("select * from dindan where datetime >= '%s' and datetime <= '%s' and name = '%s'"), strStartDate, strEndofDate, strStaff);
  29. // 获取职员的全部工作信息;
  30. strSQL.Format(_T("select * from mywork where datetime >= '%s' and datetime <= '%s' and name = '%s'"), strStartDate, strEndofDate, strStaff);
  31. case 192: dindan && dindanjd;
  32. // 获取拍照OK的全部订单信息;
  33. strSQL.Format(_T("select * from dindan where [date] >= '%s' and [date] <= '%s' and status = 'OK' and (waiter1 = '%s' or waiter12 = '%s' or waiter2 = '%s' or waiter22 = '%s')"),
  34. strStartDate, strEndofDate, strStaff, strStaff, strStaff, strStaff);
  35. strSQL.Format(_T("select * from dindanjd where [date] >= '%s' and [date] <= '%s' and status = 'OK' and (waiter1 = '%s' or waiter12 = '%s' or waiter2 = '%s' or waiter22 = '%s')"),
  36. strStartDate, strEndofDate, strStaff, strStaff, strStaff, strStaff);
  37. case 193: digitalview;
  38. // 获取数码工作信息;
  39. strSQL.Format(_T("select * from digitalview where (time8 >= '%s' and time8 <= '%s' and status4 = 'OK' and waiter5 = '%s') or\
  40. (time9 >= '%s' and time9 <= '%s' and status6 = 'OK' and waiter7 = '%s') or \
  41. (time10 >= '%s' and time10 <= '%s' and status5 = 'OK' and waiter4 = '%s')"),
  42. strStartDate, strEndofDate, strStaff, strStartDate, strEndofDate, strStaff, strStartDate, strEndofDate, strStaff);
  43. 2、工资计算函数;
  44. /************************************************************************/
  45. /*
  46. 函数:GetStaffWage
  47. 描述:获取职员指定时间内的工资;
  48. 参数:
  49. [IN] lpStaff 职员;
  50. [IN] lpStartDate 计算工资的开始日期;
  51. [IN] lpEndofDate 计算工资的结束日期;
  52. 返回:空
  53. */
  54. /************************************************************************/
  55. VOID GetStaffWage(IN LPCTSTR lpStaff, IN LPCTSTR lpStartDate, IN LPCTSTR lpEndofDate)
  56. {
  57. }