From e67ea06df31667e28e4a2c9ad776f9a0ef9c80e4 Mon Sep 17 00:00:00 2001 From: sez Date: Fri, 7 Nov 2025 15:44:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=BC=82=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/api/controller/WMSAdjustBillController.java | 4 ++-- lc123/cloud/app/api/utils/ApiResultExt.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lc123/cloud/app/api/controller/WMSAdjustBillController.java b/lc123/cloud/app/api/controller/WMSAdjustBillController.java index 757178a..f18de5b 100644 --- a/lc123/cloud/app/api/controller/WMSAdjustBillController.java +++ b/lc123/cloud/app/api/controller/WMSAdjustBillController.java @@ -428,7 +428,7 @@ public class WMSAdjustBillController { } String itemId = ckObj.getString("itemId");//仓储系统商品ID-条件必填 String inventoryType = ckObj.getString("inventoryType");//库存类型-ZP=正品, CC=残次,JS=机损, XS= 箱损, ZT=在途库存,DJ=冻结 - String quantity = ckObj.getString("quantity");//异动数量-必填,有正负 + int quantity = ckObj.getIntValue("quantity");//异动数量-必填,有正负 if (ApiResultExt.validateRequired(quantity, "int")) { errormsg = errormsg.append(";").append("传入参数 quantity 为空"); } @@ -470,7 +470,7 @@ public class WMSAdjustBillController { Date expireDate_e = rkObj.getDate("expireDate"); //调整后商品 DynamicObject iGoods = null; - DynamicObject[] iGoodsArr = BaseDataMatchUtils.materialMatchGoods(itemCode, batchCode_e, productDate, expireDate, true); + DynamicObject[] iGoodsArr = BaseDataMatchUtils.materialMatchGoods(itemCode, batchCode_e, productDate_e, expireDate_e, true); if(iGoodsArr != null && iGoodsArr.length > 0){ iGoods = iGoodsArr[0]; }else{ diff --git a/lc123/cloud/app/api/utils/ApiResultExt.java b/lc123/cloud/app/api/utils/ApiResultExt.java index 40f01f1..a26daa1 100644 --- a/lc123/cloud/app/api/utils/ApiResultExt.java +++ b/lc123/cloud/app/api/utils/ApiResultExt.java @@ -252,6 +252,10 @@ public class ApiResultExt implements Serializable { } catch (NumberFormatException e) { return true; // 无法转为BigDecimal返回 true } + case "int": + case "Date": + return false; + default: return true; // 如果没有匹配的类型,返回 true } From c1512c9157f76f78caafc2711c70de0fbfbfd314 Mon Sep 17 00:00:00 2001 From: sez Date: Fri, 7 Nov 2025 16:30:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=BC=82=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/api/controller/WMSAdjustBillController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lc123/cloud/app/api/controller/WMSAdjustBillController.java b/lc123/cloud/app/api/controller/WMSAdjustBillController.java index f18de5b..7402ea0 100644 --- a/lc123/cloud/app/api/controller/WMSAdjustBillController.java +++ b/lc123/cloud/app/api/controller/WMSAdjustBillController.java @@ -7,6 +7,7 @@ import com.drew.lang.annotations.NotNull; import kd.bos.dataentity.OperateOption; import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObjectCollection; +import kd.bos.entity.operate.interaction.InteractionContext; import kd.bos.entity.operate.result.IOperateInfo; import kd.bos.entity.operate.result.OperationResult; import kd.bos.openapi.common.custom.annotation.ApiController; @@ -572,6 +573,10 @@ public class WMSAdjustBillController { for (IOperateInfo iOperateInfo : allErrorOrValidateInfo) { errormsg = errormsg.append(";").append(iOperateInfo.getMessage()); } + InteractionContext interactionContext = operationResult.getInteractionContext(); + if (null!=interactionContext){ + errormsg=errormsg.append(";").append(interactionContext.getSimpleMessage()); + } response.setMessage(errormsg.substring(1)); response.setCode("-1"); response.setFlag("failure"); @@ -584,6 +589,10 @@ public class WMSAdjustBillController { for (IOperateInfo iOperateInfo : allErrorOrValidateInfo) { errormsg = errormsg.append(";").append(iOperateInfo.getMessage()); } + InteractionContext interactionContext = operationResult.getInteractionContext(); + if (null!=interactionContext){ + errormsg=errormsg.append(";").append(interactionContext.getSimpleMessage()); + } response.setMessage(errormsg.substring(1)); response.setCode("-1"); response.setFlag("failure"); @@ -596,6 +605,10 @@ public class WMSAdjustBillController { for (IOperateInfo iOperateInfo : allErrorOrValidateInfo) { errormsg = errormsg.append(";").append(iOperateInfo.getMessage()); } + InteractionContext interactionContext = operationResult.getInteractionContext(); + if (null!=interactionContext){ + errormsg=errormsg.append(";").append(interactionContext.getSimpleMessage()); + } response.setMessage(errormsg.substring(1)); response.setCode("-1"); response.setFlag("failure");