注掉必填判断

This commit is contained in:
xiaofajia 2024-11-20 21:06:16 +08:00
parent 545cf7eea9
commit 977fb20920

View File

@ -116,14 +116,14 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
@Override @Override
public void createRepairSo(DlRepairSoRespVO repairSoRespVO) { public void createRepairSo(DlRepairSoRespVO repairSoRespVO) {
repairSoRespVO.setSoTime(new Date()); repairSoRespVO.setSoTime(new Date());
// 加个判断可能出现没有设置价格的情况 // 加个判断可能出现没有设置价格的情况----需求说了非必填注掉
if (repairSoRespVO.getGoodsList() != null){ // if (repairSoRespVO.getGoodsList() != null){
repairSoRespVO.getGoodsList().forEach(item -> { // repairSoRespVO.getGoodsList().forEach(item -> {
if (item.getGoodsPrice() == null){ // if (item.getGoodsPrice() == null){
throw exception0(500, "有配件未设置进价"); // throw exception0(500, "有配件未设置进价");
} // }
}); // });
} // }
//保存供应商 //保存供应商
if (StringUtils.isEmpty(repairSoRespVO.getSupplierId())){ if (StringUtils.isEmpty(repairSoRespVO.getSupplierId())){
//采购单中录入供应商或无供应商情况 //采购单中录入供应商或无供应商情况