parent
34f30062f9
commit
3ab2957c62
|
@ -199,6 +199,22 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
|||
return addDateSet;
|
||||
}
|
||||
|
||||
|
||||
public Set<LocalDate> calTripentryDay(Date startdate,Date enddate){
|
||||
int allHomeCount = 0;
|
||||
DynamicObjectCollection dynamicObjectCollection = this.getModel().getDataEntity()
|
||||
.getDynamicObjectCollection("tripentry");
|
||||
Set<LocalDate> addDateSet = new HashSet<>();
|
||||
for (DynamicObject dynamicObject : dynamicObjectCollection) {
|
||||
if(startdate!=null && enddate!=null){
|
||||
Set<LocalDate> datesExcludingWeekends = getWorkingDays(dateToLocalDate(startdate), dateToLocalDate(enddate));
|
||||
addDateSet.addAll(datesExcludingWeekends);
|
||||
}
|
||||
}
|
||||
|
||||
return addDateSet;
|
||||
}
|
||||
|
||||
//获取开始结束时间
|
||||
public static Set<LocalDate> getStartAndEnd(LocalDate startDate, LocalDate endDate) {
|
||||
Set<LocalDate> result = new HashSet<>();
|
||||
|
@ -242,11 +258,10 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
|||
}
|
||||
return workingDays;
|
||||
}else{
|
||||
if (startDate.isAfter(endDate)) {
|
||||
/*if (!startDate.isAfter(endDate)) {
|
||||
throw new IllegalArgumentException("开始日期不能晚于结束日期");
|
||||
}
|
||||
}*/
|
||||
LocalDate currentDate = startDate;
|
||||
|
||||
while (!currentDate.isAfter(endDate)) {
|
||||
if (!isWeekend(currentDate)) {
|
||||
workingDays.add(currentDate);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package zcgj.zcdev.zcdev.fs.plugin.report;
|
||||
|
||||
import kd.bos.context.RequestContext;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.events.PackageDataEvent;
|
||||
import kd.bos.entity.report.FilterInfo;
|
||||
|
@ -9,6 +10,7 @@ import kd.bos.report.events.CellStyleRule;
|
|||
import kd.bos.report.events.SortAndFilterEvent;
|
||||
import kd.bos.report.plugin.AbstractReportFormPlugin;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -44,7 +46,8 @@ public class PositionFeesRptListPlugin extends AbstractReportFormPlugin implemen
|
|||
IDataModel model = this.getModel();
|
||||
//获取当前登陆人所在组织
|
||||
long orgId = RequestContext.get().getOrgId();
|
||||
model.setValue("zcgj_query_org",orgId);
|
||||
DynamicObject orgByNumber = OrgCheckUtils.getOrgByNumber("10008253");//领导板班子成员部门编码
|
||||
model.setValue("zcgj_query_org",orgByNumber.getLong("id"));
|
||||
model.setValue("zcgj_query_year",new Date());
|
||||
}
|
||||
|
||||
|
@ -104,4 +107,5 @@ public class PositionFeesRptListPlugin extends AbstractReportFormPlugin implemen
|
|||
ent.setSort(true);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
|
|
@ -67,4 +67,13 @@ public class OrgCheckUtils {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为矿山
|
||||
*/
|
||||
public static DynamicObject getOrgByNumber(String orgNumber){
|
||||
QFilter filterOrgId = new QFilter("number", QCP.equals,orgNumber);//中材矿山建设有限公司
|
||||
DynamicObject org = BusinessDataServiceHelper.loadSingle("bos_org", "number,name,fullname", new QFilter[]{filterOrgId});
|
||||
return org;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue