|
@@ -3,7 +3,10 @@ package restcontroller.sale.stockbill;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import common.Controller;
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
import common.YosException;
|
|
|
|
|
+import common.YosLogger;
|
|
|
import common.annotation.API;
|
|
import common.annotation.API;
|
|
|
|
|
+import common.crm.bean.icstockbill;
|
|
|
|
|
+import common.crm.bean.sku;
|
|
|
import common.data.*;
|
|
import common.data.*;
|
|
|
import restcontroller.R;
|
|
import restcontroller.R;
|
|
|
import common.annotation.CACHEING;
|
|
import common.annotation.CACHEING;
|
|
@@ -83,7 +86,7 @@ public class stockbill extends Controller {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@API(title = "收货确认", apiversion = R.ID2025061311223103.v1.class)
|
|
@API(title = "收货确认", apiversion = R.ID2025061311223103.v1.class)
|
|
|
- public String newApiMethod() throws YosException {
|
|
|
|
|
|
|
+ public String receiver() throws YosException {
|
|
|
Long st_stockbillid = content.getLong("st_stockbillid");
|
|
Long st_stockbillid = content.getLong("st_stockbillid");
|
|
|
boolean isreceiver = content.getBooleanValue("isreceiver");
|
|
boolean isreceiver = content.getBooleanValue("isreceiver");
|
|
|
Rows rows = dbConnect.runSqlQuery("select * from st_stockbill where st_stockbillid ='"
|
|
Rows rows = dbConnect.runSqlQuery("select * from st_stockbill where st_stockbillid ='"
|
|
@@ -114,18 +117,34 @@ public class stockbill extends Controller {
|
|
|
//
|
|
//
|
|
|
// }
|
|
// }
|
|
|
if(BigDecimal.valueOf(codeRows.size()).compareTo(itemRows.toRowsMap("skucontrol").get("1").sum("qty"))!=0){
|
|
if(BigDecimal.valueOf(codeRows.size()).compareTo(itemRows.toRowsMap("skucontrol").get("1").sum("qty"))!=0){
|
|
|
- throw new YosException("序列号数量和出库数量不一致,无法到货确认!");
|
|
|
|
|
|
|
+ throw new YosException("序列号数量和出库数量不一致,无法到货确认!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ icstockbill icstockbill = new icstockbill(YosLogger.logger);
|
|
|
|
|
+ JSONObject jsonObject =icstockbill.oneAction(st_stockbillid);
|
|
|
|
|
+ if(isreceiver){
|
|
|
|
|
+ if(jsonObject.getBooleanValue("success")){
|
|
|
|
|
+ return getSucReturnObject().toString();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ System.err.println(jsonObject);
|
|
|
|
|
+ return getErrReturnObject().toString();
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return getSucReturnObject().toString();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+// UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "st_stockbill");
|
|
|
|
|
+// updateSQL.setUniqueid(st_stockbillid);
|
|
|
|
|
+// updateSQL.setSiteid(siteid);
|
|
|
|
|
+// updateSQL.setValue("isreceiver", isreceiver);
|
|
|
|
|
+// updateSQL.setValue("receiverby", username);
|
|
|
|
|
+// updateSQL.setDateValue("receiverdate");
|
|
|
|
|
+
|
|
|
|
|
+// dbConnect.runSqlQuery("select stockid from st_stock where stockno='00'");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// dbConnect.runSqlUpdate(updateSQL.getSQL());
|
|
|
|
|
|
|
|
- UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "st_stockbill");
|
|
|
|
|
- updateSQL.setUniqueid(st_stockbillid);
|
|
|
|
|
- updateSQL.setSiteid(siteid);
|
|
|
|
|
- updateSQL.setValue("isreceiver", isreceiver);
|
|
|
|
|
- updateSQL.setValue("receiverby", username);
|
|
|
|
|
- updateSQL.setDateValue("receiverdate");
|
|
|
|
|
- dbConnect.runSqlUpdate(updateSQL.getSQL());
|
|
|
|
|
- return getSucReturnObject().toString();
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|