Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
2786d65392
|
@ -58,7 +58,7 @@ public class TriprCostcompanyDefaultPlugin extends AbstractBillPlugIn implements
|
||||||
DynamicObject companyObj = (DynamicObject)company;
|
DynamicObject companyObj = (DynamicObject)company;
|
||||||
Long companyId = companyObj.getLong("id");
|
Long companyId = companyObj.getLong("id");
|
||||||
String companyNumber = companyObj.getString("number");
|
String companyNumber = companyObj.getString("number");
|
||||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(companyId)){
|
// if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(companyId)){
|
||||||
//costcompany 费用承担公司
|
//costcompany 费用承担公司
|
||||||
//costdept 费用承担部门
|
//costdept 费用承担部门
|
||||||
//费用明细分录 expenseentryentity
|
//费用明细分录 expenseentryentity
|
||||||
|
@ -72,18 +72,20 @@ public class TriprCostcompanyDefaultPlugin extends AbstractBillPlugIn implements
|
||||||
//费用承担公司带入到成本中心
|
//费用承担公司带入到成本中心
|
||||||
costcompanyObj= (DynamicObject)this.getModel().getValue("costcompany");
|
costcompanyObj= (DynamicObject)this.getModel().getValue("costcompany");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(costcompanyObj!=null){
|
if(costcompanyObj!=null){
|
||||||
QFilter numberFilter = new QFilter("number",QCP.equals,costcompanyObj.getString("number"));
|
if(OrgCheckUtils.isKS(costcompanyObj.getLong("id")) && OrgCheckUtils.isKS(costcompanyObj.getLong("id"))){
|
||||||
DynamicObject[] dynamicObjectAccItem = BusinessDataServiceHelper.load("bos_costcenter", "number,name", new QFilter[]{numberFilter});
|
QFilter numberFilter = new QFilter("number",QCP.equals,costcompanyObj.getString("number"));
|
||||||
if(dynamicObjectAccItem != null && dynamicObjectAccItem.length>0){
|
DynamicObject[] dynamicObjectAccItem = BusinessDataServiceHelper.load("bos_costcenter", "number,name", new QFilter[]{numberFilter});
|
||||||
this.getModel().setValue("std_costcenter",dynamicObjectAccItem[0]);
|
if(dynamicObjectAccItem != null && dynamicObjectAccItem.length>0){
|
||||||
}else{
|
this.getModel().setValue("std_costcenter",dynamicObjectAccItem[0]);
|
||||||
this.getModel().setValue("std_costcenter",null);
|
}else{
|
||||||
|
this.getModel().setValue("std_costcenter",null);
|
||||||
|
}
|
||||||
|
getView().updateView("std_costcenter");
|
||||||
}
|
}
|
||||||
getView().updateView("std_costcenter");
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,29 @@
|
||||||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||||
|
|
||||||
import kd.bos.bill.BillShowParameter;
|
import kd.bos.bill.BillShowParameter;
|
||||||
|
import kd.bos.context.RequestContext;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||||
|
import kd.bos.filter.FilterColumn;
|
||||||
import kd.bos.form.ShowType;
|
import kd.bos.form.ShowType;
|
||||||
import kd.bos.form.control.events.ItemClickEvent;
|
import kd.bos.form.control.events.ItemClickEvent;
|
||||||
|
import kd.bos.form.events.FilterContainerInitArgs;
|
||||||
import kd.bos.form.events.HyperLinkClickArgs;
|
import kd.bos.form.events.HyperLinkClickArgs;
|
||||||
|
import kd.bos.form.field.events.BeforeFilterF7SelectEvent;
|
||||||
import kd.bos.list.BillList;
|
import kd.bos.list.BillList;
|
||||||
import kd.bos.list.plugin.AbstractListPlugin;
|
import kd.bos.list.plugin.AbstractListPlugin;
|
||||||
import kd.bos.logging.Log;
|
import kd.bos.logging.Log;
|
||||||
import kd.bos.logging.LogFactory;
|
import kd.bos.logging.LogFactory;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.permission.api.HasPermOrgResult;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.permission.PermissionServiceHelper;
|
||||||
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收入合同结算财务确认单
|
* 收入合同结算财务确认单
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +57,38 @@ public class InContractFinaceConfirmeListPlugin extends AbstractListPlugin imple
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//列表F7 所属组织增加过滤
|
||||||
|
@Override
|
||||||
|
public void filterContainerBeforeF7Select(BeforeFilterF7SelectEvent args) {
|
||||||
|
super.filterContainerBeforeF7Select(args);
|
||||||
|
//获取当前人员有权限的组织
|
||||||
|
HasPermOrgResult userHasPermOrgs = PermissionServiceHelper.getUserHasPermOrgs(Long.parseLong(RequestContext.get().getUserId()));
|
||||||
|
//有权的组织
|
||||||
|
List<Long> hasPermOrgs = userHasPermOrgs.getHasPermOrgs();
|
||||||
|
String fieldName = args.getFieldName();
|
||||||
|
if ("zcgj_org.id".equals(fieldName)) {
|
||||||
|
args.getQfilters().add(new QFilter("id", QCP.in, hasPermOrgs));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void filterContainerInit(FilterContainerInitArgs args) {
|
||||||
|
super.filterContainerInit(args);
|
||||||
|
List<FilterColumn> commonFilterColumns = args.getCommonFilterColumns();
|
||||||
|
for (FilterColumn commonFilterColumn : commonFilterColumns) {
|
||||||
|
String fieldName = commonFilterColumn.getFieldName();
|
||||||
|
Long currentUserId = UserServiceHelper.getCurrentUserId();
|
||||||
|
// 当前用户所属组织
|
||||||
|
Long mainOrgId = UserServiceHelper.getUserMainOrgId(currentUserId);
|
||||||
|
//当前切换选择的组织
|
||||||
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
|
if("zcgj_org.name".equals(fieldName)) {
|
||||||
|
commonFilterColumn.setDefaultValue(String.valueOf(currentOrgId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void itemClick(ItemClickEvent evt) {
|
public void itemClick(ItemClickEvent evt) {
|
||||||
super.itemClick(evt);
|
super.itemClick(evt);
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class InContractFinaceConfirmePlugin extends AbstractBillPlugIn implement
|
||||||
getModel().setValue("zcgj_description",ecincontractsettle.getString("description"));
|
getModel().setValue("zcgj_description",ecincontractsettle.getString("description"));
|
||||||
getModel().setValue("zcgj_currency",ecincontractsettle.getDynamicObject("currency"));
|
getModel().setValue("zcgj_currency",ecincontractsettle.getDynamicObject("currency"));
|
||||||
getModel().setValue("zcgj_invoice_org",ecincontractsettle.getDynamicObject("project").getDynamicObject("projectorg"));
|
getModel().setValue("zcgj_invoice_org",ecincontractsettle.getDynamicObject("project").getDynamicObject("projectorg"));
|
||||||
// getModel().setValue("zcgj_jscustomer",ecincontractsettle.getDynamicObject("zcgj_jscustomer"));
|
getModel().setValue("zcgj_jscustomer",ecincontractsettle.getDynamicObject("zcgj_jscustomer"));
|
||||||
|
|
||||||
DynamicObjectCollection itementry = ecincontractsettle.getDynamicObjectCollection("itementry");
|
DynamicObjectCollection itementry = ecincontractsettle.getDynamicObjectCollection("itementry");
|
||||||
//DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("zcgj_itementry");
|
//DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("zcgj_itementry");
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||||
|
|
||||||
import kd.bos.bill.BillShowParameter;
|
import kd.bos.bill.BillShowParameter;
|
||||||
|
import kd.bos.context.RequestContext;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.utils.StringUtils;
|
import kd.bos.dataentity.utils.StringUtils;
|
||||||
import kd.bos.entity.datamodel.IDataModel;
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.datamodel.ListSelectedRow;
|
import kd.bos.entity.datamodel.ListSelectedRow;
|
||||||
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||||
|
import kd.bos.filter.FilterColumn;
|
||||||
import kd.bos.form.FormShowParameter;
|
import kd.bos.form.FormShowParameter;
|
||||||
import kd.bos.form.ShowType;
|
import kd.bos.form.ShowType;
|
||||||
import kd.bos.form.StyleCss;
|
import kd.bos.form.StyleCss;
|
||||||
import kd.bos.form.control.events.ItemClickEvent;
|
import kd.bos.form.control.events.ItemClickEvent;
|
||||||
import kd.bos.form.events.HyperLinkClickArgs;
|
import kd.bos.form.events.*;
|
||||||
import kd.bos.form.events.HyperLinkClickEvent;
|
import kd.bos.form.field.events.BeforeFilterF7SelectEvent;
|
||||||
import kd.bos.form.events.HyperLinkClickListener;
|
|
||||||
import kd.bos.list.BillList;
|
import kd.bos.list.BillList;
|
||||||
import kd.bos.list.plugin.AbstractListPlugin;
|
import kd.bos.list.plugin.AbstractListPlugin;
|
||||||
import kd.bos.logging.Log;
|
import kd.bos.logging.Log;
|
||||||
|
@ -22,8 +23,11 @@ import kd.bos.openapi.common.result.OpenApiResult;
|
||||||
import kd.bos.openapi.common.util.OpenApiSdkUtil;
|
import kd.bos.openapi.common.util.OpenApiSdkUtil;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.permission.api.HasPermOrgResult;
|
||||||
import kd.bos.report.ReportList;
|
import kd.bos.report.ReportList;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.permission.PermissionServiceHelper;
|
||||||
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
import kd.ec.contract.common.enums.DirectionEnum;
|
import kd.ec.contract.common.enums.DirectionEnum;
|
||||||
import kd.ec.contract.common.enums.PayDirectionEnum;
|
import kd.ec.contract.common.enums.PayDirectionEnum;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
@ -64,6 +68,38 @@ public class OutContractFinaceConfirmeListPlugin extends AbstractListPlugin impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//列表F7 所属组织增加过滤
|
||||||
|
@Override
|
||||||
|
public void filterContainerBeforeF7Select(BeforeFilterF7SelectEvent args) {
|
||||||
|
super.filterContainerBeforeF7Select(args);
|
||||||
|
//获取当前人员有权限的组织
|
||||||
|
HasPermOrgResult userHasPermOrgs = PermissionServiceHelper.getUserHasPermOrgs(Long.parseLong(RequestContext.get().getUserId()));
|
||||||
|
//有权的组织
|
||||||
|
List<Long> hasPermOrgs = userHasPermOrgs.getHasPermOrgs();
|
||||||
|
String fieldName = args.getFieldName();
|
||||||
|
if ("zcgj_org.id".equals(fieldName)) {
|
||||||
|
args.getQfilters().add(new QFilter("id", QCP.in, hasPermOrgs));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void filterContainerInit(FilterContainerInitArgs args) {
|
||||||
|
super.filterContainerInit(args);
|
||||||
|
List<FilterColumn> commonFilterColumns = args.getCommonFilterColumns();
|
||||||
|
for (FilterColumn commonFilterColumn : commonFilterColumns) {
|
||||||
|
String fieldName = commonFilterColumn.getFieldName();
|
||||||
|
Long currentUserId = UserServiceHelper.getCurrentUserId();
|
||||||
|
// 当前用户所属组织
|
||||||
|
Long mainOrgId = UserServiceHelper.getUserMainOrgId(currentUserId);
|
||||||
|
//当前切换选择的组织
|
||||||
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
|
if("zcgj_org.name".equals(fieldName)) {
|
||||||
|
commonFilterColumn.setDefaultValue(String.valueOf(currentOrgId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void itemClick(ItemClickEvent evt) {
|
public void itemClick(ItemClickEvent evt) {
|
||||||
super.itemClick(evt);
|
super.itemClick(evt);
|
||||||
|
|
Loading…
Reference in New Issue