rev:代码优化
This commit is contained in:
@@ -713,13 +713,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
} else if (type.equals("3")) {
|
||||
//判断AGV是否启用
|
||||
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("agv_status").getValue();
|
||||
String device_code = whereJson.getString("device_code");
|
||||
String product_area = device_code.substring(0,2);
|
||||
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode(product_area+"_agv_status").getValue();
|
||||
|
||||
if ("0".equals(agv_status)) {
|
||||
log.info("当前AGV未启用,不启用自动出烘箱功能!");
|
||||
} else {
|
||||
//烘箱出箱任务
|
||||
String device_code = whereJson.getString("device_code");
|
||||
JSONObject bake_jo = new JSONObject();
|
||||
bake_jo.put("point_code", device_code);
|
||||
bake_jo.put("option", "2");
|
||||
|
||||
@@ -333,7 +333,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
log.info("母卷:" + ContainerName + "被决策入半成品库,请求入半成品库标识改为1");
|
||||
|
||||
//判断AGV是否启用
|
||||
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("agv_status").getValue();
|
||||
String product_area = ContainerName.substring(0,2);
|
||||
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode(product_area+"_agv_status").getValue();
|
||||
|
||||
if (agv_status.equals("1")) {
|
||||
log.info("当前AGV启用参数为是");
|
||||
|
||||
@@ -143,6 +143,10 @@ public class OutServiceImpl implements OutService {
|
||||
.addParam("flag", "303").process().uniqueResult(0);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(empty_vehicle)){
|
||||
throw new BadRequestException("未查询到可用的空载具!");
|
||||
}
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("point_code1", point_code);
|
||||
jo.put("point_code2", empty_vehicle.getString("point_code"));
|
||||
|
||||
@@ -155,9 +155,9 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位:"+jsonRaw.getString("resource_name")+"生箔设备不存在");
|
||||
|
||||
if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
|
||||
/*if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
|
||||
throw new BadRequestException("当前生箔机:"+jsonSb.getString("ext_code")+"未启用!");
|
||||
}
|
||||
}*/
|
||||
|
||||
String start_pint_code = "";
|
||||
String point_code4 = "";
|
||||
@@ -213,9 +213,9 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
throw new BadRequestException("未查到相关的生箔机点位!");
|
||||
}
|
||||
|
||||
if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
|
||||
/*if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
|
||||
throw new BadRequestException("当前生箔机:"+raw_jo.getString("ext_code")+"未启用!");
|
||||
}
|
||||
}*/
|
||||
|
||||
// 2.根据就近原则查对应空卷抽
|
||||
JSONObject map = new JSONObject();
|
||||
@@ -265,7 +265,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
|
||||
|
||||
// 查询生箔点位库存表
|
||||
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
||||
// JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
||||
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
|
||||
|
||||
//下发ACS,执行取满放空的AGV动作
|
||||
@@ -307,7 +308,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
|
||||
|
||||
// 查询生箔点位库存表
|
||||
JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
||||
// JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
||||
JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
|
||||
|
||||
//下发ACS,执行取满放空的AGV动作
|
||||
|
||||
@@ -99,8 +99,9 @@
|
||||
is_child_ps_ok = 0
|
||||
AND
|
||||
plan.is_delete = '0'
|
||||
AND
|
||||
OPTION 输入.in_area_id <> ""
|
||||
ivt.product_area in 输入.in_area_id
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
@@ -273,8 +274,9 @@
|
||||
is_child_ps_ok = 1
|
||||
AND
|
||||
plan.is_delete = '0'
|
||||
AND
|
||||
OPTION 输入.in_area_id <> ""
|
||||
ivt.product_area in 输入.in_area_id
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
@@ -304,8 +306,9 @@
|
||||
is_child_ps_ok = 0
|
||||
AND
|
||||
plan.is_delete = '0'
|
||||
AND
|
||||
OPTION 输入.in_area_id <> ""
|
||||
ivt.product_area in 输入.in_area_id
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
@@ -392,8 +395,9 @@
|
||||
AND del.is_used = '1'
|
||||
AND
|
||||
plan.is_delete = '0'
|
||||
AND
|
||||
OPTION 输入.in_area_id <> ""
|
||||
del.product_area in 输入.in_area_id
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
del.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
@@ -487,8 +491,9 @@
|
||||
is_parent_ok = 0
|
||||
AND
|
||||
plan.is_delete = '0'
|
||||
AND
|
||||
OPTION 输入.in_area_id <> ""
|
||||
ivt.product_area in 输入.in_area_id
|
||||
ENDOPTION
|
||||
OPTION 输入.product_area <> ""
|
||||
ivt.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
|
||||
Reference in New Issue
Block a user