|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.yxt.yyth.api.appletgiftbag; |
|
|
|
|
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import lombok.Data; |
|
|
|
|
|
|
@ -32,4 +33,44 @@ public class GiftBagGoods { |
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#0.00"); |
|
|
|
return decimalFormat.format(Double.valueOf(jPrice)); |
|
|
|
} |
|
|
|
|
|
|
|
public String getMefenPrice() { |
|
|
|
double dj = 0.0; |
|
|
|
try { |
|
|
|
dj = Double.parseDouble(price); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
int js = 1; |
|
|
|
try { |
|
|
|
js = Integer.parseInt(weight); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
double mfjg = dj * js; |
|
|
|
return NumberUtil.decimalFormatMoney(mfjg); |
|
|
|
} |
|
|
|
|
|
|
|
public String getSubtotal() { |
|
|
|
double dj = 0.0; |
|
|
|
try { |
|
|
|
dj = Double.parseDouble(price); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
int js = 1; |
|
|
|
try { |
|
|
|
js = Integer.parseInt(weight); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
int fs = 1; |
|
|
|
try { |
|
|
|
fs = Integer.parseInt(goodsNumber); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
double mfjg = dj * js * fs; |
|
|
|
return NumberUtil.decimalFormatMoney(mfjg); |
|
|
|
} |
|
|
|
} |
|
|
|