|
|
@@ -119,6 +119,15 @@ public class LSALogistics extends Controller {
|
|
|
|
|
|
@API(title = "删除送货明细", apiversion = R.ID20230720141902.v1.class)
|
|
|
public String delete() throws YosException {
|
|
|
+ Long sa_logisticsid = content.getLongValue("sa_logisticsid");
|
|
|
+ Rows rows = LSALogisticsHelper.getLogisticsRows(this);
|
|
|
+ if (rows.isEmpty()) {
|
|
|
+ return getErrReturnObject().setErrMsg("数据不存在").toString();
|
|
|
+ }
|
|
|
+ if (!"新建".equals(rows.get(0).getString("status"))) {
|
|
|
+ return getErrReturnObject().setErrMsg("非新建状态无法删除").toString();
|
|
|
+ }
|
|
|
+
|
|
|
JSONArray sa_logistics_itemsids = content.getJSONArray("sa_logistics_itemsids");
|
|
|
String sql = "DELETE from sa_logistics_items where sa_logistics_itemsid in " + sa_logistics_itemsids + " and siteid='" + siteid + "'";
|
|
|
sql = sql.replace("[", "(").replace("]", ")");
|