|
|
@@ -51,7 +51,7 @@ public class Order extends Controller {
|
|
|
@CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
|
|
|
public String insertOrUpdate() throws YosException {
|
|
|
|
|
|
- ArrayList<String> sqlList =new ArrayList<>();
|
|
|
+ ArrayList<String> sqlList = new ArrayList<>();
|
|
|
//表名
|
|
|
String tableName = "sa_order";
|
|
|
Long sa_orderid = content.getLong("sa_orderid");
|
|
|
@@ -107,10 +107,10 @@ public class Order extends Controller {
|
|
|
//营销账户类型ID
|
|
|
if ((type.equals("标准订单") || type.equals("特殊订单")) && content.getString("tradefield").equals("整装工程")) {
|
|
|
sqlFactory.addParameter("sa_accountclassid", "69");
|
|
|
- sqlList.addAll(updateAccountclassinfos(sa_orderid,69,sys_enterpriseid));
|
|
|
+ sqlList.addAll(updateAccountclassinfos(sa_orderid, 69, sys_enterpriseid));
|
|
|
} else {
|
|
|
sqlFactory.addParameter("sa_accountclassid", beans.order.Order.getDefaultAccount(siteid, type));
|
|
|
- sqlList.addAll(updateAccountclassinfos(sa_orderid,beans.order.Order.getDefaultAccount(siteid, type),sys_enterpriseid));
|
|
|
+ sqlList.addAll(updateAccountclassinfos(sa_orderid, beans.order.Order.getDefaultAccount(siteid, type), sys_enterpriseid));
|
|
|
}
|
|
|
//品牌ID
|
|
|
sqlFactory.addParameter("sa_brandid", sa_brandid);
|
|
|
@@ -166,27 +166,27 @@ public class Order extends Controller {
|
|
|
} else {
|
|
|
sqlFactory.addParameter("billdate", billdate);
|
|
|
}
|
|
|
- if(content.containsKey("sa_accountclassid")){
|
|
|
+ if (content.containsKey("sa_accountclassid")) {
|
|
|
sqlFactory.addParameter("sa_accountclassid", content.getLongValue("sa_accountclassid"));
|
|
|
- sqlList.addAll(updateAccountclassinfos(sa_orderid,content.getLongValue("sa_accountclassid"),sys_enterpriseid));
|
|
|
+ sqlList.addAll(updateAccountclassinfos(sa_orderid, content.getLongValue("sa_accountclassid"), sys_enterpriseid));
|
|
|
}
|
|
|
} else {
|
|
|
//订单更新时
|
|
|
- if(content.getLongValue("sa_accountclassid")!=0){
|
|
|
+ if (content.getLongValue("sa_accountclassid") != 0) {
|
|
|
Rows accountclassRows = dbConnect
|
|
|
.runSqlQuery(
|
|
|
"select accountno,accountname from sa_accountclass where sa_accountclassid=" + content.getLongValue("sa_accountclassid"));
|
|
|
- if(accountclassRows.isNotEmpty()){
|
|
|
- if(accountclassRows.get(0).getString("accountname").equals("物料账户")){
|
|
|
- Rows wuliaoRows = dbConnect.runSqlQuery("select * from sa_orderitems t1 where exists(select 1 from sa_itemsaleclass t left join plm_itemclass t2 on t.itemclassid=t2.itemclassid and t.siteid=t2.siteid where t.itemid=t1.itemid and t2.itemclassname='物料') and t1.sa_orderid="+sa_orderid);
|
|
|
- Rows itemRows = dbConnect.runSqlQuery("select * from sa_orderitems where sa_orderid="+sa_orderid);
|
|
|
- if(wuliaoRows.size()!=itemRows.size()){
|
|
|
+ if (accountclassRows.isNotEmpty()) {
|
|
|
+ if (accountclassRows.get(0).getString("accountname").equals("物料账户")) {
|
|
|
+ Rows wuliaoRows = dbConnect.runSqlQuery("select * from sa_orderitems t1 where exists(select 1 from sa_itemsaleclass t left join plm_itemclass t2 on t.itemclassid=t2.itemclassid and t.siteid=t2.siteid where t.itemid=t1.itemid and t2.itemclassname='物料') and t1.sa_orderid=" + sa_orderid);
|
|
|
+ Rows itemRows = dbConnect.runSqlQuery("select * from sa_orderitems where sa_orderid=" + sa_orderid);
|
|
|
+ if (wuliaoRows.size() != itemRows.size()) {
|
|
|
return getErrReturnObject().setErrMsg("物料账户只能添加物料商品,请检查").toString();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
sqlFactory.addParameter("sa_accountclassid", content.getLongValue("sa_accountclassid"));
|
|
|
- sqlList.addAll(updateAccountclassinfos(sa_orderid, content.getLongValue("sa_accountclassid"),sys_enterpriseid));
|
|
|
+ sqlList.addAll(updateAccountclassinfos(sa_orderid, content.getLongValue("sa_accountclassid"), sys_enterpriseid));
|
|
|
}
|
|
|
if (billdate.equals("")) {
|
|
|
sqlFactory.addParameter_SQL("billdate", "createdate");
|
|
|
@@ -218,7 +218,7 @@ public class Order extends Controller {
|
|
|
@API(title = "购物车转化订单", apiversion = R.ID20221128183202.v1.class)
|
|
|
@CACHEING_CLEAN(apiClass = {Order.class, OrderItems.class, restcontroller.sale.order.Order.class})
|
|
|
public String ship() throws YosException {
|
|
|
- ArrayList<String> sqlList1 =new ArrayList<>();
|
|
|
+ ArrayList<String> sqlList1 = new ArrayList<>();
|
|
|
Long istool = content.getLongValue("istool");
|
|
|
Long sa_brandid = 0L;
|
|
|
String tradefield = content.getString("tradefield");
|
|
|
@@ -356,9 +356,9 @@ public class Order extends Controller {
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
|
|
|
if ((type.equals("标准订单") || type.equals("特殊订单")) && content.getString("tradefield").equals("整装工程")) {
|
|
|
- sqlList1.addAll(updateAccountclassinfos(sa_orderid,69,sys_enterpriseid));
|
|
|
+ sqlList1.addAll(updateAccountclassinfos(sa_orderid, 69, sys_enterpriseid));
|
|
|
} else {
|
|
|
- sqlList1.addAll(updateAccountclassinfos(sa_orderid,beans.order.Order.getDefaultAccount(siteid, type),sys_enterpriseid));
|
|
|
+ sqlList1.addAll(updateAccountclassinfos(sa_orderid, beans.order.Order.getDefaultAccount(siteid, type), sys_enterpriseid));
|
|
|
}
|
|
|
|
|
|
dbConnect.runSqlUpdate(sqlList1);
|
|
|
@@ -438,6 +438,7 @@ public class Order extends Controller {
|
|
|
sqlFactory.addParameter("sa_orderid", sa_orderid);
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
+ System.err.println(sqlFactory.getSQL());
|
|
|
//查询数据:amount,defaultamount,qty,writeoffamount,invoiceamount
|
|
|
ArrayList<Long> sa_orderids = rows.toArrayList("sa_orderid", new ArrayList<>());
|
|
|
sqlFactory = new SQLFactory(this, "订单_查询数据");
|
|
|
@@ -771,7 +772,6 @@ public class Order extends Controller {
|
|
|
rows.getFieldList().remove("salename");
|
|
|
|
|
|
|
|
|
-
|
|
|
//添加
|
|
|
rows.getFieldList().add("amount");
|
|
|
rows.getFieldList().add("qty");
|
|
|
@@ -785,7 +785,7 @@ public class Order extends Controller {
|
|
|
//查询订单列表(管理端)
|
|
|
public QuerySQL queryListManage(String where) throws YosException {
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_order",
|
|
|
- "sa_orderid","sonum","type","status","submitdate","checkdate","remarks","createby","checkby","billdate","tradefield");
|
|
|
+ "sa_orderid", "sonum", "type", "status", "submitdate", "checkdate", "remarks", "createby", "checkby", "billdate", "tradefield");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t2", "t2.sys_enterpriseid = t1.sys_enterpriseid and t2.siteid = t1.siteid",
|
|
|
"enterprisename");
|
|
|
@@ -2456,9 +2456,9 @@ public class Order extends Controller {
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
content.put("sa_orderid", sa_orderid_copy);
|
|
|
|
|
|
- Rows ordercopyRows = dbConnect.runSqlQuery("select * from sa_order where siteid='"+siteid+"' and sa_orderid="+sa_orderid_copy);
|
|
|
- if(ordercopyRows.isNotEmpty()){
|
|
|
- dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid_copy,ordercopyRows.get(0).getLong("sa_accountclassid"),ordercopyRows.get(0).getLong("sys_enterpriseid")));
|
|
|
+ Rows ordercopyRows = dbConnect.runSqlQuery("select * from sa_order where siteid='" + siteid + "' and sa_orderid=" + sa_orderid_copy);
|
|
|
+ if (ordercopyRows.isNotEmpty()) {
|
|
|
+ dbConnect.runSqlUpdate(updateAccountclassinfos(sa_orderid_copy, ordercopyRows.get(0).getLong("sa_accountclassid"), ordercopyRows.get(0).getLong("sys_enterpriseid")));
|
|
|
}
|
|
|
|
|
|
return selectDetail();
|
|
|
@@ -2855,97 +2855,97 @@ public class Order extends Controller {
|
|
|
/**
|
|
|
* 更新订单扣款信息
|
|
|
*/
|
|
|
- public ArrayList<String> updateAccountclassinfos(Long sa_orderid,long sa_accountclassid,long sys_enterpriseid) throws YosException {
|
|
|
+ public ArrayList<String> updateAccountclassinfos(Long sa_orderid, long sa_accountclassid, long sys_enterpriseid) throws YosException {
|
|
|
|
|
|
Rows orderRows = getOrderRows(this, sa_orderid);
|
|
|
- ArrayList<String> sqlList =new ArrayList<>();
|
|
|
+ ArrayList<String> sqlList = new ArrayList<>();
|
|
|
|
|
|
// if (orderRows.isEmpty()) {
|
|
|
// System.out.println(111111);
|
|
|
// return sqlList;
|
|
|
// }
|
|
|
- JSONArray jsonArray =new JSONArray();
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
BigDecimal orderSumamount = BigDecimal.ZERO;
|
|
|
- Rows classamountrows = dbConnect.runSqlQuery("select t2.marketingcategory topitemclassid,t1.siteid,sum(ifnull(t1.amount,0)) sumamount from sa_orderitems t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.sa_orderid='"+sa_orderid+"' and t1.siteid='"+siteid+"' group by t2.marketingcategory,t1.siteid");
|
|
|
- for (Row classamountrow:classamountrows) {
|
|
|
- orderSumamount=orderSumamount.add(classamountrow.getBigDecimal("sumamount"));
|
|
|
+ Rows classamountrows = dbConnect.runSqlQuery("select t2.marketingcategory topitemclassid,t1.siteid,sum(ifnull(t1.amount,0)) sumamount from sa_orderitems t1 inner join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.sa_orderid='" + sa_orderid + "' and t1.siteid='" + siteid + "' group by t2.marketingcategory,t1.siteid");
|
|
|
+ for (Row classamountrow : classamountrows) {
|
|
|
+ orderSumamount = orderSumamount.add(classamountrow.getBigDecimal("sumamount"));
|
|
|
}
|
|
|
- if(orderSumamount.compareTo(getAmount(this,sa_orderid))!=0){
|
|
|
+ if (orderSumamount.compareTo(getAmount(this, sa_orderid)) != 0) {
|
|
|
System.out.println(22222);
|
|
|
return sqlList;
|
|
|
}
|
|
|
|
|
|
- RowsMap classamountrowsMap =classamountrows.toRowsMap("topitemclassid");
|
|
|
- Rows accountclassrows =dbConnect.runSqlQuery("select t1.*,ifnull(t2.balance,0) balance,ifnull(t2.creditquota,0) creditquota from sa_accountclass t1 left join sa_accountbalance t2 on t1.sa_accountclassid=t2.sa_accountclassid and t1.siteid=t2.siteid and t2.sys_enterpriseid="+(sys_enterpriseid==0?orderRows.get(0).getLong("pay_enterpriseid"):sys_enterpriseid)+" where isused=1 and t1.siteid='"+siteid+"'");
|
|
|
+ RowsMap classamountrowsMap = classamountrows.toRowsMap("topitemclassid");
|
|
|
+ Rows accountclassrows = dbConnect.runSqlQuery("select t1.*,ifnull(t2.balance,0) balance,ifnull(t2.creditquota,0) creditquota from sa_accountclass t1 left join sa_accountbalance t2 on t1.sa_accountclassid=t2.sa_accountclassid and t1.siteid=t2.siteid and t2.sys_enterpriseid=" + (sys_enterpriseid == 0 ? orderRows.get(0).getLong("pay_enterpriseid") : sys_enterpriseid) + " where isused=1 and t1.siteid='" + siteid + "'");
|
|
|
BigDecimal firstpayamount = BigDecimal.ZERO;
|
|
|
|
|
|
|
|
|
- if(!accountclassrows.isEmpty()){
|
|
|
- for (Row row:accountclassrows) {
|
|
|
- BigDecimal sumamount =BigDecimal.ZERO;
|
|
|
- JSONObject jsonObject =new JSONObject();
|
|
|
- if(row.getJSONArray("bindingcategories")!=null && !row.getJSONArray("bindingcategories").isEmpty()){
|
|
|
- for (Object object:row.getJSONArray("bindingcategories")) {
|
|
|
+ if (!accountclassrows.isEmpty()) {
|
|
|
+ for (Row row : accountclassrows) {
|
|
|
+ BigDecimal sumamount = BigDecimal.ZERO;
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ if (row.getJSONArray("bindingcategories") != null && !row.getJSONArray("bindingcategories").isEmpty()) {
|
|
|
+ for (Object object : row.getJSONArray("bindingcategories")) {
|
|
|
Long topitemclassid = Long.valueOf(object.toString());
|
|
|
- if(classamountrowsMap.containsKey(object.toString())){
|
|
|
- if(classamountrowsMap.get(object.toString()).isNotEmpty()){
|
|
|
- sumamount=sumamount.add(classamountrowsMap.get(object.toString()).get(0).getBigDecimal("sumamount").multiply(row.getBigDecimal("maximumdiscount")).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
+ if (classamountrowsMap.containsKey(object.toString())) {
|
|
|
+ if (classamountrowsMap.get(object.toString()).isNotEmpty()) {
|
|
|
+ sumamount = sumamount.add(classamountrowsMap.get(object.toString()).get(0).getBigDecimal("sumamount").multiply(row.getBigDecimal("maximumdiscount")).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(sumamount.compareTo(BigDecimal.ZERO)>0){
|
|
|
- if((row.getBigDecimal("balance").add(row.getBigDecimal("creditquota"))).compareTo(BigDecimal.ZERO)<=0){
|
|
|
+ if (sumamount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ if ((row.getBigDecimal("balance").add(row.getBigDecimal("creditquota"))).compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
continue;
|
|
|
- }else if((row.getBigDecimal("balance").add(row.getBigDecimal("creditquota"))).compareTo(sumamount)<0){
|
|
|
+ } else if ((row.getBigDecimal("balance").add(row.getBigDecimal("creditquota"))).compareTo(sumamount) < 0) {
|
|
|
//部分优先账户扣款,部分现金扣款
|
|
|
- jsonObject.put("amount",row.getBigDecimal("balance").add(row.getBigDecimal("creditquota")));
|
|
|
- jsonObject.put("sa_accountclassid",row.getLong("sa_accountclassid"));
|
|
|
- jsonObject.put("accountname",row.getString("accountname"));
|
|
|
- jsonObject.put("balance",row.getBigDecimal("balance"));
|
|
|
- jsonObject.put("creditquota",row.getBigDecimal("creditquota"));
|
|
|
+ jsonObject.put("amount", row.getBigDecimal("balance").add(row.getBigDecimal("creditquota")));
|
|
|
+ jsonObject.put("sa_accountclassid", row.getLong("sa_accountclassid"));
|
|
|
+ jsonObject.put("accountname", row.getString("accountname"));
|
|
|
+ jsonObject.put("balance", row.getBigDecimal("balance"));
|
|
|
+ jsonObject.put("creditquota", row.getBigDecimal("creditquota"));
|
|
|
jsonArray.add(jsonObject);
|
|
|
- firstpayamount=firstpayamount.add(row.getBigDecimal("balance").add(row.getBigDecimal("creditquota")));
|
|
|
+ firstpayamount = firstpayamount.add(row.getBigDecimal("balance").add(row.getBigDecimal("creditquota")));
|
|
|
|
|
|
- }else if((row.getBigDecimal("balance").add(row.getBigDecimal("creditquota"))).compareTo(sumamount)>=0){
|
|
|
+ } else if ((row.getBigDecimal("balance").add(row.getBigDecimal("creditquota"))).compareTo(sumamount) >= 0) {
|
|
|
//全部优先账户扣款
|
|
|
- jsonObject.put("amount",sumamount);
|
|
|
- jsonObject.put("sa_accountclassid",row.getLong("sa_accountclassid"));
|
|
|
- jsonObject.put("accountname",row.getString("accountname"));
|
|
|
- jsonObject.put("balance",row.getBigDecimal("balance"));
|
|
|
- jsonObject.put("creditquota",row.getBigDecimal("creditquota"));
|
|
|
+ jsonObject.put("amount", sumamount);
|
|
|
+ jsonObject.put("sa_accountclassid", row.getLong("sa_accountclassid"));
|
|
|
+ jsonObject.put("accountname", row.getString("accountname"));
|
|
|
+ jsonObject.put("balance", row.getBigDecimal("balance"));
|
|
|
+ jsonObject.put("creditquota", row.getBigDecimal("creditquota"));
|
|
|
jsonArray.add(jsonObject);
|
|
|
- firstpayamount=firstpayamount.add(sumamount);
|
|
|
+ firstpayamount = firstpayamount.add(sumamount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(getAmount(this,sa_orderid).compareTo(BigDecimal.ZERO)==0){
|
|
|
- Rows xianjinaccountclassrows =dbConnect.runSqlQuery("select t1.*,ifnull(t2.balance,0) balance,ifnull(t2.creditquota,0) creditquota from sa_accountclass t1 left join sa_accountbalance t2 on t1.sa_accountclassid=t2.sa_accountclassid and t1.siteid=t2.siteid and t2.sys_enterpriseid="+(sys_enterpriseid==0?orderRows.get(0).getLong("pay_enterpriseid"):sys_enterpriseid)+" where isorder=1 and isused=1 and t1.sa_accountclassid="+(sa_accountclassid==0?orderRows.get(0).getLong("sa_accountclassid"):sa_accountclassid)+" and t1.siteid='"+siteid+"'");
|
|
|
- if(xianjinaccountclassrows.isNotEmpty()){
|
|
|
- JSONObject jsonObject =new JSONObject();
|
|
|
+ if (getAmount(this, sa_orderid).compareTo(BigDecimal.ZERO) == 0) {
|
|
|
+ Rows xianjinaccountclassrows = dbConnect.runSqlQuery("select t1.*,ifnull(t2.balance,0) balance,ifnull(t2.creditquota,0) creditquota from sa_accountclass t1 left join sa_accountbalance t2 on t1.sa_accountclassid=t2.sa_accountclassid and t1.siteid=t2.siteid and t2.sys_enterpriseid=" + (sys_enterpriseid == 0 ? orderRows.get(0).getLong("pay_enterpriseid") : sys_enterpriseid) + " where isorder=1 and isused=1 and t1.sa_accountclassid=" + (sa_accountclassid == 0 ? orderRows.get(0).getLong("sa_accountclassid") : sa_accountclassid) + " and t1.siteid='" + siteid + "'");
|
|
|
+ if (xianjinaccountclassrows.isNotEmpty()) {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("amount", BigDecimal.ZERO);
|
|
|
- jsonObject.put("sa_accountclassid",xianjinaccountclassrows.get(0).getLong("sa_accountclassid"));
|
|
|
- jsonObject.put("accountname",xianjinaccountclassrows.get(0).getString("accountname"));
|
|
|
- jsonObject.put("balance",xianjinaccountclassrows.get(0).getBigDecimal("balance"));
|
|
|
- jsonObject.put("creditquota",xianjinaccountclassrows.get(0).getBigDecimal("creditquota"));
|
|
|
+ jsonObject.put("sa_accountclassid", xianjinaccountclassrows.get(0).getLong("sa_accountclassid"));
|
|
|
+ jsonObject.put("accountname", xianjinaccountclassrows.get(0).getString("accountname"));
|
|
|
+ jsonObject.put("balance", xianjinaccountclassrows.get(0).getBigDecimal("balance"));
|
|
|
+ jsonObject.put("creditquota", xianjinaccountclassrows.get(0).getBigDecimal("creditquota"));
|
|
|
jsonArray.add(jsonObject);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(orderSumamount.compareTo(firstpayamount)>0){
|
|
|
- Rows xianjinaccountclassrows =dbConnect.runSqlQuery("select t1.*,ifnull(t2.balance,0) balance,ifnull(t2.creditquota,0) creditquota from sa_accountclass t1 left join sa_accountbalance t2 on t1.sa_accountclassid=t2.sa_accountclassid and t1.siteid=t2.siteid and t2.sys_enterpriseid="+(sys_enterpriseid==0?orderRows.get(0).getLong("pay_enterpriseid"):sys_enterpriseid)+" where isorder=1 and isused=1 and t1.sa_accountclassid="+(sa_accountclassid==0?orderRows.get(0).getLong("sa_accountclassid"):sa_accountclassid)+" and t1.siteid='"+siteid+"'");
|
|
|
- if(xianjinaccountclassrows.isNotEmpty()){
|
|
|
- JSONObject jsonObject =new JSONObject();
|
|
|
+ if (orderSumamount.compareTo(firstpayamount) > 0) {
|
|
|
+ Rows xianjinaccountclassrows = dbConnect.runSqlQuery("select t1.*,ifnull(t2.balance,0) balance,ifnull(t2.creditquota,0) creditquota from sa_accountclass t1 left join sa_accountbalance t2 on t1.sa_accountclassid=t2.sa_accountclassid and t1.siteid=t2.siteid and t2.sys_enterpriseid=" + (sys_enterpriseid == 0 ? orderRows.get(0).getLong("pay_enterpriseid") : sys_enterpriseid) + " where isorder=1 and isused=1 and t1.sa_accountclassid=" + (sa_accountclassid == 0 ? orderRows.get(0).getLong("sa_accountclassid") : sa_accountclassid) + " and t1.siteid='" + siteid + "'");
|
|
|
+ if (xianjinaccountclassrows.isNotEmpty()) {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("amount", orderSumamount.subtract(firstpayamount));
|
|
|
- jsonObject.put("sa_accountclassid",xianjinaccountclassrows.get(0).getLong("sa_accountclassid"));
|
|
|
- jsonObject.put("accountname",xianjinaccountclassrows.get(0).getString("accountname"));
|
|
|
- jsonObject.put("balance",xianjinaccountclassrows.get(0).getBigDecimal("balance"));
|
|
|
- jsonObject.put("creditquota",xianjinaccountclassrows.get(0).getBigDecimal("creditquota"));
|
|
|
+ jsonObject.put("sa_accountclassid", xianjinaccountclassrows.get(0).getLong("sa_accountclassid"));
|
|
|
+ jsonObject.put("accountname", xianjinaccountclassrows.get(0).getString("accountname"));
|
|
|
+ jsonObject.put("balance", xianjinaccountclassrows.get(0).getBigDecimal("balance"));
|
|
|
+ jsonObject.put("creditquota", xianjinaccountclassrows.get(0).getBigDecimal("creditquota"));
|
|
|
jsonArray.add(jsonObject);
|
|
|
}
|
|
|
}
|
|
|
- sqlList.add("update sa_order set sa_accountclassinfos='"+jsonArray+"' where sa_orderid="+sa_orderid+" and siteid='"+siteid+"'");
|
|
|
+ sqlList.add("update sa_order set sa_accountclassinfos='" + jsonArray + "' where sa_orderid=" + sa_orderid + " and siteid='" + siteid + "'");
|
|
|
return sqlList;
|
|
|
}
|
|
|
|