|
|
@@ -7,6 +7,7 @@ import com.huaweicloud.sdk.meeting.v1.model.SearchQosHistoryMeetingsRequest;
|
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
|
import common.annotation.API;
|
|
|
+import common.annotation.CACHEING;
|
|
|
import common.data.QuerySQL;
|
|
|
import common.data.Row;
|
|
|
import common.data.Rows;
|
|
|
@@ -142,7 +143,7 @@ public class LSALogistics extends Controller {
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "st_stockbill", "t3", "t3.st_stockbillid =t2.st_stockbillid and t3.siteid=t2.siteid",
|
|
|
"billno");
|
|
|
querySQL.setWhere("t1.sa_logisticsid=" + sa_logisticsid);
|
|
|
- querySQL.setWhere("t1.siteid='" + siteid+"'");
|
|
|
+ querySQL.setWhere("t1.siteid='" + siteid + "'");
|
|
|
querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting);
|
|
|
Rows rows = querySQL.query();
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
@@ -170,14 +171,60 @@ public class LSALogistics extends Controller {
|
|
|
"t4.kd100id");
|
|
|
querySQL.addQueryFields("logiscomp_name", "t4.name");
|
|
|
querySQL.setWhere("t1.sa_logisticsid=" + sa_logisticsid);
|
|
|
- querySQL.setWhere("t1.siteid='" + siteid+"'");
|
|
|
+ querySQL.setWhere("t1.siteid='" + siteid + "'");
|
|
|
Rows rows = querySQL.query();
|
|
|
- return getSucReturnObject().setData(rows.isNotEmpty() ? rows.get(0) : new Row()).toString();
|
|
|
+ Row row = rows.isNotEmpty() ? rows.get(0) : new Row();
|
|
|
+ row.putIfAbsent("billdate", "");
|
|
|
+ row.putIfAbsent("checkdate", "");
|
|
|
+ row.putIfAbsent("receivedate", "");
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(row).toString();
|
|
|
}
|
|
|
|
|
|
@API(title = "物流单列表", apiversion = R.ID20230720142102.v1.class)
|
|
|
- public String selectList() {
|
|
|
- return getSucReturnObject().toString();
|
|
|
+ public String selectList() 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.billno like '%").append(whereObject.getString("condition")).append("%'");
|
|
|
+ where.append("or t1.logisticno like '%").append(whereObject.getString("condition")).append("%'");
|
|
|
+ where.append("or t1.remarks like '%").append(whereObject.getString("condition")).append("%'");
|
|
|
+ where.append("or t3.agentnum like '%").append(whereObject.getString("condition")).append("%'");
|
|
|
+ where.append("or t2.enterprisename like '%").append(whereObject.getString("condition")).append("%')");
|
|
|
+ }
|
|
|
+ if (whereObject.containsKey("begindate") && !"".equals(whereObject.getString("begindate"))) {
|
|
|
+ where.append(" and t1.billdate >='").append(whereObject.getString("begindate")).append(" 00:00:00'");
|
|
|
+ }
|
|
|
+ if (whereObject.containsKey("enddate") && !"".equals(whereObject.getString("enddate"))) {
|
|
|
+ where.append(" and t1.billdate <='").append(whereObject.getString("enddate")).append(" 23:59:59'");
|
|
|
+ }
|
|
|
+ if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
|
|
|
+ where.append(" and t1.status = '").append(whereObject.getString("status")).append("'");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_logistics");
|
|
|
+ querySQL.setTableAlias("t1");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t2", "t2.sys_enterpriseid=t1.sys_enterpriseid and t2.siteid=t1.siteid",
|
|
|
+ "t2.enterprisename");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_agents", "t3", "t3.sys_enterpriseid=t2.sys_enterpriseid and t3.siteid=t2.siteid",
|
|
|
+ "t3.agentnum");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_logiscomp", "t4", "t4.sa_logiscompid=t1.sa_logiscompid and t4.siteid=t1.siteid",
|
|
|
+ "t4.kd100id");
|
|
|
+ querySQL.addQueryFields("logiscomp_name", "t4.name");
|
|
|
+ querySQL.setWhere("t1.siteid='" + siteid + "'");
|
|
|
+ querySQL.setWhere(where.toString());
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+
|
|
|
+ for (Row row : rows) {
|
|
|
+ row.putIfAbsent("billdate", "");
|
|
|
+ row.putIfAbsent("checkdate", "");
|
|
|
+ row.putIfAbsent("receivedate", "");
|
|
|
+ }
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
|
|
|
|
|