|
@@ -39,36 +39,36 @@ public class OrderFeeCostPlan extends Controller {
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @API(title = "定制费用方案-绑定", apiversion = R.ID20231208134002.v1.class)
|
|
|
|
|
- public String insertOrUpdatePlan() throws YosException {
|
|
|
|
|
-
|
|
|
|
|
- Long sys_datafunctionid = content.getLongValue("sys_datafunctionid");
|
|
|
|
|
- JSONArray items = content.getJSONArray("items");
|
|
|
|
|
- ArrayList<String> sqlList = new ArrayList<>();
|
|
|
|
|
- for (Object obj : items) {
|
|
|
|
|
- JSONObject item = (JSONObject) obj;
|
|
|
|
|
- Long ownerid = item.getLongValue("ownerid");
|
|
|
|
|
- String ownertable = item.getStringValue("ownertable");
|
|
|
|
|
- Rows rows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_bind WHERE ownerid=" + ownerid + " and ownertable='" + ownertable + "'");
|
|
|
|
|
- if (rows.isEmpty()) {
|
|
|
|
|
- InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sys_datafunction_bind");
|
|
|
|
|
- insertSQL.setUniqueid(createTableID("sys_datafunction_bind"));
|
|
|
|
|
- insertSQL.setValue("ownerid", ownerid);
|
|
|
|
|
- insertSQL.setValue("ownertable", ownertable);
|
|
|
|
|
- insertSQL.setValue("sys_datafunctionid", sys_datafunctionid);
|
|
|
|
|
- sqlList.add(insertSQL.getSQL());
|
|
|
|
|
- } else {
|
|
|
|
|
- UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_datafunction_bind");
|
|
|
|
|
- updateSQL.setUniqueid(rows.get(0).getLong("sys_datafunction_bindid"));
|
|
|
|
|
- updateSQL.setValue("sys_datafunctionid", sys_datafunctionid);
|
|
|
|
|
- sqlList.add(updateSQL.getSQL());
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- dbConnect.runSqlUpdate(sqlList);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- return getSucReturnObject().toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// @API(title = "定制费用方案-绑定", apiversion = R.ID20231208134002.v1.class)
|
|
|
|
|
+// public String insertOrUpdatePlan() throws YosException {
|
|
|
|
|
+//
|
|
|
|
|
+// Long sys_datafunctionid = content.getLongValue("sys_datafunctionid");
|
|
|
|
|
+// JSONArray items = content.getJSONArray("items");
|
|
|
|
|
+// ArrayList<String> sqlList = new ArrayList<>();
|
|
|
|
|
+// for (Object obj : items) {
|
|
|
|
|
+// JSONObject item = (JSONObject) obj;
|
|
|
|
|
+// Long ownerid = item.getLongValue("ownerid");
|
|
|
|
|
+// String ownertable = item.getStringValue("ownertable");
|
|
|
|
|
+// Rows rows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_bind WHERE ownerid=" + ownerid + " and ownertable='" + ownertable + "'");
|
|
|
|
|
+// if (rows.isEmpty()) {
|
|
|
|
|
+// InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sys_datafunction_bind");
|
|
|
|
|
+// insertSQL.setUniqueid(createTableID("sys_datafunction_bind"));
|
|
|
|
|
+// insertSQL.setValue("ownerid", ownerid);
|
|
|
|
|
+// insertSQL.setValue("ownertable", ownertable);
|
|
|
|
|
+// insertSQL.setValue("sys_datafunctionid", sys_datafunctionid);
|
|
|
|
|
+// sqlList.add(insertSQL.getSQL());
|
|
|
|
|
+// } else {
|
|
|
|
|
+// UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_datafunction_bind");
|
|
|
|
|
+// updateSQL.setUniqueid(rows.get(0).getLong("sys_datafunction_bindid"));
|
|
|
|
|
+// updateSQL.setValue("sys_datafunctionid", sys_datafunctionid);
|
|
|
|
|
+// sqlList.add(updateSQL.getSQL());
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// dbConnect.runSqlUpdate(sqlList);
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// return getSucReturnObject().toString();
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
@API(title = "定制费用方案-商品列表", apiversion = R.ID20231212110202.v1.class)
|
|
@API(title = "定制费用方案-商品列表", apiversion = R.ID20231212110202.v1.class)
|
|
|
public String bindItemList() throws YosException {
|
|
public String bindItemList() throws YosException {
|
|
@@ -115,24 +115,24 @@ public class OrderFeeCostPlan extends Controller {
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @API(title = "定制费用方案-参数列表", apiversion = R.ID20231212111202.v1.class)
|
|
|
|
|
- public String queryParam() throws YosException {
|
|
|
|
|
- Long sys_datafunctionid = content.getLongValue("sys_datafunctionid");
|
|
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_datafunction",
|
|
|
|
|
- "sys_datafunctionid", "functionname", "remarks", "createdate","status");
|
|
|
|
|
- querySQL.addQueryFields("createby", "\'admin\'");
|
|
|
|
|
- querySQL.setWhere("t1.sys_datafunctionid", sys_datafunctionid);
|
|
|
|
|
- querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting).setTableAlias("t1");
|
|
|
|
|
- Rows rows = querySQL.query();
|
|
|
|
|
- if(rows.isEmpty()){
|
|
|
|
|
- return getSucReturnObject().setData(new Row()).toString();
|
|
|
|
|
- }
|
|
|
|
|
- Row detail=rows.get(0);
|
|
|
|
|
-
|
|
|
|
|
- Rows paramRows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_params WHERE issystem=1 and sys_datafunctionid=" + sys_datafunctionid);
|
|
|
|
|
- detail.put("param",paramRows);
|
|
|
|
|
- return getSucReturnObject().setData(detail).toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// @API(title = "定制费用方案-参数列表", apiversion = R.ID20231212111202.v1.class)
|
|
|
|
|
+// public String queryParam() throws YosException {
|
|
|
|
|
+// Long sys_datafunctionid = content.getLongValue("sys_datafunctionid");
|
|
|
|
|
+// QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_datafunction",
|
|
|
|
|
+// "sys_datafunctionid", "functionname", "remarks", "createdate","status");
|
|
|
|
|
+// querySQL.addQueryFields("createby", "\'admin\'");
|
|
|
|
|
+// querySQL.setWhere("t1.sys_datafunctionid", sys_datafunctionid);
|
|
|
|
|
+// querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting).setTableAlias("t1");
|
|
|
|
|
+// Rows rows = querySQL.query();
|
|
|
|
|
+// if(rows.isEmpty()){
|
|
|
|
|
+// return getSucReturnObject().setData(new Row()).toString();
|
|
|
|
|
+// }
|
|
|
|
|
+// Row detail=rows.get(0);
|
|
|
|
|
+//
|
|
|
|
|
+// Rows paramRows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_params WHERE issystem=1 and sys_datafunctionid=" + sys_datafunctionid);
|
|
|
|
|
+// detail.put("param",paramRows);
|
|
|
|
|
+// return getSucReturnObject().setData(detail).toString();
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
|
@API(title = "定制费用方案-删除绑定商品", apiversion = R.ID20231208134102.v1.class)
|
|
@API(title = "定制费用方案-删除绑定商品", apiversion = R.ID20231208134102.v1.class)
|
|
@@ -145,32 +145,32 @@ public class OrderFeeCostPlan extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @API(title = "商品定制费用方案详情", apiversion = R.ID20231208134202.v1.class)
|
|
|
|
|
- public String list() throws YosException {
|
|
|
|
|
- Long ownerid = content.getLongValue("ownerid");
|
|
|
|
|
- String ownertable = content.getStringValue("ownertable");
|
|
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_datafunction_bind");
|
|
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "sys_datafunction", "t2", "t2.sys_datafunctionid=t1.sys_datafunctionid"
|
|
|
|
|
- , "functionname", "remarks", "isused", "createdate");
|
|
|
|
|
- querySQL.setWhere("t1.ownerid", ownerid);
|
|
|
|
|
- querySQL.setWhere("t1.ownertable", ownertable);
|
|
|
|
|
- querySQL.setWhere("t1.sys_datafunctionid in (SELECT sys_datafunctionid from sys_datafunction_params WHERE param='siteid' and value='" + siteid + "')");
|
|
|
|
|
- querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting).setTableAlias("t1");
|
|
|
|
|
- Rows rows = querySQL.query();
|
|
|
|
|
-
|
|
|
|
|
- Row detailRow = new Row();
|
|
|
|
|
- if (rows.isEmpty()) {
|
|
|
|
|
- return getSucReturnObject().setData(detailRow).toString();
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- detailRow = rows.get(0);
|
|
|
|
|
- Long sys_datafunctionid = detailRow.getLong("sys_datafunctionid");
|
|
|
|
|
-
|
|
|
|
|
- Rows paramRows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_params WHERE param!='siteid' and sys_datafunctionid=" + sys_datafunctionid);
|
|
|
|
|
- detailRow.put("params", paramRows);
|
|
|
|
|
-
|
|
|
|
|
- return getSucReturnObject().setData(detailRow).toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// @API(title = "商品定制费用方案详情", apiversion = R.ID20231208134202.v1.class)
|
|
|
|
|
+// public String list() throws YosException {
|
|
|
|
|
+// Long ownerid = content.getLongValue("ownerid");
|
|
|
|
|
+// String ownertable = content.getStringValue("ownertable");
|
|
|
|
|
+// QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_datafunction_bind");
|
|
|
|
|
+// querySQL.addJoinTable(JOINTYPE.left, "sys_datafunction", "t2", "t2.sys_datafunctionid=t1.sys_datafunctionid"
|
|
|
|
|
+// , "functionname", "remarks", "isused", "createdate");
|
|
|
|
|
+// querySQL.setWhere("t1.ownerid", ownerid);
|
|
|
|
|
+// querySQL.setWhere("t1.ownertable", ownertable);
|
|
|
|
|
+// querySQL.setWhere("t1.sys_datafunctionid in (SELECT sys_datafunctionid from sys_datafunction_params WHERE param='siteid' and value='" + siteid + "')");
|
|
|
|
|
+// querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting).setTableAlias("t1");
|
|
|
|
|
+// Rows rows = querySQL.query();
|
|
|
|
|
+//
|
|
|
|
|
+// Row detailRow = new Row();
|
|
|
|
|
+// if (rows.isEmpty()) {
|
|
|
|
|
+// return getSucReturnObject().setData(detailRow).toString();
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// detailRow = rows.get(0);
|
|
|
|
|
+// Long sys_datafunctionid = detailRow.getLong("sys_datafunctionid");
|
|
|
|
|
+//
|
|
|
|
|
+// Rows paramRows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_params WHERE param!='siteid' and sys_datafunctionid=" + sys_datafunctionid);
|
|
|
|
|
+// detailRow.put("params", paramRows);
|
|
|
|
|
+//
|
|
|
|
|
+// return getSucReturnObject().setData(detailRow).toString();
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
|
@API(title = "定制费用方案-调整参数值", apiversion = R.ID20231211141802.v1.class)
|
|
@API(title = "定制费用方案-调整参数值", apiversion = R.ID20231211141802.v1.class)
|