|
@@ -45,6 +45,16 @@ public class dispatch extends Controller {
|
|
|
// TODO Auto-generated constructor stub
|
|
|
}
|
|
|
|
|
|
+ @API(title = "查询是否存在新建的发货单", apiversion = R.ID20240123163302.v1.class)
|
|
|
+ public String query() throws YosException {
|
|
|
+
|
|
|
+ Long sys_enterpriseid = content.getLongValue("sys_enterpriseid");
|
|
|
+ Long sa_orderid = content.getLongValue("sa_orderid");
|
|
|
+ Rows rows = dbConnect.runSqlQuery("SELECT * from sa_dispatch WHERE sys_enterpriseid=" + sys_enterpriseid + " and status='新建' and sa_orderid='" + sa_orderid + "' and siteid='" + siteid + "'");
|
|
|
+ return getSucReturnObject().setData(rows).toString();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@API(title = "发货单新增更新", apiversion = R.ID20221114135203.v1.class, intervaltime = 200)
|
|
|
@CACHEING_CLEAN(apiversions = {R.ID20221114135303.v1.class, R.ID20221114135403.v1.class, R.ID20230320160203.v1.class})
|
|
@@ -64,18 +74,6 @@ public class dispatch extends Controller {
|
|
|
|
|
|
if (sa_dispatchid <= 0) {
|
|
|
|
|
|
- Rows rows = dbConnect.runSqlQuery("SELECT * from sa_dispatch WHERE sys_enterpriseid=" + content.getLong("sys_enterpriseid") + " and status='新建' and sa_orderid='" + sa_orderid + "' and siteid='" + siteid + "'");
|
|
|
-
|
|
|
- if (rows.isNotEmpty()) {
|
|
|
- sa_dispatchid = rows.get(0).getLong("sa_dispatchid");
|
|
|
-// content.put("sa_dispatchid", sa_dispatchid);
|
|
|
- Row row = new Row();
|
|
|
- row.put("sa_dispatchid", sa_dispatchid);
|
|
|
- row.put("error", "该订单号已存在新建的发货单");
|
|
|
- return getErrReturnObject().setErrMsg(row.toString()).toString();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
sa_dispatchid = createTableID(tableName);
|
|
|
Rows rowsinfo = dbConnect
|
|
|
.runSqlQuery("select contactsid from sys_enterprise_contacts where workaddress=1 and sys_enterpriseid="
|