From 01fa0a83ebfbbb7629b5571ba38371253f657e39 Mon Sep 17 00:00:00 2001 From: psh Date: Mon, 18 Mar 2024 14:56:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=9B=98=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=8F=8D=E9=A6=88=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/pda/service/impl/PdaServiceImpl.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index 302de7b..9658f1b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -1,6 +1,7 @@ package org.nl.wms.pda.service.impl; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.extern.slf4j.Slf4j; @@ -78,19 +79,21 @@ public class PdaServiceImpl implements PdaService { .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) .eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue())); - groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); - groupEntity.setUpdate_id(GeneralDefinition.ACS_ID); - groupEntity.setUpdate_name(GeneralDefinition.ACS_NAME); - groupEntity.setUpdate_time(DateUtil.now()); - vehiclematerialgroupService.update(groupEntity); - SchBasePoint pointObj=pointService.getById(groupEntity.getPoint_code()); - if(pointObj.getVehicle_code().contains(",")){ - vehicleCode+=','; + if(ObjectUtil.isNotEmpty(groupEntity)) { + groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); + groupEntity.setUpdate_id(GeneralDefinition.ACS_ID); + groupEntity.setUpdate_name(GeneralDefinition.ACS_NAME); + groupEntity.setUpdate_time(DateUtil.now()); + vehiclematerialgroupService.update(groupEntity); + SchBasePoint pointObj = pointService.getById(groupEntity.getPoint_code()); + if (pointObj.getVehicle_code().contains(",")) { + vehicleCode += ','; + } + pointObj.setVehicle_code(pointObj.getVehicle_code().replace(vehicleCode, "")); + pointObj.setVehicle_qty(pointObj.getVehicle_qty() - 1); + pointService.update(pointObj); + //清空组盘表的信息 } - pointObj.setVehicle_code(pointObj.getVehicle_code().replace(vehicleCode,"")); - pointObj.setVehicle_qty(pointObj.getVehicle_qty()-1); - pointService.update(pointObj); - //清空组盘表的信息 return PdaResponseVo.pdaResultOk("清空物料信息请求成功"); } @Override