|
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
|
import common.annotation.API;
|
|
|
+import common.annotation.Param;
|
|
|
import common.data.QuerySQL;
|
|
|
import common.data.Rows;
|
|
|
import common.data.SQLFactory;
|
|
|
@@ -31,12 +32,26 @@ public class invbal extends Controller {
|
|
|
public String sys_enterprise_invbal_total_querylist() throws YosException {
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "总仓库存查询");
|
|
|
sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_enterprise_item", "itemno", "itemname", "model", "safeqty", "spec").setTableAlias("t10");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_enterprise_item", "itemid", "itemno", "itemname", "model", "safeqty", "spec").setTableAlias("t10");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "plm_item", "t11", "t10.itemid=t11.itemid", "topclassnum");
|
|
|
- querySQL.addJoinTable(JOINTYPE.inner, sqlFactory, "t12", "t10.sys_enterprise_itemid=t2.sys_enterprise_itemid", "icqty", "undeliqty", "unreceiveqty", "willoutqty");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, sqlFactory, "t12", "t10.sys_enterprise_itemid=t2.sys_enterprise_itemid", "icqty", "undeliqty", "unreceiveqty", "willoutqty");
|
|
|
querySQL.setWhere("t10.sys_enterpriseid", sys_enterpriseid);
|
|
|
Rows icrows = querySQL.query();
|
|
|
return getSucReturnObject().setData(icrows).toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "美大CRM_经销商_总仓库存序列号查询", type = API.Type.PageQuery, apiversion = R.ID2026033015555101.v1.class, params = {
|
|
|
+ @Param(paramname = "itemid", fieldtype = FieldType.BigInt, remarks = "商品ID", isrequired = true)})
|
|
|
+ public String sa_itemsku_querylist() throws YosException {
|
|
|
+ long itemid = content.getLong("itemid");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_itemsku", "sku").setTableAlias("t1");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.inner, "st_stock", "t2", "t1.stockid=t2.stockid and t2.stockno='00'");
|
|
|
+ querySQL.setWhere("t1.itemid", itemid);
|
|
|
+ querySQL.setWhere("t1.sys_enterpriseid", sys_enterpriseid);
|
|
|
+ querySQL.setSiteid(siteid);
|
|
|
+ querySQL.setPage(pageSize, pageNumber);
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|