汇率计算合同金额
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.oa.domain.vo;
|
package com.ruoyi.oa.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -12,14 +13,19 @@ public class ProjectProfitLossVO {
|
|||||||
private String projectNum;
|
private String projectNum;
|
||||||
private Date beginTime;
|
private Date beginTime;
|
||||||
private String projectStatus;
|
private String projectStatus;
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private BigDecimal originalFunds; // 原始合同金额
|
private BigDecimal originalFunds; // 原始合同金额
|
||||||
private String projectRemark; // 项目备注(用于判断币种)
|
private String projectRemark; // 项目备注(用于判断币种)
|
||||||
private BigDecimal contractAmountUsd; // 美元合同金额
|
private BigDecimal contractAmountUsd; // 美元合同金额
|
||||||
private Integer isUsd; // 是否美元(1是,0否)
|
private Integer isUsd; // 是否美元(1是,0否)
|
||||||
private BigDecimal exchangeRate; // 实时汇率
|
private BigDecimal exchangeRate; // 实时汇率
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private BigDecimal contractAmountCny; // 人民币合同金额
|
private BigDecimal contractAmountCny; // 人民币合同金额
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private BigDecimal warehouseCost;
|
private BigDecimal warehouseCost;
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private BigDecimal hrCost;
|
private BigDecimal hrCost;
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private BigDecimal profitLoss; //盈亏金额
|
private BigDecimal profitLoss; //盈亏金额
|
||||||
// ...其他字段
|
// ...其他字段
|
||||||
// getter/setter
|
// getter/setter
|
||||||
|
|||||||
@@ -857,8 +857,10 @@
|
|||||||
a.project_id,
|
a.project_id,
|
||||||
SUM(
|
SUM(
|
||||||
CASE
|
CASE
|
||||||
WHEN a.hour > 0 THEN a.hour * u.labor_cost
|
-- 当小时数存在时,使用日薪/8计算小时薪资
|
||||||
ELSE a.day_length * 8 * u.labor_cost
|
WHEN a.hour > 0 THEN a.hour * (COALESCE(u.labor_cost, 0) DIV 8)
|
||||||
|
-- 当日数存在时,使用日薪×天数
|
||||||
|
ELSE a.day_length * COALESCE(u.labor_cost, 0)
|
||||||
END
|
END
|
||||||
) AS total_hr_cost
|
) AS total_hr_cost
|
||||||
FROM
|
FROM
|
||||||
|
|||||||
Reference in New Issue
Block a user