职务消费台账统计领导问题处理
This commit is contained in:
parent
d55f5745be
commit
3707cf73ce
|
@ -307,48 +307,48 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//差旅报销单数据
|
||||
DynamicObject[] tripreimburseDataSet = getTripreimburseDataSet(userId, year);
|
||||
for (DynamicObject dynamicObject : tripreimburseDataSet) {
|
||||
String billno = dynamicObject.getString("billno");//单据编号
|
||||
//判罚是否因公出国
|
||||
Boolean isBusinessForeign = dynamicObject.getBoolean(DEV_KEY+"_is_business_foreign");//单据编号
|
||||
DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("tripentry");
|
||||
for (DynamicObject entry : entrys) {
|
||||
Date happendate = entry.getDate("startdate");//出差开始日期
|
||||
String happendateStr = dateFormat.format(happendate);//费用发生日期str
|
||||
DynamicObjectCollection entryentity = entry.getDynamicObjectCollection("entryentity");
|
||||
for (DynamicObject object : entryentity) {
|
||||
BigDecimal orientryamount = BigDecimal.ZERO;
|
||||
if(istax){
|
||||
orientryamount = object.getBigDecimal("orientryamount");//报销金额
|
||||
}else{
|
||||
orientryamount = object.getBigDecimal("notaxamount");//不含税金额
|
||||
}
|
||||
// 生成唯一的键:报销人 + 单据编号 + 费用发生日期
|
||||
String key = userId + "-" + billno + "-" + happendateStr;
|
||||
userSet.add(userId);
|
||||
// 根据键获取报表对象
|
||||
ExpenseReport report = reportMap.get(key);
|
||||
if (report == null) {
|
||||
report = new ExpenseReport(userId, billno, happendateStr);
|
||||
reportMap.put(key, report);
|
||||
}
|
||||
if(!isBusinessForeign){
|
||||
//费用明细中的所有金额因公临时出国费用
|
||||
BigDecimal travel = report.getTravel().add(orientryamount);
|
||||
report.setTravel(travel);
|
||||
}else{
|
||||
//费用明细中的所有金额因公临时出国费用
|
||||
BigDecimal abroadTravel = report.getAbroadTravel().add(orientryamount);
|
||||
report.setAbroadTravel(abroadTravel);
|
||||
|
||||
//差旅报销单数据
|
||||
DynamicObject[] tripreimburseDataSet = getTripreimburseDataSet(userId, year);
|
||||
for (DynamicObject dynamicObject : tripreimburseDataSet) {
|
||||
String billno = dynamicObject.getString("billno");//单据编号
|
||||
//判罚是否因公出国
|
||||
Boolean isBusinessForeign = dynamicObject.getBoolean(DEV_KEY+"_is_business_foreign");//单据编号
|
||||
DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("tripentry");
|
||||
for (DynamicObject entry : entrys) {
|
||||
Date happendate = entry.getDate("startdate");//出差开始日期
|
||||
String happendateStr = dateFormat.format(happendate);//费用发生日期str
|
||||
DynamicObjectCollection entryentity = entry.getDynamicObjectCollection("entryentity");
|
||||
for (DynamicObject object : entryentity) {
|
||||
BigDecimal orientryamount = BigDecimal.ZERO;
|
||||
if(istax){
|
||||
orientryamount = object.getBigDecimal("orientryamount");//报销金额
|
||||
}else{
|
||||
orientryamount = object.getBigDecimal("notaxamount");//不含税金额
|
||||
}
|
||||
// 生成唯一的键:报销人 + 单据编号 + 费用发生日期
|
||||
String key = userId + "-" + billno + "-" + happendateStr;
|
||||
userSet.add(userId);
|
||||
// 根据键获取报表对象
|
||||
ExpenseReport report = reportMap.get(key);
|
||||
if (report == null) {
|
||||
report = new ExpenseReport(userId, billno, happendateStr);
|
||||
reportMap.put(key, report);
|
||||
}
|
||||
if(!isBusinessForeign){
|
||||
//费用明细中的所有金额因公临时出国费用
|
||||
BigDecimal travel = report.getTravel().add(orientryamount);
|
||||
report.setTravel(travel);
|
||||
}else{
|
||||
//费用明细中的所有金额因公临时出国费用
|
||||
BigDecimal abroadTravel = report.getAbroadTravel().add(orientryamount);
|
||||
report.setAbroadTravel(abroadTravel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//合计汇总
|
||||
ExpenseReport totalReport = new ExpenseReport(null, null, null);
|
||||
|
|
Loading…
Reference in New Issue