1.功能开发

This commit is contained in:
zhangzhiguo 2025-01-16 16:36:02 +08:00
parent fb487fb726
commit 3bd576df24
8 changed files with 187 additions and 79 deletions

View File

@ -46,7 +46,9 @@ public class AccountFilterPlugin extends AbstractBillPlugIn implements Plugin,
//会计科目根据左树根据科目表编码过滤
String zcgjAccounttableNumber = (String)this.getModel().getValue("zcgj_accounttable_number");
QFilter accountTableFilter = new QFilter("number", QCP.equals,zcgjAccounttableNumber);
DynamicObject accountTableFilterObj = BusinessDataServiceHelper.loadSingle("bd_accounttable", "id,number", new QFilter[]{accountTableFilter});
QFilter isLeafFilter = new QFilter("isleaf", "=", true);
QFilter enablefFilter = new QFilter("enable", "=", "1");
DynamicObject accountTableFilterObj = BusinessDataServiceHelper.loadSingle("bd_accounttable", "id,number", new QFilter[]{accountTableFilter,isLeafFilter,enablefFilter});
if(accountTableFilterObj!=null){
long id = accountTableFilterObj.getLong("id");
ListShowParameter param = (ListShowParameter) arg0.getFormShowParameter();

View File

@ -24,8 +24,12 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
@Override
public void propertyChanged(PropertyChangedArgs e) {
//当前切换选择的组织
//costcompany
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
Long currentOrgId = RequestContext.get().getOrgId();
if(OrgCheckUtils.isKS(currentOrgId)){
DynamicObject companyObj = (DynamicObject)company;
Long companyId = companyObj.getLong("id");
if(OrgCheckUtils.isKS(companyId)){
String name = e.getProperty().getName();
if(name.equals("zcgj_startdate") ||name.equals("zcgj_enddate")){
ChangeData[] changeSet = e.getChangeSet();
@ -33,13 +37,24 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
int count = calHomeentityDay(rowIndex);
this.getModel().setValue("zcgj_kccbdays",count);
}else if("zcgj_holiday_start_time".equals(name) || "zcgj_holiday_end_time".equals(name)){
Date zcgjStartdate = (Date)this.getModel().getValue("zcgj_holiday_start_time");
Date zcgjEnddate = (Date)this.getModel().getValue("zcgj_holiday_end_time");
if(zcgjStartdate!=null && zcgjEnddate!=null){
Set<LocalDate> datesExcludingWeekends = getDatesExcludingWeekends(dateToLocalDate(zcgjStartdate), dateToLocalDate(zcgjEnddate));
this.getModel().setValue("zcgj_kccbdays",datesExcludingWeekends.size());
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
if(isVisit){
calVisitDay();
}
}else if(name.equals("zcgj_is_home") ){
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_home");
if(isHome){
calHomeentityDay();
}else{
this.getModel().setValue("zcgj_kccbdays",null);
this.getModel().deleteEntryData("zcgj_homeentity");
}
}else if(name.equals("zcgj_is_visit")){
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
if(isVisit){
calVisitDay();
}else{
this.getModel().deleteEntryData("zcgj_homeentity");
}
}
}
@ -88,15 +103,36 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
public Set<LocalDate> calHomeentityDay(){
//获取分录
DynamicObject dataEntity = this.getModel().getDataEntity(true);
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("zcgj_homeentity");
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_home");
Set<LocalDate> addDateSet = new HashSet<>();
for (DynamicObject dynamicObject : dynamicObjectCollection) {
Date zcgjStartdate = dynamicObject.getDate("zcgj_startdate");
Date zcgjEnddate = dynamicObject.getDate("zcgj_enddate");
if(isHome){
DynamicObject dataEntity = this.getModel().getDataEntity(true);
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("zcgj_homeentity");
for (DynamicObject dynamicObject : dynamicObjectCollection) {
Date zcgjStartdate = dynamicObject.getDate("zcgj_startdate");
Date zcgjEnddate = dynamicObject.getDate("zcgj_enddate");
if(zcgjStartdate!=null && zcgjEnddate!=null){
Set<LocalDate> datesExcludingWeekends = getDatesExcludingWeekends(dateToLocalDate(zcgjStartdate), dateToLocalDate(zcgjEnddate));
addDateSet.addAll(datesExcludingWeekends);
}
}
}
return addDateSet;
}
public Set<LocalDate> calVisitDay(){
//获取分录
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
Set<LocalDate> addDateSet = new HashSet<>();
if(isVisit){
Date zcgjStartdate = (Date)this.getModel().getValue("zcgj_holiday_start_time");
Date zcgjEnddate = (Date)this.getModel().getValue("zcgj_holiday_end_time");
if(zcgjStartdate!=null && zcgjEnddate!=null){
Set<LocalDate> datesExcludingWeekends = getDatesExcludingWeekends(dateToLocalDate(zcgjStartdate), dateToLocalDate(zcgjEnddate));
this.getModel().setValue("zcgj_kccbdays",datesExcludingWeekends.size());
addDateSet.addAll(datesExcludingWeekends);
}else{
this.getModel().setValue("zcgj_kccbdays",null);
}
}
return addDateSet;

View File

@ -4,8 +4,12 @@ import kd.bos.bill.AbstractBillPlugIn;
import kd.bos.context.RequestContext;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.dataentity.metadata.dynamicobject.DynamicProperty;
import kd.bos.entity.datamodel.IDataModel;
import kd.bos.entity.datamodel.RowDataEntity;
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
import kd.bos.entity.property.EntryProp;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
@ -147,6 +151,47 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
}
}
super.itemClick(evt);
}
public void afterAddRow(AfterAddRowEventArgs e) {
super.afterAddRow(e);
Long currentUserId = UserServiceHelper.getCurrentUserId();
// 当前用户所属组织
Long mainOrgId = UserServiceHelper.getUserMainOrgId(currentUserId);
//当前切换选择的组织
Long currentOrgId = RequestContext.get().getOrgId();
//当前所在的组织是属于矿山下的 costcompany
//costcompany 费用承担公司
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
long costcompanyId = costcompany.getLong("id");
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
EntryProp entryProp = e.getEntryProp();
DynamicProperty compareProp = entryProp.getCompareProp();
if("expenseentryentity".equals(compareProp.getName())){
RowDataEntity[] rowDatas = e.getRowDataEntities();
String companyNumber = costcompany.getString("number");
if (rowDatas.length > 0) {
int rowIndex = rowDatas[0].getRowIndex();
DynamicObject costcompanyObj = null;
//如果费用承担公司是五家本部公司
if(OrgCheckUtils.testCompanyNumberSet.contains(companyNumber) || OrgCheckUtils.ksNumber.equals(companyNumber)){
//费用承担部门带入到成本中心
costcompanyObj= (DynamicObject)this.getModel().getValue("costdept");
}else{
//费用承担公司带入到成本中心
costcompanyObj= (DynamicObject)this.getModel().getValue("costcompany");
}
if(costcompanyObj!=null){
//bos_costcenter
QFilter numberFilter = new QFilter("number",QCP.equals,costcompanyObj.getString("number"));
DynamicObject[] dynamicObjectAccItem = BusinessDataServiceHelper.load("bos_costcenter", "number,name", new QFilter[]{numberFilter});
if(dynamicObjectAccItem!=null ){
this.getModel().setValue("std_entrycostcenter", dynamicObjectAccItem[0], rowIndex);
}
}
}
}
}
}
}

View File

@ -7,6 +7,8 @@ import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.datamodel.ListSelectedRow;
import kd.bos.entity.datamodel.ListSelectedRowCollection;
import kd.bos.entity.datamodel.RowDataEntity;
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
import kd.bos.form.CloseCallBack;
import kd.bos.form.ShowFormHelper;
import kd.bos.form.events.ClosedCallBackEvent;
@ -59,7 +61,6 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
//借款单
private static String BILL_TYPE ="er_dailyloanbill";
@Override
public void registerListener(EventObject e) {
super.registerListener(e);
@ -100,19 +101,21 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
QFilter nameQFilter = new QFilter(prefix+"_account_item", QCP.equals,id);
QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE);
DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter});
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null&&selectRow!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
if(selectRow!=null){
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
}
}
}
}
@ -177,7 +180,7 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
//操作的行数据获取之前的数据
DynamicObject selectRow = this.getModel().getEntryRowEntity(EXPENSE_ENTRY_ENTITY, index);
//克隆新的行
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, false)).clone(selectRow);
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, true)).clone(selectRow);
ListSelectedRowCollection listSelectedRows = (ListSelectedRowCollection) closedCallBackEvent.getReturnData();
for (ListSelectedRow listSelectedRow : listSelectedRows) {

View File

@ -98,19 +98,21 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
String number = costcompany.getString("number");
QFilter createorg = new QFilter("createorg",QCP.equals,number);
DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter});
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null&&selectRow!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
if(selectRow!=null){
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
}
}
}
}
@ -176,7 +178,7 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
//操作的行数据获取之前的数据
DynamicObject selectRow = this.getModel().getEntryRowEntity(EXPENSE_ENTRY_ENTITY, index);
//克隆新的行
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, false)).clone(selectRow);
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, true)).clone(selectRow);
ListSelectedRowCollection listSelectedRows = (ListSelectedRowCollection) closedCallBackEvent.getReturnData();
for (ListSelectedRow listSelectedRow : listSelectedRows) {
@ -219,6 +221,7 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
QFilter nameQFilterAccItem = new QFilter("id",QCP.equals,listSelectedRow.getPrimaryKeyValue());
DynamicObject dynamicObjectAccItem = BusinessDataServiceHelper.loadSingle("er_expenseitemedit", "number,name", new QFilter[]{nameQFilterAccItem});
insertRow.set(EXPENSE_ITEM,dynamicObjectAccItem);
this.getModel().createNewEntryRow(EXPENSE_ENTRY_ENTITY,insertRow);
}

View File

@ -99,19 +99,21 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin
QFilter nameQFilter = new QFilter(prefix+"_account_item", QCP.equals,id);
QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE);
DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter});
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null&&selectRow!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
if(selectRow!=null){
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
}
}
}
}
@ -176,7 +178,7 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin
//操作的行数据获取之前的数据
DynamicObject selectRow = this.getModel().getEntryRowEntity(EXPENSE_ENTRY_ENTITY, index);
//克隆新的行
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, false)).clone(selectRow);
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, true)).clone(selectRow);
ListSelectedRowCollection listSelectedRows = (ListSelectedRowCollection) closedCallBackEvent.getReturnData();
for (ListSelectedRow listSelectedRow : listSelectedRows) {

View File

@ -99,19 +99,21 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen
QFilter nameQFilter = new QFilter(prefix+"_account_item", QCP.equals,id);
QFilter billTypeQFilter = new QFilter(prefix+"_entryentity.zcgj_rim_expense_type.number",QCP.equals,BILL_TYPE);
DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(MAP_TABLE, "createorg,zcgj_entryentity,zcgj_entryentity.zcgj_entity_items", new QFilter[]{nameQFilter,billTypeQFilter});
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null&&selectRow!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
if(selectRow!=null){
DynamicObject dynamicObject2 = this.getModel().getDataEntity(true).getDynamicObjectCollection(EXPENSE_ENTRY_ENTITY).get(selectRow);
boolean isEx = false;
if(dynamicObject2!=null){
isEx = dynamicObject2.get(EXPENSE_ITEM) == null;
}
if(isEx && dynamicObject1!=null){
DynamicObjectCollection zcgjEntryentity = (DynamicObjectCollection) dynamicObject1.get(MAP_ENTRY_ENTITY);
if(zcgjEntryentity!=null){
DynamicObject dynamicObject = zcgjEntryentity.get(0);
DynamicObject itemDynamicObject= dynamicObject.getDynamicObject(prefix+"_entity_items");
long aLong = itemDynamicObject.getLong("id");
System.out.println();
this.getModel().setValue(EXPENSE_ITEM,aLong,selectRow);
}
}
}
}
@ -176,7 +178,7 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen
//操作的行数据获取之前的数据
DynamicObject selectRow = this.getModel().getEntryRowEntity(EXPENSE_ENTRY_ENTITY, index);
//克隆新的行
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, false)).clone(selectRow);
DynamicObject insertRow = (DynamicObject) (new CloneUtils(false, true)).clone(selectRow);
ListSelectedRowCollection listSelectedRows = (ListSelectedRowCollection) closedCallBackEvent.getReturnData();
for (ListSelectedRow listSelectedRow : listSelectedRows) {

View File

@ -27,11 +27,11 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
@Override
public void propertyChanged(PropertyChangedArgs e) {
//当前切换选择的组织
Object company = this.getModel().getValue("costcompany");//核算组织
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
Long currentOrgId = RequestContext.get().getOrgId();
DynamicObject companyObj = (DynamicObject)company;
Long companyId = companyObj.getLong("id");
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(companyId)){
if(OrgCheckUtils.isKS(companyId)){
String name = e.getProperty().getName();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
if(name.equals("zcgj_startdate") ||name.equals("zcgj_enddate")){
@ -52,6 +52,18 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
allSet.addAll(localDates1);
allSet.addAll(localDates2);
this.getModel().setValue("zcgj_kccbdays",allSet.size());
}else if(name.equals("zcgj_is_include_home")){
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_include_home");
if(!isHome){
this.getModel().deleteEntryData("zcgj_homeentity");
}
Set<LocalDate> allSet = new HashSet<>();
Set<LocalDate> localDates1 = calHomeentityDay();
Set<LocalDate> localDates2 = calTripentryDay();
allSet.addAll(localDates1);
allSet.addAll(localDates2);
this.getModel().setValue("zcgj_kccbdays",allSet.size());
getView().updateView();
}
}
@ -123,16 +135,19 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
}
public Set<LocalDate> calHomeentityDay(){
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_include_home");
//获取分录
DynamicObject dataEntity = this.getModel().getDataEntity(true);
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("zcgj_homeentity");
Set<LocalDate> addDateSet = new HashSet<>();
for (DynamicObject dynamicObject : dynamicObjectCollection) {
Date zcgjStartdate = dynamicObject.getDate("zcgj_startdate");
Date zcgjEnddate = dynamicObject.getDate("zcgj_enddate");
if(zcgjStartdate!=null && zcgjEnddate!=null){
Set<LocalDate> datesExcludingWeekends = getDatesExcludingWeekends(dateToLocalDate(zcgjStartdate), dateToLocalDate(zcgjEnddate));
addDateSet.addAll(datesExcludingWeekends);
if(isHome){
DynamicObject dataEntity = this.getModel().getDataEntity(true);
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection("zcgj_homeentity");
for (DynamicObject dynamicObject : dynamicObjectCollection) {
Date zcgjStartdate = dynamicObject.getDate("zcgj_startdate");
Date zcgjEnddate = dynamicObject.getDate("zcgj_enddate");
if(zcgjStartdate!=null && zcgjEnddate!=null){
Set<LocalDate> datesExcludingWeekends = getDatesExcludingWeekends(dateToLocalDate(zcgjStartdate), dateToLocalDate(zcgjEnddate));
addDateSet.addAll(datesExcludingWeekends);
}
}
}
return addDateSet;