Merge branch 'technology/rakor-w3' into technology-init-lhj1119
This commit is contained in:
commit
c96e25c487
|
|
@ -28,9 +28,9 @@ public class EBomDTO {
|
|||
private String materialUnit;
|
||||
|
||||
/**
|
||||
* 最近采购价格
|
||||
* 物料价格
|
||||
*/
|
||||
private BigDecimal lastPurchasePrice;
|
||||
private BigDecimal materialPrice;
|
||||
|
||||
/**
|
||||
* 物料分类编码
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ public class BomCostCalculateService {
|
|||
.add(auxiliaryDepartmentLaborCosts).add(assistantFee)
|
||||
.multiply(getGsForWorkingType(d, workHours, vw)));
|
||||
productionCosts.add(dto);
|
||||
if (dto.getCost().compareTo(BigDecimal.ZERO) > 0) {
|
||||
log.debug(StrUtil.format("BOM成本计算 {} 制作成本 {},价格: {}", d.getMaterialNo(), dto.getName(), dto.getCost()));
|
||||
}
|
||||
}
|
||||
return productionCosts;
|
||||
}
|
||||
|
|
@ -288,12 +291,12 @@ public class BomCostCalculateService {
|
|||
}
|
||||
|
||||
private BigDecimal calculatePurchasedPartsCost(EBomDTO dto) {
|
||||
return Optional.ofNullable(dto.getLastPurchasePrice()).orElse(BigDecimal.ZERO);
|
||||
return Optional.ofNullable(dto.getMaterialPrice()).orElse(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
private BigDecimal calculateSteelsCost(EBomDTO dto) {
|
||||
//是钢材
|
||||
BigDecimal price = Optional.ofNullable(dto.getLastPurchasePrice()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal price = Optional.ofNullable(dto.getMaterialPrice()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal unitWeight = Optional.ofNullable(dto.getNum()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal wastage = BigDecimal.ZERO;
|
||||
if (StrUtil.isNotBlank(dto.getRawMaterialGroup())) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
select m.row_id AS 'materialRowId',m.material_no AS 'materialNo',m.drawing_no AS 'drawingNo'
|
||||
,m.material_desc AS 'materialDesc',m.material_unit AS 'materialUnit'
|
||||
,CONVERT(m.material_weight, DECIMAL(12,4)) AS 'unitWeight',m.material_category_code AS
|
||||
'materialCategoryCode',m.last_purchase_price AS 'lastPurchasePrice'
|
||||
'materialCategoryCode',m.material_price AS 'materialPrice'
|
||||
,c.rel_category_code AS 'relCategoryCode',c.category_name AS 'categoryName'
|
||||
,m.raw_material_group AS 'rawMaterialGroup',m.material_stock AS 'inventory',t.plan_delivery_time AS 'leadTime'
|
||||
from t_material_main m
|
||||
|
|
|
|||
Loading…
Reference in New Issue