提交 947de548 编写于 作者: misaka's avatar misaka

update

上级 087c0945
...@@ -10,6 +10,7 @@ import cn.ibizlab.businesscentral.core.odoo_product.domain.Product_supplierinfo; ...@@ -10,6 +10,7 @@ import cn.ibizlab.businesscentral.core.odoo_product.domain.Product_supplierinfo;
import cn.ibizlab.businesscentral.core.odoo_product.domain.Product_template; import cn.ibizlab.businesscentral.core.odoo_product.domain.Product_template;
import cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel; import cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_move_purchase_order_rel;
import cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line; import cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line;
import cn.ibizlab.businesscentral.core.odoo_purchase.filter.Purchase_order_lineSearchContext;
import cn.ibizlab.businesscentral.core.odoo_purchase.service.impl.Purchase_orderServiceImpl; import cn.ibizlab.businesscentral.core.odoo_purchase.service.impl.Purchase_orderServiceImpl;
import cn.ibizlab.businesscentral.core.odoo_uom.domain.Uom_uom; import cn.ibizlab.businesscentral.core.odoo_uom.domain.Uom_uom;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -20,6 +21,7 @@ import org.springframework.stereotype.Service; ...@@ -20,6 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import java.math.BigDecimal;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.*; import java.util.*;
...@@ -66,9 +68,9 @@ public class Purchase_orderExService extends Purchase_orderServiceImpl { ...@@ -66,9 +68,9 @@ public class Purchase_orderExService extends Purchase_orderServiceImpl {
// 获取凭证录入的ID组 // 获取凭证录入的ID组
List<Account_move_purchase_order_rel> accountMovePurchaseOrderRels = accountMovePurchaseOrderRelService.selectByPurchaseOrderId(et.getId()); List<Account_move_purchase_order_rel> accountMovePurchaseOrderRels = accountMovePurchaseOrderRelService.selectByPurchaseOrderId(et.getId());
// 这里应该为Long型, // 这里应该为Long型,
List<String> accountMoveIds = new ArrayList(); List<Long> accountMoveIds = new ArrayList();
for(Account_move_purchase_order_rel accountMovePurchaseOrderRel : accountMovePurchaseOrderRels){ for(Account_move_purchase_order_rel accountMovePurchaseOrderRel : accountMovePurchaseOrderRels){
accountMoveIds.add(accountMovePurchaseOrderRel.getAccountMoveId().toString()); accountMoveIds.add(accountMovePurchaseOrderRel.getAccountMoveId());
} }
// 通过凭证录入的ID获取对应的凭证记录 // 通过凭证录入的ID获取对应的凭证记录
List<Account_move> accountMoves = accountMoveService.getAccountMoveByIds(accountMoveIds); List<Account_move> accountMoves = accountMoveService.getAccountMoveByIds(accountMoveIds);
...@@ -322,5 +324,16 @@ public class Purchase_orderExService extends Purchase_orderServiceImpl { ...@@ -322,5 +324,16 @@ public class Purchase_orderExService extends Purchase_orderServiceImpl {
} }
return super.button_approve(et); return super.button_approve(et);
} }
@Override
public Purchase_order calc_amount(Purchase_order et) {
Purchase_order_lineSearchContext ctx = new Purchase_order_lineSearchContext() ;
ctx.setN_order_id_eq(et.getId());
Map calc = purchaseOrderLineService.searchCalc_order_amount(ctx).getContent().get(0);
et.setAmountTax(BigDecimal.valueOf((Double)calc.get("price_tax")));
et.setAmountUntaxed((BigDecimal)calc.get("price_subtotal"));
et.setAmountTotal((BigDecimal)calc.get("price_total"));
return super.calc_amount(et);
}
} }
...@@ -68,7 +68,7 @@ public class UomHelper { ...@@ -68,7 +68,7 @@ public class UomHelper {
return num / uom.getFactor(); return num / uom.getFactor();
} }
/** /**
* 转换成其他计量单位 * 转换成其他计量单位
* @param num * @param num
......
package cn.ibizlab.businesscentral.util.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class MultiSelectItem implements Serializable {
@JSONField(name = "srfmajortext")
@JsonProperty("srfmajortext")
private String srfmajortext;
@JSONField(name = "srfkey")
@JsonProperty("srfkey")
private Long srfkey ;
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册