fix:一期光电上报无货优化
This commit is contained in:
@@ -1587,23 +1587,53 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//判断该点位是否存在未完成的任务
|
||||
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
||||
//如果为分切输送线上料位,判断该点位是否存在未完成的任务类型为分切输送出的任务
|
||||
JSONObject left_jo = WQLObject.getWQLObject("sch_base_task").query("task_type = '010401' AND point_code1 = '" + device_code + "' AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(left_jo)) {
|
||||
JSONArray left_arr = WQLObject.getWQLObject("sch_base_task").query("task_type = '010401' AND point_code1 = '" + device_code + "' AND is_delete = '0' AND task_status < '07'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(left_arr)) {
|
||||
log.info("shipDeviceUpdate请求参数:---------------------------------------------" + whereJson.toString() + ",ACS上报无货且此时LMS该点位没有任何任务!");
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "反馈成功!");
|
||||
result.put("message", "反馈成功,ACS上报无货且此时LMS该点位没有任何任务!");
|
||||
return result;
|
||||
}else {
|
||||
boolean need_clean = false;
|
||||
for (int i = 0; i < left_arr.size(); i++) {
|
||||
JSONObject left_jo = left_arr.getJSONObject(i);
|
||||
String vehicleCode2 = left_jo.getString("vehicle_code2");
|
||||
if (deliver_jo.getString("vehicle_code").equals(vehicleCode2)) {
|
||||
need_clean = true;
|
||||
}
|
||||
}
|
||||
if (!need_clean) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "反馈成功,ACS上报无货但当前点位载具和任务载具号不一致!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//如果为分切输送线上料位,判断该点位是否存在未完成的任务类型为分切输送出的或载具横移任务
|
||||
JSONObject right_jo = WQLObject.getWQLObject("sch_base_task").query("(task_type = '010401' OR task_type = '010406') AND point_code1 = '" + device_code + "' AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(right_jo)) {
|
||||
JSONArray right_arr = WQLObject.getWQLObject("sch_base_task").query("(task_type = '010401' OR task_type = '010406') AND point_code1 = '" + device_code + "' AND is_delete = '0' AND task_status < '07'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(right_arr)) {
|
||||
log.info("shipDeviceUpdate请求参数:---------------------------------------------" + whereJson.toString() + ",ACS上报无货且此时LMS该点位没有任何任务!");
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "反馈成功!");
|
||||
return result;
|
||||
}else {
|
||||
boolean need_clean = false;
|
||||
for (int i = 0; i < right_arr.size(); i++) {
|
||||
JSONObject right_jo = right_arr.getJSONObject(i);
|
||||
String vehicleCode2 = right_jo.getString("vehicle_code2");
|
||||
if (deliver_jo.getString("vehicle_code").equals(vehicleCode2)) {
|
||||
need_clean = true;
|
||||
}
|
||||
}
|
||||
if (!need_clean) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "反馈成功,ACS上报无货但当前点位载具和任务载具号不一致!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
deliver_jo.put("point_status", "01");
|
||||
|
||||
Reference in New Issue
Block a user