Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
xiaoshi 2025-08-15 16:02:25 +08:00
commit 4df092d9de
2 changed files with 11 additions and 7 deletions

View File

@ -9,6 +9,8 @@ import kd.bos.entity.datamodel.events.ChangeData;
import kd.bos.entity.datamodel.events.PropertyChangedArgs; import kd.bos.entity.datamodel.events.PropertyChangedArgs;
import kd.bos.form.control.events.ItemClickEvent; import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.plugin.AbstractFormPlugin; import kd.bos.form.plugin.AbstractFormPlugin;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.BusinessDataServiceHelper;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -48,7 +50,8 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
DynamicObjectType processAllocEntityType = processAllocEntityCollection.getDynamicObjectType(); DynamicObjectType processAllocEntityType = processAllocEntityCollection.getDynamicObjectType();
long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id
DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle(referBillId, "ec_outcontractmeasure");//支出合同计量 QFilter qFilter = new QFilter("id", QCP.equals, referBillId);
DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle("ec_outcontractmeasure", new QFilter[]{qFilter});//支出合同计量
if (EcOutContractMeasure != null) { if (EcOutContractMeasure != null) {
DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录 DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录
for (DynamicObject ListModelEntry : ListModelEntryCollection) { for (DynamicObject ListModelEntry : ListModelEntryCollection) {
@ -89,7 +92,7 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
super.propertyChanged(e); super.propertyChanged(e);
String name = e.getProperty().getName(); String name = e.getProperty().getName();
if ("totalsettleoftaxamount".equals(name) || "contract".equals(name)) { if ("totalsettleoftaxamount".equals(name) || "contract".equals(name)) {
//关联单据 //累计结算金额含当期价税合计,合同名称
DynamicObjectCollection payItemDetailEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("payitemdetailentry");//合同支付项明细 DynamicObjectCollection payItemDetailEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("payitemdetailentry");//合同支付项明细
DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录 DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录
if (itemEntryCollection.size() == 0) { if (itemEntryCollection.size() == 0) {
@ -116,7 +119,8 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
for (DynamicObject payItemDetailEntry : payItemDetailEntryCollection) { for (DynamicObject payItemDetailEntry : payItemDetailEntryCollection) {
long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id long referBillId = payItemDetailEntry.getLong("referbillid");//关联单据id
DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle(referBillId, "ec_outcontractmeasure");//支出合同计量 QFilter qFilter = new QFilter("id", QCP.equals, referBillId);
DynamicObject EcOutContractMeasure = BusinessDataServiceHelper.loadSingle("ec_outcontractmeasure", new QFilter[]{qFilter});//支出合同计量
if (EcOutContractMeasure != null) { if (EcOutContractMeasure != null) {
DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录 DynamicObjectCollection ListModelEntryCollection = EcOutContractMeasure.getDynamicObjectCollection("listmodelentry");//模板分录
for (DynamicObject ListModelEntry : ListModelEntryCollection) { for (DynamicObject ListModelEntry : ListModelEntryCollection) {

View File

@ -262,7 +262,7 @@ public class EquipmentCommandBillPlugin extends AbstractBillPlugIn implements Be
QFilter[] qFilters = new QFilter[]{ QFilter[] qFilters = new QFilter[]{
new QFilter("number", QCP.equals, viewParent.getString("number")) new QFilter("number", QCP.equals, viewParent.getString("number"))
}; };
cost = BusinessDataServiceHelper.loadSingle("bos_adminorg", qFilters); cost = BusinessDataServiceHelper.loadSingle("bos_adminorg", qFilters);//行政组织
} }
DynamicObjectCollection structureCollection = cost.getDynamicObjectCollection("structure");//组织结构分录 DynamicObjectCollection structureCollection = cost.getDynamicObjectCollection("structure");//组织结构分录
DynamicObject structure = structureCollection.get(0); DynamicObject structure = structureCollection.get(0);
@ -275,7 +275,7 @@ public class EquipmentCommandBillPlugin extends AbstractBillPlugIn implements Be
DynamicObject orgPattern1 = bos_adminOrg.getDynamicObject("orgpattern");//形态 DynamicObject orgPattern1 = bos_adminOrg.getDynamicObject("orgpattern");//形态
String orgPatternNumber1 = orgPattern1.getString("number"); String orgPatternNumber1 = orgPattern1.getString("number");
if (!orgPatternNumber1.equals("Orgform06")) { if (!orgPatternNumber1.equals("Orgform06")) {
//上级不为不为部门的时候将现在查询的部门赋值给一级承担部门 //上级不为不为部门的时候跳出循环
break; break;
} else { } else {
a++; a++;
@ -283,7 +283,7 @@ public class EquipmentCommandBillPlugin extends AbstractBillPlugIn implements Be
} }
DynamicObject bos_adminorg = BusinessDataServiceHelper.loadSingle("bos_adminorg", new QFilter[]{ DynamicObject bos_adminorg = BusinessDataServiceHelper.loadSingle("bos_adminorg", new QFilter[]{
new QFilter("number", QCP.equals, viewParent.getString("number"))}); new QFilter("number", QCP.equals, viewParent.getString("number"))});//行政组织
this.getModel().setValue("zcgj_org", bos_adminorg);//所属组织 this.getModel().setValue("zcgj_org", bos_adminorg);//所属组织
} }
} }