|
@@ -68,11 +68,11 @@ public class ListenerMaterialApply implements TaskListener, ExecutionListener {
|
|
|
queryWrapper.eq("unit",unit);
|
|
|
Material material = materialMapper.selectOne(queryWrapper);
|
|
|
if(material==null){
|
|
|
- throw new Exception("物料名称为"+materialName+";规格型号为"+unit+"的物料不存在");
|
|
|
+ throw new Exception("物料名称为"+materialName+";计量单位为"+unit+"的物料不存在");
|
|
|
}
|
|
|
BigDecimal quantity = material.getQuantity();
|
|
|
if(quantity.compareTo(amount)==-1){
|
|
|
- throw new Exception("物料名称为"+materialName+";规格型号为"+unit+"的物料库存数量小于申请数量!");
|
|
|
+ throw new Exception("物料名称为"+materialName+";计量单位为"+unit+"的物料库存数量小于申请数量!");
|
|
|
}
|
|
|
material.setQuantity(material.getQuantity().subtract(amount));
|
|
|
materialMapper.updateById(material);
|