From bb5f841d9e790ff95ed5afe1b03fc9ce0bc8185b Mon Sep 17 00:00:00 2001 From: liuxy Date: Thu, 11 May 2023 13:42:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add:=20=E6=96=B0=E5=A2=9E=E9=A2=9D=E5=A4=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/nl/wms/sch/tasks/SendOutTask.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java index 354986fac..869ce6661 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java @@ -2,6 +2,7 @@ package org.nl.wms.sch.tasks; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONArray; @@ -13,6 +14,8 @@ import org.nl.common.utils.SecurityUtils; import org.nl.modules.system.util.CodeUtil; import org.nl.modules.wql.WQL; import org.nl.modules.wql.core.bean.WQLObject; +import org.nl.modules.wql.util.SpringContextHolder; +import org.nl.system.service.param.impl.SysParamServiceImpl; import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl; import org.nl.wms.sch.AcsTaskDto; import org.nl.wms.sch.manage.AbstractAcsTask; @@ -51,7 +54,9 @@ public class SendOutTask extends AbstractAcsTask { if (StrUtil.equals(jsonPoint.getString("layer_num"), "2")) { JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + json.getString("vehicle_code") + "'").uniqueResult(0); - next_high = jsonSub.getString("box_high"); + + String box_high_ext = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_high_ext").getValue(); + next_high = String.valueOf(NumberUtil.add(jsonSub.getDoubleValue("box_high"),Double.parseDouble(box_high_ext))); } else { next_high = "0"; } From 22bcfc1e5439b69e34b1ba3d2138da1fc804cddc Mon Sep 17 00:00:00 2001 From: liuxy Date: Thu, 11 May 2023 15:47:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?rev:=20=E6=9C=A8=E7=AE=B1=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E7=B2=BE=E5=BA=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/nl/wms/sch/tasks/SendOutTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java index 869ce6661..fb4f8c48d 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/SendOutTask.java @@ -56,7 +56,8 @@ public class SendOutTask extends AbstractAcsTask { JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + json.getString("vehicle_code") + "'").uniqueResult(0); String box_high_ext = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_high_ext").getValue(); - next_high = String.valueOf(NumberUtil.add(jsonSub.getDoubleValue("box_high"),Double.parseDouble(box_high_ext))); + double box_high = NumberUtil.add(jsonSub.getDoubleValue("box_high"), Double.parseDouble(box_high_ext)); + next_high = String.valueOf(NumberUtil.round(box_high, 0)); } else { next_high = "0"; }