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