diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java index 5fca064..1361a55 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/ivt/service/impl/StPointIvtServiceImpl.java @@ -166,6 +166,7 @@ public class StPointIvtServiceImpl implements StPointIvtService { } JSONObject task_jo = new JSONObject(); + //表处批次 task_jo.put("material_code", down_pcsn); task_jo.put("product_area", device_jo.getString("product_area")); //查询可用的满轴点位 diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java index 7d03134..241ec62 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java @@ -135,7 +135,9 @@ public class ProcessTask extends AbstractAcsTask { String from_area = cool_jo1.getString("point_code").substring(0,2); String to_area = st_jo1.getString("ext_code").substring(0, 2); JSONObject mom_jo = new JSONObject(); + //起点区域 mom_jo.put("from_area", from_area); + //目的区域 mom_jo.put("to_area", to_area); mom_jo.put("container_name", container_name); LmsToMesService bean = SpringContextHolder.getBean(LmsToMesService.class); @@ -143,7 +145,7 @@ public class ProcessTask extends AbstractAcsTask { } if ("011002".equals(task_type)) { - //维护冷却区满轴点位的库存 + //维护冷却区满轴点位的库存 ST_IVT_CoolPointIvt JSONObject cool_jo1 = ivtTab.query("full_point_code = '" + point_code1 + "'").uniqueResult(0); String full_vehicle_code = cool_jo1.getString("full_vehicle_code"); HashMap map = new HashMap(); @@ -154,6 +156,7 @@ public class ProcessTask extends AbstractAcsTask { //维护表处区点位 HashMap map2 = new HashMap(); map2.put("up_scroll", full_vehicle_code); + //st_ivt_stpointivt stTab.update(map2, "up_point_code = '" + point_code2.split("_K")[0] + "'").uniqueResult(0); JSONObject st_jo1 = stTab.query("up_point_code = '" + point_code2.split("_M")[0] + "'").uniqueResult(0); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java index e8efcad..fa7be64 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java @@ -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"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java index 5492274..cf94498 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java @@ -127,7 +127,7 @@ public class BakingServiceImpl implements BakingService { JSONObject jsonPointZc = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0); JSONObject cool_jo = coolIvtTab.query("point_code = '" + point_code1 + "' AND point_type = '3'").uniqueResult(0); - + //暂存区入烘箱 if (ObjectUtil.isNotEmpty(jsonPointZc) || ObjectUtil.isNotEmpty(cool_jo)) { if (ObjectUtil.isEmpty(jsonPointZc)) { jsonPointZc = cool_jo; @@ -153,7 +153,7 @@ public class BakingServiceImpl implements BakingService { for (int i = 0; i < hot_rows.size(); i++) { JSONObject hot_row = hot_rows.getJSONObject(i); String point_code = hot_row.getString("point_code"); - //?? + // String point_temperature = (String) redisUtils.hget(point_code, "temperature"); if (!ObjectUtil.isEmpty(point_temperature)) { if (point_temperature.equals(temperature)) { @@ -335,7 +335,7 @@ public class BakingServiceImpl implements BakingService { param.put("type", "1"); //起点 param.put("point_code1", point_code1); - //暂存位 + //对接位 param.put("point_code2", point_code2_jo.getString("point_code")); //烘烤点位 param.put("point_code3", jsonHotIvt.getString("point_code")); @@ -350,6 +350,7 @@ public class BakingServiceImpl implements BakingService { // 4.插入烘箱区出入主表 JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0); JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0); + //待优化 if (ObjectUtil.isEmpty(jsonMater)) { throw new BadRequestException("物料基础信息中无此物料!"); } @@ -419,7 +420,7 @@ public class BakingServiceImpl implements BakingService { throw new BadRequestException("烘烤区域无此点位!"); } - //查询该点位是否存在未完成的任务 + //查询该点位是否存在未完成的任务,待优化 boolean have_task = new CutConveyorTask().isSingleTask(point_code1); if (have_task) { throw new BadRequestException("该点位存在未完成的任务!"); @@ -486,6 +487,7 @@ public class BakingServiceImpl implements BakingService { throw new BadRequestException("当前登录人员暂无【" + product_area + "】操作权限"); } String reging_id = ""; + //带优化 switch (product_area) { case "A1": reging_id = RegionTypeEnum.A_HKZC.getId(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/SerfaceServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/SerfaceServiceImpl.java index 7412a0b..80805e4 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/SerfaceServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/SerfaceServiceImpl.java @@ -28,7 +28,7 @@ public class SerfaceServiceImpl implements SerfaceService { String option = whereJson.getString("option"); String container_name = whereJson.getString("container_name"); String device_code = whereJson.getString("point_code"); - + //根据母卷查询生箔工单 JSONObject raw_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '" + container_name + "'").uniqueResult(0); if (ObjectUtil.isEmpty(raw_jo)) { throw new BadRequestException("未查询到该母卷号对应的生箔工单!"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java index 6fe162f..f634f86 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/InHotTask.java @@ -352,7 +352,7 @@ public class InHotTask extends AbstractAcsTask { tab.insert(json); task_id = json.getString("task_id"); } - + // if (StrUtil.equals(form.getString("type"), "3")) { { String point_code1 = form.getString("point_code1");