|
|
@@ -30,7 +30,6 @@ import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
-import static restcontroller.webmanage.sale.stockbill.stockbill.updateStockBillWithVersion;
|
|
|
|
|
|
/**
|
|
|
* 出入库单
|
|
|
@@ -270,11 +269,13 @@ public class stockbill extends Controller {
|
|
|
@API(title = "单据日期调整", apiversion = R.ID2025102215133403.v1.class)
|
|
|
public String billdateChange() throws YosException {
|
|
|
JSONArray st_stockbillids = content.getJSONArray("st_stockbillids");
|
|
|
- JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
- for (Object object : st_stockbillids_v) {
|
|
|
- JSONObject object_v = (JSONObject) object;
|
|
|
- //通过版本更新订单表头数据
|
|
|
- updateStockBillWithVersion(this, object_v);
|
|
|
+ if (content.containsKey("st_stockbillids_v")) {
|
|
|
+ JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
+ for (Object object : st_stockbillids_v) {
|
|
|
+ JSONObject object_v = (JSONObject) object;
|
|
|
+ //通过版本更新订单表头数据
|
|
|
+ updateStockBillWithVersion(this, object_v);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Date billdate = content.getDate("billdate");
|
|
|
@@ -543,11 +544,13 @@ public class stockbill extends Controller {
|
|
|
public String delete() throws YosException {
|
|
|
|
|
|
JSONArray st_stockbillids = content.getJSONArray("st_stockbillids");
|
|
|
- JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
- for (Object object : st_stockbillids_v) {
|
|
|
- JSONObject object_v = (JSONObject) object;
|
|
|
- //通过版本更新订单表头数据
|
|
|
- updateStockBillWithVersion(this, object_v);
|
|
|
+ if (content.containsKey("st_stockbillids_v")) {
|
|
|
+ JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
+ for (Object object : st_stockbillids_v) {
|
|
|
+ JSONObject object_v = (JSONObject) object;
|
|
|
+ //通过版本更新订单表头数据
|
|
|
+ updateStockBillWithVersion(this, object_v);
|
|
|
+ }
|
|
|
}
|
|
|
BatchDeleteErr batchDeleteErr = BatchDeleteErr.create(this, st_stockbillids.size());
|
|
|
for (Object o : st_stockbillids) {
|
|
|
@@ -577,11 +580,13 @@ public class stockbill extends Controller {
|
|
|
@CACHEING_CLEAN(apiClass = {stockbill.class, stockbillitems.class, Order.class, OrderItems.class, restcontroller.sale.stockbill.stockbill.class})
|
|
|
public String check() throws YosException {
|
|
|
JSONArray st_stockbillids = content.getJSONArray("st_stockbillids");
|
|
|
- JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
- for (Object object : st_stockbillids_v) {
|
|
|
- JSONObject object_v = (JSONObject) object;
|
|
|
- //通过版本更新订单表头数据
|
|
|
- updateStockBillWithVersion(this, object_v);
|
|
|
+ if (content.containsKey("st_stockbillids_v")) {
|
|
|
+ JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
+ for (Object object : st_stockbillids_v) {
|
|
|
+ JSONObject object_v = (JSONObject) object;
|
|
|
+ //通过版本更新订单表头数据
|
|
|
+ updateStockBillWithVersion(this, object_v);
|
|
|
+ }
|
|
|
}
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "st_stockbill", "billno", "st_stockbillid");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
@@ -637,11 +642,13 @@ public class stockbill extends Controller {
|
|
|
@CACHEING_CLEAN(apiClass = {stockbill.class, stockbillitems.class, Order.class, OrderItems.class, stockbill.class, restcontroller.sale.stockbill.stockbill.class})
|
|
|
public String uncheck() throws YosException {
|
|
|
JSONArray st_stockbillids = content.getJSONArray("st_stockbillids");
|
|
|
- JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
- for (Object object : st_stockbillids_v) {
|
|
|
- JSONObject object_v = (JSONObject) object;
|
|
|
- //通过版本更新订单表头数据
|
|
|
- updateStockBillWithVersion(this, object_v);
|
|
|
+ if (content.containsKey("st_stockbillids_v")) {
|
|
|
+ JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
+ for (Object object : st_stockbillids_v) {
|
|
|
+ JSONObject object_v = (JSONObject) object;
|
|
|
+ //通过版本更新订单表头数据
|
|
|
+ updateStockBillWithVersion(this, object_v);
|
|
|
+ }
|
|
|
}
|
|
|
for (Object o : st_stockbillids) {
|
|
|
long st_stockbillid = Long.parseLong(o.toString());
|
|
|
@@ -952,11 +959,13 @@ public class stockbill extends Controller {
|
|
|
@API(title = "仓库确认", apiversion = R.ID2025050709505703.v1.class)
|
|
|
public String confirm() throws YosException {
|
|
|
JSONArray st_stockbillids = content.getJSONArray("st_stockbillids");
|
|
|
- JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
- for (Object object : st_stockbillids_v) {
|
|
|
- JSONObject object_v = (JSONObject) object;
|
|
|
- //通过版本更新订单表头数据
|
|
|
- updateStockBillWithVersion(this, object_v);
|
|
|
+ if (content.containsKey("st_stockbillids_v")) {
|
|
|
+ JSONArray st_stockbillids_v = content.getJSONArray("st_stockbillids_v");
|
|
|
+ for (Object object : st_stockbillids_v) {
|
|
|
+ JSONObject object_v = (JSONObject) object;
|
|
|
+ //通过版本更新订单表头数据
|
|
|
+ updateStockBillWithVersion(this, object_v);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
boolean isconfirm = content.getBooleanValue("isconfirm");
|