被动付款入账跳转付款处理报错
This commit is contained in:
parent
0d8baf60f3
commit
43fd9bee1a
|
|
@ -8,15 +8,11 @@ import kd.bos.form.events.SetFilterEvent;
|
|||
import kd.bos.list.BillList;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.list.plugin.AbstractListPlugin;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
import shjh.jhzj7.fi.fi.plugin.operate.ApplyTransBillSaveOperation;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -27,42 +23,22 @@ import static kd.fi.cas.helper.PayBillListPlugnHelper.getFcaFilter;
|
|||
* 付款处理-取消付款校验
|
||||
*/
|
||||
public class PayBillListPlugin extends AbstractListPlugin implements Plugin {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(PayBillListPlugin.class);
|
||||
|
||||
@Override
|
||||
public void setFilter(SetFilterEvent e) {
|
||||
super.setFilter(e);
|
||||
ListShowParameter listShowParameter = (ListShowParameter)this.getView().getFormShowParameter();
|
||||
if (!"付款处理".equals(listShowParameter.getCaption())) {
|
||||
if (!"cas_apphome_grid".equals(listShowParameter.getParentFormId())) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<QFilter> qFilters = e.getQFilters();
|
||||
HashSet<Long> value = new HashSet<>();
|
||||
|
||||
for (QFilter qFilter : qFilters) {
|
||||
if (qFilter.toString().contains("billtype")) {
|
||||
List<QFilter.QFilterNest> nests = qFilter.getNests(true);
|
||||
for (QFilter.QFilterNest nest : nests) {
|
||||
String string1 = nest.toString();
|
||||
if (string1.contains("billtype")) {
|
||||
// 修改这里:正确处理获取的值
|
||||
Object filterValue = nest.getFilter().getValue();
|
||||
if (filterValue instanceof String[]) {
|
||||
String[] stringValues = (String[])filterValue;
|
||||
for (String str : stringValues) {
|
||||
try {
|
||||
value.add(Long.parseLong(str));
|
||||
} catch (NumberFormatException ex) {
|
||||
// 处理转换失败的情况
|
||||
logger.error("无法转换字符串到Long: " + str, ex);
|
||||
}
|
||||
}
|
||||
} else if (filterValue instanceof Collection) {
|
||||
// 如果已经是集合类型,直接转换
|
||||
value = new HashSet<>((Collection<Long>)filterValue);
|
||||
}
|
||||
value = (HashSet<Long>)nest.getFilter().getValue();
|
||||
value.add(993266082510901248L);
|
||||
}
|
||||
}
|
||||
|
|
@ -71,7 +47,6 @@ public class PayBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
qFilters.add(new QFilter("billtype", QCP.in, value).and("iswaitsche", QCP.equals, '0'));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue