|
|
@@ -1421,6 +1421,8 @@ public class Order extends Controller {
|
|
|
Row row = rows.get(0);
|
|
|
//付款账户信息
|
|
|
JSONArray accountclassinfos = row.getJSONArray("sa_accountclassinfos");
|
|
|
+ //扣款的金额
|
|
|
+ BigDecimal amount = beans.order.Order.getAmount(this, sa_orderid);
|
|
|
|
|
|
Long sa_accountclassid = row.getLong("sa_accountclassid");
|
|
|
if (sa_accountclassid <= 0) {
|
|
|
@@ -1481,7 +1483,12 @@ public class Order extends Controller {
|
|
|
return getErrReturnObject().setErrMsg("该促销活动已截止,无法提交").toString();
|
|
|
}
|
|
|
|
|
|
- Rows promotionRows = dbConnect.runSqlQuery("SELECT isauth FROM sa_promotion WHERE siteid='" + siteid + "' AND sa_promotionid='" + sa_promotionid + "'");
|
|
|
+ Rows promotionRows = dbConnect.runSqlQuery("SELECT isauth,orderminamount FROM sa_promotion WHERE siteid='" + siteid + "' AND sa_promotionid='" + sa_promotionid + "'");
|
|
|
+ if(promotionRows.isNotEmpty()){
|
|
|
+ if(amount.compareTo(promotionRows.get(0).getBigDecimal("orderminamount"))<0){
|
|
|
+ return getErrReturnObject().setErrMsg("订单未满足最低起订金额,请勿提交!").toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
if(!promotionRows.get(0).getBoolean("isauth")){
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "促销方案经销商授权区域查询");
|
|
|
sqlFactory.addParameter("sys_enterpriseid",sys_enterpriseid);
|
|
|
@@ -1563,8 +1570,7 @@ public class Order extends Controller {
|
|
|
// String type = row.getString("type");
|
|
|
//提交
|
|
|
String status = "提交";
|
|
|
- //扣款的金额
|
|
|
- BigDecimal amount = beans.order.Order.getAmount(this, sa_orderid);
|
|
|
+
|
|
|
Row enterpriseRow = Enterprise.getEnterprise(this, sys_enterpriseid);
|
|
|
BigDecimal freefreightamount = BigDecimal.ZERO;
|
|
|
if (!enterpriseRow.isEmpty()) {
|