职务消费台账开发
This commit is contained in:
parent
7b994eac74
commit
fa0411db49
|
@ -116,9 +116,11 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
||||||
Map<String, ExpenseReport> reportMap = new LinkedHashMap<>();
|
Map<String, ExpenseReport> reportMap = new LinkedHashMap<>();
|
||||||
for (Long userId : allUsersOfOrg) {
|
for (Long userId : allUsersOfOrg) {
|
||||||
//费用报销单数据
|
//费用报销单数据
|
||||||
DynamicObject[] dailyreimbursebillDataSet = getDailyreimbursebillDataSet(userId, year, false);
|
DynamicObject[] dailyreimbursebillDataSet = getDailyreimbursebillDataSet(userId, year);
|
||||||
for (DynamicObject dynamicObject : dailyreimbursebillDataSet) {
|
for (DynamicObject dynamicObject : dailyreimbursebillDataSet) {
|
||||||
String billno = dynamicObject.getString("billno");//单据编号
|
String billno = dynamicObject.getString("billno");//单据编号
|
||||||
|
//判罚是否因公出国
|
||||||
|
Boolean isBusinessForeign = dynamicObject.getBoolean(DEV_KEY+"_is_business_foreign");//单据编号
|
||||||
|
|
||||||
DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("expenseentryentity");
|
DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("expenseentryentity");
|
||||||
for (DynamicObject entry : entrys) {
|
for (DynamicObject entry : entrys) {
|
||||||
|
@ -137,49 +139,92 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
||||||
report = new ExpenseReport(userId, billno, happendateStr);
|
report = new ExpenseReport(userId, billno, happendateStr);
|
||||||
reportMap.put(key, report);
|
reportMap.put(key, report);
|
||||||
}
|
}
|
||||||
|
if(!isBusinessForeign){
|
||||||
// 为该行添加费用
|
// 为该行添加费用
|
||||||
//report.addExpense(expenseType, amount);
|
//report.addExpense(expenseType, amount);
|
||||||
if(itemNumber.startsWith(FYF)){//防疫费
|
if(itemNumber.startsWith(FYF)){//防疫费
|
||||||
BigDecimal health = report.getHealth().add(expenseamount);
|
BigDecimal health = report.getHealth().add(expenseamount);
|
||||||
report.setHealth(health);
|
report.setHealth(health);
|
||||||
}else if(itemNumber.startsWith(TXF)){//日常费用-通信费用
|
}else if(itemNumber.startsWith(TXF)){//日常费用-通信费用
|
||||||
BigDecimal correspondence = report.getCorrespondence().add(expenseamount);
|
BigDecimal correspondence = report.getCorrespondence().add(expenseamount);
|
||||||
report.setCorrespondence(correspondence);
|
report.setCorrespondence(correspondence);
|
||||||
}else if(itemNumber.startsWith(PXF)){//日常费用-培训费用
|
}else if(itemNumber.startsWith(PXF)){//日常费用-培训费用
|
||||||
BigDecimal training = report.getTraining().add(expenseamount);
|
BigDecimal training = report.getTraining().add(expenseamount);
|
||||||
report.setTraining(training);
|
report.setTraining(training);
|
||||||
}else if(itemNumber.startsWith(YWZD_SWZD)){//日常费用-业务招待费-商务招待
|
}else if(itemNumber.startsWith(YWZD_SWZD)){//日常费用-业务招待费-商务招待
|
||||||
//businessEntertainment
|
//businessEntertainment
|
||||||
BigDecimal businessEntertainment = report.getBusinessEntertainment().add(expenseamount);
|
BigDecimal businessEntertainment = report.getBusinessEntertainment().add(expenseamount);
|
||||||
report.setBusinessEntertainment(businessEntertainment);
|
report.setBusinessEntertainment(businessEntertainment);
|
||||||
}else if(itemNumber.startsWith(YWZD_WSZD)){//日常费用-业务招待费-外事招待
|
}else if(itemNumber.startsWith(YWZD_WSZD)){//日常费用-业务招待费-外事招待
|
||||||
//foreignEntertainment
|
//foreignEntertainment
|
||||||
BigDecimal foreignEntertainment = report.getForeignEntertainment().add(expenseamount);
|
BigDecimal foreignEntertainment = report.getForeignEntertainment().add(expenseamount);
|
||||||
report.setForeignEntertainment(foreignEntertainment);
|
report.setForeignEntertainment(foreignEntertainment);
|
||||||
}
|
}
|
||||||
else if(itemNumber.startsWith(YWZD_ZYGW)){//日常费用-业务招待费-重要公务
|
else if(itemNumber.startsWith(YWZD_ZYGW)){//日常费用-业务招待费-重要公务
|
||||||
//importantOfficial
|
//importantOfficial
|
||||||
BigDecimal importantOfficial = report.getImportantOfficial().add(expenseamount);
|
BigDecimal importantOfficial = report.getImportantOfficial().add(expenseamount);
|
||||||
report.setImportantOfficial(importantOfficial);
|
report.setImportantOfficial(importantOfficial);
|
||||||
}
|
}
|
||||||
else if(itemNumber.startsWith(YWZD_ZS)){//日常费用-业务招待费-住宿
|
else if(itemNumber.startsWith(YWZD_ZS)){//日常费用-业务招待费-住宿
|
||||||
//accommodation
|
//accommodation
|
||||||
BigDecimal accommodation = report.getAccommodation().add(expenseamount);
|
BigDecimal accommodation = report.getAccommodation().add(expenseamount);
|
||||||
report.setAccommodation(accommodation);
|
report.setAccommodation(accommodation);
|
||||||
}
|
}
|
||||||
else if(itemNumber.startsWith(YWZD_JNP)){//日常费用-业务招待费-纪念品
|
else if(itemNumber.startsWith(YWZD_JNP)){//日常费用-业务招待费-纪念品
|
||||||
//souvenirs
|
//souvenirs
|
||||||
BigDecimal souvenirs = report.getSouvenirs().add(expenseamount);
|
BigDecimal souvenirs = report.getSouvenirs().add(expenseamount);
|
||||||
report.setSouvenirs(souvenirs);
|
report.setSouvenirs(souvenirs);
|
||||||
}else if(itemNumber.startsWith(YWZD_QT)){//日常费用-业务招待费-其他
|
}else if(itemNumber.startsWith(YWZD_QT)){//日常费用-业务招待费-其他
|
||||||
//other
|
//other
|
||||||
BigDecimal other = report.getOther().add(expenseamount);
|
BigDecimal other = report.getOther().add(expenseamount);
|
||||||
report.setOther(other);
|
report.setOther(other);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//费用明细中的所有金额因公临时出国费用
|
||||||
|
BigDecimal abroadTravel = report.getAbroadTravel().add(expenseamount);
|
||||||
|
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 = object.getBigDecimal("orientryamount");//报销金额
|
||||||
|
// 生成唯一的键:报销人 + 单据编号 + 费用发生日期
|
||||||
|
String key = userId + "-" + billno + "-" + happendateStr;
|
||||||
|
// 根据键获取报表对象
|
||||||
|
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);
|
||||||
|
|
||||||
ArrayList<ExpenseReport> reportsList = new ArrayList<>(reportMap.values());
|
ArrayList<ExpenseReport> reportsList = new ArrayList<>(reportMap.values());
|
||||||
// 打印每一行报表
|
// 打印每一行报表
|
||||||
for (ExpenseReport report : reportsList) {
|
for (ExpenseReport report : reportsList) {
|
||||||
|
@ -193,138 +238,92 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
||||||
tempData[2] = report.getHappenDateStr();
|
tempData[2] = report.getHappenDateStr();
|
||||||
tempData[3] = report.getBillNumber();
|
tempData[3] = report.getBillNumber();
|
||||||
BigDecimal businessEntertainment = report.getBusinessEntertainment();
|
BigDecimal businessEntertainment = report.getBusinessEntertainment();
|
||||||
|
totalReport.setBusinessEntertainment(totalReport.getBusinessEntertainment().add(businessEntertainment));
|
||||||
tempData[4] = businessEntertainment;
|
tempData[4] = businessEntertainment;
|
||||||
BigDecimal foreignEntertainment = report.getForeignEntertainment();
|
BigDecimal foreignEntertainment = report.getForeignEntertainment();
|
||||||
|
totalReport.setForeignEntertainment(totalReport.getForeignEntertainment().add(foreignEntertainment));
|
||||||
tempData[5] = foreignEntertainment;
|
tempData[5] = foreignEntertainment;
|
||||||
BigDecimal importantOfficial = report.getImportantOfficial();
|
BigDecimal importantOfficial = report.getImportantOfficial();
|
||||||
|
totalReport.setImportantOfficial(totalReport.getImportantOfficial().add(importantOfficial));
|
||||||
tempData[6] = importantOfficial;
|
tempData[6] = importantOfficial;
|
||||||
BigDecimal other = report.getOther();
|
BigDecimal other = report.getOther();
|
||||||
|
totalReport.setOther(totalReport.getOther().add(other));
|
||||||
tempData[7] = other;
|
tempData[7] = other;
|
||||||
BigDecimal accommodation = report.getAccommodation();
|
BigDecimal accommodation = report.getAccommodation();
|
||||||
|
totalReport.setAccommodation(totalReport.getAccommodation().add(accommodation));
|
||||||
tempData[8] = accommodation;
|
tempData[8] = accommodation;
|
||||||
BigDecimal souvenirs = report.getSouvenirs();
|
BigDecimal souvenirs = report.getSouvenirs();
|
||||||
|
totalReport.setSouvenirs(totalReport.getSouvenirs().add(souvenirs));
|
||||||
tempData[9] = souvenirs;
|
tempData[9] = souvenirs;
|
||||||
BigDecimal subtotal = businessEntertainment.add(foreignEntertainment)
|
BigDecimal subtotal = businessEntertainment.add(foreignEntertainment)
|
||||||
.add(importantOfficial).add(other)
|
.add(importantOfficial).add(other)
|
||||||
.add(accommodation).add(souvenirs);
|
.add(accommodation).add(souvenirs);
|
||||||
|
totalReport.setSubtotal(totalReport.getSubtotal().add(subtotal));
|
||||||
tempData[10] = subtotal;
|
tempData[10] = subtotal;
|
||||||
//private BigDecimal abroadTravel = BigDecimal.ZERO;//因公临时出国费用
|
|
||||||
// private BigDecimal health = BigDecimal.ZERO;//防疫费用
|
|
||||||
// private BigDecimal correspondence = BigDecimal.ZERO;//通信费用
|
|
||||||
// private BigDecimal training = BigDecimal.ZERO;//培训费用
|
|
||||||
BigDecimal travel = report.getTravel();
|
BigDecimal travel = report.getTravel();
|
||||||
|
totalReport.setTravel(totalReport.getTravel().add(travel));
|
||||||
tempData[11] = travel;//travel
|
tempData[11] = travel;//travel
|
||||||
BigDecimal abroadTravel = report.getAbroadTravel();
|
BigDecimal abroadTravel = report.getAbroadTravel();
|
||||||
|
totalReport.setAbroadTravel(totalReport.getAbroadTravel().add(abroadTravel));
|
||||||
tempData[12] = abroadTravel;
|
tempData[12] = abroadTravel;
|
||||||
BigDecimal health = report.getHealth();
|
BigDecimal health = report.getHealth();
|
||||||
|
totalReport.setHealth(totalReport.getHealth().add(health));
|
||||||
tempData[13] = health;
|
tempData[13] = health;
|
||||||
BigDecimal correspondence = report.getCorrespondence();
|
BigDecimal correspondence = report.getCorrespondence();
|
||||||
|
totalReport.setCorrespondence(totalReport.getCorrespondence().add(correspondence));
|
||||||
tempData[14] = correspondence;
|
tempData[14] = correspondence;
|
||||||
BigDecimal training = report.getTraining();
|
BigDecimal training = report.getTraining();
|
||||||
|
totalReport.setTraining(totalReport.getTraining().add(training));
|
||||||
tempData[15] = training;
|
tempData[15] = training;
|
||||||
|
|
||||||
BigDecimal total = subtotal.add(travel).add(abroadTravel).add(health).add(correspondence).add(training);
|
BigDecimal total = subtotal.add(travel).add(abroadTravel).add(health).add(correspondence).add(training);
|
||||||
|
totalReport.setTotal(totalReport.getTotal().add(total));
|
||||||
tempData[16] = total;
|
tempData[16] = total;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Map<String,BigDecimal> expenseamountMap = new HashMap<>();
|
|
||||||
Map<String,Map<String,BigDecimal>> dateMap = new HashMap<>();
|
|
||||||
Map<String,Map<String,Map<String,BigDecimal>>> billMap = new HashMap<>();
|
|
||||||
Map<Long,Map<String,Map<String,Map<String,BigDecimal>>>> userMap = new HashMap<>();*/
|
|
||||||
|
|
||||||
/*for (Long userId : allUsersOfOrg) {
|
|
||||||
//费用报销单数据
|
|
||||||
DynamicObject[] dailyreimbursebillDataSet = getDailyreimbursebillDataSet(userId, year, false);
|
|
||||||
for (DynamicObject dynamicObject : dailyreimbursebillDataSet) {
|
|
||||||
String billno = dynamicObject.getString("billno");
|
|
||||||
|
|
||||||
DynamicObjectCollection entrys = dynamicObject.getDynamicObjectCollection("expenseentryentity");
|
|
||||||
|
|
||||||
for (DynamicObject entry : entrys) {
|
|
||||||
DynamicObject expenseitemObj = entry.getDynamicObject("expenseitem");
|
|
||||||
Date happendate = entry.getDate("happendate");
|
|
||||||
String expenseamount = entry.getString("expenseamount");
|
|
||||||
System.out.println(happendate);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(userMap.containsKey(userId)){
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
|
Object [] tempData = new Object [FIELDS.length];
|
||||||
|
coll.add(tempData);
|
||||||
|
tempData[1] = "合计";
|
||||||
|
tempData[4] = totalReport.getBusinessEntertainment();
|
||||||
|
tempData[5] = totalReport.getForeignEntertainment();
|
||||||
|
tempData[6] = totalReport.getImportantOfficial();
|
||||||
|
tempData[7] = totalReport.getOther();
|
||||||
|
tempData[8] = totalReport.getAccommodation();
|
||||||
|
tempData[9] = totalReport.getSouvenirs();
|
||||||
|
tempData[10] = totalReport.getSubtotal();
|
||||||
|
tempData[11] = totalReport.getTravel();
|
||||||
|
tempData[12] = totalReport.getAbroadTravel();
|
||||||
|
tempData[13] = totalReport.getHealth();
|
||||||
|
tempData[14] = totalReport.getCorrespondence();
|
||||||
|
tempData[15] = totalReport.getTraining();
|
||||||
|
tempData[16] = totalReport.getTotal();
|
||||||
|
|
||||||
/**/
|
|
||||||
|
|
||||||
/*for (Row itemRow : dailyreimbursebillDataSet) {
|
|
||||||
//汇总国内差旅费 FYXM0015.001、防疫费 FYXM002-CUS.001
|
|
||||||
String itemnumber = itemRow.getString("itemnumber");
|
|
||||||
String happendateStr = dateFormat.format(itemRow.getDate("happendate"));
|
|
||||||
BigDecimal expenseamount = itemRow.getBigDecimal("expenseamount");
|
|
||||||
|
|
||||||
if(itemnumber.startsWith(FYF)){//防疫费
|
|
||||||
//healthRealTotal = healthRealTotal.add(expenseamount);
|
|
||||||
}else if(itemnumber.startsWith(TXF)){//日常费用-通信费用
|
|
||||||
//correspondenceTotal = correspondenceTotal.add(expenseamount);
|
|
||||||
}else if(itemnumber.startsWith(PXF)){//日常费用-培训费用
|
|
||||||
//trainingTotal = trainingTotal.add(expenseamount);
|
|
||||||
}else if(itemnumber.startsWith(YWZDF)){//日常费用-业务招待费
|
|
||||||
// entertainTotal = entertainTotal.add(expenseamount);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
//}
|
|
||||||
|
|
||||||
/**/
|
|
||||||
return resultDataSet;
|
return resultDataSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取费用报销单数据
|
* 获取费用报销单数据
|
||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
* @param year 统计年份
|
* @param year 统计年份
|
||||||
* @param isBusinessForeign 是否因公临时出国
|
|
||||||
* @return 数据集
|
* @return 数据集
|
||||||
*/
|
*/
|
||||||
private DataSet getDailyreimbursebillDataSet1(Long userId, Integer year,Boolean isBusinessForeign) {
|
public DynamicObject[] getDailyreimbursebillDataSet(Long userId, Integer year){
|
||||||
LocalDate firstDay = getFirstDayOfYear(year);
|
|
||||||
LocalDate lastDay = getLastDayOfYear(year);
|
|
||||||
List<QFilter> searchFilterList = new ArrayList<>();
|
|
||||||
//searchFilterList.add(new QFilter(DEV_KEY+"_year", QCP.equals, getFirstDayOfYear(year)));
|
|
||||||
searchFilterList.add(new QFilter("applier", QCP.equals, userId));
|
|
||||||
searchFilterList.add(new QFilter("expenseentryentity.happendate", QCP.large_equals, firstDay));
|
|
||||||
searchFilterList.add(new QFilter("expenseentryentity.happendate", QCP.less_equals, lastDay));
|
|
||||||
searchFilterList.add(new QFilter(DEV_KEY+"_is_business_foreign", QCP.equals, isBusinessForeign));
|
|
||||||
DataSet bdMaterialDataSet = QueryServiceHelper.queryDataSet(this.getClass().getName(),
|
|
||||||
"er_dailyreimbursebill",
|
|
||||||
"id,description,billno,expenseentryentity," +
|
|
||||||
"expenseentryentity.happendate as happendate," + //费用发生日期
|
|
||||||
"expenseentryentity.expenseitem.number as itemnumber," + //费用项目编码
|
|
||||||
"expenseentryentity.expenseamount as expenseamount",searchFilterList.toArray(new QFilter [] {}), null);
|
|
||||||
return bdMaterialDataSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DynamicObject[] getDailyreimbursebillDataSet(Long userId, Integer year,Boolean isBusinessForeign){
|
|
||||||
LocalDate firstDay = getFirstDayOfYear(year);
|
LocalDate firstDay = getFirstDayOfYear(year);
|
||||||
LocalDate lastDay = getLastDayOfYear(year);
|
LocalDate lastDay = getLastDayOfYear(year);
|
||||||
List<QFilter> searchFilterList = new ArrayList<>();
|
List<QFilter> searchFilterList = new ArrayList<>();
|
||||||
searchFilterList.add(new QFilter("applier", QCP.equals, userId));
|
searchFilterList.add(new QFilter("applier", QCP.equals, userId));
|
||||||
searchFilterList.add(new QFilter("expenseentryentity.happendate", QCP.large_equals, firstDay));
|
searchFilterList.add(new QFilter("expenseentryentity.happendate", QCP.large_equals, firstDay));
|
||||||
searchFilterList.add(new QFilter("expenseentryentity.happendate", QCP.less_equals, lastDay));
|
searchFilterList.add(new QFilter("expenseentryentity.happendate", QCP.less_equals, lastDay));
|
||||||
searchFilterList.add(new QFilter(DEV_KEY+"_is_business_foreign", QCP.equals, isBusinessForeign));
|
|
||||||
DynamicObject[] load = BusinessDataServiceHelper.load("er_dailyreimbursebill",
|
DynamicObject[] load = BusinessDataServiceHelper.load("er_dailyreimbursebill",
|
||||||
"id,description,billno,expenseentryentity," +
|
"id,description,billno,expenseentryentity," +
|
||||||
|
DEV_KEY+"_is_business_foreign,"+
|
||||||
"expenseentryentity.happendate," + //费用发生日期
|
"expenseentryentity.happendate," + //费用发生日期
|
||||||
"expenseentryentity.expenseitem," + //费用项目
|
"expenseentryentity.expenseitem," + //费用项目
|
||||||
"expenseentryentity.expenseamount ", searchFilterList.toArray(new QFilter [] {}));
|
"expenseentryentity.expenseamount ", searchFilterList.toArray(new QFilter [] {}));
|
||||||
/*for (DynamicObject doj : load) {
|
|
||||||
DynamicObjectCollection entrys = doj.getDynamicObjectCollection("expenseentryentity");
|
|
||||||
for (DynamicObject entry : entrys) {
|
|
||||||
entry.getString("happendate");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
return load;
|
return load;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,10 +331,9 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
||||||
* 获取差旅报销单数据
|
* 获取差旅报销单数据
|
||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
* @param year 统计年份
|
* @param year 统计年份
|
||||||
* @param isBusinessForeign 是否因公临时出国
|
|
||||||
* @return 数据集
|
* @return 数据集
|
||||||
*/
|
*/
|
||||||
private DataSet getTripreimburseDataSet(Long userId, Integer year,Boolean isBusinessForeign) {
|
private DynamicObject[] getTripreimburseDataSet(Long userId, Integer year) {
|
||||||
LocalDate firstDay = getFirstDayOfYear(year);
|
LocalDate firstDay = getFirstDayOfYear(year);
|
||||||
LocalDate lastDay = getLastDayOfYear(year);
|
LocalDate lastDay = getLastDayOfYear(year);
|
||||||
List<QFilter> searchFilterList = new ArrayList<>();
|
List<QFilter> searchFilterList = new ArrayList<>();
|
||||||
|
@ -343,16 +341,21 @@ public class PositionFeesRptQueryPlugin extends AbstractReportListDataPlugin {
|
||||||
searchFilterList.add(new QFilter("applier", QCP.equals, userId));
|
searchFilterList.add(new QFilter("applier", QCP.equals, userId));
|
||||||
searchFilterList.add(new QFilter("tripentry.startdate", QCP.large_equals, firstDay));
|
searchFilterList.add(new QFilter("tripentry.startdate", QCP.large_equals, firstDay));
|
||||||
searchFilterList.add(new QFilter("tripentry.startdate", QCP.less_equals, lastDay));
|
searchFilterList.add(new QFilter("tripentry.startdate", QCP.less_equals, lastDay));
|
||||||
searchFilterList.add(new QFilter(DEV_KEY+"_is_business_foreign", QCP.equals, isBusinessForeign));
|
//searchFilterList.add(new QFilter(DEV_KEY+"_is_business_foreign", QCP.equals, isBusinessForeign));
|
||||||
|
/*DataSet bdMaterialDataSet = QueryServiceHelper.queryDataSet(
|
||||||
DataSet bdMaterialDataSet = QueryServiceHelper.queryDataSet(
|
|
||||||
this.getClass().getName(),
|
this.getClass().getName(),
|
||||||
"er_tripreimbursebill",
|
"er_tripreimbursebill",
|
||||||
"id,applier,billno,tripentry.startdate as startdate," +
|
"id,applier,billno,tripentry.startdate as startdate," +
|
||||||
"tripentry.entryentity.orientryamount as orientryamount" ,
|
"tripentry.entryentity.orientryamount as orientryamount" ,
|
||||||
searchFilterList.toArray(new QFilter [] {}), null
|
searchFilterList.toArray(new QFilter [] {}), null
|
||||||
).orderBy(new String[]{"applier", "startdate"});
|
).orderBy(new String[]{"applier", "startdate"});*/
|
||||||
return bdMaterialDataSet;
|
DynamicObject[] load = BusinessDataServiceHelper.load("er_tripreimbursebill",
|
||||||
|
"id,description,billno,expenseentryentity," +
|
||||||
|
DEV_KEY+"_is_business_foreign,"+
|
||||||
|
"id,applier,billno,tripentry.startdate,tripentry.entryentity," + //费用发生日期
|
||||||
|
"entryentity.orientryamount", //报销金额
|
||||||
|
searchFilterList.toArray(new QFilter [] {}));
|
||||||
|
return load;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取某年份的第一天
|
// 获取某年份的第一天
|
||||||
|
|
Loading…
Reference in New Issue