From ee1a988e3ad3d83da4d2f2c21b39e42f27503e52 Mon Sep 17 00:00:00 2001 From: psh Date: Mon, 22 Jan 2024 18:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E6=9E=81=E6=9D=BF=E5=8F=AB=E6=96=99?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nl/acs/task/service/impl/TaskServiceImpl.java | 1 - .../nl/wms/sch/task_manage/task/tasks/BPSLTask.java | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 2426a37..8013efa 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -983,7 +983,6 @@ public class TaskServiceImpl extends CommonServiceImpl impleme if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest(); request.setTask_id(entity.getExt_task_id()); - request.setTask_id(entity.getExt_task_id()); request.setTask_code(entity.getTask_code()); request.setTask_status(entity.getTask_status()); request.setRequest_medthod_code(RequestMethodEnum.feedback_task_status.getCode()); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java index 95beb3b..b7d9570 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java @@ -242,18 +242,20 @@ public class BPSLTask extends AbstractTask { } @Override - protected void feedbackTaskState(JSONObject param,SchBaseTask schBaseTask, BaseResponse result) { + protected synchronized 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"))) { + //正极板两种情况,任务没分配就是点位高度,如果已分配则已减掉,所以重复请求需要加回去,多次变动太恶心了待优化 + if( "1".equals(jsonObject.getString("material_type"))&&ObjectUtil.isEmpty(point.getIng_task_code())) { schBaseTask.setPoint_code1(point.getPoint_code()+"0"+(point.getVehicle_qty())); + }else if ("1".equals(jsonObject.getString("material_type"))&&ObjectUtil.isNotEmpty(point.getIng_task_code())){ + schBaseTask.setPoint_code1(point.getPoint_code()+"0"+(point.getVehicle_qty()+1)); }else{ schBaseTask.setPoint_code1(point.getPoint_code().replace("HCQ","QHQ")); } //如果是正极板对接位则直接减库存 - if ((point.getPoint_code().startsWith("ZJBDJW"))&&!schBaseTask.getTask_code().equals(point.getIng_task_code())) { + if ((point.getPoint_code().startsWith("ZJBDJW"))&&ObjectUtil.isEmpty(point.getIng_task_code())) { point.setVehicle_qty(point.getVehicle_qty() - 1); } //重算点位时把点位占用