fix:MES调用LMS出入烘箱
This commit is contained in:
@@ -409,14 +409,18 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
log.info("母卷:" + ContainerName + "被决策入烘箱,请求烘烤标识改为1");
|
||||
|
||||
String point_code = "";
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("container_name = '" + containerName + "' and full_point_status = '02' AND point_type = '1'").uniqueResult(0);
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("container_name = '" + containerName + "' and full_point_status = '02' AND point_type IN ('1','3')").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonCoolIvt)) {
|
||||
JSONObject jsonPoint = pointTab.query("material_code ='" + containerName + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonPoint)) {
|
||||
point_code = jsonPoint.getString("point_code");
|
||||
}
|
||||
} else {
|
||||
point_code = jsonCoolIvt.getString("full_point_code");
|
||||
if (containerName.startsWith("B1") || containerName.startsWith("B3")) {
|
||||
point_code = jsonCoolIvt.getString("point_code");
|
||||
}else {
|
||||
point_code = jsonCoolIvt.getString("full_point_code");
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(point_code)) {
|
||||
throw new BadRequestException("该母卷已经被烘烤或现在还未绑定在暂存位或对接点位上,不能进行入烘箱操作!!请检查当前母卷所在位置,并绑定对应位置");
|
||||
@@ -449,12 +453,20 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
if ("1".equals(agv_status)) {
|
||||
log.info("当前AGV启用参数为是");
|
||||
JSONObject jsonPoint = pointTab.query("material_code = '" + containerName + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
JSONObject cool_jo = new JSONObject();
|
||||
if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||
throw new BadRequestException("当前AGV已启用,且母卷不存在烘箱对接位上!");
|
||||
cool_jo = coolIvtTab.query("container_name = '"+containerName+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(cool_jo)) {
|
||||
throw new BadRequestException("当前AGV已启用,且母卷不存在烘箱对接位上!");
|
||||
}
|
||||
}
|
||||
|
||||
// 调用接口输入参数
|
||||
jsonParam.put("point_code", jsonPoint.getString("point_code"));
|
||||
if (ObjectUtil.isEmpty(jsonPoint)) {
|
||||
jsonParam.put("point_code", cool_jo.getString("point_code"));
|
||||
}else {
|
||||
jsonParam.put("point_code", jsonPoint.getString("point_code"));
|
||||
}
|
||||
jsonParam.put("container_name", containerName);
|
||||
|
||||
// 调用手持接口
|
||||
|
||||
@@ -389,6 +389,9 @@ public class BakingServiceImpl implements BakingService {
|
||||
cache_param.put("point_location", jsonHotIvt.getString("point_location"));
|
||||
cache_param.put("product_area", jsonHotIvt.getString("product_area"));
|
||||
JSONObject cache_jo = WQL.getWO("PDA_COOLIN").addParamMap(cache_param).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(cache_jo)) {
|
||||
throw new BadRequestException("桁架范围内没有可用的空点位,请检查库存!");
|
||||
}
|
||||
|
||||
// 3.创建任务
|
||||
JSONObject param = new JSONObject();
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||
import org.nl.wms.pda.mps.service.HandleBakingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -296,7 +297,7 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
throw new BadRequestException("母卷不能为空!");
|
||||
}
|
||||
|
||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
|
||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code + "' OR point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(cool_ivt)) {
|
||||
throw new BadRequestException("请扫描正确的冷却区满轴点位!");
|
||||
}
|
||||
@@ -322,7 +323,7 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
//判断该接口是否需要回传
|
||||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) {
|
||||
new LmsToMesServiceImpl().momRollSemiFGInboundComplete(param);
|
||||
SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param);
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user