rev:修改bug入库

This commit is contained in:
zhangzhiqiang
2023-06-03 17:14:04 +08:00
parent e495271f23
commit 3c34900441
3 changed files with 22 additions and 16 deletions

View File

@@ -523,8 +523,14 @@ public class EmptyVehicleServiceImpl implements EmptyVehicleService {
JSONObject obj = jo.getJSONObject("obj");
String vehicle_code = (String) jsonObject.get("vehicle_code");
JSONArray has = line_wql.query("storagevehicle_code = '" + vehicle_code + "' and workorder_id = '" + obj.getString("workorder_id") + "'").getResultJSONArray(0);
JSONArray has = null;
if (ObjectUtil.isNotEmpty(obj)){
try {
has = line_wql.query("storagevehicle_code = '" + vehicle_code + "' and workorder_id = '" + obj.getString("workorder_id") + "'").getResultJSONArray(0);
}catch (Exception ex){
log.error("组盘异常:"+ex.getMessage());
}
}
JSONObject vehicle = vehicle_wql.query("storagevehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle)){
throw new PdaRequestException("输入的载具号有误!");

View File

@@ -263,7 +263,7 @@ public class FlourworkServiceImpl implements FlourworkService {
// 5.生成移库单
//校验点位是否有执行中任务:
;
JSONArray runingtask = WQLObject.getWQLObject("SCH_BASE_Task").query("next_point_code = '" + moveInIvt.getString("point_code") + "' and task_status <> '99'").getResultJSONArray(0);
JSONArray runingtask = WQLObject.getWQLObject("SCH_BASE_Task").query("next_point_code = '" + moveInIvt.getString("point_code") + "' and task_status <> '99' and is_delete = '0'").getResultJSONArray(0);
if (runingtask.size()>0){
throw new BadRequestException("分配点位存在未完成任务:"+moveInIvt.getString("point_code"));
}