明细计算,产品详情页
This commit is contained in:
@@ -57,6 +57,16 @@ public class GearWageEntryDetail extends BaseEntity {
|
||||
|
||||
private String extraReason;
|
||||
|
||||
/**
|
||||
* 明细计算金额(多行乘法合计)
|
||||
*/
|
||||
private BigDecimal calcAmount;
|
||||
|
||||
/**
|
||||
* 明细计算行JSON(两列乘法)
|
||||
*/
|
||||
private String calcDetail;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,10 @@ public class GearWageEntryDetailBo extends BaseEntity {
|
||||
|
||||
private String extraReason;
|
||||
|
||||
private BigDecimal calcAmount;
|
||||
|
||||
private String calcDetail;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
private String isMakeup;
|
||||
|
||||
@@ -63,6 +63,11 @@ public class GearWageEntryDetailVo {
|
||||
@ExcelProperty(value = "额外原因")
|
||||
private String extraReason;
|
||||
|
||||
@ExcelProperty(value = "明细计算金额")
|
||||
private BigDecimal calcAmount;
|
||||
|
||||
private String calcDetail;
|
||||
|
||||
@ExcelProperty(value = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
|
||||
@@ -188,6 +188,7 @@ public class GearWageEntryDetailServiceImpl implements IGearWageEntryDetailServi
|
||||
private void fillAmountFields(GearWageEntryDetail entity) {
|
||||
BigDecimal workload = entity.getWorkload() == null ? BigDecimal.ZERO : entity.getWorkload();
|
||||
BigDecimal extraAmount = entity.getExtraAmount() == null ? BigDecimal.ZERO : entity.getExtraAmount();
|
||||
BigDecimal calcAmount = entity.getCalcAmount() == null ? BigDecimal.ZERO : entity.getCalcAmount();
|
||||
|
||||
// 小时工/天工默认按1个计量单位计算基础金额(1小时或1天)
|
||||
if (("1".equals(entity.getBillingType()) || "3".equals(entity.getBillingType())) && workload.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
@@ -212,7 +213,8 @@ public class GearWageEntryDetailServiceImpl implements IGearWageEntryDetailServi
|
||||
BigDecimal baseAmount = workload.multiply(unitPrice);
|
||||
entity.setBaseAmount(baseAmount);
|
||||
entity.setExtraAmount(extraAmount);
|
||||
entity.setTotalAmount(baseAmount.add(extraAmount));
|
||||
entity.setCalcAmount(calcAmount);
|
||||
entity.setTotalAmount(baseAmount.add(extraAmount).add(calcAmount));
|
||||
}
|
||||
|
||||
private void fillMakeupFields(GearWageEntryDetail entity) {
|
||||
|
||||
Reference in New Issue
Block a user