|
|
@@ -6,10 +6,8 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
|
import common.annotation.API;
|
|
|
-import common.data.InsertSQL;
|
|
|
-import common.data.Rows;
|
|
|
-import common.data.RowsMap;
|
|
|
-import common.data.SQLFactory;
|
|
|
+import common.annotation.CACHEING;
|
|
|
+import common.data.*;
|
|
|
import org.apache.poi.hssf.record.DVALRecord;
|
|
|
import restcontroller.R;
|
|
|
|
|
|
@@ -19,6 +17,40 @@ public class dbstockbilldetailsku extends Controller {
|
|
|
public dbstockbilldetailsku(JSONObject content) throws YosException {
|
|
|
super(content);
|
|
|
}
|
|
|
+
|
|
|
+ @API(title = "调拨单明细序列号列表", apiversion = R.ID2025062411234603.v1.class)
|
|
|
+ @CACHEING
|
|
|
+ public String querydbstockbilldetailsku() throws YosException {
|
|
|
+ long st_dbstockbilldetailid=content.getLong("st_dbstockbilldetailid");
|
|
|
+ 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(" t4.itemname like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append("or t4.model like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append("or t4.spec like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append("or t1.sku like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "st_dbstockbilldetailsku", "*");
|
|
|
+ querySQL.setTableAlias("t1");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_itemsku", "t2", "t1.sku=t2.sku and t1.siteid = t2.siteid");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "st_stock", "t3", "t1.outstockid = t3.stockid AND t1.siteid = t3.siteid","stockname");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "plm_item", "t4", "t2.itemid=t4.itemid and t2.siteid = t4.siteid", "itemno","itemname","spec","model");
|
|
|
+ querySQL.setSiteid(siteid);
|
|
|
+ querySQL.setWhere("st_dbstockbilldetailid",st_dbstockbilldetailid);
|
|
|
+ querySQL.setWhere(where);
|
|
|
+ querySQL.setPage(pageSize, pageNumber);
|
|
|
+ querySQL.setOrderBy(pageSorting);
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
+ }
|
|
|
+
|
|
|
@API(title = "判断序列号是否符合条件", apiversion = R.ID2025061915095203.v1.class)
|
|
|
public String judgesku() throws YosException {
|
|
|
long st_dbstockbillid = content.getLong("st_dbstockbillid");
|