opt: 表处区域的冷却区区分锂电铜箔

This commit is contained in:
2024-11-12 09:34:28 +08:00
parent 6ca912a498
commit 1bd7049bcd
5 changed files with 57 additions and 10 deletions

View File

@@ -114,7 +114,7 @@ public class BakingServiceImpl implements BakingService {
}
/*
* 根据点位判断是 冷却区入烘箱还是暂存区入烘箱
* 根据点位判断是 冷却区入烘箱还是暂存区(对接位)入烘箱
*/
JSONObject jsonPointZc = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
@@ -209,9 +209,19 @@ public class BakingServiceImpl implements BakingService {
/*
* 冷却区入烘箱
*/
// hint: 两个都找不到点位,可能是使用了满轴位请求,查找冷却区域
// 1.根据冷却区此母卷的点位找到对应的暂存区、找到空位
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code1 + "' and is_used = '1' AND point_type = '1'").uniqueResult(0);
// 根据标箔/锂电判断类型
String point_type = "1";
if (raw_jo.getString("product_area").equals("B2")) {
String orderType = raw_jo.getString("order_type");
// order_type 1-标箔2-锂电
if ("2".equals(orderType)) {
point_type = "4";
}
}
// 冷却点
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code1 + "' and is_used = '1' AND point_type = '" + point_type + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonCoolIvt)) {
throw new BadRequestException("请扫描正确的冷却区或对接点位!");
}
@@ -424,6 +434,7 @@ public class BakingServiceImpl implements BakingService {
}
this.createHotIoMst(hotParam);
} else {
// 出烘箱,创建桁架任务到对接位
if (!in_area_id.contains(product_area)) {
throw new BadRequestException("当前登录人员暂无【" + product_area + "】操作权限");
}
@@ -548,6 +559,7 @@ public class BakingServiceImpl implements BakingService {
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject inCoolIvt(JSONObject whereJson) {
// 手持-烘烤-质检合格
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); // 点位点
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工单表
@@ -605,7 +617,15 @@ public class BakingServiceImpl implements BakingService {
if (!jsonPoint.getString("product_area").equals("B2")) {
map.put("point_location", jsonPoint.getString("point_location"));
}
map.put("point_type", "1");
// B2出来要根据锂电或者标箔去不同地方
if (jsonPoint.getString("product_area").equals("B2")) {
String orderType = raw_jo.getString("order_type");
// order_type 1-标箔2-锂电
if ("2".equals(orderType)) {
map.put("point_type", "4");
}
}
JSONObject jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
// 如果为空
if (ObjectUtil.isEmpty(jsonCooIvt) && !jsonPoint.getString("product_area").equals("B2")) {

View File

@@ -172,12 +172,14 @@ public class RawFoilServiceImpl implements RawFoilService {
map.put("flag", "6");
map.put("product_area", jsonSb.getString("product_area"));
map.put("point_location", jsonSb.getString("point_location"));
// 查找冷却区空轴位状态是空轴的点位
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
// 3.如果没找到则继续找下一节点
if (ObjectUtil.isEmpty(jsonIvt)) {
String point_location = jsonSb.getString("point_location");
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
// 没有找到就往其他位置(上下位置)查找
jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
if (ObjectUtil.isEmpty(jsonIvt)) {
throw new BadRequestException("未查询到有空轴的点位!");
@@ -187,6 +189,7 @@ public class RawFoilServiceImpl implements RawFoilService {
//查询可用的对接位
String reging_id = "";
String product_area = jsonSb.getString("product_area");
// 获取对应的烘箱对接位区域id
switch (product_area) {
case "A1":
reging_id = RegionTypeEnum.A_HKZC.getId();
@@ -213,11 +216,12 @@ public class RawFoilServiceImpl implements RawFoilService {
cache_map.put("flag", "4");
cache_map.put("reging_id", reging_id);
cache_map.put("point_location", jsonSb.getString("point_location"));
//只找入箱点位
//只找入箱点位point_type : 4
cache_map.put("point_type", "4");
JSONObject point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(cache_map).process().uniqueResult(0);
if (ObjectUtil.isEmpty(point_code2_jo)) {
// 找不到就找其他上下位置的
cache_map.put("point_location", jsonSb.getString("point_location").equals("0") ? "1" : "0");
point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(cache_map).process().uniqueResult(0);
}
@@ -246,6 +250,18 @@ public class RawFoilServiceImpl implements RawFoilService {
map.put("flag", "1");
map.put("product_area", jsonSb.getString("product_area"));
map.put("point_location", jsonSb.getString("point_location"));
// 如果是B2, 需要根据标箔或者锂电来判断是哪个位置
if (jsonSb.getString("product_area").equals("B2")) {
String orderType = jsonRaw.getString("order_type");
// order_type 1-标箔2-锂电
if ("2".equals(orderType)) {
map.put("point_type", "4");
} else {
map.put("point_type", "1");
}
} else {
map.put("point_type", "1");
}
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
// 3.如果没找到则继续找下一节点
if (ObjectUtil.isEmpty(jsonIvt)) {

View File

@@ -21,6 +21,7 @@
输入.cant_location TYPEAS f_string
输入.mater_flag TYPEAS s_string
输入.mater_flag TYPEAS s_string
输入.point_type TYPEAS s_string
[临时表]
@@ -164,7 +165,12 @@
AND full_point_status = '01'
AND empty_point_status = '01'
AND is_used = '1'
AND point_type = '1'
OPTION 输入.point_type <> ""
point_type = 输入.point_type
ENDOPTION
OPTION 输入.point_type = ""
point_type = '1'
ENDOPTION
AND NOT EXISTS (
SELECT
@@ -313,4 +319,4 @@
ORDER BY in_order_seq desc
ENDSELECT
ENDQUERY
ENDIF
ENDIF

View File

@@ -19,6 +19,7 @@
输入.point_code TYPEAS s_string
输入.container_name TYPEAS s_string
输入.product_area TYPEAS s_string
输入.point_type TYPEAS s_string
输入.in_area_id TYPEAS f_string
@@ -56,8 +57,12 @@
ivt.full_point_status = '01'
AND
ivt.is_used = '1'
AND
point_type = '1'
OPTION 输入.point_type <> ""
ivt.point_type = 输入.point_type
ENDOPTION
OPTION 输入.point_type = ""
ivt.point_type = '1'
ENDOPTION
AND NOT EXISTS (
SELECT

View File

@@ -215,7 +215,7 @@ public class InCoolIvtTask extends AbstractAcsTask {
json.put("acs_task_type", "3");
tab.insert(json);
this.immediateNotifyAcs(null);
// this.immediateNotifyAcs(null);
return json.getString("task_id");
}