fix:出烘箱任务补全修改
This commit is contained in:
@@ -310,7 +310,42 @@ public class CoolCutTask extends AbstractAcsTask {
|
||||
cut_jo.put("update_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_jo);
|
||||
}
|
||||
|
||||
//判断是存在确定起点的该任务类型
|
||||
JSONArray issue_arr = taskTab.query("task_type = '010205' AND task_status = '02' AND is_delete= '0'").getResultJSONArray(0);
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "4");
|
||||
map.put("reging_id", RegionTypeEnum.B1_HKZC.getId());
|
||||
//只找入箱点位
|
||||
map.put("point_type", "5");
|
||||
JSONArray canuse_point = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
for (int i = 0; i < issue_arr.size(); i++) {
|
||||
JSONObject issue_jo = issue_arr.getJSONObject(i);
|
||||
JSONObject goal_point = WQLObject.getWQLObject("st_ivt_coolpointivt").query("point_code = '" + issue_jo.getString("point_code1") + "'").uniqueResult(0);
|
||||
for (int j = 0; j < canuse_point.size(); j++) {
|
||||
JSONObject canuse_point_jo = canuse_point.getJSONObject(j);
|
||||
if (canuse_point_jo.getString("point_location").equals(goal_point.getString("point_location"))) {
|
||||
issue_jo.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||
issue_jo.put("point_code2", canuse_point_jo.getString("point_code"));
|
||||
canuse_point.remove(canuse_point_jo);
|
||||
taskTab.update(issue_jo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!issue_jo.getString("task_status").equals(TaskStatusEnum.START_AND_POINT.getCode())) {
|
||||
for (int j = 0; j < canuse_point.size(); j++) {
|
||||
JSONObject canuse_point_jo = canuse_point.getJSONObject(j);
|
||||
if (!canuse_point_jo.getString("point_location").equals(goal_point.getString("point_location"))) {
|
||||
issue_jo.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||
issue_jo.put("point_code2", canuse_point_jo.getString("point_code"));
|
||||
canuse_point.remove(canuse_point_jo);
|
||||
taskTab.update(issue_jo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//下发任务
|
||||
SpringContextHolder.getBean(OutHotTask.class).immediateNotifyAcs(null);
|
||||
}
|
||||
} else {
|
||||
// 更新主表状态
|
||||
JSONObject coolMst = ivtTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
|
||||
Reference in New Issue
Block a user