Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
0d8baf60f3
|
|
@ -106,7 +106,8 @@ public class CimFinancialBillPlugin extends AbstractBillPlugIn implements Plugin
|
|||
for (DynamicObject item : entryEntity) {
|
||||
int currentSeq = item.getInt("seq");
|
||||
if (currentSeq==0){
|
||||
throw new RuntimeException("初始行不可删除!");
|
||||
this.getView().showMessage("初始行不可删除!");
|
||||
return null;
|
||||
}
|
||||
if (currentSeq > maxSeq) {
|
||||
maxSeq = currentSeq;
|
||||
|
|
|
|||
|
|
@ -8,11 +8,15 @@ 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;
|
||||
|
||||
|
|
@ -23,6 +27,9 @@ 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);
|
||||
|
|
@ -30,15 +37,32 @@ public class PayBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
if (!"付款处理".equals(listShowParameter.getCaption())) {
|
||||
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")) {
|
||||
value = (HashSet<Long>)nest.getFilter().getValue();
|
||||
// 修改这里:正确处理获取的值
|
||||
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.add(993266082510901248L);
|
||||
}
|
||||
}
|
||||
|
|
@ -47,6 +71,7 @@ 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