This commit is contained in:
2023-02-21 09:21:01 +08:00
parent 56ee27acf7
commit 42247eb5c4
2 changed files with 29 additions and 16 deletions

View File

@@ -690,7 +690,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (ObjectUtil.isNotEmpty(deliver_jo)) { if (ObjectUtil.isNotEmpty(deliver_jo)) {
char dtl_type = device_code.charAt(device_code.length() - 1); char dtl_type = device_code.charAt(device_code.length() - 1);
//判断该点位是否存在未完成的任务 //判断该点位是否存在未完成的任务
/*if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0){ if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
//如果为分切输送线上料位,判断该点位是否存在未完成的任务类型为分切输送出的任务 //如果为分切输送线上料位,判断该点位是否存在未完成的任务类型为分切输送出的任务
JSONObject left_jo = WQLObject.getWQLObject("sch_base_task").query("task_type = '010401' AND point_code1 = '" + device_code + "' AND is_delete = '0' AND task_status < '07'").uniqueResult(0); JSONObject left_jo = WQLObject.getWQLObject("sch_base_task").query("task_type = '010401' AND point_code1 = '" + device_code + "' AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
if (ObjectUtil.isEmpty(left_jo)) { if (ObjectUtil.isEmpty(left_jo)) {
@@ -710,7 +710,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
result.put("message", "反馈成功!"); result.put("message", "反馈成功!");
return result; return result;
} }
}*/ }
deliver_jo.put("point_status", "01"); deliver_jo.put("point_status", "01");
deliver_jo.put("qzzno", ""); deliver_jo.put("qzzno", "");
deliver_jo.put("vehicle_code", ""); deliver_jo.put("vehicle_code", "");

View File

@@ -696,6 +696,14 @@ public class MesToLmsServiceImpl implements MesToLmsService {
if (ObjectUtil.isEmpty(plan_jo)) { if (ObjectUtil.isEmpty(plan_jo)) {
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup")); throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
} }
String need_down = row.getString("Attribute1");
if (StrUtil.isEmpty(need_down)) {
throw new BadRequestException("子卷:" + row.getString("ContainerGroup") + "对应的是否需要下轴字段不能为空!");
}
if ("1".equals(need_down)) {
plan_jo.put("status", "09");
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
} else {
if (row.getString("ContainerPosition").equals("1")) { if (row.getString("ContainerPosition").equals("1")) {
up_rows.add(plan_jo); up_rows.add(plan_jo);
} }
@@ -703,12 +711,17 @@ public class MesToLmsServiceImpl implements MesToLmsService {
down_rows.add(plan_jo); down_rows.add(plan_jo);
} }
} }
}
if (ObjectUtil.isEmpty(up_rows) && ObjectUtil.isEmpty(down_rows)) { if (ObjectUtil.isEmpty(up_rows) && ObjectUtil.isEmpty(down_rows)) {
throw new BadRequestException("MES传入的分切计划不能为空"); result.put("RTYPE", "S");
result.put("RTMSG", "该设备不需要下轴!");
result.put("RTOAL", 1);
result.put("RTDAT", null);
return result;
} }
//查询输送线上该分切机下一分切组可用的气涨轴
//查询输送线上该分切机下一分切组可用的气涨轴
JSONObject group_jo = WQL.getWO("PDA_02").addParam("flag", "14").addParam("resource_name", ResourceName).process().uniqueResult(0); JSONObject group_jo = WQL.getWO("PDA_02").addParam("flag", "14").addParam("resource_name", ResourceName).process().uniqueResult(0);
if (ObjectUtil.isEmpty(group_jo)) { if (ObjectUtil.isEmpty(group_jo)) {
group_jo = new JSONObject(); group_jo = new JSONObject();