diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES062Request.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES062Request.java new file mode 100644 index 0000000..3fa1d06 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES062Request.java @@ -0,0 +1,37 @@ +package org.nl.wms.mes.domain; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; + +import javax.xml.bind.annotation.XmlRootElement; + +@Data +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@XmlRootElement +@Accessors(chain = true) +public class QPMES062Request extends Public { + //入库单号 + private String SimtOrderNo; + //场地 + private String locationCode; + //入库类型 + private String simtType; + //到货单号 + private String deliveryNo; + //扫描库位 + private String whlCode; + //物料条码号(托号) + private String PalletSn; + //用户编码 + private String userCode; + //用户名称 + private String userName; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES062Response.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES062Response.java new file mode 100644 index 0000000..dd07c31 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES062Response.java @@ -0,0 +1,48 @@ +package org.nl.wms.mes.domain; + +import lombok.Data; + +@Data +public class QPMES062Response extends Public { + //消息状态 + private String STATUS; + //消息文本 + private String MESSAGE; + //预留主键1 + private String KEY_VALUE01; + //预留主键2 + private String KEY_VALUE02; + //预留主键3 + private String KEY_VALUE03; + //预留主键4 + private String KEY_VALUE04; + //预留主键5 + private String KEY_VALUE05; + //预留主键6 + private String KEY_VALUE06; + //预留主键7 + private String KEY_VALUE07; + //预留主键8 + private String KEY_VALUE08; + //预留主键9 + private String KEY_VALUE09; + //预留反馈主键1 + private String FKEY_VALUE01; + //预留反馈主键2 + private String FKEY_VALUE02; + //预留反馈主键3 + private String FKEY_VALUE03; + //预留反馈主键4 + private String FKEY_VALUE04; + //预留反馈主键5 + private String FKEY_VALUE05; + //预留反馈主键6 + private String FKEY_VALUE06; + //预留反馈主键7 + private String FKEY_VALUE07; + //预留反馈主键8 + private String FKEY_VALUE08; + //预留反馈主键9 + private String FKEY_VALUE09; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES065Request.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES065Request.java new file mode 100644 index 0000000..22632a1 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES065Request.java @@ -0,0 +1,49 @@ +package org.nl.wms.mes.domain; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; + +import javax.xml.bind.annotation.XmlRootElement; + +@Data +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@XmlRootElement +@Accessors(chain = true) +public class QPMES065Request extends Public { + //工单号 + private String moname; + //物料条码(托号) + private String lotSN; + //领料数量 + private String qty; + //场地 + private String siteName; + //预留字段1 + private String ZXXV01; + //预留字段2 + private String ZXXV02; + //预留字段3 + private String ZXXV03; + //预留字段4 + private String ZXXV04; + //预留字段5 + private String ZXXV05; + //预留字段6 + private String ZXXV06; + //预留字段7 + private String ZXXV07; + //预留字段8 + private String ZXXV08; + //预留字段9 + private String ZXXV09; + //预留字段10 + private String ZXXV10; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES065Response.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES065Response.java new file mode 100644 index 0000000..7cf909e --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/domain/QPMES065Response.java @@ -0,0 +1,48 @@ +package org.nl.wms.mes.domain; + +import lombok.Data; + +@Data +public class QPMES065Response extends Public { + //消息状态 + private String STATUS; + //消息文本 + private String MESSAGE; + //预留主键1 + private String KEY_VALUE01; + //预留主键2 + private String KEY_VALUE02; + //预留主键3 + private String KEY_VALUE03; + //预留主键4 + private String KEY_VALUE04; + //预留主键5 + private String KEY_VALUE05; + //预留主键6 + private String KEY_VALUE06; + //预留主键7 + private String KEY_VALUE07; + //预留主键8 + private String KEY_VALUE08; + //预留主键9 + private String KEY_VALUE09; + //预留反馈主键1 + private String FKEY_VALUE01; + //预留反馈主键2 + private String FKEY_VALUE02; + //预留反馈主键3 + private String FKEY_VALUE03; + //预留反馈主键4 + private String FKEY_VALUE04; + //预留反馈主键5 + private String FKEY_VALUE05; + //预留反馈主键6 + private String FKEY_VALUE06; + //预留反馈主键7 + private String FKEY_VALUE07; + //预留反馈主键8 + private String FKEY_VALUE08; + //预留反馈主键9 + private String FKEY_VALUE09; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java index 0ccf8aa..80b145e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java @@ -76,21 +76,16 @@ public class YCLCKTask extends AbstractTask { SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper() .eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE)); for (SchBaseTask task : tasks) { - String extGroupData = task.getExt_group_data(); - JSONObject jsonObject = JSONObject.parseObject(extGroupData); - String materialType = jsonObject.getString("material_type"); - SchBasePoint point = findNextPoint(jsonObject,task); + SchBasePoint point = findNextPoint(task); if (ObjectUtil.isEmpty(point)) { task.setRemark("未找到所需点位!"); taskService.update(task); // 消息通知 - log.info("包片上料未找到当前符合条件的点位materialType:{},",materialType); + log.info("原材料出库未找到所需点位!"); continue; } // 设置起点并修改创建成功状态 - // 取料先去等待点 - task.setTask_type("3"); - task.setPoint_code1(point.getNext_wait_point()); + task.setPoint_code1(point.getPoint_code()); task.setTask_status(TaskStatus.CREATED.getCode()); task.setRemark(""); taskService.update(task); @@ -107,22 +102,13 @@ public class YCLCKTask extends AbstractTask { } /** - * 判断目标点位 - * 从10-1查找可以物料一致且有货的点位 + * todo 待确认怎么区分普通回温和快速回温 + * todo 设置回温时间 * - * @param extGroupData * @return */ - private SchBasePoint findNextPoint(JSONObject extGroupData,SchBaseTask task) { - String regionCode = ""; - String materialType = extGroupData.getString("material_type"); - if("1".equals(materialType)){ - regionCode="ZJBDJW"; - }else if("2".equals(materialType)){ - regionCode="HCQ2"; - }else if ("3".equals(materialType)){ - regionCode="HCQ3"; - } + private SchBasePoint findNextPoint(SchBaseTask task) { + String regionCode = "HW"; List schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); for(int i=schBasePointList.size()-1;i>=0;i--){ SchBasePoint schBasePoint=schBasePointList.get(i); @@ -130,10 +116,9 @@ public class YCLCKTask extends AbstractTask { if(task.getTask_code().equals(schBasePoint.getIng_task_code())){ return schBasePoint; } - if (!"2".equals(schBasePoint.getPoint_type())&&schBasePoint.getVehicle_qty()!=0 - &&ObjectUtil.isEmpty(schBasePoint.getIng_task_code()) - &&(ObjectUtil.isEmpty(schBasePoint.getVehicle_type())||materialType.equals(schBasePoint.getVehicle_type()))){ - log.info("包片上料任务找到当前符合条件的缓存区位置{}",schBasePoint.getPoint_code()); + if ("2".equals(schBasePoint.getPoint_status()) + && schBasePoint.getVehicle_qty() ==0) { + log.info("原材料出库任务找到当前符合条件的缓存区位置{}",schBasePoint.getPoint_code()); return schBasePoint; } } @@ -141,8 +126,7 @@ public class YCLCKTask extends AbstractTask { } /** - * 1.取货完毕后起点减少最后一份组盘,并且该组盘视为已结束 - * 2.包片机LMS不记录点位信息,由人工对组盘进行操作 + * todo 任务完成设置完成时间为开始固化时间 */ @Override // @Transactional(rollbackFor = Exception.class) @@ -206,6 +190,11 @@ public class YCLCKTask extends AbstractTask { taskObj.setTask_status(TaskStatus.FINISHED.getCode()); taskObj.setGroup_id(one.getGroup_id()); taskObj.setRemark("任务完成"); + try { + //todo 出库成功后上报mes + }catch (Exception e){ + log.error("原材料出库上报MES失败{}",e.getMessage(),e); + } } if (status.equals(TaskStatus.CANCELED)) { // 取消 // 终点解锁 @@ -239,21 +228,6 @@ public class YCLCKTask extends AbstractTask { @Override protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { - //重算最优点 - JSONObject jsonObject = JSONObject.parseObject(schBaseTask.getExt_group_data()); - SchBasePoint point = this.findNextPoint(jsonObject,schBaseTask); - //正极板现在不堆叠 - if( "1".equals(jsonObject.getString("material_type"))) { - schBaseTask.setPoint_code1(point.getPoint_code()+"0"+(point.getVehicle_qty())); - }else{ - schBaseTask.setPoint_code1(point.getPoint_code().replace("HCQ","QHQ")); - } - //重算点位时把点位占用 - point.setIng_task_code(schBaseTask.getTask_code()); - //如果是正极板对接位则直接减库存 - if ((point.getPoint_code().startsWith("ZJBDJW"))) { - point.setVehicle_qty(point.getVehicle_qty() - 1); - } - pointService.update(point); + //该场景无需重算等待点 } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java index 9817edc..8c19426 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLRKTask.java @@ -83,7 +83,7 @@ public class YCLRKTask extends AbstractTask { String extGroupData = task.getExt_group_data(); JSONObject jsonObject = JSONObject.parseObject(extGroupData); // String materialType = jsonObject.getString("material_type"); - SchBasePoint point = findNextPoint(startPoint, jsonObject); + SchBasePoint point = findNextPoint(); if (ObjectUtil.isEmpty(point)) { task.setRemark("未找到所需点位!"); taskService.update(task); @@ -109,18 +109,11 @@ public class YCLRKTask extends AbstractTask { /** * 判断目标点位 - * 1.A区的去A区缓存点,B区的去B区 - * 2.优先找未放满的固化室的起始位置01和06,且物料必须一致 - * 4.固化室不满足条件时按顺序取下一个固化室 - * 5.都不满足则抛出异常暂时等待 * - * @param startPoint - * @param extGroupData * @return */ - private SchBasePoint findNextPoint(SchBasePoint startPoint, JSONObject extGroupData) { - String regionCode = null; - + private SchBasePoint findNextPoint() { + String regionCode = "YL"; List schBasePointList = pointMapper.findPointByRegion(regionCode, "2"); for (SchBasePoint schBasePoint : schBasePointList) { if ("2".equals(schBasePoint.getPoint_status())