|
@@ -597,7 +597,8 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
|
|
|
depotItem.setOperNumber(rowObj.getBigDecimal("operNumber"));
|
|
|
//获取子表单商品单位
|
|
|
String unit = rowObj.get("unit") == null ? "" :rowObj.get("unit").toString();
|
|
|
- BigDecimal oNumber = rowObj.getBigDecimal("operNumber");
|
|
|
+ //获取实际出入库数量
|
|
|
+ BigDecimal oNumber = rowObj.getBigDecimal("actualQuantityInStorage");
|
|
|
if (StringUtil.isNotEmpty(unitInfo.getName())) {
|
|
|
String basicUnit = unitInfo.getBasicUnit(); //基本单位
|
|
|
if (unit.equals(basicUnit)) { //如果等于基本单位
|
|
@@ -680,11 +681,15 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
|
|
|
depotItem.setPurchaseUnitPrice(getDepotItemByBatchNumber(depotItem.getMaterialExtendId(),depotItem.getBatchNumber()).getUnitPrice());
|
|
|
}
|
|
|
}
|
|
|
+ //含税单价
|
|
|
if (StringUtil.isExist(rowObj.get("taxUnitPrice"))) {
|
|
|
depotItem.setTaxUnitPrice(rowObj.getBigDecimal("taxUnitPrice"));
|
|
|
}
|
|
|
+ //总金额,不含税
|
|
|
if (StringUtil.isExist(rowObj.get("allPrice"))) {
|
|
|
- depotItem.setAllPrice(rowObj.getBigDecimal("allPrice"));
|
|
|
+ //基本单位数量*单价
|
|
|
+ depotItem.setAllPrice(depotItem.getBasicNumber().multiply(depotItem.getUnitPrice()));
|
|
|
+ //depotItem.setAllPrice(rowObj.getBigDecimal("allPrice"));
|
|
|
}
|
|
|
if (StringUtil.isExist(rowObj.get("depotId"))) {
|
|
|
depotItem.setDepotId(rowObj.getLong("depotId"));
|
|
@@ -709,14 +714,21 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
|
|
|
String.format(ExceptionConstants.DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG));
|
|
|
}
|
|
|
}
|
|
|
+ //税率
|
|
|
if (StringUtil.isExist(rowObj.get("taxRate"))) {
|
|
|
depotItem.setTaxRate(rowObj.getBigDecimal("taxRate"));
|
|
|
}
|
|
|
+ //税额
|
|
|
if (StringUtil.isExist(rowObj.get("taxMoney"))) {
|
|
|
- depotItem.setTaxMoney(rowObj.getBigDecimal("taxMoney"));
|
|
|
+ //单价总金额*税率
|
|
|
+ depotItem.setTaxMoney(depotItem.getAllPrice().multiply(depotItem.getTaxRate()));
|
|
|
+ //depotItem.setTaxMoney(rowObj.getBigDecimal("taxMoney"));
|
|
|
}
|
|
|
+ //价税合计
|
|
|
if (StringUtil.isExist(rowObj.get("taxLastMoney"))) {
|
|
|
- depotItem.setTaxLastMoney(rowObj.getBigDecimal("taxLastMoney"));
|
|
|
+ //单价总额 + 税额
|
|
|
+ depotItem.setTaxLastMoney(depotItem.getAllPrice().add(depotItem.getTaxMoney()));
|
|
|
+ //depotItem.setTaxLastMoney(rowObj.getBigDecimal("taxLastMoney"));
|
|
|
}
|
|
|
if (StringUtil.isExist(rowObj.get("mType"))) {
|
|
|
depotItem.setMaterialType(rowObj.getString("mType"));
|