dobe_comic8/main/java/shkd/repc/resm/formplugin/GetDataTemplatePlugin.java

39 lines
1.3 KiB
Java
Raw Normal View History

2025-01-07 10:52:04 +00:00
package shkd.repc.resm.formplugin;
import kd.bos.dataentity.utils.StringUtils;
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.sdk.plugin.Plugin;
/**
* 动态表单插件
*/
public class GetDataTemplatePlugin extends AbstractFormPlugin implements Plugin {
private static final String BIZ_OBJECT= "qeug_projectsource2";
private static final String PRO_SOURCE="qeug_projectsourceid2";
private static final String INVESTIGATION="resm_investigationplan";
private static final String PRO_BILL="repmd_projectbill";
@Override
public void propertyChanged(PropertyChangedArgs e) {
super.propertyChanged(e);
String fieldKey = e.getProperty().getName();
if (StringUtils.equals(BIZ_OBJECT,fieldKey)){
String value = (String)this.getModel().getValue(BIZ_OBJECT);
if (null!=value&&!"".equals(value)){
switch (value){
case "考察任务":
this.getModel().setValue(PRO_SOURCE,INVESTIGATION);
break;
case "评估任务":
this.getModel().setValue(PRO_SOURCE,PRO_BILL);
break;
}
}
}
}
}