From cb431515fc83b2465681b2fb5441417cf8d11412 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Tue, 20 Aug 2024 11:32:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=AE=8C=E6=88=90=E6=97=B6?= =?UTF-8?q?=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sch/task_manage/task/tasks/YCLCKTask.java | 24 +++++++++++++++---- .../service/impl/WorkorderServiceImpl.java | 3 +++ 2 files changed, 22 insertions(+), 5 deletions(-) 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 a155977..f5f6c8a 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 @@ -202,11 +202,17 @@ public class YCLCKTask extends AbstractTask { one.setMove_way(one.getMove_way() == null ? "" : (one.getMove_way() + " -> ") + endPointObj.getPoint_code()); one.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue()); one.setInstorage_time(DateUtil.now()); - one.setStanding_time(Integer.valueOf(extGroupData.getString("time"))); + if(ObjectUtil.isEmpty(extGroupData.getString("time"))){ + one.setStanding_time(1); + }else{ + one.setStanding_time(Integer.valueOf(extGroupData.getString("time"))); + } one.setUpdate_id(GeneralDefinition.ACS_ID); one.setUpdate_name(GeneralDefinition.ACS_NAME); one.setUpdate_time(DateUtil.now()); - one.setPcsn(extGroupData.getString("batch")); + if(ObjectUtil.isNotEmpty(extGroupData.getString("batch"))){ + one.setPcsn(extGroupData.getString("batch")); + } vehiclematerialgroupService.updateById(one); } // 终点解锁 @@ -215,8 +221,14 @@ public class YCLCKTask extends AbstractTask { endPointObj.setVehicle_code2(taskObj.getVehicle_code2()); endPointObj.setVehicle_qty(1); endPointObj.setUpdate_time(DateUtil.now()); - endPointObj.setStanding_time(Integer.valueOf(extGroupData.getString("time"))); - endPointObj.setPcsn(extGroupData.getString("batch")); + if(ObjectUtil.isEmpty(extGroupData.getString("time"))){ + endPointObj.setStanding_time(1); + }else{ + endPointObj.setStanding_time(Integer.valueOf(extGroupData.getString("time"))); + } + if(ObjectUtil.isNotEmpty(extGroupData.getString("batch"))){ + endPointObj.setPcsn(extGroupData.getString("batch")); + } endPointObj.setInstorage_time(DateUtil.now()); pointService.update(endPointObj); // 起点清空 @@ -292,7 +304,9 @@ public class YCLCKTask extends AbstractTask { materialDataDto.setSupplierName(material.getSupplierName()); materialDataDto.setProductName(material.getProductName()); materialDataDto.setSpecification(material.getSpecification()); - materialDataDto.setPickingBatch(extGroupData.getString("batch")); + if(ObjectUtil.isNotEmpty(extGroupData.getString("batch"))){ + materialDataDto.setPickingBatch(extGroupData.getString("batch")); + } materialDataDto.setLength(BigDecimal.valueOf(length)); materialDataDto.setWeight(BigDecimal.valueOf(weight)); materialDataDto.setCreateTime(new DateTime().toTimestamp()); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/service/impl/WorkorderServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/service/impl/WorkorderServiceImpl.java index d1f1fcb..8ef4bac 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/service/impl/WorkorderServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/workorder/service/impl/WorkorderServiceImpl.java @@ -1,5 +1,6 @@ package org.nl.wms.sch.workorder.service.impl; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; @@ -144,6 +145,8 @@ public class WorkorderServiceImpl extends ServiceImpl