|
@@ -421,4 +421,40 @@ public class FadGoods extends Controller {
|
|
|
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
|
+
|
|
|
+ @API(title = "经销商调整商品", apiversion = R.ID2024060715503002.v1.class)
|
|
|
+ public String adjustList() throws YosException {
|
|
|
+
|
|
|
+ StringBuffer where = new StringBuffer(" 1=1 ");
|
|
|
+ if (content.containsKey("where")) {
|
|
|
+ JSONObject whereObject = content.getJSONObject("where");
|
|
|
+ if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
|
|
|
+ where.append(" and (");
|
|
|
+ where.append("t2.enterprisename like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (whereObject.containsKey("isonsale") && !"".equals(whereObject.getString("isonsale"))) {
|
|
|
+ where.append(" and (");
|
|
|
+ where.append("t1.isonsale ='").append(whereObject.getString("isonsale")).append("' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ Long sa_fadid = content.getLongValue("sa_fadid");
|
|
|
+
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_fadadjust").setTableAlias("t1");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise", "t2", "t2.sys_enterpriseid=t1.sys_enterpriseid and t2.siteid=t1.siteid",
|
|
|
+ "enterprisename");
|
|
|
+ querySQL.setPage(pageSize, pageNumber);
|
|
|
+ querySQL.setWhere(where.toString());
|
|
|
+ querySQL.setWhere("sa_fadid", sa_fadid);
|
|
|
+ querySQL.setSiteid(siteid);
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|