fix:更新空木箱重量会校验重量是否为0

This commit is contained in:
zhouz
2026-04-08 13:54:18 +08:00
parent 7b3cff7acd
commit 6ce909fb21

View File

@@ -3314,7 +3314,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (boxinfo == null) {
throw new BadRequestException("未查询到该木箱对应的木箱信息");
}
boxinfo.setBox_weight(weight);
if(ObjectUtil.isEmpty(boxinfo.getBox_weight()) || Double.parseDouble(boxinfo.getBox_weight()) == 0){
boxinfo.setBox_weight(weight);
}else {
log.info("当前木箱已有重量【"+boxinfo.getBox_weight()+"】,上传重量为【"+weight+"");
}
bstIvtBoxinfoMapper.updateById(boxinfo);
JSONObject result = new JSONObject();