1.优化离线测算导出报错

S
This commit is contained in:
weiyunlong 2025-02-24 12:51:51 +08:00
parent 248d1184cd
commit bb8b370172
1 changed files with 7 additions and 1 deletions

View File

@ -112,8 +112,14 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl
DynamicObjectCollection cientry = single.getDynamicObjectCollection("cientry");
if (cientry.isEmpty()) {
this.getView().showErrorNotification("该测算分录没有数据,不支持导出");
return;
}
String sheetname= cientry.get(0).getDynamicObject("entry_producttype").getString("name");//产品类型名称
DynamicObject producttype = cientry.get(0).getDynamicObject("entry_producttype");
if (null == producttype) {
this.getView().showErrorNotification("该测算分录没有产品类型,不支持导出");
return;
}
String sheetname= producttype.getString("name");//产品类型名称
for (DynamicObject dynamicObject : cientry) {
DynamicObject entry_costaccount = dynamicObject.getDynamicObject("entry_costaccount");//科目
if (entry_costaccount.getBoolean("isleaf")){