提交人:刘森澳
日期:2025/4/25 12:18 内容:1、评级筛选过滤反写逻辑补充; 2、发行人账号非必填逻辑补充;
This commit is contained in:
parent
295dd38b7c
commit
7a8f14eb34
|
@ -2,19 +2,24 @@ package shkd.sys.sys.plugin.tmc;
|
||||||
|
|
||||||
import kd.bos.base.AbstractBasePlugIn;
|
import kd.bos.base.AbstractBasePlugIn;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.dataentity.resource.ResManager;
|
import kd.bos.dataentity.resource.ResManager;
|
||||||
|
import kd.bos.entity.datamodel.ListSelectedRow;
|
||||||
|
import kd.bos.entity.datamodel.ListSelectedRowCollection;
|
||||||
import kd.bos.form.CloseCallBack;
|
import kd.bos.form.CloseCallBack;
|
||||||
import kd.bos.form.ShowFormHelper;
|
import kd.bos.form.ShowFormHelper;
|
||||||
import kd.bos.form.control.Control;
|
import kd.bos.form.control.Control;
|
||||||
|
import kd.bos.form.events.ClosedCallBackEvent;
|
||||||
import kd.bos.form.field.TextEdit;
|
import kd.bos.form.field.TextEdit;
|
||||||
import kd.bos.list.ListShowParameter;
|
import kd.bos.list.ListShowParameter;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.tmc.fbp.common.helper.TmcDataServiceHelper;
|
||||||
import kd.tmc.fbp.common.util.EmptyUtil;
|
import kd.tmc.fbp.common.util.EmptyUtil;
|
||||||
|
|
||||||
import java.util.EventObject;
|
import java.util.EventObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础资料插件
|
* 评级过滤插件
|
||||||
*/
|
*/
|
||||||
public class BondSeletRatingPlugin extends AbstractBasePlugIn {
|
public class BondSeletRatingPlugin extends AbstractBasePlugIn {
|
||||||
@Override
|
@Override
|
||||||
|
@ -65,4 +70,44 @@ public class BondSeletRatingPlugin extends AbstractBasePlugIn {
|
||||||
this.getView().showForm(showParameter);
|
this.getView().showForm(showParameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void closedCallBack(ClosedCallBackEvent event) {
|
||||||
|
super.closedCallBack(event);
|
||||||
|
switch (event.getActionId()) {
|
||||||
|
case "shkd_ratingscale":
|
||||||
|
this.setRatingScale(event, "ratingscale");
|
||||||
|
this.setRatingScale(event, "shkd_ratingscale");break;
|
||||||
|
case "shkd_debtratingscale":
|
||||||
|
this.setRatingScale(event, "debtratingscale");
|
||||||
|
this.setRatingScale(event, "shkd_debtratingscale");break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setRatingScale(ClosedCallBackEvent event, String field) {
|
||||||
|
ListSelectedRowCollection selectedRowCol = (ListSelectedRowCollection)event.getReturnData();
|
||||||
|
if (EmptyUtil.isNoEmpty(selectedRowCol)) {
|
||||||
|
ListSelectedRow selectedRow = selectedRowCol.get(0);
|
||||||
|
Object entryId = selectedRow.getEntryPrimaryKeyValue();
|
||||||
|
this.setRatingScaleByEntryId(entryId, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setRatingScaleByEntryId(Object entryId, String field) {
|
||||||
|
if (!EmptyUtil.isEmpty(entryId)) {
|
||||||
|
QFilter qFilter = new QFilter("entrys.id", "=", entryId);
|
||||||
|
DynamicObject data = TmcDataServiceHelper.loadSingleFromCache("tbd_ratingscale", "entrys.grade,entrys.desc", qFilter.toArray());
|
||||||
|
DynamicObjectCollection entrys = data.getDynamicObjectCollection("entrys");
|
||||||
|
|
||||||
|
for(int i = 0; i < entrys.size(); ++i) {
|
||||||
|
DynamicObject entry = (DynamicObject)entrys.get(i);
|
||||||
|
if (entry.getPkValue().toString().equals(entryId.toString())) {
|
||||||
|
this.getModel().setValue(field, entry.get("grade"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ public class IssuerNotMandatoryPlugin extends AbstractFormPlugin implements Plug
|
||||||
@Override
|
@Override
|
||||||
public void propertyChanged(PropertyChangedArgs e) {
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
String fieldKey = e.getProperty().getName();
|
String fieldKey = e.getProperty().getName();
|
||||||
if ("issyncdraw".equals(fieldKey)){
|
if ("issyncdraw".equals(fieldKey) || "amount".equals(fieldKey)){
|
||||||
//前端去掉星号,前端不一定会校验
|
//前端去掉星号,前端不一定会校验
|
||||||
BasedataEdit attch= (BasedataEdit)this.getControl("accountbank");
|
BasedataEdit attch= (BasedataEdit)this.getControl("accountbank");
|
||||||
attch.setMustInput(false);
|
attch.setMustInput(false);
|
||||||
|
|
Loading…
Reference in New Issue