rev:成品报废审核增加接口报错信息

This commit is contained in:
2024-06-06 09:35:53 +08:00
parent 6f1d80737e
commit 9aba17fd13

View File

@@ -213,6 +213,7 @@ public class ProductScrapServiceImpl implements ProductScrapService {
WQLObject dtl = WQLObject.getWQLObject("ST_IVT_ProductScrapDtl"); WQLObject dtl = WQLObject.getWQLObject("ST_IVT_ProductScrapDtl");
WQLObject ivt = WQLObject.getWQLObject("st_ivt_structivt"); WQLObject ivt = WQLObject.getWQLObject("st_ivt_structivt");
try {
// 查询所有明细 // 查询所有明细
JSONArray dtlArr = dtl.query("scrap_id = '" + whereJson.getString("scrap_id") + "'").getResultJSONArray(0); JSONArray dtlArr = dtl.query("scrap_id = '" + whereJson.getString("scrap_id") + "'").getResultJSONArray(0);
@@ -237,15 +238,6 @@ public class ProductScrapServiceImpl implements ProductScrapService {
throw new BadRequestException("库存异常请检查!"); throw new BadRequestException("库存异常请检查!");
} }
/* List<String> collect = ivtList.stream()
.filter(row -> !pcsnJoining.contains(row.getString("pcsn")))
.map(row -> row.getString("pcsn"))
.collect(Collectors.toList());
if (ObjectUtil.isNotEmpty(collect)) {
throw new BadRequestException("子卷:"+collect.toString()+"异常请检查!");
}*/
// 生成出库单 // 生成出库单
JSONObject jsonOutMst = new JSONObject(); JSONObject jsonOutMst = new JSONObject();
jsonOutMst.put("stor_id", whereJson.getString("stor_id")); jsonOutMst.put("stor_id", whereJson.getString("stor_id"));
@@ -288,6 +280,13 @@ public class ProductScrapServiceImpl implements ProductScrapService {
param.put("confirm_optname", SecurityUtils.getCurrentNickName()); param.put("confirm_optname", SecurityUtils.getCurrentNickName());
param.put("confirm_time", DateUtil.now()); param.put("confirm_time", DateUtil.now());
mst.update(param, "scrap_id = '" + whereJson.getString("scrap_id") + "'"); mst.update(param, "scrap_id = '" + whereJson.getString("scrap_id") + "'");
} catch (Exception e) {
JSONObject msg = new JSONObject();
msg.put("remark", "单据异常:"+e.getMessage());
mst.update(msg,"scrap_id = '" + whereJson.getString("scrap_id") + "'");
}
} }
@Override @Override