fix: B2车间生箔下料配送顺序:先烘箱对接位再到冷却位

This commit is contained in:
2024-12-12 11:16:32 +08:00
parent b086de7fc1
commit 0de92594e3
2 changed files with 49 additions and 0 deletions

View File

@@ -293,6 +293,27 @@ public class RawFoilServiceImpl implements RawFoilService {
param.put("task_type", "010105");
param.put("material_code", jsonRaw.getString("container_name"));
param.put("product_area", jsonSb.getString("product_area"));
} else if (jsonSb.getString("product_area").startsWith("B2")) {
// 如果是B2直接送到对接位。
JSONObject map2 = new JSONObject();
map2.put("flag", "3");
map2.put("reging_id", RegionTypeEnum.B2_HKZC.getId());
map2.put("point_location", jsonSb.getString("point_location"));
//只找入箱点位
map2.put("point_type", "4");
JSONObject point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map2).process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(point_code2_jo)) {
param.put("point_code4", point_code2_jo.getString("point_code"));
param.put("task_type", "010106");
} else {
param.put("point_code4", point_code4);
param.put("task_type", "010101");
}
param.put("point_code1", start_pint_code);
param.put("point_code2", jsonSb.getString("point_code") + "_K");
param.put("point_code3", jsonSb.getString("point_code") + "_M");
param.put("material_code", jsonRaw.getString("container_name"));
param.put("product_area", jsonSb.getString("product_area"));
} else {
param.put("point_code1", start_pint_code);
param.put("point_code2", jsonSb.getString("point_code") + "_K");

View File

@@ -227,6 +227,34 @@ public class CallEmpReelTask extends AbstractAcsTask {
jsonIvt2.put("point_status", "2");
jsonIvt2.put("material_code", jsonTask.getString("material_code"));
point_tab.update(jsonIvt2);
} else if (jsonTask.getString("task_type").equals("010106")) {
// 校验终点是否存在
JSONObject jsonIvt2 = point_tab.query("point_code ='" + point_code4 + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonIvt2)) {
throw new BadRequestException("终点未找到可用点位:" + point_code4);
}
// 更新工单状态为完成
//更新母卷工单状态
HashMap<String, String> map = new HashMap<>();
map.put("status", "09");
map.put("realend_time", DateUtil.now());
map.put("update_optid", currentUserId + "");
map.put("update_optname", currentUsername);
map.put("finish_type", "01");
map.put("update_time", DateUtil.now());
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map, "container_name = '" + jsonTask.getString("material_code") + "'");
// 更新点位存状态
JSONObject point_param = new JSONObject();
point_param.put("point_status", "2");
point_param.put("update_time", DateUtil.now());
point_param.put("material_code", jsonRaw.getString("container_name"));
point_tab.update(point_param, "point_code ='" + point_code4 + "'");
// 更新冷却库存状态
JSONObject cache_param = new JSONObject();
cache_param.put("full_point_status", "01");
cache_param.put("cool_ivt_status", "01");
cache_param.put("empty_point_status", "01");
ivtTab.update(cache_param, "empty_point_code ='" + point_code1 + "'");
} else {
// 校验终点是否存在
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);