Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
00ef43d235
|
|
@ -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;
|
||||
|
|
@ -428,7 +429,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 +471,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{
|
||||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue