diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/ShutFrameServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/ShutFrameServiceImpl.java index cba3516f..440922a8 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/ShutFrameServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/ShutFrameServiceImpl.java @@ -297,12 +297,12 @@ public class ShutFrameServiceImpl implements ShutFrameService { if (StrUtil.isNotEmpty(Struct.getString("storagevehicle_code"))) { //生成任务 //查询移入点位 - JSONObject point = wo_Point.query("source_id='" + struct_id + "'").uniqueResult(0); + JSONObject point = wo_Point.query("is_used='1' and source_id='" + struct_id + "'").uniqueResult(0); if (point == null) { - throw new BadRequestException(struct_id + "仓位数据异常,找不到对应点位!"); + throw new BadRequestException(struct_id + "仓位或点位数据异常,无可用点位!"); } //判断拆拼盘区 - JSONObject next_point_code = wo_Point.query("area_type='35' and lock_type='00' and point_status='00'").uniqueResult(0); + JSONObject next_point_code = wo_Point.query("is_used='1' and area_type='35' and lock_type='00' and point_status='00'").uniqueResult(0); if (next_point_code == null) { throw new BadRequestException("拆拼盘区无可用点位!"); } @@ -479,12 +479,12 @@ public class ShutFrameServiceImpl implements ShutFrameService { } //查询移入点位 - JSONObject point = wo_Point.query("source_id='" + turnin.getString("struct_id") + "'").uniqueResult(0); + JSONObject point = wo_Point.query("is_used='1' and source_id='" + turnin.getString("struct_id") + "'").uniqueResult(0); if (point == null) { - throw new BadRequestException(turnin.getString("struct_id") + "仓位数据异常,找不到对应点位!"); + throw new BadRequestException(turnin.getString("struct_code") + "仓位点位数据异常,无可用点位!"); } //判断拆拼盘区 - JSONObject next_point_code = wo_Point.query("area_type='35' and lock_type='00' and point_status='00'").uniqueResult(0); + JSONObject next_point_code = wo_Point.query("is_used='1' and area_type='35' and lock_type='00' and point_status='00'").uniqueResult(0); if (next_point_code == null) { throw new BadRequestException("拆拼盘区无可用点位!"); } @@ -536,12 +536,12 @@ public class ShutFrameServiceImpl implements ShutFrameService { storPublicService.updateStructAndPoint(from_end); //查询移入点位 - JSONObject point2 = wo_Point.query("source_id='" + turnout_jo.getString("struct_id") + "'").uniqueResult(0); + JSONObject point2 = wo_Point.query("is_used='1' and source_id='" + turnout_jo.getString("struct_id") + "'").uniqueResult(0); if (point2 == null) { - throw new BadRequestException(turnin.getString("struct_id") + "仓位数据异常,找不到对应点位!"); + throw new BadRequestException(turnin.getString("struct_code") + "仓位点位数据异常,无可用点位!"); } //判断拆拼盘区 - JSONObject next_point_code2 = wo_Point.query("area_type='35' and lock_type='00' and point_status='00'").uniqueResult(0); + JSONObject next_point_code2 = wo_Point.query("is_used='1' and area_type='35' and lock_type='00' and point_status='00'").uniqueResult(0); if (next_point_code2 == null) { throw new BadRequestException("拆拼盘区无可用点位!"); }