|
|
@ -1710,7 +1710,9 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
|
|
|
|
JSONObject resultParam = new JSONObject(); |
|
|
|
try { |
|
|
|
//母卷号
|
|
|
|
String containerName = param.getString("ContainerName"); |
|
|
|
//表处机
|
|
|
|
String ResourceName = param.getString("ResourceName"); |
|
|
|
|
|
|
|
String Type = param.getString("Type"); |
|
|
@ -1734,6 +1736,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
|
|
|
|
//上料
|
|
|
|
if ("1".equals(Type)) { |
|
|
|
//表处上料位轴编码
|
|
|
|
String up_scroll = device_jo.getString("up_scroll"); |
|
|
|
//查询母卷所在点位
|
|
|
|
JSONObject jsonCoolIvt = coolIvtTab.query("container_name = '" + containerName + "' and full_point_status = '02' and cool_ivt_status <> '04'").uniqueResult(0); |
|
|
@ -1741,6 +1744,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
throw new BadRequestException("未查询到母卷【" + containerName + "】所在的半成品暂存点!"); |
|
|
|
} |
|
|
|
JSONObject form = new JSONObject(); |
|
|
|
//判断有轴
|
|
|
|
if (StrUtil.isEmpty(up_scroll)) { |
|
|
|
//取满放满
|
|
|
|
form.put("point_code1", jsonCoolIvt.getString("full_point_code")); |
|
|
@ -1761,6 +1765,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
} else { |
|
|
|
JSONObject map = new JSONObject(); |
|
|
|
map.put("flag", "6"); |
|
|
|
//表处机对应区域
|
|
|
|
map.put("product_area", device_jo.getString("product_area")); |
|
|
|
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0); |
|
|
|
form.put("point_code4", jsonIvt.getString("empty_point_code")); |
|
|
@ -1781,6 +1786,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
map.put("flag", "1"); |
|
|
|
map.put("product_area", device_jo.getString("product_area")); |
|
|
|
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0); |
|
|
|
//起点
|
|
|
|
form.put("point_code1", device_jo.getString("up_point_code") + "_M"); |
|
|
|
//寻找可用的冷却区满轴点位
|
|
|
|
form.put("point_code2", jsonIvt.getString("full_point_code")); |
|
|
@ -1819,7 +1825,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
String UpCoilerDate = param.getString("UpCoilerDate"); |
|
|
|
|
|
|
|
WQLObject pointTab = WQLObject.getWQLObject("st_ivt_stpointivt"); |
|
|
|
WQLObject orderTab = WQLObject.getWQLObject("PDM_BI_SurProcessOrder"); |
|
|
|
WQLObject PDM_BI_SurProcessOrderTab = WQLObject.getWQLObject("PDM_BI_SurProcessOrder"); |
|
|
|
|
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
try { |
|
|
@ -1845,7 +1851,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
if (ObjectUtil.isEmpty(UpCoilerDate)) { |
|
|
|
throw new BadRequestException("开始时间不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
//st_ivt_stpointivt
|
|
|
|
JSONObject jsonPoint = pointTab.query("ext_code ='" + ResourceName + "'").uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(jsonPoint)) { |
|
|
|
jsonPoint = new JSONObject(); |
|
|
@ -1870,7 +1876,7 @@ public class MesToLmsServiceImpl implements MesToLmsService { |
|
|
|
json.put("create_id", "1"); |
|
|
|
json.put("create_name", "管理员"); |
|
|
|
json.put("create_time", DateUtil.now()); |
|
|
|
orderTab.insert(json); |
|
|
|
PDM_BI_SurProcessOrderTab.insert(json); |
|
|
|
|
|
|
|
// 返回成功
|
|
|
|
result.put("RTYPE", "S"); |
|
|
|