Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
5efb378c94
|
@ -199,6 +199,22 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
||||||
return addDateSet;
|
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) {
|
public static Set<LocalDate> getStartAndEnd(LocalDate startDate, LocalDate endDate) {
|
||||||
Set<LocalDate> result = new HashSet<>();
|
Set<LocalDate> result = new HashSet<>();
|
||||||
|
@ -242,11 +258,10 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
||||||
}
|
}
|
||||||
return workingDays;
|
return workingDays;
|
||||||
}else{
|
}else{
|
||||||
if (startDate.isAfter(endDate)) {
|
/*if (!startDate.isAfter(endDate)) {
|
||||||
throw new IllegalArgumentException("开始日期不能晚于结束日期");
|
throw new IllegalArgumentException("开始日期不能晚于结束日期");
|
||||||
}
|
}*/
|
||||||
LocalDate currentDate = startDate;
|
LocalDate currentDate = startDate;
|
||||||
|
|
||||||
while (!currentDate.isAfter(endDate)) {
|
while (!currentDate.isAfter(endDate)) {
|
||||||
if (!isWeekend(currentDate)) {
|
if (!isWeekend(currentDate)) {
|
||||||
workingDays.add(currentDate);
|
workingDays.add(currentDate);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package zcgj.zcdev.zcdev.fs.plugin.report;
|
package zcgj.zcdev.zcdev.fs.plugin.report;
|
||||||
|
|
||||||
import kd.bos.context.RequestContext;
|
import kd.bos.context.RequestContext;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.entity.datamodel.IDataModel;
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.datamodel.events.PackageDataEvent;
|
import kd.bos.entity.datamodel.events.PackageDataEvent;
|
||||||
import kd.bos.entity.report.FilterInfo;
|
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.events.SortAndFilterEvent;
|
||||||
import kd.bos.report.plugin.AbstractReportFormPlugin;
|
import kd.bos.report.plugin.AbstractReportFormPlugin;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -44,7 +46,8 @@ public class PositionFeesRptListPlugin extends AbstractReportFormPlugin implemen
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
//获取当前登陆人所在组织
|
//获取当前登陆人所在组织
|
||||||
long orgId = RequestContext.get().getOrgId();
|
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());
|
model.setValue("zcgj_query_year",new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,4 +107,5 @@ public class PositionFeesRptListPlugin extends AbstractReportFormPlugin implemen
|
||||||
ent.setSort(true);
|
ent.setSort(true);
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,4 +73,13 @@ public class OrgCheckUtils {
|
||||||
}
|
}
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,13 +99,14 @@ public class EquipmentCardListPlugin extends AbstractListPlugin implements Plugi
|
||||||
DynamicObject eceq_equipment_card = BusinessDataServiceHelper.loadSingle("eceq_equipment_card", new QFilter[]{new QFilter("zcgj_assetnumber", QCP.equals, number)});
|
DynamicObject eceq_equipment_card = BusinessDataServiceHelper.loadSingle("eceq_equipment_card", new QFilter[]{new QFilter("zcgj_assetnumber", QCP.equals, number)});
|
||||||
if (eceq_equipment_card!=null){
|
if (eceq_equipment_card!=null){
|
||||||
equipmentcard.set("id",eceq_equipment_card.getLong("id"));
|
equipmentcard.set("id",eceq_equipment_card.getLong("id"));
|
||||||
}
|
|
||||||
String cardString = eceq_equipment_card.getString("number");
|
String cardString = eceq_equipment_card.getString("number");
|
||||||
if(!cardString.isEmpty() && cardString!=null){
|
if(!cardString.isEmpty() && cardString!=null){
|
||||||
equipmentcard.set("number",cardString);//设备编号
|
equipmentcard.set("number",cardString);//设备编号
|
||||||
}else{
|
}else{
|
||||||
equipmentcard.set("number",getCodeRule(equipmentcard,"53BT+ZJB86=L"));//设备编号
|
equipmentcard.set("number",getCodeRule(equipmentcard,"53BT+ZJB86=L"));//设备编号
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
equipmentcard.set("billno",timeText);//单据编号
|
equipmentcard.set("billno",timeText);//单据编号
|
||||||
equipmentcard.set("status","C");//单据状态
|
equipmentcard.set("status","C");//单据状态
|
||||||
equipmentcard.set("billstatus","C");//
|
equipmentcard.set("billstatus","C");//
|
||||||
|
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -85,13 +85,14 @@ public class EquipmentCardTaskPlugin extends AbstractTask {
|
||||||
DynamicObject eceq_equipment_card = BusinessDataServiceHelper.loadSingle("eceq_equipment_card", new QFilter[]{new QFilter("zcgj_assetnumber", QCP.equals, number)});
|
DynamicObject eceq_equipment_card = BusinessDataServiceHelper.loadSingle("eceq_equipment_card", new QFilter[]{new QFilter("zcgj_assetnumber", QCP.equals, number)});
|
||||||
if (eceq_equipment_card!=null){
|
if (eceq_equipment_card!=null){
|
||||||
equipmentcard.set("id",eceq_equipment_card.getLong("id"));
|
equipmentcard.set("id",eceq_equipment_card.getLong("id"));
|
||||||
}
|
|
||||||
String cardString = eceq_equipment_card.getString("number");
|
String cardString = eceq_equipment_card.getString("number");
|
||||||
if(!cardString.isEmpty() && cardString!=null){
|
if(!cardString.isEmpty() && cardString!=null){
|
||||||
equipmentcard.set("number",cardString);//设备编号
|
equipmentcard.set("number",cardString);//设备编号
|
||||||
}else{
|
}else{
|
||||||
equipmentcard.set("number",getCodeRule(equipmentcard,"53BT+ZJB86=L"));//设备编号
|
equipmentcard.set("number",getCodeRule(equipmentcard,"53BT+ZJB86=L"));//设备编号
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
equipmentcard.set("billno",timeText);//单据编号
|
equipmentcard.set("billno",timeText);//单据编号
|
||||||
equipmentcard.set("status","C");//单据状态
|
equipmentcard.set("status","C");//单据状态
|
||||||
equipmentcard.set("billstatus","C");//
|
equipmentcard.set("billstatus","C");//
|
||||||
|
|
Loading…
Reference in New Issue