|
|
@@ -85,7 +85,7 @@ public class LSALogistics extends Controller {
|
|
|
if (st_stockbill_itemsids.size() > 0) {
|
|
|
deleteLogisticsItem(this, st_stockbill_itemsids);
|
|
|
}
|
|
|
- return getSucReturnObject().setData(sa_logisticsid).toString();
|
|
|
+ return detail();
|
|
|
}
|
|
|
|
|
|
@API(title = "添加送货明细", apiversion = R.ID20230720141602.v1.class)
|
|
|
@@ -150,10 +150,36 @@ public class LSALogistics extends Controller {
|
|
|
}
|
|
|
|
|
|
@API(title = "选择送货明细列表", apiversion = R.ID20230720141802.v1.class)
|
|
|
- public String selectChooseMXList() {
|
|
|
+ public String selectChooseMXList() 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 (t1.itemname like '%").append(whereObject.getString("condition")).append("%'");
|
|
|
+ where.append("or t1.itemno like '%").append(whereObject.getString("condition")).append("%'");
|
|
|
+ where.append("or t1.remarks like '%").append(whereObject.getString("condition")).append("%')");
|
|
|
+ }
|
|
|
+ }
|
|
|
//物流单ID
|
|
|
Long sa_logisticsid = content.getLongValue("sa_logisticsid");
|
|
|
- return getSucReturnObject().toString();
|
|
|
+ Long sys_enterpriseid = content.getLongValue("sys_enterpriseid");
|
|
|
+
|
|
|
+ pageSorting = pageSorting.equals("''") ? "rowno" : pageSorting;
|
|
|
+
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "st_stockbill_items");
|
|
|
+ querySQL.setTableAlias("t1");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "st_stockbill", "t2", "t2.st_stockbillid =t1.st_stockbillid and t2.siteid=t1.siteid",
|
|
|
+ "billno");
|
|
|
+ querySQL.setWhere("t1.siteid='" + siteid + "'");
|
|
|
+ querySQL.setWhere("t2.sys_enterpriseid=" + sys_enterpriseid);
|
|
|
+ querySQL.setWhere("t1.transportqty<qty");
|
|
|
+ querySQL.setWhere("NOT EXISTS(SELECT 1 from sa_logistics_items WHERE sa_logisticsid=" + sa_logisticsid + " and st_stockbill_itemsid=t1.st_stockbill_itemsid)");
|
|
|
+ querySQL.setWhere(where.toString());
|
|
|
+ querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting);
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
|
|
|
|
@API(title = "物流单详情", apiversion = R.ID20230720142002.v1.class)
|