1.供应商画像逻辑优化

2.立项选择采购需求根据组织过滤

S
This commit is contained in:
weiyunlong 2025-01-02 16:29:53 +08:00
parent c1ef44e138
commit 7e73d41fd8
4 changed files with 93 additions and 11 deletions

View File

@ -0,0 +1,50 @@
package shkd.repc.rebm.listplugin;
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.metadata.IDataEntityType;
import kd.bos.entity.MainEntityType;
import kd.bos.entity.datamodel.IDataModel;
import kd.bos.form.IFormView;
import kd.bos.form.events.SetFilterEvent;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import java.util.EventObject;
import java.util.List;
public class PurDemandListPlugin extends AbstractListPlugin {
@Override
public void afterBindData(EventObject e) {
super.afterBindData(e);
IFormView parentView = this.getView().getParentView();
MainEntityType dataEntityType = parentView.getModel().getDataEntityType();
}
@Override
public void setFilter(SetFilterEvent e) {
super.setFilter(e);
IFormView parentView = this.getView().getParentView();
IDataModel model = parentView.getModel();
DynamicObject dataEntity = model.getDataEntity();
IDataEntityType dataEntityType = dataEntity.getDataEntityType();
String name = dataEntityType.getName();
if ("rebm_project".equals(name)) {
DynamicObject org = dataEntity.getDynamicObject("org");
if (null != org) {
List<QFilter> qFilters = e.getQFilters();
QFilter q1 = new QFilter("org.name", QCP.equals, org.getString("name"));
QFilter q2 = new QFilter("billstatus", QCP.equals, "C");
List<QFilter> listQF = Lists.newArrayList();
listQF.add(q1.and(q2));
qFilters.addAll(listQF);
}
}
}
}

View File

@ -1,6 +1,9 @@
package shkd.repc.resm.formplugin;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.form.container.Tab;
import kd.bos.form.control.events.TabSelectEvent;
import kd.bos.form.control.events.TabSelectListener;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
@ -13,7 +16,7 @@ import java.util.EventObject;
* 页签-工商信息
* qeug_resm_portrait_ba_ext
*/
public class PortraitBasicsFormPlugin extends AbstractFormPlugin {
public class PortraitBasicsFormPlugin extends AbstractFormPlugin implements TabSelectListener {
@Override
public void afterBindData(EventObject e) {
@ -69,4 +72,28 @@ public class PortraitBasicsFormPlugin extends AbstractFormPlugin {
// this.getView().updateView();
}
public void registerListener (EventObject e){
// // 页签添加监听事件*
// Tab tab = this.getView().getControl("tabap");
// tab.addTabSelectListener(this);
}
@Override
public void tabSelected(TabSelectEvent tabSelectEvent) {
// DynamicObject dataEntity = this.getView().getModel().getDataEntity();
// DynamicObject supplier = dataEntity.getDynamicObject("supplier");
// Long supplierid = supplier.getLong("id");
// QFilter q1 = new QFilter("id", QCP.equals, supplierid);
// DynamicObject supplier1 = BusinessDataServiceHelper.loadSingle("resm_official_supplier", new QFilter[]{q1});
//
// if (null != supplier1) {
// // 页签切换时触发
// String tabKey = tabSelectEvent.getTabKey();
// if ("tab_bigdata".equals(tabKey)) {
//// this.getModel().getEntryEntity("");
// }
// }
}
}

View File

@ -33,6 +33,8 @@ public class SupplierChangeFormPlugin extends AbstractFormPlugin {
}
//todo:审核后,将天眼查查到的数据同步到正式供应商
@Override
public void afterBindData(EventObject e) {
super.afterBindData(e);

View File

@ -29,19 +29,22 @@ public class TycSupplieFormPlugin extends AbstractFormPlugin {
QFilter q1 = new QFilter("id", QCP.equals, supplierid);
DynamicObject supplier = BusinessDataServiceHelper.loadSingle("resm_official_supplier", new QFilter[]{q1});
DynamicObject supplier_t = null;
//正式供应商
if (null != supplier) {
if (supplier != null) {
boolean qeugIstyccheck = supplier.getBoolean("qeug_istyccheck"); // 是否查询天眼查(正式供应商)
if (qeugIstyccheck) {
supplier_t = supplier;
} else {
//潜在供应商
QFilter q2 = new QFilter("officesupplier.id", QCP.equals, supplier.getLong("id"));
supplier_t = BusinessDataServiceHelper.loadSingle("resm_regsupplier", new QFilter[]{q2});
supplier_t = qeugIstyccheck ? supplier :
BusinessDataServiceHelper.loadSingle("resm_regsupplier", new QFilter[]{new QFilter("officesupplier.id", QCP.equals, supplierid)});
}
if (supplier_t == null) {
supplier_t = BusinessDataServiceHelper.loadSingle("resm_official_supplier", new QFilter[]{q1});
}
if (supplier_t != null) {
showPreaudits(supplier_t);
}
if (null != supplier_t) {
/**
* 基本信息核对 qeug_infocheckentry
*/