fix: 反馈重量校验为空才可更新
This commit is contained in:
@@ -2468,6 +2468,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject res = new JSONObject();
|
||||
String subVolume = param.getString("sub_volume");
|
||||
String weight = param.getString("weight1");
|
||||
PdmBiSlittingproductionplan containerName = slittingproductionplanService.getByContainerName(subVolume);
|
||||
if (ObjectUtil.isEmpty(containerName)) {
|
||||
throw new BadRequestException("子卷号[" + subVolume + "]对应的分切计划不存在!");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(containerName.getWeight())) {
|
||||
throw new BadRequestException("子卷号[" + subVolume + "]不允许重复更新重量!");
|
||||
}
|
||||
LambdaUpdateWrapper<PdmBiSlittingproductionplan> updateWrapper = new UpdateWrapper<PdmBiSlittingproductionplan>().lambda();
|
||||
updateWrapper.set(PdmBiSlittingproductionplan::getWeight, NumberUtil.round(weight, 2).toString())
|
||||
.eq(PdmBiSlittingproductionplan::getContainer_name, subVolume);
|
||||
|
||||
Reference in New Issue
Block a user