|
@@ -2294,7 +2294,8 @@ public class Order extends Controller {
|
|
|
Long pay_enterpriseid = row.getLong("pay_enterpriseid");
|
|
Long pay_enterpriseid = row.getLong("pay_enterpriseid");
|
|
|
if (pay_enterpriseid <= 0) {
|
|
if (pay_enterpriseid <= 0) {
|
|
|
dbConnect.runSqlUpdate("UPDATE sa_order set pay_enterpriseid=sys_enterpriseid WHERE sa_orderid=" + sa_orderid);
|
|
dbConnect.runSqlUpdate("UPDATE sa_order set pay_enterpriseid=sys_enterpriseid WHERE sa_orderid=" + sa_orderid);
|
|
|
-// return getErrReturnObject().setErrMsg("请选择结算企业").toString();
|
|
|
|
|
|
|
+ pay_enterpriseid=row.getLong("sys_enterpriseid");
|
|
|
|
|
+ // return getErrReturnObject().setErrMsg("请选择结算企业").toString();
|
|
|
}
|
|
}
|
|
|
Long sys_enterprise_financeid = row.getLong("sys_enterprise_financeid");
|
|
Long sys_enterprise_financeid = row.getLong("sys_enterprise_financeid");
|
|
|
if (sys_enterprise_financeid <= 0) {
|
|
if (sys_enterprise_financeid <= 0) {
|
|
@@ -2666,18 +2667,21 @@ public class Order extends Controller {
|
|
|
Accountbalance.remindSend(this, pay_enterpriseid, sa_cashbillid);
|
|
Accountbalance.remindSend(this, pay_enterpriseid, sa_cashbillid);
|
|
|
}
|
|
}
|
|
|
Rows agentrows = dbConnect.runSqlQuery("select submitautocheck from sa_agents where sys_enterpriseid=" + sys_enterpriseid);
|
|
Rows agentrows = dbConnect.runSqlQuery("select submitautocheck from sa_agents where sys_enterpriseid=" + sys_enterpriseid);
|
|
|
|
|
+ if (!Accountbalance.judgeBalance(this, pay_enterpriseid, sa_accountclassid, amount)) {
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
if (agentrows.isNotEmpty()) {
|
|
if (agentrows.isNotEmpty()) {
|
|
|
if (agentrows.get(0).getBoolean("submitautocheck")) {
|
|
if (agentrows.get(0).getBoolean("submitautocheck")) {
|
|
|
Rows orderRows = dbConnect.runSqlQuery("select * from sa_order where sa_orderid="+sa_orderid+" and ifnull(remarks,'')!=''");
|
|
Rows orderRows = dbConnect.runSqlQuery("select * from sa_order where sa_orderid="+sa_orderid+" and ifnull(remarks,'')!=''");
|
|
|
Rows orderdetailsRows = dbConnect.runSqlQuery("select * from sa_orderitems where sa_orderid="+sa_orderid+" and ifnull(remarks,'')!=''");
|
|
Rows orderdetailsRows = dbConnect.runSqlQuery("select * from sa_orderitems where sa_orderid="+sa_orderid+" and ifnull(remarks,'')!=''");
|
|
|
if(amount.compareTo(BigDecimal.ZERO)>0){
|
|
if(amount.compareTo(BigDecimal.ZERO)>0){
|
|
|
if(orderRows.isEmpty() && orderdetailsRows.isEmpty()){
|
|
if(orderRows.isEmpty() && orderdetailsRows.isEmpty()){
|
|
|
- String result = check();
|
|
|
|
|
- if(result.contains("成功")){
|
|
|
|
|
- dbConnect.runSqlUpdate("update sa_order set checkby='自动审核' where sa_orderid="+sa_orderid);
|
|
|
|
|
|
|
+ if (Accountbalance.judgeBalance(this, pay_enterpriseid, sa_accountclassid, amount)) {
|
|
|
|
|
+ String result = check();
|
|
|
|
|
+ if(result.contains("成功")){
|
|
|
|
|
+ dbConnect.runSqlUpdate("update sa_order set checkby='自动审核' where sa_orderid="+sa_orderid);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|