|
@@ -2207,6 +2207,15 @@ public class Order extends Controller {
|
|
|
dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid, sa_accountclassid, sys_enterpriseid));
|
|
|
rows = getOrderRows(this, sa_orderid);
|
|
|
row = rows.get(0);
|
|
|
+ }else{
|
|
|
+ if(isJSONArray(row.getString("sa_accountclassinfos"))){
|
|
|
+ JSONArray jsonArrayResult = JSONArray.parseArray(row.getString("sa_accountclassinfos"));
|
|
|
+ if(jsonArrayResult.isEmpty()){
|
|
|
+ dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid, sa_accountclassid, sys_enterpriseid));
|
|
|
+ rows = getOrderRows(this, sa_orderid);
|
|
|
+ row = rows.get(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//System.out.println(rows.get(0).getString("sa_accountclassinfos"));
|
|
@@ -2313,6 +2322,15 @@ public class Order extends Controller {
|
|
|
dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid, sa_accountclassid, sys_enterpriseid));
|
|
|
rows = getOrderRows(this, sa_orderid);
|
|
|
row = rows.get(0);
|
|
|
+ }else{
|
|
|
+ if(isJSONArray(row.getString("sa_accountclassinfos"))){
|
|
|
+ JSONArray jsonArrayResult = JSONArray.parseArray(row.getString("sa_accountclassinfos"));
|
|
|
+ if(jsonArrayResult.isEmpty()){
|
|
|
+ dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid, sa_accountclassid, sys_enterpriseid));
|
|
|
+ rows = getOrderRows(this, sa_orderid);
|
|
|
+ row = rows.get(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal amount = beans.order.Order.getAmount(this, sa_orderid);
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
@@ -3434,6 +3452,14 @@ public class Order extends Controller {
|
|
|
if (StringUtils.isBlank(orderRow.get(0).getString("sa_accountclassinfos"))) {
|
|
|
dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid, sa_accountclassid, sys_enterpriseid));
|
|
|
orderRow = getOrderRows(this, sa_orderid);
|
|
|
+ }else{
|
|
|
+ if(isJSONArray(orderRow.get(0).getString("sa_accountclassinfos"))){
|
|
|
+ JSONArray jsonArrayResult = JSONArray.parseArray(orderRow.get(0).getString("sa_accountclassinfos"));
|
|
|
+ if(jsonArrayResult.isEmpty()){
|
|
|
+ dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid, sa_accountclassid, sys_enterpriseid));
|
|
|
+ orderRow = getOrderRows(this, sa_orderid);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if (dbConnect.runSqlQuery("SELECT 1 from sa_dispatch t1 left join sa_dispatch_items t2 on t1.sa_dispatchid=t2.sa_dispatchid and t1.siteid=t2.siteid left join sa_orderitems t3 on t2.sa_orderitemsid=t3.sa_orderitemsid and t2.siteid=t3.siteid WHERE t1.status not in ('关闭','手工关闭') and t1.siteid='" + siteid + "' and t3.sa_orderid=" + sa_orderid).isNotEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("存在未关闭的发货单,无法关闭").toString();
|