|
@@ -0,0 +1,45 @@
|
|
|
+package nckd.jimin.jyyy.fi.plugin.form.botp;
|
|
|
+
|
|
|
+import kd.bos.dataentity.entity.DynamicObject;
|
|
|
+import kd.bos.entity.datamodel.IDataModel;
|
|
|
+import kd.bos.form.IFormView;
|
|
|
+import kd.bos.form.events.SetFilterEvent;
|
|
|
+import kd.bos.orm.query.QCP;
|
|
|
+import kd.bos.orm.query.QFilter;
|
|
|
+import kd.fi.er.business.utils.ErEntityTypeUtils;
|
|
|
+import kd.fi.er.formplugin.publicbiz.botp.up.UpDrawContract;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+public class UpDrawContractExtListPlugin extends UpDrawContract{
|
|
|
+ @Override
|
|
|
+ public void setFilter(SetFilterEvent e) {
|
|
|
+ super.setFilter(e);
|
|
|
+ IFormView parentView = this.getView().getParentView();
|
|
|
+ if (parentView != null) {
|
|
|
+ IDataModel pModel = parentView.getModel();
|
|
|
+ String formId = parentView.getEntityId();
|
|
|
+
|
|
|
+ if (ErEntityTypeUtils.isPublicReimburseBill(formId) || ErEntityTypeUtils.isPrePayBill(formId)) {
|
|
|
+ List<QFilter> qFilters = e.getCustomQFilters();
|
|
|
+ if (qFilters != null && qFilters.size() > 0) {
|
|
|
+ QFilter qFilter = qFilters.get(0);
|
|
|
+
|
|
|
+ DynamicObject project = (DynamicObject) pModel.getValue("nckd_project");
|
|
|
+
|
|
|
+ if(project != null){
|
|
|
+ String projectNumber = project.getString("number");
|
|
|
+ if(projectNumber.indexOf(".") > 0) {
|
|
|
+ projectNumber = projectNumber.substring(0, projectNumber.indexOf("."));
|
|
|
+ }
|
|
|
+
|
|
|
+ qFilter.and(new QFilter("expenseentryentity.std_project.number", QCP.like, projectNumber +"%"));
|
|
|
+
|
|
|
+ String name = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|