|
@@ -406,24 +406,6 @@ public class NewOrderController extends BaseController {
|
|
if (!beanValidator(model, newOrder)) {
|
|
if (!beanValidator(model, newOrder)) {
|
|
return form(newOrder, model, request);
|
|
return form(newOrder, model, request);
|
|
}
|
|
}
|
|
- if (newOrder.getClubID() != null && CollectionUtils.isEmpty(newOrder.getOrderProduct())) {
|
|
|
|
- Integer firstClubType = clubDao.selFirst(newOrder.getClubID());
|
|
|
|
- List<Integer> list = new ArrayList<>();
|
|
|
|
- boolean bol = false;
|
|
|
|
- newOrder.getOrderProduct().forEach(p -> {
|
|
|
|
- list.add(p.getProductID());
|
|
|
|
- });
|
|
|
|
- List<String> machineType = clubDao.selMachineType(list);
|
|
|
|
- for (String str : machineType) {
|
|
|
|
- if ("3".equals(str)) {
|
|
|
|
- bol = true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (firstClubType == 1 && bol) {
|
|
|
|
- model.addAttribute("message", "发货商品中存在械字号三类商品,机构资质不符合,确定发货吗?");
|
|
|
|
- return form(newOrder, model, request);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
if (CollectionUtils.isEmpty(newOrder.getOrderProduct())) {
|
|
if (CollectionUtils.isEmpty(newOrder.getOrderProduct())) {
|
|
model.addAttribute("message", "保存失败商品不能为空");
|
|
model.addAttribute("message", "保存失败商品不能为空");
|
|
return form(newOrder, model, request);
|
|
return form(newOrder, model, request);
|
|
@@ -466,24 +448,7 @@ public class NewOrderController extends BaseController {
|
|
skuId = newOrderProductDao.findSkuIdByProductId(o.getProductID());
|
|
skuId = newOrderProductDao.findSkuIdByProductId(o.getProductID());
|
|
}
|
|
}
|
|
o.setSplitCode(productDao.getSplitCodeByProductId(o.getProductID()));
|
|
o.setSplitCode(productDao.getSplitCodeByProductId(o.getProductID()));
|
|
- o.setPreferential(0d);
|
|
|
|
- o.setDiscount(100d);
|
|
|
|
- o.setDiscountFee(0d);
|
|
|
|
- o.setTotalAmount(0d);
|
|
|
|
- o.setShouldPayFee(0d);
|
|
|
|
- o.setSingleShouldPayTotalTax(0d);
|
|
|
|
- o.setShouldPayTotalTax(0d);
|
|
|
|
- o.setCmFee(0d);
|
|
|
|
- o.setTotalFee(0d);
|
|
|
|
- o.setTotalAddedValueTax(0d);
|
|
|
|
- o.setAddedValueTax(0d);
|
|
|
|
- o.setTaxRate(0d);
|
|
|
|
- o.setPresentNum(0);
|
|
|
|
- o.setNotOutStore(o.getNum());
|
|
|
|
- o.setStatus(0);//订单商品待付款
|
|
|
|
- if (o.getPayStatus() == null) {
|
|
|
|
- o.setPayStatus("0"); //默认值为未付款(0 未进账 1 待财务审核 2 已进账)
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
Integer promotionsId = o.getPromotionsId() != null ? o.getPromotionsId() : 0;
|
|
Integer promotionsId = o.getPromotionsId() != null ? o.getPromotionsId() : 0;
|
|
o.setPromotionsId(promotionsId);
|
|
o.setPromotionsId(promotionsId);
|
|
@@ -518,6 +483,24 @@ public class NewOrderController extends BaseController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ o.setPreferential(0d);
|
|
|
|
+ o.setDiscount(100d);
|
|
|
|
+ o.setDiscountFee(0d);
|
|
|
|
+ o.setTotalAmount(0d);
|
|
|
|
+ o.setShouldPayFee(0d);
|
|
|
|
+ o.setSingleShouldPayTotalTax(0d);
|
|
|
|
+ o.setShouldPayTotalTax(0d);
|
|
|
|
+ o.setCmFee(0d);
|
|
|
|
+ o.setTotalFee(0d);
|
|
|
|
+ o.setTotalAddedValueTax(0d);
|
|
|
|
+ o.setAddedValueTax(0d);
|
|
|
|
+ o.setTaxRate(0d);
|
|
|
|
+ }
|
|
|
|
+ o.setPresentNum(0);
|
|
|
|
+ o.setNotOutStore(o.getNum());
|
|
|
|
+ o.setStatus(0);//订单商品待付款
|
|
|
|
+ if (o.getPayStatus() == null) {
|
|
|
|
+ o.setPayStatus("0"); //默认值为未付款(0 未进账 1 待财务审核 2 已进账)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|