添加清除费用标准、标准单位逻辑-龚宇杰
This commit is contained in:
parent
4f41697623
commit
8944160f16
|
@ -12,6 +12,7 @@ import kd.bos.orm.query.QFilter;
|
|||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -76,10 +77,13 @@ public class GetExpenseStandardPlugin extends AbstractBillPlugIn implements Plug
|
|||
DynamicObject expenseItem = expenseEntry.getDynamicObject("expenseitem");
|
||||
if (expenseItem != null) {
|
||||
HashMap<String, Object> result = getExpenseStandard(entryFields, reimburseType, expenseItem.getString("number"), expenseEntry);
|
||||
if (result != null) {
|
||||
if (result != null && !result.isEmpty()) {
|
||||
for (String field : result.keySet()) {
|
||||
model.setValue(field, result.get(field), i);
|
||||
}
|
||||
} else {
|
||||
model.setValue("zf47_expense_standards", BigDecimal.ZERO, i);
|
||||
model.setValue("fk_zf47_standard_unit", "", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,10 +93,13 @@ public class GetExpenseStandardPlugin extends AbstractBillPlugIn implements Plug
|
|||
DynamicObject expenseItem = expenseEntry.getDynamicObject("expenseitem");
|
||||
if (expenseItem != null) {
|
||||
HashMap<String, Object> result = getExpenseStandard(entryFields, reimburseType, expenseItem.getString("number"), expenseEntry);
|
||||
if (result != null) {
|
||||
if (result != null && !result.isEmpty()) {
|
||||
for (String field : result.keySet()) {
|
||||
model.setValue(field, result.get(field), rowIndex);
|
||||
}
|
||||
} else {
|
||||
model.setValue("zf47_expense_standards", BigDecimal.ZERO, rowIndex);
|
||||
model.setValue("fk_zf47_standard_unit", "", rowIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue