This commit is contained in:
2022-10-17 09:38:11 +08:00
parent de96ac490d
commit df1d989e8d

View File

@@ -25,7 +25,7 @@ public class PointStatusServiceImpl implements PointStatusService {
throw new BadRequestException("输入的点位不能为空!");
}
String option = whereJson.getString("point_code");
String option = whereJson.getString("option");
//1-绑定
if (option.equals("1")) {
String container_name = whereJson.getString("container_name");
@@ -54,16 +54,13 @@ public class PointStatusServiceImpl implements PointStatusService {
throw new BadRequestException("未查询到对应的分切点!");
}
}
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_point);
}
//2-解绑
if (option.equals("2")) {
//查询该点对应的是什么位置
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)) {
String now_container_name = cut_point.getString("container_name");
if (StrUtil.isNotEmpty(now_container_name)) {
throw new BadRequestException("该点位上已存在母卷,不能进行绑定!");
}
cut_point.put("container_name", "");
cut_point.put("full_point_status", "01");
} else {
@@ -79,6 +76,7 @@ public class PointStatusServiceImpl implements PointStatusService {
throw new BadRequestException("未查询到对应的分切点!");
}
}
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_point);
}
JSONObject jo = new JSONObject();