1.增加职员出差天数统计台账
This commit is contained in:
parent
cee3debf85
commit
dd9a29bb62
|
@ -16,6 +16,9 @@ import java.util.Calendar;
|
|||
import java.util.Date;
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* 往返家居工作日天数自动计算插件
|
||||
*/
|
||||
public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plugin {
|
||||
|
||||
@Override
|
||||
|
@ -40,24 +43,23 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
|
|||
}else{
|
||||
dynamicObject.set("zcgj_kccbdaycount",0);
|
||||
}
|
||||
getView().updateView();
|
||||
int allHomeCount = 0;
|
||||
for (DynamicObject entry : dynamicObjectCollection) {
|
||||
allHomeCount += entry.getInt("zcgj_kccbdaycount");
|
||||
}
|
||||
this.getModel().setValue("zcgj_kccbdays",allHomeCount);
|
||||
getView().updateView();
|
||||
this.getView().updateView("zcgj_homeentity");
|
||||
}
|
||||
}
|
||||
super.propertyChanged(e);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
//监听工具栏按钮点击事件
|
||||
this.addItemClickListeners("zcgj_hometoolbarap");
|
||||
this.addClickListeners("advcontoolbarap");
|
||||
//this.addItemClickListeners("zcgj_hometoolbarap");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +69,6 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
|
|||
//获取分录
|
||||
DynamicObject dataEntity = this.getModel().getDataEntity();
|
||||
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("zcgj_homeentity");
|
||||
getView().updateView();
|
||||
int allHomeCount = 0;
|
||||
for (DynamicObject entry : dynamicObjectCollection) {
|
||||
allHomeCount += entry.getInt("zcgj_kccbdaycount");
|
||||
|
|
|
@ -143,7 +143,6 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
monthDaysMap.getOrDefault(bxmonth.getMonth().getValue(), 0) + homedaycount);
|
||||
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
for (Long userId : userMonthDaysMap.keySet()) {
|
||||
|
@ -151,7 +150,6 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
Map<String, Object> userInfoByID = UserServiceHelper.getUserInfoByID(userId);
|
||||
String username = String.valueOf(userInfoByID.get("name"));//报销人
|
||||
Object [] tempData = new Object [FIELDS.length];
|
||||
coll.add(tempData);
|
||||
|
||||
tempData[0] = userId;
|
||||
tempData[1] = username;
|
||||
|
@ -162,8 +160,10 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
tempData[index] = integerIntegerMap.get(i) == 0 ?null:integerIntegerMap.get(i)+"";
|
||||
index++;
|
||||
}
|
||||
//如果总天数不为0的
|
||||
if(totalDays!=0){
|
||||
tempData[14] = totalDays;
|
||||
coll.add(tempData);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
"er_tripreimbursebill",
|
||||
"id,billno,zcgj_kccbdays as kccbdays,zcgj_homeentity,zcgj_homeentity.zcgj_bxmonth as bxmonth," +
|
||||
"zcgj_homeentity.zcgj_startdate as startdate,zcgj_homeentity.zcgj_enddate as enddate," +
|
||||
"zcgj_homeentity.zcgj_homebz as homebz,zcgj_homedaycount as homedaycount",
|
||||
"zcgj_homeentity.zcgj_homebz as homebz,zcgj_homeentity.zcgj_homedaycount as homedaycount",
|
||||
searchFilterList.toArray(new QFilter [] {}), null
|
||||
);
|
||||
return dateSet;
|
||||
|
@ -242,7 +242,7 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
|
|||
"er_dailyreimbursebill",
|
||||
"id,billno,zcgj_kccbdays as kccbdays,zcgj_homeentity,zcgj_homeentity.zcgj_bxmonth as bxmonth," +
|
||||
"zcgj_homeentity.zcgj_startdate as startdate,zcgj_homeentity.zcgj_enddate as enddate," +
|
||||
"zcgj_homeentity.zcgj_homebz as homebz,zcgj_homedaycount as homedaycount",
|
||||
"zcgj_homeentity.zcgj_homebz as homebz,zcgj_homeentity.zcgj_homedaycount as homedaycount",
|
||||
searchFilterList.toArray(new QFilter [] {}), null
|
||||
);
|
||||
return dateSet;
|
||||
|
|
Loading…
Reference in New Issue