|
@@ -619,7 +619,7 @@ public class Order extends Controller {
|
|
|
// Rows saleRows = dbConnect.runSqlQuery("SELECT * from sa_salearea_hr WHERE hrid = " + hrid + " and siteid='" + siteid + "'");
|
|
|
//查询定制费用
|
|
|
sql = "SELECT ifnull(sum(costamount),0) costamount from sa_order_cost WHERE sa_orderid=" + sa_orderid;
|
|
|
- BigDecimal costamount = dbConnect.runSqlQuery(0, sql).getBigDecimal("costamount");
|
|
|
+ BigDecimal costamount = dbConnect.runSqlQuery(0, sql).getBigDecimal("costamount");
|
|
|
row.put("costamount", costamount);
|
|
|
|
|
|
JSONArray jsonArray = row.getJSONArray("sa_accountclassinfos");
|
|
@@ -1404,6 +1404,26 @@ public class Order extends Controller {
|
|
|
if (sa_accountclassid <= 0) {
|
|
|
return getErrReturnObject().setErrMsg("请选择支付账号").toString();
|
|
|
}
|
|
|
+ sa_accountclassid=55l;
|
|
|
+
|
|
|
+ if (siteid.equalsIgnoreCase("CCYOSG")) {
|
|
|
+ String tradefield = row.getString("tradefield");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_optiontypemx");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.inner, "sys_optiontype", "t2", "t2.optiontypeid=t1.optiontypeid");
|
|
|
+ querySQL.setWhere("t2.typename='domainrelatedaccounts'");
|
|
|
+ querySQL.setWhere("(t1.value='" + tradefield + "' or t1.remarks='" + tradefield + "')");
|
|
|
+ querySQL.setTableAlias("t1");
|
|
|
+ Rows accountsTows=querySQL.query();
|
|
|
+ if(accountsTows.isNotEmpty()){
|
|
|
+ JSONArray subvalues=accountsTows.get(0).getJSONArray("subvalues");
|
|
|
+// JSONArray jsonArray=JSONArray.parseArray(subvalues);
|
|
|
+ if(!subvalues.contains(sa_accountclassid.toString())){
|
|
|
+ return getErrReturnObject().setErrMsg("扣款账户不对,禁止提交,请更换支付账户后提交").toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
Long sys_enterpriseid = row.getLong("sys_enterpriseid");
|
|
|
if (sys_enterpriseid <= 0) {
|
|
|
return getErrReturnObject().setErrMsg("请选择订货企业信息").toString();
|