这是我必须使用的工资单文件中的一个示例,它列出了员工编号、不同类型的收入和检查日期。目标是获得每个员工的小计,列出员工的总工资和其他收入。我无法理解如何做到这一点,有人可以提供一些建议吗?我正在尝试在 C# 中执行此操作。一些员工可能只有一条线,其他员工可能有没有固定工资类型的线,只有扣除/收入(奖金、保险等......)
240 TN DP 800.00 1696.65 .00 .00 .00 .00 65 46.20 11/10/11
240 TN DP 800.00 1696.65 .00 .00 .00 .00 66 124.83 11/10/11
240 TN DP 800.00 1696.65 .00 .00 .00 .00 72 5.27 11/10/11
240 TN DP 800.00 1696.65 .00 .00 .00 .00 ZC 1933.75 11/10/11
240 TN DP 800.00 1643.55 .00 .00 .00 .00 65 46.20 11/25/11
240 TN DP 800.00 1643.55 .00 .00 .00 .00 66 122.18 11/25/11
240 TN DP 800.00 1643.55 .00 .00 .00 .00 72 5.27 11/25/11
240 TN DP 800.00 1643.55 .00 .00 .00 .00 ZC 1893.87 11/25/11
240 TN DP .00 .00 .00 .00 400.00 .00 66 20.00 12/09/11
240 TN DP 800.00 1595.25 .00 80.00 .00 .00 65 46.20 12/09/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 65 .00 07/08/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 67 .00 07/08/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 69 .00 07/08/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 72 .00 07/08/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 74 .00 07/08/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 ZC 1299.03 07/08/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 65 181.85 07/22/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 67 12.46 07/22/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 69 .00 07/22/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 72 22.15 07/22/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 74 .00 07/22/11
242 TN DP 1538.46 .00 .00 .00 .00 .00 ZC 1124.70 07/22/11
编辑:在回答一些问题时,这些字段从左到右依次为:员工编号、州、部门、正常工资、加班工资、假期工资、假期工资、病假工资、特殊工资、收入代码、收入金额、检查日期。我需要为每个字段获取每位员工的总数,同时确保每个检查日期不会多次添加一个人的工资。