|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.yxt.yyth.api.appletgiftbag; |
|
|
|
|
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import lombok.Data; |
|
|
|
|
|
|
@ -38,40 +39,50 @@ public class GiftBagGoods { |
|
|
|
|
|
|
|
public String getMefenPrice() { |
|
|
|
double dj = 0.0; |
|
|
|
if (StrUtil.isNotBlank(price)) { |
|
|
|
try { |
|
|
|
dj = Double.parseDouble(price); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
int js = 1; |
|
|
|
if (StrUtil.isNotBlank(weight)) { |
|
|
|
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; |
|
|
|
if (StrUtil.isNotBlank(price)) { |
|
|
|
try { |
|
|
|
dj = Double.parseDouble(price); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
int js = 1; |
|
|
|
if (StrUtil.isNotBlank(weight)) { |
|
|
|
try { |
|
|
|
js = Integer.parseInt(weight); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
int fs = 1; |
|
|
|
if (StrUtil.isNotBlank(goodsNumber)) { |
|
|
|
try { |
|
|
|
fs = Integer.parseInt(goodsNumber); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
double mfjg = dj * js * fs; |
|
|
|
return NumberUtil.decimalFormatMoney(mfjg); |
|
|
|
} |
|
|
|