Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
6a1a850c57
|
@ -27,6 +27,7 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
|
|||
//costcompany
|
||||
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
|
||||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
if(company != null){
|
||||
DynamicObject companyObj = (DynamicObject)company;
|
||||
Long companyId = companyObj.getLong("id");
|
||||
if(OrgCheckUtils.isKS(companyId)){
|
||||
|
@ -58,6 +59,7 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
super.propertyChanged(e);
|
||||
|
||||
}
|
||||
|
|
|
@ -122,7 +122,6 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
|
|||
@Override
|
||||
public void itemClick(ItemClickEvent evt) {
|
||||
//费用项目设置为默认
|
||||
|
||||
Object company = this.getModel().getValue("costcompany");//核算组织
|
||||
if (company!=null && evt.getItemKey().equals("addloancheck1")) {
|
||||
DynamicObject companyObj = (DynamicObject)company;
|
||||
|
@ -163,7 +162,9 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
|
|||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
//当前所在的组织是属于矿山下的 costcompany
|
||||
//costcompany 费用承担公司
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||
Object costcompanyObjVal = this.getModel().getValue("costcompany");
|
||||
if(costcompanyObjVal!=null){
|
||||
DynamicObject costcompany = (DynamicObject)costcompanyObjVal;
|
||||
long costcompanyId = costcompany.getLong("id");
|
||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||
EntryProp entryProp = e.getEntryProp();
|
||||
|
@ -196,4 +197,5 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
|
|||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
//当前所在的组织是属于矿山下的 costcompany
|
||||
//costcompany 费用承担公司
|
||||
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||
if(costcompanyObj!=null){
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||
long costcompanyId = costcompany.getLong("id");
|
||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||
|
@ -85,6 +87,7 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
|
|||
fieldEditExpense.addAfterF7SelectListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterF7Select(AfterF7SelectEvent afterF7SelectEvent) {
|
||||
|
|
|
@ -67,7 +67,9 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
|
|||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
//当前所在的组织是属于矿山下的
|
||||
//costcompany 费用承担公司
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||
if(costcompanyObj != null){
|
||||
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||
long costcompanyId = costcompany.getLong("id");
|
||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||
|
@ -79,6 +81,7 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
|
|||
fieldEditExpense.addAfterF7SelectListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterF7Select(AfterF7SelectEvent afterF7SelectEvent) {
|
||||
|
|
|
@ -32,6 +32,8 @@ public class DefaultExpenseItemPlugin extends AbstractBillPlugIn implements Plu
|
|||
//通过费用承担公司找到行政组织,获取长名称,排除编码为'10006447','10007186','10006476','10006461','10006939'的
|
||||
String rootOrgCode = "10006431";
|
||||
super.afterCreateNewData(e);
|
||||
Object costcompany1 = this.getModel().getValue("costcompany");
|
||||
if(costcompany1!=null){
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||
long id = costcompany.getLong("id");
|
||||
|
||||
|
@ -62,6 +64,7 @@ public class DefaultExpenseItemPlugin extends AbstractBillPlugIn implements Plu
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,9 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin
|
|||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
//当前所在的组织是属于矿山下的 costcompany
|
||||
//costcompany 费用承担公司
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||
if(costcompanyObj!=null){
|
||||
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||
long costcompanyId = costcompany.getLong("id");
|
||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||
|
@ -81,7 +83,7 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin
|
|||
fieldEditExpense.addBeforeF7SelectListener(this);
|
||||
fieldEditExpense.addAfterF7SelectListener(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -71,7 +71,9 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen
|
|||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
//当前所在的组织是属于矿山下的 costcompany
|
||||
//costcompany 费用承担公司
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||
if(costcompanyObj!=null){
|
||||
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||
long costcompanyId = costcompany.getLong("id");
|
||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||
|
@ -83,6 +85,7 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen
|
|||
fieldEditExpense.addAfterF7SelectListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterF7Select(AfterF7SelectEvent afterF7SelectEvent) {
|
||||
|
|
|
@ -29,6 +29,7 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
|||
//当前切换选择的组织
|
||||
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
|
||||
Long currentOrgId = RequestContext.get().getOrgId();
|
||||
if(company!=null){
|
||||
DynamicObject companyObj = (DynamicObject)company;
|
||||
Long companyId = companyObj.getLong("id");
|
||||
if(OrgCheckUtils.isKS(companyId)){
|
||||
|
@ -67,6 +68,7 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
super.propertyChanged(e);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||
|
||||
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.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
public class EcInFinalsettleJusCustPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener {
|
||||
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
BasedataEdit fieldEdit = this.getView().getControl("zcgj_jscustomer");
|
||||
fieldEdit.addBeforeF7SelectListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeF7Select(BeforeF7SelectEvent arg0) {
|
||||
String name = arg0.getProperty().getName();
|
||||
if(name.equals("zcgj_jscustomer")){
|
||||
Object contractObj = this.getModel().getValue("contract");
|
||||
if(contractObj != null){
|
||||
DynamicObject contract = (DynamicObject)contractObj;
|
||||
boolean ismulticontract = contract.getBoolean("ismulticontract");//多方合同
|
||||
DynamicObject parta = contract.getDynamicObject("parta");
|
||||
List<Long> ids = new ArrayList<>();
|
||||
ids.add(parta.getLong("id"));
|
||||
if(ismulticontract){
|
||||
DynamicObjectCollection otherpart = contract.getDynamicObjectCollection("otherpart");
|
||||
for (DynamicObject dynamicObject : otherpart) {
|
||||
ids.add(dynamicObject.getLong(2));
|
||||
}
|
||||
}
|
||||
List<QFilter> qFilterList = new ArrayList<>();
|
||||
qFilterList.add(new QFilter("id", QCP.in,ids));
|
||||
arg0.setCustomQFilters(qFilterList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue