|
@@ -141,15 +141,27 @@ public class OrderCommonService {
|
|
|
});
|
|
|
// 拼接运费信息--联合丽格
|
|
|
if (null != order.getColdChina()) {
|
|
|
+ String open = "";
|
|
|
+ String close = "";
|
|
|
+ if (order.getIsColdChina()==1) {
|
|
|
+ open = "(";
|
|
|
+ close = ")";
|
|
|
+ } else if (!arrList.stream().allMatch(c -> c == 1)) {
|
|
|
+ open = "(";
|
|
|
+ close = ")";
|
|
|
+ } else {
|
|
|
+ open = "";
|
|
|
+ close = "";
|
|
|
+ }
|
|
|
if (-1 == order.getPostageFlag()) {
|
|
|
// 到付
|
|
|
- order.setPostageInfo("¥" + order.getPostage().doubleValue() + "("+(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?")":" 其他: 到付)"));
|
|
|
+ order.setPostageInfo("¥" + order.getPostage().doubleValue() + open +(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?"":" 其他: 到付")+close);
|
|
|
} else if (0 == order.getPostageFlag()) {
|
|
|
// 包邮
|
|
|
- order.setPostageInfo("¥" + order.getPostage().doubleValue() + "("+(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?")":" 其他: 包邮)"));
|
|
|
+ order.setPostageInfo("¥" + order.getPostage().doubleValue() + open +(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?"":" 其他: 包邮")+close);
|
|
|
} else {
|
|
|
// 有运费
|
|
|
- order.setPostageInfo("¥" + order.getPostage().doubleValue() + "("+(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (!arrList.stream().allMatch(c -> c == 1)?" 其他: ¥" + MathUtil.sub(order.getPostage(), order.getColdChina()).doubleValue():")") + ")");
|
|
|
+ order.setPostageInfo("¥" + order.getPostage().doubleValue() + open +(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (!arrList.stream().allMatch(c -> c == 1)?" 其他: ¥" + MathUtil.sub(order.getPostage(), order.getColdChina()).doubleValue():"") + close);
|
|
|
}
|
|
|
} else {
|
|
|
order.setPostageInfo(order.getPostage().doubleValue() == -1?"到付":order.getPostageFlag() == 0?"包邮":"¥" + order.getPostage().doubleValue());
|