rev:入库明细完成时更新单条报错
This commit is contained in:
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.pcs.Enum.ProcStatusEnum;
|
||||
@@ -221,6 +222,7 @@ public class InbillServiceImpl {
|
||||
if (dtl_rows.size() == 0) {
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("iostorinv_id", dtl_row.getString("iostorinv_id"));
|
||||
data.put("iostorinvdis_id", dis_row.getString("iostorinvdis_id"));
|
||||
this.confirmMst(data);
|
||||
}
|
||||
}
|
||||
@@ -237,6 +239,7 @@ public class InbillServiceImpl {
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt"); //库存表
|
||||
WQLObject redTab = WQLObject.getWQLObject("MD_PB_BucketRecord"); //桶记录表
|
||||
String iostorinv_id = from.getString("iostorinv_id");
|
||||
String iostorinvdis_id = from.getString("iostorinvdis_id");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
@@ -252,9 +255,13 @@ public class InbillServiceImpl {
|
||||
if (dtl_rows.size() > 0) {
|
||||
throw new BadRequestException("主表下存在未完成的明细!");
|
||||
}
|
||||
|
||||
JSONArray dis_rows;
|
||||
//更新目的点位,仓位、加库存
|
||||
JSONArray dis_rows = dis_table.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
if (StringUtils.isNotEmpty(iostorinvdis_id)){
|
||||
dis_rows = dis_table.query("iostorinvdis_id = '" + iostorinvdis_id + "'").getResultJSONArray(0);
|
||||
}else {
|
||||
dis_rows = dis_table.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
}
|
||||
for (int i = 0; i < dis_rows.size(); i++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(i);
|
||||
JSONObject point_form = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user