Browse Source

20250507

java8
qiezi 8 months ago
parent
commit
8b472e2bd1
  1. 3
      src/main/java/com/xujie/sys/modules/quote/entity/QuoteDetail.java
  2. 2
      src/main/java/com/xujie/sys/modules/quote/entity/QuoteGroupDetail.java
  3. 26
      src/main/resources/mapper/quote/QuoteDetailMapper.xml
  4. 11
      src/main/resources/mapper/quote/QuoteGroupDetailMapper.xml

3
src/main/java/com/xujie/sys/modules/quote/entity/QuoteDetail.java

@ -229,6 +229,9 @@ public class QuoteDetail {
@TableField(exist = false)
private Integer decimalPlace;
@TableField(exist = false)
private BigDecimal totalCostUSD;
@TableField(exist = false)
private List<PropertyModelDetail> list;
}

2
src/main/java/com/xujie/sys/modules/quote/entity/QuoteGroupDetail.java

@ -228,6 +228,8 @@ public class QuoteGroupDetail {
private BigDecimal weighted2;
@TableField(exist = false)
private Integer decimalPlace;
@TableField(exist = false)
private BigDecimal totalCostUSD;
@TableField(exist = false)
private List<PropertyModelDetail> list;

26
src/main/resources/mapper/quote/QuoteDetailMapper.xml

@ -74,6 +74,17 @@
qd.type,
qd.quote_group_detail_id,
qd.cost_model,
CASE
WHEN ((qd.currency1 = 'USD' AND qd.exchange_rate1 > 0) OR
(qd.currency2 = 'USD' AND qd.exchange_rate2 > 0))
THEN
(qd.total_cost /
CASE
WHEN qd.currency1 = 'USD' THEN qd.exchange_rate1
ELSE qd.exchange_rate2
END)
ELSE NULL
END AS totalCostUSD,
CASE
WHEN qd.qty >= 250000 AND
((qd.currency1 = 'USD' AND qd.exchange_rate1 > 0) OR
@ -477,8 +488,8 @@
</select>
<select id="queryQuoteDetailReportTP" resultType="com.xujie.sys.modules.quote.entity.QuoteDetail">
<!-- <select id="queryQuoteDetailReportTP" resultType="java.util.LinkedHashMap">-->
<!-- exec dbo.plm_calculate_quote_detail_TP #{id}-->
<!-- <select id="queryQuoteDetailReportTP" resultType="java.util.LinkedHashMap">-->
<!-- exec dbo.plm_calculate_quote_detail_TP #{id}-->
select qd.id,
qd.quote_id,
qd.site,
@ -550,6 +561,17 @@
qd.type,
qd.quote_group_detail_id,
qd.cost_model,
CASE
WHEN ((qd.currency1 = 'USD' AND qd.exchange_rate1 > 0) OR
(qd.currency2 = 'USD' AND qd.exchange_rate2 > 0))
THEN
(qd.total_cost /
CASE
WHEN qd.currency1 = 'USD' THEN qd.exchange_rate1
ELSE qd.exchange_rate2
END)
ELSE NULL
END AS totalCostUSD,
CASE
WHEN qd.qty >= 250000 AND
((qd.currency1 = 'USD' AND qd.exchange_rate1 > 0) OR

11
src/main/resources/mapper/quote/QuoteGroupDetailMapper.xml

@ -74,6 +74,17 @@
qd.type,
qd.current_quote_detail_item_no,
qd.cost_model,
CASE
WHEN ((qd.currency1 = 'USD' AND qd.exchange_rate1 > 0) OR
(qd.currency2 = 'USD' AND qd.exchange_rate2 > 0))
THEN
(qd.total_cost /
CASE
WHEN qd.currency1 = 'USD' THEN qd.exchange_rate1
ELSE qd.exchange_rate2
END)
ELSE NULL
END AS totalCostUSD,
CASE
WHEN qd.qty >= 250000 AND
((qd.currency1 = 'USD' AND qd.exchange_rate1 > 0) OR

Loading…
Cancel
Save