opt:优化空指针异常

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-02-13 17:58:45 +08:00
parent a72c4e3f8d
commit 4adf4c9692

View File

@@ -135,7 +135,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
String point_code4 = jsonTask.getString("point_code4");
JSONObject jsonRaw = rawTab.query("container_name ='" + jsonTask.getString("material_code") + "' AND status <> '09' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonRaw)) {
throw new BadRequestException("未找到满足条件的生箔工单:" + jsonTask.getString("material_code"));
}
// 判断是两个点位的任务还是四个点位的任务
if (ObjectUtil.isEmpty(point_code3)) {
// 判断是取满 or 取空 :取满起点是生箔区域、取空起点是冷却区域
@@ -297,8 +299,8 @@ public class CallEmpReelTask extends AbstractAcsTask {
} else {
// 校验终点是否存在
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonIvt)) {
throw new BadRequestException("终点未找到可用点位:" + point_code2);
if (ObjectUtil.isEmpty(jsonIvt2)) {
throw new BadRequestException("终点未找到可用点位:" + jsonIvt2);
}
// 更新工单状态为完成