提交 6d02b986 作者: luyincheng

辅材审批数量校验

父级 a0e3dd08
...@@ -231,6 +231,15 @@ public class TauxiliarymaterialsController { ...@@ -231,6 +231,15 @@ public class TauxiliarymaterialsController {
}else{ }else{
ta.setId(exist.getId()); ta.setId(exist.getId());
} }
if(StringUtils.isEmpty(exist.getApplyQuantity())){
exist.setApplyQuantity("0");
}
if(StringUtils.isEmpty(ta.getApprovedQuantity())){
ta.setApprovedQuantity("0");
}
if(Float.parseFloat(exist.getApplyQuantity())<Float.parseFloat(ta.getApprovedQuantity())){
throw new ServiceException(400,"批准数量不能大于申请数量");
}
return ta; return ta;
}) })
.filter(ta->{ .filter(ta->{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论