Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		
						commit
						211352174b
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,37 @@
 | 
			
		|||
package zcgj.zcdev.zcdev.pr.plugin.form;
 | 
			
		||||
 | 
			
		||||
import kd.bos.bill.AbstractBillPlugIn;
 | 
			
		||||
import kd.bos.bill.BillShowParameter;
 | 
			
		||||
import kd.bos.bill.OperationStatus;
 | 
			
		||||
import kd.bos.context.RequestContext;
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObject;
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
 | 
			
		||||
import kd.bos.entity.datamodel.events.BizDataEventArgs;
 | 
			
		||||
import kd.sdk.plugin.Plugin;
 | 
			
		||||
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.util.EventObject;
 | 
			
		||||
import java.util.HashSet;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 资金计划申请插件
 | 
			
		||||
 */
 | 
			
		||||
public class FundingplanapplyPlugin extends AbstractBillPlugIn implements Plugin {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void afterBindData(EventObject e) {
 | 
			
		||||
        super.afterBindData(e);
 | 
			
		||||
        BillShowParameter bsp=(BillShowParameter)this.getView().getFormShowParameter();
 | 
			
		||||
        if(bsp.getStatus()== OperationStatus.ADDNEW ){
 | 
			
		||||
            DynamicObjectCollection zcgjFinApprovedAmount = this.getModel().getDataEntity().getDynamicObjectCollection("zcgj_fin_approved_amount");
 | 
			
		||||
            String[] typeArray = new String[]{"XJ","YHCD","SYCD","GYL","QTJRCP"};
 | 
			
		||||
            for (String type : typeArray) {
 | 
			
		||||
                DynamicObject item = zcgjFinApprovedAmount.addNew();
 | 
			
		||||
                item.set("zcgj_setttype",type);
 | 
			
		||||
            }
 | 
			
		||||
            getView().updateView("zcgj_fin_approved_amount");
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue