优化测试

This commit is contained in:
xuhaihui 2025-09-22 18:33:59 +08:00
parent fb58b6ea97
commit e7020edce3
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.user.UserServiceHelper;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
@ -143,8 +144,9 @@ public class MaterialOutBillPlugin extends AbstractBillPlugIn implements BeforeF
int rowIndex = changeData.getRowIndex();
BigDecimal newValue = (BigDecimal) changeData.getNewValue();//数量
BigDecimal price = dataEntity.getBigDecimal("price");//单价不含税
BigDecimal result = newValue.multiply(price).setScale(2, RoundingMode.HALF_UP);
BigDecimal settleprice = dataEntity.getBigDecimal("settleprice");//结算单价
this.getModel().setValue("amount", newValue.multiply(price), rowIndex);//金额
this.getModel().setValue("amount", result, rowIndex);//金额
this.getModel().setValue("settleamount", newValue.multiply(settleprice), rowIndex);//结算金额
Object warehouse = this.getModel().getValue("warehouse");//发货仓库
DynamicObject transType = (DynamicObject) this.getModel().getValue("transtype");//事务类型